Add customizable home dashboard with per-user pinned apps
- Users can pin/unpin any available service on their home page via a Customize mode; preferences persisted via PATCH /api/users/me/preferences - Time-aware greeting renders the user's display name through React JSX (HTML-escaped by design — no dangerouslySetInnerHTML used) - Added dashboard_app_ids JSON column to users table (migration c7e8f9a0b1d2) - /settings now routes to a placeholder page Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,16 @@ export interface UserData {
|
||||
|
||||
export const getMe = () => api.get<UserData>("/users/me").then((r) => r.data);
|
||||
|
||||
export interface DashboardPrefs {
|
||||
app_ids: string[];
|
||||
}
|
||||
|
||||
export const getDashboardPrefs = () =>
|
||||
api.get<DashboardPrefs>("/users/me/preferences").then((r) => r.data);
|
||||
|
||||
export const updateDashboardPrefs = (app_ids: string[]) =>
|
||||
api.patch<DashboardPrefs>("/users/me/preferences", { app_ids }).then((r) => r.data);
|
||||
|
||||
// --- Admin ---
|
||||
export interface AdminUserCreate {
|
||||
email: string;
|
||||
|
||||
Reference in New Issue
Block a user