mirror of
https://github.com/octopusYan/alist-gui.git
synced 2024-11-10 06:26:43 +08:00
chore: 调整
This commit is contained in:
parent
08f0473814
commit
9c75f9bf3a
8
pom.xml
8
pom.xml
@ -101,12 +101,14 @@
|
|||||||
<version>${hutool.version}</version>
|
<version>${hutool.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- lombok -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<version>${lombok.version}</version>
|
<version>${lombok.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- jackson -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||||
<artifactId>jackson-dataformat-yaml</artifactId>
|
<artifactId>jackson-dataformat-yaml</artifactId>
|
||||||
@ -253,7 +255,11 @@
|
|||||||
<generateInstaller>false</generateInstaller>
|
<generateInstaller>false</generateInstaller>
|
||||||
<copyDependencies>true</copyDependencies>
|
<copyDependencies>true</copyDependencies>
|
||||||
<assetsDir>${project.basedir}/src/main/resources/assets</assetsDir>
|
<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>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
|
@ -97,7 +97,7 @@ public class Application extends javafx.application.Application {
|
|||||||
|
|
||||||
private void showErrorDialog(Thread t, Throwable e) {
|
private void showErrorDialog(Thread t, Throwable e) {
|
||||||
logger.error("", e);
|
logger.error("", e);
|
||||||
AlertUtil.exception(new Exception(e)).show();
|
Platform.runLater(() -> AlertUtil.exception(new Exception(e)).show());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -189,12 +189,16 @@ public class ConfigManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void checkProxy(BiConsumer<Boolean, String> consumer) {
|
public static void checkProxy(BiConsumer<Boolean, String> consumer) {
|
||||||
|
if (ProxySetup.SYSTEM.equals(proxySetup())) {
|
||||||
|
consumer.accept(true, "");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!hasProxy()) return;
|
if (!hasProxy()) return;
|
||||||
|
|
||||||
ThreadPoolManager.getInstance().execute(() -> {
|
ThreadPoolManager.getInstance().execute(() -> {
|
||||||
try {
|
try {
|
||||||
InetSocketAddress address = NetUtil.createAddress(proxyHost(), getProxyPort());
|
InetSocketAddress address = NetUtil.createAddress(proxyHost(), getProxyPort());
|
||||||
if (NetUtil.isOpen(address, 5000)) {
|
if (NetUtil.isOpen(address, 1000)) {
|
||||||
Platform.runLater(() -> consumer.accept(true, "success"));
|
Platform.runLater(() -> consumer.accept(true, "success"));
|
||||||
} else {
|
} else {
|
||||||
Platform.runLater(() -> consumer.accept(false, "connection timed out"));
|
Platform.runLater(() -> consumer.accept(false, "connection timed out"));
|
||||||
|
@ -129,7 +129,7 @@ public class ConsoleLog {
|
|||||||
String regex = STR.".*(\{AListManager.scheme()}|\{URL_IP_REX}).*";
|
String regex = STR.".*(\{AListManager.scheme()}|\{URL_IP_REX}).*";
|
||||||
if (ReUtil.isMatch(regex, message)) {
|
if (ReUtil.isMatch(regex, message)) {
|
||||||
String text = ReUtil.get(regex, message, 1);
|
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");
|
url = url.replace("0.0.0.0", "127.0.0.1");
|
||||||
message = message.replace(text, STR."[url=\{url}]\{text}[/url]");
|
message = message.replace(text, STR."[url=\{url}]\{text}[/url]");
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ public class SetupViewModel extends BaseViewModel {
|
|||||||
ConfigManager.checkProxy((success, msg) -> {
|
ConfigManager.checkProxy((success, msg) -> {
|
||||||
if (!success) {
|
if (!success) {
|
||||||
final var tmp = Context.getLanguageBinding("proxy.test.result.failed").getValue();
|
final var tmp = Context.getLanguageBinding("proxy.test.result.failed").getValue();
|
||||||
AlertUtil.error(STR."\{tmp}:\{msg}").show();
|
AlertUtil.error(STR."\{tmp}\{msg}").show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,18 +23,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#startButton {
|
#startButton {
|
||||||
-color-button-bg-hover: -color-button-bg;
|
|
||||||
-color-button-bg-focused: -color-button-bg;
|
-color-button-bg-focused: -color-button-bg;
|
||||||
-fx-border-color: -color-button-bg;
|
-fx-border-color: -color-button-bg;
|
||||||
-fx-border-color-hover: -color-button-bg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#passwordButton {
|
#passwordButton {
|
||||||
-color-button-bg: -color-success-3;
|
-color-button-bg: -color-success-3;
|
||||||
-color-button-bg-hover: -color-button-bg;
|
-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;
|
-color-button-bg-pressed: -color-button-bg;
|
||||||
-fx-border-color: -color-success-3;
|
-fx-border-color: -color-button-bg;
|
||||||
}
|
}
|
||||||
|
|
||||||
#restartButton {
|
#restartButton {
|
||||||
|
Loading…
Reference in New Issue
Block a user