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
+4 -3
View File
@@ -69,9 +69,10 @@ func (s *Server) Handler() http.Handler {
w.Write(data)
}))
mux.Handle("GET /style.css", http.FileServerFS(web.FS))
mux.Handle("GET /app.js", http.FileServerFS(web.FS))
mux.Handle("GET /alpine.min.js", http.FileServerFS(web.FS))
static := http.FileServerFS(web.FS)
mux.Handle("GET /components/", static)
mux.Handle("GET /styles/", static)
mux.Handle("GET /alpine.min.js", static)
return mux
}