让用户选择更新源,并同步在线更新历史
设置里可以在 YanJiu Git 和 GitHub 之间选择,默认是 YanJiu Git。选中的源连不上时改用另一个,结果会写明实际用的是哪一个。更新历史从所选源读取已发布版本并在本机缓存。表单里被省略号截断的提示可以点开。 Co-authored-by: yanjiu0721 <yanjiu0721@users.noreply.github.com>
This commit is contained in:
1 parent
b8cc446454
commit
2e77fcc376
14 files changed
+1771
-68
No files matched your search
@@ -120,6 +120,7 @@ class SessionConfig {
|
||||
this.allowIPv4 = true,
|
||||
this.allowIPv6 = true,
|
||||
this.autoUpdate = true,
|
||||
this.updateSource = 'gitea',
|
||||
this.httpVersion = 'auto',
|
||||
this.httpResolve = '',
|
||||
this.httpMethod = 'GET',
|
||||
@@ -163,6 +164,9 @@ class SessionConfig {
|
||||
final bool allowIPv4;
|
||||
final bool allowIPv6;
|
||||
final bool autoUpdate;
|
||||
|
||||
/// `gitea` (YanJiu Git, the default) or `github`.
|
||||
final String updateSource;
|
||||
final String httpVersion;
|
||||
final String httpResolve;
|
||||
final String httpMethod;
|
||||
@@ -306,6 +310,7 @@ class SessionConfig {
|
||||
'allowIPv4': allowIPv4,
|
||||
'allowIPv6': allowIPv6,
|
||||
'autoUpdate': autoUpdate,
|
||||
'updateSource': updateSource == 'github' ? 'github' : 'gitea',
|
||||
'httpVersion': httpVersion,
|
||||
'httpResolve': httpResolve,
|
||||
'httpMethod': httpMethod,
|
||||
@@ -352,6 +357,7 @@ class SessionConfig {
|
||||
autoUpdate: json['autoUpdate'] is bool
|
||||
? json['autoUpdate'] as bool
|
||||
: true,
|
||||
updateSource: json['updateSource'] == 'github' ? 'github' : 'gitea',
|
||||
httpVersion: json['httpVersion'] is String
|
||||
? json['httpVersion'] as String
|
||||
: 'auto',
|
||||
|
||||
Reference in new issue
Block a user