diff --git a/index.html b/index.html index 70f5acc..e54505a 100644 --- a/index.html +++ b/index.html @@ -2,8 +2,10 @@ - + + + MingdaOS diff --git a/package.json b/package.json index 30e078d..8931548 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "mingda-os", "private": true, - "version": "0.0.0", + "version": "1.0.0", "type": "module", "scripts": { "dev": "vite", diff --git a/src/apps/AboutMe.tsx b/src/apps/AboutMe.tsx index 608e7c4..d810432 100644 --- a/src/apps/AboutMe.tsx +++ b/src/apps/AboutMe.tsx @@ -1,3 +1,5 @@ +import { APP_VERSION } from '../config/version'; + export default function AboutMe() { return (
- [ MingdaOS ] + [ MingdaOS v{APP_VERSION} ] {MENU_ITEMS.map(item => ( {item} ))} diff --git a/src/config/apps.ts b/src/config/apps.ts index d30588b..54c65fe 100644 --- a/src/config/apps.ts +++ b/src/config/apps.ts @@ -7,6 +7,7 @@ import Alfred from '../apps/Alfred'; import Chengyu from '../apps/Chengyu'; import Poker from '../apps/Poker'; import Trash from '../apps/Trash'; +import { withVersion } from './version'; export const APPS: AppConfig[] = [ { @@ -94,7 +95,7 @@ export const APPS: AppConfig[] = [ title: 'Collab', emoji: '', iconGradient: 'linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02))', - iconImage: '/docnest-icon-32.png', + iconImage: withVersion('/docnest-icon-32.png'), defaultSize: { width: 400, height: 360 }, defaultPosition: { x: 0, y: 0 }, component: Links, @@ -120,5 +121,5 @@ export const WALLPAPERS = [ // Solid dark — flat and minimal `linear-gradient(135deg, #050510 0%, #080818 100%)`, // Pixel city — neon cityscape - `url(/wallpaper-city.png)`, + `url(${withVersion('/wallpaper-city.png')})`, ]; diff --git a/src/config/version.ts b/src/config/version.ts new file mode 100644 index 0000000..40df64e --- /dev/null +++ b/src/config/version.ts @@ -0,0 +1,5 @@ +export const APP_VERSION = '1.0.0'; + +export function withVersion(url: string): string { + return url.includes('?') ? `${url}&v=${APP_VERSION}` : `${url}?v=${APP_VERSION}`; +}