mirror of
https://github.com/octopusYan/alist-gui.git
synced 2024-11-23 20:46:42 +08:00
Compare commits
2 Commits
17d21fdc03
...
96274f6952
Author | SHA1 | Date | |
---|---|---|---|
96274f6952 | |||
b468b9774d |
@ -20,7 +20,7 @@
|
||||
|
||||
### 截图
|
||||
|
||||
<details>
|
||||
<details open>
|
||||
<summary> 主界面 </summary>
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/909ac6ad-0021-47d7-a75c-7fb6505e8c15">
|
||||
@ -28,7 +28,7 @@
|
||||
</picture>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<details open>
|
||||
<summary> 管理员信息 </summary>
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/840dca69-e67d-4083-88f8-8e67c3e47141">
|
||||
@ -36,7 +36,7 @@
|
||||
</picture>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<details open>
|
||||
<summary> 设置 </summary>
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/8fc8c489-b9cd-4e34-ad32-4899ccc275e9">
|
||||
@ -44,7 +44,7 @@
|
||||
</picture>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<details open>
|
||||
<summary> 关于 </summary>
|
||||
<picture>
|
||||
<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));
|
||||
proxyTestUrl.addListener((_, _, newValue) -> ConfigManager.proxyTestUrl(newValue));
|
||||
proxyHost.addListener((_, _, newValue) -> ConfigManager.proxyHost(newValue));
|
||||
proxyPort.addListener((_, _, newValue) -> ConfigManager.proxyPort(newValue));
|
||||
language.addListener((_, _, newValue) -> Context.setLanguage(newValue));
|
||||
proxyHost.addListener((_, _, newValue) -> {
|
||||
ConfigManager.proxyHost(newValue);
|
||||
setProxy();
|
||||
});
|
||||
proxyPort.addListener((_, _, newValue) -> {
|
||||
ConfigManager.proxyPort(newValue);
|
||||
setProxy();
|
||||
});
|
||||
}
|
||||
|
||||
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) {
|
||||
var task = new ProxyCheckTask(checkUrl);
|
||||
task.onListen(new TaskListener(task) {
|
||||
|
Loading…
Reference in New Issue
Block a user