diff --git a/web/src/lib/components/ChangelogDrawer.svelte b/web/src/lib/components/ChangelogDrawer.svelte new file mode 100644 index 0000000..18b851c --- /dev/null +++ b/web/src/lib/components/ChangelogDrawer.svelte @@ -0,0 +1,120 @@ + + + + + +
+ 版本更新日志 + +
+
+ +
+
+ {#each changelog as release} +
+ +
+
+ +

v{release.version}

+
+
+ + {release.date} +
+
+ + +
+ {#each Object.entries(release.changes) as [category, items]} +
+

{category}

+
    + {#each items as item} +
  • + + {item} +
  • + {/each} +
+
+ {/each} +
+
+ {/each} +
+
+ + + + +
+
diff --git a/web/src/routes/+layout.svelte b/web/src/routes/+layout.svelte index 7ce061f..f12f5ce 100644 --- a/web/src/routes/+layout.svelte +++ b/web/src/routes/+layout.svelte @@ -10,6 +10,7 @@ import * as DropdownMenu from '$lib/components/ui/dropdown-menu'; import * as Avatar from '$lib/components/ui/avatar'; import { Separator } from '$lib/components/ui/separator'; + import ChangelogDrawer from '$lib/components/ChangelogDrawer.svelte'; // Icons import Upload from '@lucide/svelte/icons/upload'; @@ -24,6 +25,10 @@ import User from '@lucide/svelte/icons/user'; import Bell from '@lucide/svelte/icons/bell'; import Sparkles from '@lucide/svelte/icons/sparkles'; + import Info from '@lucide/svelte/icons/info'; + + // 从 package.json 导入版本号 + import pkg from '../../package.json'; // Theme import { @@ -42,6 +47,7 @@ let checkingHealth = $state(true); let isAuthenticated = $state(false); let currentUser = $state(null); + let changelogOpen = $state(false); // 订阅认证状态 $effect(() => { @@ -228,9 +234,27 @@ - + + + + + {#snippet child({ props })} + + {/snippet} + + + + @@ -344,4 +368,7 @@ + + + {/if}