feat: Notifications page, Sidebar layout fixes, and Achievements enhancements
continuous-integration/drone/push Build is failing
continuous-integration/drone/push Build is failing
- implemented /notifications page with overdue/upcoming alerts - Fixed sidebar scrolling in collapsed mode - Moved notification button to sidebar footer - Enhanced Achievements page with streak stats and tooltips - Improved XP history to show task titles - Added missing translations (en/de) - Removed top bar header - Fixed Docker environment routing
This commit is contained in:
+22
-2
@@ -8,7 +8,17 @@ export const LEVEL_THRESHOLDS = [
|
||||
3500, // Level 7: 3500-4999
|
||||
5000, // Level 8: 5000-7499
|
||||
7500, // Level 9: 7500-9999
|
||||
10000 // Level 10: 10000+
|
||||
10000, // Level 10: 10000-14999
|
||||
15000, // Level 11: 15000-24999
|
||||
25000, // Level 12: 25000-39999
|
||||
40000, // Level 13: 40000-59999
|
||||
60000, // Level 14: 60000-84999
|
||||
85000, // Level 15: 85000-119999
|
||||
120000, // Level 16: 120000-159999
|
||||
160000, // Level 17: 160000-209999
|
||||
210000, // Level 18: 210000-269999
|
||||
270000, // Level 19: 270000-349999
|
||||
350000 // Level 20: 350000+
|
||||
];
|
||||
|
||||
export function getLevelFromXP(xp: number): number {
|
||||
@@ -48,7 +58,17 @@ export const RANK_KEYS = [
|
||||
'grandmaster', // Level 7
|
||||
'virtuoso', // Level 8
|
||||
'legend', // Level 9
|
||||
'mythic' // Level 10
|
||||
'mythic', // Level 10
|
||||
'titan', // Level 11
|
||||
'sentinel', // Level 12
|
||||
'vanguard', // Level 13
|
||||
'oracle', // Level 14
|
||||
'ascendant', // Level 15
|
||||
'ethereal', // Level 16
|
||||
'celestial', // Level 17
|
||||
'divine', // Level 18
|
||||
'omnipotent', // Level 19
|
||||
'eternal' // Level 20
|
||||
];
|
||||
|
||||
export function getRankKey(level: number): string {
|
||||
|
||||
+10
-3
@@ -19,9 +19,15 @@ export const users = pgTable("users", {
|
||||
isSearchable: boolean("is_searchable").notNull().default(false), // Privacy setting
|
||||
apiKey: text("api_key"), // For MCP Server access
|
||||
aiEnabled: boolean("ai_enabled").notNull().default(true), // Feature flag per user
|
||||
routineConfig: json("routine_config").$type<{ morningTime: string, eveningTime: string, enabled: boolean }>().default({ morningTime: "09:00", eveningTime: "17:00", enabled: true }),
|
||||
routineConfig: json("routine_config").$type<{ morningTime: string, eveningTime: string, enabled: boolean }>().default({ morningTime: "09:00", eveningTime: "17:00", enabled: false }),
|
||||
lastMorningRoutine: timestamp("last_morning_routine"),
|
||||
lastEveningRoutine: timestamp("last_evening_routine"),
|
||||
|
||||
// 2FA Fields
|
||||
is2faEnabled: boolean("is_2fa_enabled").notNull().default(false),
|
||||
otpCode: text("otp_code"), // The temporary 6-digit code
|
||||
otpExpiresAt: timestamp("otp_expires_at"),
|
||||
language: text("language").notNull().default("en"), // 'en' | 'de'
|
||||
});
|
||||
|
||||
export const systemSettings = pgTable("system_settings", {
|
||||
@@ -98,6 +104,7 @@ export const insertUserSchema = createInsertSchema(users).pick({
|
||||
showOnLeaderboard: true,
|
||||
isSearchable: true,
|
||||
aiEnabled: true,
|
||||
language: true,
|
||||
});
|
||||
|
||||
export const registerSchema = insertUserSchema;
|
||||
@@ -120,8 +127,8 @@ export const insertLabelSchema = createInsertSchema(labels).omit({
|
||||
});
|
||||
|
||||
export const insertTaskSchema = createInsertSchema(tasks, {
|
||||
dueDate: z.coerce.date().nullable(),
|
||||
startDate: z.coerce.date().nullable(),
|
||||
dueDate: z.coerce.date().nullable().optional(),
|
||||
startDate: z.coerce.date().nullable().optional(),
|
||||
}).omit({
|
||||
id: true,
|
||||
userId: true, // We will set this server-side
|
||||
|
||||
Reference in New Issue
Block a user