mirror of
https://github.com/octopusYan/alist-gui.git
synced 2024-11-24 13:06:42 +08:00
Compare commits
2 Commits
17d21fdc03
...
96274f6952
Author | SHA1 | Date | |
---|---|---|---|
96274f6952 | |||
b468b9774d |
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
### 截图
|
### 截图
|
||||||
|
|
||||||
<details>
|
<details open>
|
||||||
<summary> 主界面 </summary>
|
<summary> 主界面 </summary>
|
||||||
<picture>
|
<picture>
|
||||||
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/909ac6ad-0021-47d7-a75c-7fb6505e8c15">
|
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/909ac6ad-0021-47d7-a75c-7fb6505e8c15">
|
||||||
@ -28,7 +28,7 @@
|
|||||||
</picture>
|
</picture>
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details open>
|
||||||
<summary> 管理员信息 </summary>
|
<summary> 管理员信息 </summary>
|
||||||
<picture>
|
<picture>
|
||||||
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/840dca69-e67d-4083-88f8-8e67c3e47141">
|
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/840dca69-e67d-4083-88f8-8e67c3e47141">
|
||||||
@ -36,7 +36,7 @@
|
|||||||
</picture>
|
</picture>
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details open>
|
||||||
<summary> 设置 </summary>
|
<summary> 设置 </summary>
|
||||||
<picture>
|
<picture>
|
||||||
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/8fc8c489-b9cd-4e34-ad32-4899ccc275e9">
|
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/8fc8c489-b9cd-4e34-ad32-4899ccc275e9">
|
||||||
@ -44,7 +44,7 @@
|
|||||||
</picture>
|
</picture>
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details open>
|
||||||
<summary> 关于 </summary>
|
<summary> 关于 </summary>
|
||||||
<picture>
|
<picture>
|
||||||
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/dbef2d66-4ca4-4e89-8292-dbdce3566f93">
|
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/dbef2d66-4ca4-4e89-8292-dbdce3566f93">
|
||||||
|
@ -65,8 +65,14 @@ public class SetupViewModel extends BaseViewModel {
|
|||||||
proxySetup.addListener((_, _, newValue) -> ConfigManager.proxySetup(newValue));
|
proxySetup.addListener((_, _, newValue) -> ConfigManager.proxySetup(newValue));
|
||||||
proxyTestUrl.addListener((_, _, newValue) -> ConfigManager.proxyTestUrl(newValue));
|
proxyTestUrl.addListener((_, _, newValue) -> ConfigManager.proxyTestUrl(newValue));
|
||||||
proxyHost.addListener((_, _, newValue) -> ConfigManager.proxyHost(newValue));
|
proxyHost.addListener((_, _, newValue) -> ConfigManager.proxyHost(newValue));
|
||||||
proxyPort.addListener((_, _, newValue) -> ConfigManager.proxyPort(newValue));
|
proxyHost.addListener((_, _, newValue) -> {
|
||||||
language.addListener((_, _, newValue) -> Context.setLanguage(newValue));
|
ConfigManager.proxyHost(newValue);
|
||||||
|
setProxy();
|
||||||
|
});
|
||||||
|
proxyPort.addListener((_, _, newValue) -> {
|
||||||
|
ConfigManager.proxyPort(newValue);
|
||||||
|
setProxy();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObjectProperty<Theme> themeProperty() {
|
public ObjectProperty<Theme> themeProperty() {
|
||||||
@ -123,6 +129,14 @@ public class SetupViewModel extends BaseViewModel {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setProxy() {
|
||||||
|
ConfigManager.checkProxy((success, _) -> {
|
||||||
|
if (!success) return;
|
||||||
|
|
||||||
|
HttpUtil.getInstance().proxy(ConfigManager.proxySetup(), ConfigManager.getProxyInfo());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private static ProxyCheckTask getProxyCheckTask(String checkUrl) {
|
private static ProxyCheckTask getProxyCheckTask(String checkUrl) {
|
||||||
var task = new ProxyCheckTask(checkUrl);
|
var task = new ProxyCheckTask(checkUrl);
|
||||||
task.onListen(new TaskListener(task) {
|
task.onListen(new TaskListener(task) {
|
||||||
|
Loading…
Reference in New Issue
Block a user