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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user