forked from j62/ctbrec
Add buttons to settings panel to delete cookies per site
This commit is contained in:
parent
f786892d56
commit
b1632cde93
|
@ -73,26 +73,20 @@ public class AmateurTvConfigUI extends AbstractConfigUI {
|
||||||
GridPane.setColumnSpan(password, 2);
|
GridPane.setColumnSpan(password, 2);
|
||||||
layout.add(password, 1, row++);
|
layout.add(password, 1, row++);
|
||||||
|
|
||||||
// layout.add(new Label("Bongacams Base URL"), 0, row);
|
|
||||||
// var baseUrl = new TextField();
|
|
||||||
// baseUrl.setText(Config.getInstance().getSettings().bongacamsBaseUrl);
|
|
||||||
// baseUrl.textProperty().addListener((ob, o, n) -> {
|
|
||||||
// Config.getInstance().getSettings().bongacamsBaseUrl = baseUrl.getText();
|
|
||||||
// save();
|
|
||||||
// });
|
|
||||||
// GridPane.setFillWidth(baseUrl, true);
|
|
||||||
// GridPane.setHgrow(baseUrl, Priority.ALWAYS);
|
|
||||||
// GridPane.setColumnSpan(baseUrl, 2);
|
|
||||||
// layout.add(baseUrl, 1, row++);
|
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(site.getAffiliateLink()));
|
createAccount.setOnAction(e -> DesktopIntegration.open(site.getAffiliateLink()));
|
||||||
layout.add(createAccount, 1, row);
|
layout.add(createAccount, 1, row++);
|
||||||
GridPane.setColumnSpan(createAccount, 2);
|
GridPane.setColumnSpan(createAccount, 2);
|
||||||
|
|
||||||
|
var deleteCookies = new Button("Delete Cookies");
|
||||||
|
deleteCookies.setOnAction(e -> site.getHttpClient().clearCookies());
|
||||||
|
layout.add(deleteCookies, 1, row);
|
||||||
|
GridPane.setColumnSpan(deleteCookies, 2);
|
||||||
|
|
||||||
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
// GridPane.setMargin(baseUrl, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
|
||||||
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,12 +87,19 @@ public class BongaCamsConfigUI extends AbstractConfigUI {
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(bongaCams.getAffiliateLink()));
|
createAccount.setOnAction(e -> DesktopIntegration.open(bongaCams.getAffiliateLink()));
|
||||||
layout.add(createAccount, 1, row);
|
layout.add(createAccount, 1, row++);
|
||||||
GridPane.setColumnSpan(createAccount, 2);
|
GridPane.setColumnSpan(createAccount, 2);
|
||||||
|
|
||||||
|
var deleteCookies = new Button("Delete Cookies");
|
||||||
|
deleteCookies.setOnAction(e -> bongaCams.getHttpClient().clearCookies());
|
||||||
|
layout.add(deleteCookies, 1, row);
|
||||||
|
GridPane.setColumnSpan(deleteCookies, 2);
|
||||||
|
|
||||||
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(baseUrl, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(baseUrl, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class BongaCamsTabProvider implements TabProvider {
|
||||||
|
|
||||||
// friends
|
// friends
|
||||||
url = BongaCams.baseUrl + "/tools/listing_v3.php?livetab=friends&online_only=true&offset=";
|
url = BongaCams.baseUrl + "/tools/listing_v3.php?livetab=friends&online_only=true&offset=";
|
||||||
updateService = new BongaCamsUpdateService(bongaCams, url);
|
updateService = new BongaCamsUpdateService(bongaCams, url, true);
|
||||||
friendsTab = new BongaCamsFriendsTab("Friends", updateService, bongaCams);
|
friendsTab = new BongaCamsFriendsTab("Friends", updateService, bongaCams);
|
||||||
friendsTab.setRecorder(recorder);
|
friendsTab.setRecorder(recorder);
|
||||||
tabs.add(friendsTab);
|
tabs.add(friendsTab);
|
||||||
|
|
|
@ -16,6 +16,7 @@ import ctbrec.Config;
|
||||||
import ctbrec.Model;
|
import ctbrec.Model;
|
||||||
import ctbrec.sites.bonga.BongaCams;
|
import ctbrec.sites.bonga.BongaCams;
|
||||||
import ctbrec.sites.bonga.BongaCamsModel;
|
import ctbrec.sites.bonga.BongaCamsModel;
|
||||||
|
import ctbrec.ui.SiteUiFactory;
|
||||||
import ctbrec.ui.tabs.PaginatedScheduledService;
|
import ctbrec.ui.tabs.PaginatedScheduledService;
|
||||||
import javafx.concurrent.Task;
|
import javafx.concurrent.Task;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
|
@ -26,10 +27,16 @@ public class BongaCamsUpdateService extends PaginatedScheduledService {
|
||||||
|
|
||||||
private BongaCams bongaCams;
|
private BongaCams bongaCams;
|
||||||
private String url;
|
private String url;
|
||||||
|
private boolean requiresLogin;
|
||||||
|
|
||||||
public BongaCamsUpdateService(BongaCams bongaCams, String url) {
|
public BongaCamsUpdateService(BongaCams bongaCams, String url) {
|
||||||
|
this(bongaCams, url, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public BongaCamsUpdateService(BongaCams bongaCams, String url, boolean requiresLogin) {
|
||||||
this.bongaCams = bongaCams;
|
this.bongaCams = bongaCams;
|
||||||
this.url = url;
|
this.url = url;
|
||||||
|
this.requiresLogin = requiresLogin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -37,6 +44,9 @@ public class BongaCamsUpdateService extends PaginatedScheduledService {
|
||||||
return new Task<List<Model>>() {
|
return new Task<List<Model>>() {
|
||||||
@Override
|
@Override
|
||||||
public List<Model> call() throws IOException {
|
public List<Model> call() throws IOException {
|
||||||
|
if (requiresLogin) {
|
||||||
|
SiteUiFactory.getUi(bongaCams).login();
|
||||||
|
}
|
||||||
return loadModelList();
|
return loadModelList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,11 +74,18 @@ public class Cam4ConfigUI extends AbstractConfigUI {
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(Cam4.AFFILIATE_LINK));
|
createAccount.setOnAction(e -> DesktopIntegration.open(Cam4.AFFILIATE_LINK));
|
||||||
layout.add(createAccount, 1, row);
|
layout.add(createAccount, 1, row++);
|
||||||
GridPane.setColumnSpan(createAccount, 2);
|
GridPane.setColumnSpan(createAccount, 2);
|
||||||
|
|
||||||
|
var deleteCookies = new Button("Delete Cookies");
|
||||||
|
deleteCookies.setOnAction(e -> cam4.getHttpClient().clearCookies());
|
||||||
|
layout.add(deleteCookies, 1, row);
|
||||||
|
GridPane.setColumnSpan(deleteCookies, 2);
|
||||||
|
|
||||||
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,11 +74,18 @@ public class CamsodaConfigUI extends AbstractConfigUI {
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(camsoda.getAffiliateLink()));
|
createAccount.setOnAction(e -> DesktopIntegration.open(camsoda.getAffiliateLink()));
|
||||||
layout.add(createAccount, 1, row);
|
layout.add(createAccount, 1, row++);
|
||||||
GridPane.setColumnSpan(createAccount, 2);
|
GridPane.setColumnSpan(createAccount, 2);
|
||||||
|
|
||||||
|
var deleteCookies = new Button("Delete Cookies");
|
||||||
|
deleteCookies.setOnAction(e -> camsoda.getHttpClient().clearCookies());
|
||||||
|
layout.add(deleteCookies, 1, row);
|
||||||
|
GridPane.setColumnSpan(deleteCookies, 2);
|
||||||
|
|
||||||
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,13 +106,20 @@ public class ChaturbateConfigUi extends AbstractConfigUI {
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(Chaturbate.REGISTRATION_LINK));
|
createAccount.setOnAction(e -> DesktopIntegration.open(Chaturbate.REGISTRATION_LINK));
|
||||||
layout.add(createAccount, 1, row);
|
layout.add(createAccount, 1, row++);
|
||||||
GridPane.setColumnSpan(createAccount, 2);
|
GridPane.setColumnSpan(createAccount, 2);
|
||||||
|
|
||||||
|
var deleteCookies = new Button("Delete Cookies");
|
||||||
|
deleteCookies.setOnAction(e -> chaturbate.getHttpClient().clearCookies());
|
||||||
|
layout.add(deleteCookies, 1, row);
|
||||||
|
GridPane.setColumnSpan(deleteCookies, 2);
|
||||||
|
|
||||||
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(baseUrl, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(baseUrl, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(requestThrottle, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(requestThrottle, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
|
|
||||||
username.setPrefWidth(300);
|
username.setPrefWidth(300);
|
||||||
|
|
||||||
|
|
|
@ -74,11 +74,18 @@ public class Fc2LiveConfigUI extends AbstractConfigUI {
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(fc2live.getAffiliateLink()));
|
createAccount.setOnAction(e -> DesktopIntegration.open(fc2live.getAffiliateLink()));
|
||||||
layout.add(createAccount, 1, row);
|
layout.add(createAccount, 1, row++);
|
||||||
GridPane.setColumnSpan(createAccount, 2);
|
GridPane.setColumnSpan(createAccount, 2);
|
||||||
|
|
||||||
|
var deleteCookies = new Button("Delete Cookies");
|
||||||
|
deleteCookies.setOnAction(e -> fc2live.getHttpClient().clearCookies());
|
||||||
|
layout.add(deleteCookies, 1, row);
|
||||||
|
GridPane.setColumnSpan(deleteCookies, 2);
|
||||||
|
|
||||||
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,11 +74,18 @@ public class Flirt4FreeConfigUI extends AbstractConfigUI {
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(flirt4free.getAffiliateLink()));
|
createAccount.setOnAction(e -> DesktopIntegration.open(flirt4free.getAffiliateLink()));
|
||||||
layout.add(createAccount, 1, row);
|
layout.add(createAccount, 1, row++);
|
||||||
GridPane.setColumnSpan(createAccount, 2);
|
GridPane.setColumnSpan(createAccount, 2);
|
||||||
|
|
||||||
|
var deleteCookies = new Button("Delete Cookies");
|
||||||
|
deleteCookies.setOnAction(e -> flirt4free.getHttpClient().clearCookies());
|
||||||
|
layout.add(deleteCookies, 1, row);
|
||||||
|
GridPane.setColumnSpan(deleteCookies, 2);
|
||||||
|
|
||||||
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,12 +86,19 @@ public class LiveJasminConfigUi extends AbstractConfigUI {
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(liveJasmin.getAffiliateLink()));
|
createAccount.setOnAction(e -> DesktopIntegration.open(liveJasmin.getAffiliateLink()));
|
||||||
layout.add(createAccount, 1, row);
|
layout.add(createAccount, 1, row++);
|
||||||
GridPane.setColumnSpan(createAccount, 2);
|
GridPane.setColumnSpan(createAccount, 2);
|
||||||
|
|
||||||
|
var deleteCookies = new Button("Delete Cookies");
|
||||||
|
deleteCookies.setOnAction(e -> liveJasmin.getHttpClient().clearCookies());
|
||||||
|
layout.add(deleteCookies, 1, row);
|
||||||
|
GridPane.setColumnSpan(deleteCookies, 2);
|
||||||
|
|
||||||
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(baseUrl, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(baseUrl, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
|
|
||||||
username.setPrefWidth(300);
|
username.setPrefWidth(300);
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ import ctbrec.ui.settings.SettingsTab;
|
||||||
import ctbrec.ui.sites.AbstractConfigUI;
|
import ctbrec.ui.sites.AbstractConfigUI;
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
import javafx.scene.control.CheckBox;
|
import javafx.scene.control.CheckBox;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
|
@ -35,8 +36,15 @@ public class MVLiveConfigUi extends AbstractConfigUI {
|
||||||
}
|
}
|
||||||
save();
|
save();
|
||||||
});
|
});
|
||||||
|
layout.add(enabled, 1, row++);
|
||||||
|
|
||||||
|
var deleteCookies = new Button("Delete Cookies");
|
||||||
|
deleteCookies.setOnAction(e -> site.getHttpClient().clearCookies());
|
||||||
|
layout.add(deleteCookies, 1, row);
|
||||||
|
GridPane.setColumnSpan(deleteCookies, 2);
|
||||||
|
|
||||||
GridPane.setMargin(enabled, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(enabled, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
layout.add(enabled, 1, row);
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,10 +79,6 @@ public class MyFreeCamsConfigUI extends AbstractConfigUI {
|
||||||
layout.add(l, 0, row);
|
layout.add(l, 0, row);
|
||||||
layout.add(password, 1, row++);
|
layout.add(password, 1, row++);
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(myFreeCams.getAffiliateLink()));
|
|
||||||
layout.add(createAccount, 1, row++);
|
|
||||||
|
|
||||||
var baseUrl = new TextField();
|
var baseUrl = new TextField();
|
||||||
baseUrl.setText(Config.getInstance().getSettings().mfcBaseUrl);
|
baseUrl.setText(Config.getInstance().getSettings().mfcBaseUrl);
|
||||||
baseUrl.textProperty().addListener((ob, o, n) -> {
|
baseUrl.textProperty().addListener((ob, o, n) -> {
|
||||||
|
@ -95,13 +91,23 @@ public class MyFreeCamsConfigUI extends AbstractConfigUI {
|
||||||
l = new Label("MyFreeCams Base URL");
|
l = new Label("MyFreeCams Base URL");
|
||||||
l.labelForProperty().set(baseUrl);
|
l.labelForProperty().set(baseUrl);
|
||||||
layout.add(l, 0, row);
|
layout.add(l, 0, row);
|
||||||
layout.add(baseUrl, 1, row);
|
layout.add(baseUrl, 1, row++);
|
||||||
|
|
||||||
|
var createAccount = new Button("Create new Account");
|
||||||
|
createAccount.setOnAction(e -> DesktopIntegration.open(myFreeCams.getAffiliateLink()));
|
||||||
|
layout.add(createAccount, 1, row++);
|
||||||
GridPane.setColumnSpan(createAccount, 2);
|
GridPane.setColumnSpan(createAccount, 2);
|
||||||
|
|
||||||
|
var deleteCookies = new Button("Delete Cookies");
|
||||||
|
deleteCookies.setOnAction(e -> myFreeCams.getHttpClient().clearCookies());
|
||||||
|
layout.add(deleteCookies, 1, row);
|
||||||
|
GridPane.setColumnSpan(deleteCookies, 2);
|
||||||
|
|
||||||
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(baseUrl, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(baseUrl, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
|
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,11 +74,18 @@ public class ShowupConfigUI extends AbstractConfigUI {
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(site.getAffiliateLink()));
|
createAccount.setOnAction(e -> DesktopIntegration.open(site.getAffiliateLink()));
|
||||||
layout.add(createAccount, 1, row);
|
layout.add(createAccount, 1, row++);
|
||||||
GridPane.setColumnSpan(createAccount, 2);
|
GridPane.setColumnSpan(createAccount, 2);
|
||||||
|
|
||||||
|
var deleteCookies = new Button("Delete Cookies");
|
||||||
|
deleteCookies.setOnAction(e -> site.getHttpClient().clearCookies());
|
||||||
|
layout.add(deleteCookies, 1, row);
|
||||||
|
GridPane.setColumnSpan(deleteCookies, 2);
|
||||||
|
|
||||||
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,11 +74,18 @@ public class StreamateConfigUI extends AbstractConfigUI {
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(streamate.getAffiliateLink()));
|
createAccount.setOnAction(e -> DesktopIntegration.open(streamate.getAffiliateLink()));
|
||||||
layout.add(createAccount, 1, row);
|
layout.add(createAccount, 1, row++);
|
||||||
GridPane.setColumnSpan(createAccount, 2);
|
GridPane.setColumnSpan(createAccount, 2);
|
||||||
|
|
||||||
|
var deleteCookies = new Button("Delete Cookies");
|
||||||
|
deleteCookies.setOnAction(e -> streamate.getHttpClient().clearCookies());
|
||||||
|
layout.add(deleteCookies, 1, row);
|
||||||
|
GridPane.setColumnSpan(deleteCookies, 2);
|
||||||
|
|
||||||
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,11 +97,18 @@ public class StripchatConfigUI extends AbstractConfigUI {
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(stripchat.getAffiliateLink()));
|
createAccount.setOnAction(e -> DesktopIntegration.open(stripchat.getAffiliateLink()));
|
||||||
layout.add(createAccount, 1, row);
|
layout.add(createAccount, 1, row++);
|
||||||
GridPane.setColumnSpan(createAccount, 2);
|
GridPane.setColumnSpan(createAccount, 2);
|
||||||
|
|
||||||
|
var deleteCookies = new Button("Delete Cookies");
|
||||||
|
deleteCookies.setOnAction(e -> stripchat.getHttpClient().clearCookies());
|
||||||
|
layout.add(deleteCookies, 1, row);
|
||||||
|
GridPane.setColumnSpan(deleteCookies, 2);
|
||||||
|
|
||||||
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,11 +74,18 @@ public class XloveCamConfigUI extends AbstractConfigUI {
|
||||||
|
|
||||||
var createAccount = new Button("Create new Account");
|
var createAccount = new Button("Create new Account");
|
||||||
createAccount.setOnAction(e -> DesktopIntegration.open(site.getAffiliateLink()));
|
createAccount.setOnAction(e -> DesktopIntegration.open(site.getAffiliateLink()));
|
||||||
layout.add(createAccount, 1, row);
|
layout.add(createAccount, 1, row++);
|
||||||
GridPane.setColumnSpan(createAccount, 2);
|
GridPane.setColumnSpan(createAccount, 2);
|
||||||
|
|
||||||
|
var deleteCookies = new Button("Delete Cookies");
|
||||||
|
deleteCookies.setOnAction(e -> site.getHttpClient().clearCookies());
|
||||||
|
layout.add(deleteCookies, 1, row);
|
||||||
|
GridPane.setColumnSpan(deleteCookies, 2);
|
||||||
|
|
||||||
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(username, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(password, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
GridPane.setMargin(createAccount, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
|
GridPane.setMargin(deleteCookies, new Insets(0, 0, 0, SettingsTab.CHECKBOX_MARGIN));
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -338,4 +338,8 @@ public abstract class HttpClient {
|
||||||
return response.body().string();
|
return response.body().string();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clearCookies() {
|
||||||
|
logout();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue