chore: 调整

This commit is contained in:
octopus_yan 2024-09-17 02:40:32 +08:00
parent 08f0473814
commit 9c75f9bf3a
6 changed files with 17 additions and 9 deletions

View File

@ -101,12 +101,14 @@
<version>${hutool.version}</version>
</dependency>
<!-- lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
<!-- jackson -->
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
@ -253,7 +255,11 @@
<generateInstaller>false</generateInstaller>
<copyDependencies>true</copyDependencies>
<assetsDir>${project.basedir}/src/main/resources/assets</assetsDir>
<vmArgs>--enable-preview</vmArgs>
<vmArgs>
<arg>--enable-preview</arg>
<arg>-Xmx100m</arg>
<!-- <arg>-Djava.awt.headless=false</arg>-->
</vmArgs>
</configuration>
<executions>
<execution>

View File

@ -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

View File

@ -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"));

View File

@ -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]");
}

View File

@ -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;
}

View File

@ -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 {