diff --git a/config/update.php b/config/update.php index 821877ad..39e6e8e5 100644 --- a/config/update.php +++ b/config/update.php @@ -10,11 +10,23 @@ return array( 'github' => [ - 'name' => 'GitHub', - 'update_url' => 'https://work.prinzeugen.net/update.json', + 'name' => 'GitHub', + 'update_url' => 'https://work.prinzeugen.net/update.json', + 'description' => '从 作者主机 上取更新信息,GitHub Releases 上取更新包。国内主机可能会奇慢无比,请注意。' + ], + 'nyavm' => [ + 'name' => 'NyaVM', + 'update_url' => 'http://anycast.cdn.nyavm.net/', + 'description' => '啦啦啦' + ], + 'little_service' => [ + 'name' => 'LittleService-COS', + 'update_url' => 'http://cos.littleservice.cn/bs/update.json', + 'description' => '由 Little_Qiu 及其 团队 维护的非官方更新源,国内主机使用可能会获得一定的加速 Buff。不建议海外主机的用户使用。' ], 'local' => [ - 'name' => 'LocalHost(开发用)', - 'update_url' => 'http://127.0.0.1/test/update.json' + 'name' => 'LocalHost', + 'update_url' => 'http://127.0.0.1/test/update.json', + 'description' => '开发用,请勿选择(炸了别怪我)' ] ); diff --git a/resources/views/admin/update.tpl b/resources/views/admin/update.tpl index 8cc60f3c..68380518 100644 --- a/resources/views/admin/update.tpl +++ b/resources/views/admin/update.tpl @@ -2,6 +2,13 @@ @section('title', '检查更新') +@section('style') + +@endsection + @section('content') @@ -55,7 +62,7 @@ 下载地址: - @GitHub + @GitHub @@ -92,7 +99,8 @@

注意事项

-

下载更新需要连接 GitHub 服务器,国内主机可能会长时间无响应。

+

请根据你的主机所在位置(国内/国外)选择更新源。

+

如错选至相对于你的主机速度较慢的源,可能会造成检查/下载更新页面长时间无响应。

@@ -102,50 +110,53 @@

更新选项

-
-
-
- +
+ $value) { - if ($key != "option" && $key != "submit") - Option::set($key, $value); - } - echo '
设置已保存。
'; - } ?> - - + foreach ($_POST as $key => $value) { + if ($key != "option" && $key != "submit") + Option::set($key, $value); + } + echo '
设置已保存。
'; + } ?> +
+ - - - - + + + + - - - - - -
检查更新 - -
检查更新 + +
更新源 - -
-
- - -
+ + + 更新源 + + + + @foreach ($updater->getUpdateSources() as $key => $value) +

{!! $value['description'] !!}

+ @endforeach + + + + +
+ + @@ -154,3 +165,12 @@ @endsection + +@section('script') + +@endsection