让用户选择更新源,并同步在线更新历史
设置里可以在 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
@@ -50,6 +50,7 @@ void main() {
|
||||
test('github failure falls through to the spare source', () async {
|
||||
final check = await findUpdate(
|
||||
current: '1.1.3',
|
||||
preferred: UpdateSource.github,
|
||||
endpoints: const UpdateEndpoints(
|
||||
github: 'https://github.invalid/latest',
|
||||
gitea: 'https://git.invalid/latest',
|
||||
@@ -68,6 +69,10 @@ void main() {
|
||||
},
|
||||
);
|
||||
expect(check.offer?.version, '1.1.9');
|
||||
expect(check.used, UpdateSource.gitea);
|
||||
expect(check.fellBack, isTrue);
|
||||
expect(check.message, contains('GitHub'));
|
||||
expect(check.message, contains('YanJiu Git'));
|
||||
});
|
||||
|
||||
test('history keeps the newest identical target and can delete or clear', () {
|
||||
|
||||
Reference in new issue
Block a user