chore: 发布源与镜像指向自建 Gitea
ci / frontend (push) Failing after 14s
ci / backend (push) Failing after 42s

- selfupdate:Release 改从 gitea.bcde.io/wangdefa/ARTEX 取,API 路径换成
  /api/v1/repos/<repo>/releases/latest;白名单从 GitHub 五个域名收紧到
  gitea.bcde.io;github.go 改名 source.go,文案统一为「发布源」。
- README:clone / Releases 链接与镜像说明改为 Gitea 地址,补充发布源写死说明。
- docker-compose:镜像改为 gitea.bcde.io/wangdefa/artex。
- 前端与 server/update.go:GitHub 文案改为「发布源」。
This commit is contained in:
wangdefa committed 2026-10-20 21:45:44 -07:00
1 parent 2511c2e041
commit cadc8af05d
10 files changed
+57 -57

No files matched your search

@@ -12,9 +12,8 @@ import { api } from "@/lib/api";
* 顶栏的"有新版本"提示:整页加载时查一次,有更新就在版本号旁边亮出来,
* 点击直达系统配置页的「版本与更新」卡片。
*
* 后端对 GitHub 的查询结果有 30 分钟缓存,所以这里每次挂载都查一次是安全的
* ——未认证的 GitHub API 只有 60 次/小时/IP,没有那层缓存的话,多开几个标签页
* 就会把配额耗光,之后真想更新反而查不动。
* 后端对发布源的查询结果有 30 分钟缓存,所以这里每次挂载都查一次是安全的
* ——没有那层缓存的话,多开几个标签页就会重复出网查询,拖慢首屏。
*
* 查询失败一律静默:顶栏不是报错的地方,用户进设置页点「检查更新」会看到原因。
*/
@@ -30,7 +29,7 @@ export function UpdateBadge() {
if (alive && r.has_update && r.latest) setLatest(r.latest.replace(/^v(?=\d)/, ""));
})
.catch(() => {
// 静默:没网 / GitHub 限流都不该在顶栏弹错误。
// 静默:没网 / 发布源不可达都不该在顶栏弹错误。
});
return () => {
alive = false;
@@ -191,7 +191,7 @@ export function UpdateCard() {
<DownloadIcon className="size-4" />
版本与更新
</CardTitle>
<CardDescription>从 GitHub 检查并安装新版本。更新会重启程序,正在运行的任务会被中断。</CardDescription>
<CardDescription>从发布源检查并安装新版本。更新会重启程序,正在运行的任务会被中断。</CardDescription>
</CardHeader>
<CardContent className="space-y-4">
<div className="flex flex-wrap items-center gap-2 text-sm">
@@ -237,7 +237,7 @@ export function UpdateCard() {
{info?.error && (
<p className="flex items-start gap-2 rounded-md border border-destructive/40 bg-destructive/10 p-2 text-xs text-destructive">
<TriangleAlertIcon className="mt-0.5 size-3.5 shrink-0" />
无法连接 GitHub:{info.error}
无法连接发布源:{info.error}
{" "}可在上方配置全局代理后重试。
</p>
)}
+2 -2
View File
@@ -1304,9 +1304,9 @@ export const api = {
get<{ models: ModelTokenStat[] }>(`/llm/records/by-model?task=${encodeURIComponent(task)}`),
// ---- 一键更新 ----
// 检查以后端为准:下载是后端做的,浏览器能连 GitHub 而服务器连不上的情况很常见
// 检查以后端为准:下载是后端做的,浏览器能连发布源而服务器连不上的情况很常见
// (服务器在内网、代理只配在浏览器上),那时点更新必然失败。
// 后端对 GitHub 的查询结果有 30 分钟缓存(未认证的 GitHub API 是 60 次/小时/IP,
// 后端对发布源的查询结果有 30 分钟缓存(避免每次页面加载都出网查询),
// 顶栏每次整页加载都会查一次,不缓存会很快耗光配额)。force=true 强制回源,
// 留给用户显式点「检查更新」时用。
checkUpdate: (force = false) => get<UpdateCheck>(`/update/check${force ? "?force=1" : ""}`),
+2 -2
View File
@@ -1561,7 +1561,7 @@ export interface FindingTrafficDetail {
response: EvidenceBodyPreview;
}
/** GET /api/update/check —— 当前版本与 GitHub 最新正式版的比较结果。 */
/** GET /api/update/check —— 当前版本与发布源最新正式版的比较结果。 */
export interface UpdateCheck {
/** 当前运行的版本;开发构建为 "dev" 或 git describe 的带后缀形式。 */
current: string;
@@ -1575,7 +1575,7 @@ export interface UpdateCheck {
/** 本次启动时自更新自举的结论(换装失败 / 已回滚等),无事发生时为空。 */
boot_notice?: string;
rolled_back?: boolean;
/** 查询 GitHub 失败时给出原因,此时下面的字段都不会有。 */
/** 查询发布源失败时给出原因,此时下面的字段都不会有。 */
error?: string;
latest?: string;
notes?: string;