feat(web): add i18n, light/dark theme switching, and version constant

- Add i18n (English + 简体中文) with a locale store, $t() magic, and a language toggle (persisted)
- Add light/dark/system theme switching via a theme store and [data-theme] token overrides
- Set the theme before paint to avoid a flash of the wrong theme
- Add frontend version constant web/version.js (window.YDROPBX_VERSION) shown in the app footer
- Update AGENTS.md version-control convention to mention web/version.js
- Bump version to 0.1.1 across frontend, webui changelog, and backend constant
This commit is contained in:
2026-08-27 15:21:21 +08:00
parent d84e4dfdba
commit 5bb42a8b8a
14 changed files with 379 additions and 36 deletions
+1 -1
View File
@@ -22,7 +22,7 @@
return this.files.length;
},
get title() {
return dir === 'inbox' ? 'Inbox' : 'Outbox';
return Alpine.store('locale').t(dir === 'inbox' ? 'inbox' : 'outbox');
},
get icon() {
return dir === 'inbox' ? window.Icons.inbox : window.Icons.outbox;