fix: 修复 Vite allow list 错误

This commit is contained in:
CHE LIANG ZHAO
2026-01-26 16:24:39 +08:00
parent ab9aab7beb
commit ef34a1bb5d
4 changed files with 14 additions and 6 deletions

3
web/src/app.d.ts vendored
View File

@@ -8,6 +8,9 @@ declare global {
// interface PageState {}
// interface Platform {}
}
// Vite 注入的全局变量
const __APP_VERSION__: string;
}
export {};

View File

@@ -1,3 +0,0 @@
// 版本号配置
// 更新版本时需要手动修改此文件
export const VERSION = '1.3.0';

View File

@@ -27,8 +27,8 @@
import Sparkles from '@lucide/svelte/icons/sparkles';
import Info from '@lucide/svelte/icons/info';
// 版本号
import { VERSION } from '$lib/version';
// 版本号(从 Vite 编译时注入)
const appVersion = __APP_VERSION__;
// Theme
import {
@@ -248,7 +248,7 @@
title="查看更新日志"
>
<Info class="size-4" />
<span class="text-xs">v{VERSION}</span>
<span class="text-xs">v{appVersion}</span>
</button>
{/snippet}
</Sidebar.MenuButton>