mirror of
https://github.com/octopusYan/alist-gui.git
synced 2025-12-09 17:51:55 +08:00
chore: 调整
This commit is contained in:
@ -97,7 +97,7 @@ public class Application extends javafx.application.Application {
|
||||
|
||||
private void showErrorDialog(Thread t, Throwable e) {
|
||||
logger.error("", e);
|
||||
AlertUtil.exception(new Exception(e)).show();
|
||||
Platform.runLater(() -> AlertUtil.exception(new Exception(e)).show());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -189,12 +189,16 @@ public class ConfigManager {
|
||||
}
|
||||
|
||||
public static void checkProxy(BiConsumer<Boolean, String> consumer) {
|
||||
if (ProxySetup.SYSTEM.equals(proxySetup())) {
|
||||
consumer.accept(true, "");
|
||||
return;
|
||||
}
|
||||
if (!hasProxy()) return;
|
||||
|
||||
ThreadPoolManager.getInstance().execute(() -> {
|
||||
try {
|
||||
InetSocketAddress address = NetUtil.createAddress(proxyHost(), getProxyPort());
|
||||
if (NetUtil.isOpen(address, 5000)) {
|
||||
if (NetUtil.isOpen(address, 1000)) {
|
||||
Platform.runLater(() -> consumer.accept(true, "success"));
|
||||
} else {
|
||||
Platform.runLater(() -> consumer.accept(false, "connection timed out"));
|
||||
|
||||
@ -129,7 +129,7 @@ public class ConsoleLog {
|
||||
String regex = STR.".*(\{AListManager.scheme()}|\{URL_IP_REX}).*";
|
||||
if (ReUtil.isMatch(regex, message)) {
|
||||
String text = ReUtil.get(regex, message, 1);
|
||||
String url = text.startsWith("http") ? STR."http://\{text}" : text;
|
||||
String url = text.startsWith("http") ? text : STR."http://\{text}";
|
||||
url = url.replace("0.0.0.0", "127.0.0.1");
|
||||
message = message.replace(text, STR."[url=\{url}]\{text}[/url]");
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ public class SetupViewModel extends BaseViewModel {
|
||||
ConfigManager.checkProxy((success, msg) -> {
|
||||
if (!success) {
|
||||
final var tmp = Context.getLanguageBinding("proxy.test.result.failed").getValue();
|
||||
AlertUtil.error(STR."\{tmp}:\{msg}").show();
|
||||
AlertUtil.error(STR."\{tmp}\{msg}").show();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -23,18 +23,16 @@
|
||||
}
|
||||
|
||||
#startButton {
|
||||
-color-button-bg-hover: -color-button-bg;
|
||||
-color-button-bg-focused: -color-button-bg;
|
||||
-fx-border-color: -color-button-bg;
|
||||
-fx-border-color-hover: -color-button-bg;
|
||||
}
|
||||
|
||||
#passwordButton {
|
||||
-color-button-bg: -color-success-3;
|
||||
-color-button-bg-hover: -color-button-bg;
|
||||
-color-button-bg-focused: -color-success-3;
|
||||
-color-button-bg-focused: -color-button-bg;
|
||||
-color-button-bg-pressed: -color-button-bg;
|
||||
-fx-border-color: -color-success-3;
|
||||
-fx-border-color: -color-button-bg;
|
||||
}
|
||||
|
||||
#restartButton {
|
||||
|
||||
Reference in New Issue
Block a user