feat(web): componentize frontend and replace native delete confirm

- Split monolithic app.js/style.css into Alpine.js components (icons, store, fileSection, confirm)
- Add central Alpine.store('files') as single source of truth for file lists and actions
- Replace duplicated Inbox/Outbox markup with reusable fileSection component (props: dir, canShare)
- Add shared window.Icons module to remove duplicated inline SVGs
- Replace browser-native confirm() for file deletion with a styled, accessible modal dialog
- Split CSS into design tokens, base, and component layers; modernize visuals
- Update web.go embed and server static routes for the new component/style dirs
This commit is contained in:
2026-08-27 15:03:09 +08:00
parent 110a8f7d9d
commit d84e4dfdba
14 changed files with 966 additions and 522 deletions
+13
View File
@@ -6,6 +6,19 @@ All notable changes to this template should be documented in this file.
The format loosely follows Keep a Changelog and can be adapted to the team's habits.
本文档参考了 Keep a Changelog 的思路,也可以根据团队习惯调整。
## [0.1.0] - 2026-08-27
### Changed / 变更
- Refactored the vanilla frontend into a component-based structure (Alpine.js components, a central state store, and a shared icon module) while keeping the no-build, Go-served static-file approach.
- 将原生前端重构为组件化结构(基于 Alpine.js 的组件、集中式状态 store、共享图标模块),同时保留由 Go 直接托管、无需构建的静态文件方案。
- Replaced the duplicated Inbox/Outbox markup with a single reusable `fileSection` component configured by props (`dir`, `canShare`).
- 用同一个可复用的 `fileSection` 组件(按属性 `dir`、`canShare` 配置)替换了原先重复的收件箱/发件箱标记。
- Split styles into design tokens, base, and component layers under `web/styles/`, and moved UI icons into a shared `window.Icons` module.
- 将样式拆分为 `web/styles/` 下的设计令牌、基础样式与组件样式三层,并把界面图标统一收敛到共享的 `window.Icons` 模块。
## [0.0.1] - 2026-04-28
### Added / 新增