feat: Implement settings dropdown and page components
- Added `SettingsDropdown` component for selecting settings sections with icons and descriptions. - Created `SettingsPage` component to manage user settings, including account details, notifications, calendar availability, privacy, and appearance. - Introduced `SettingsSwitcher` for selecting options within settings. - Integrated command and dialog components for improved user interaction. - Updated `UserDropdown` to include links for settings and logout. - Refactored button styles and card footer layout for consistency. - Added popover functionality for dropdown menus. - Updated dependencies in `yarn.lock` for new components. feat: tempcommit feat: tempcommit
This commit is contained in:
parent
53cc8cb2b7
commit
9191eb3df0
25 changed files with 1476 additions and 552 deletions
8
src/app/api/logout/route.ts
Normal file
8
src/app/api/logout/route.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { signOut } from '@/auth';
|
||||
import { NextResponse } from 'next/server';
|
||||
|
||||
export const GET = async () => {
|
||||
await signOut();
|
||||
|
||||
return NextResponse.redirect('/login');
|
||||
};
|
|
@ -1,11 +1,13 @@
|
|||
import zod from 'zod/v4';
|
||||
import {
|
||||
emailSchema,
|
||||
firstNameSchema,
|
||||
lastNameSchema,
|
||||
newUserEmailServerSchema,
|
||||
newUserNameServerSchema,
|
||||
passwordSchema,
|
||||
timezoneSchema,
|
||||
userNameSchema,
|
||||
} from '@/app/api/user/validation';
|
||||
|
||||
// ----------------------------------------
|
||||
|
@ -22,6 +24,15 @@ export const updateUserServerSchema = zod.object({
|
|||
timezone: timezoneSchema.optional(),
|
||||
});
|
||||
|
||||
export const updateUserClientSchema = zod.object({
|
||||
name: userNameSchema.optional(),
|
||||
first_name: firstNameSchema.optional(),
|
||||
last_name: lastNameSchema.optional(),
|
||||
email: emailSchema.optional(),
|
||||
image: zod.url().optional(),
|
||||
timezone: timezoneSchema.optional(),
|
||||
});
|
||||
|
||||
export const updateUserPasswordServerSchema = zod
|
||||
.object({
|
||||
current_password: zod.string().min(1, 'Current password is required'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue