feat: remove nginx, add projects/milestones/notifications pages
- Dockerfile: replace nginx with serve for static files - Fix auth endpoint: /auth/login → /auth/token - Add ProjectsPage, ProjectDetailPage - Add MilestonesPage, MilestoneDetailPage with progress bar - Add NotificationsPage with unread count - Sidebar: add milestones/notifications nav, live unread badge - API: configurable VITE_API_BASE for host nginx proxy - Types: add Milestone, MilestoneProgress, Notification, ProjectMember
This commit is contained in:
@@ -36,7 +36,9 @@ export function useAuth() {
|
||||
const form = new URLSearchParams()
|
||||
form.append('username', username)
|
||||
form.append('password', password)
|
||||
const { data } = await api.post('/auth/login', form)
|
||||
const { data } = await api.post('/auth/token', form, {
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
})
|
||||
localStorage.setItem('token', data.access_token)
|
||||
setState((s) => ({ ...s, token: data.access_token }))
|
||||
await fetchUser()
|
||||
|
||||
Reference in New Issue
Block a user