'use client'; import { useState } from 'react'; import { Button } from '@/components/ui/button'; import { Card, CardContent, CardFooter, CardHeader, CardTitle, } from '@/components/ui/card'; import { Label } from '@/components/ui/label'; import { ScrollableSettingsWrapper } from '@/components/wrappers/settings-scroll'; import { Switch } from '@/components/ui/switch'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '@/components/ui/select'; import { SettingsDropdown } from '@/components/misc/settings-dropdown'; import { useRouter } from 'next/navigation'; import { useDeleteApiUserMe, useGetApiUserMe } from '@/generated/api/user/user'; import { ThemePicker } from './theme-picker'; import LabeledInput from '../custom-ui/labeled-input'; import { GroupWrapper } from '../wrappers/group-wrapper'; import ProfilePictureUpload from './profile-picture-upload'; import { CalendarArrowDown, CalendarArrowUp, CalendarCheck, CalendarClock, CalendarCog, CalendarPlus, CalendarPlus2, ClockAlert, ClockFading, FileKey, FileKey2, MailOpen, RotateCcwKey, UserLock, } from 'lucide-react'; import { IconButton } from '../buttons/icon-button'; export default function SettingsPage() { const router = useRouter(); const [currentSection, setCurrentSection] = useState('general'); const { data } = useGetApiUserMe(); const deleteUser = useDeleteApiUserMe(); const renderSettingsContent = () => { switch (currentSection) { case 'general': return ( Account Settings {/*-------------------- General Settings --------------------*/}
Email might be managed by your SSO provider.
{/*-------------------- General Settings --------------------*/} {/*-------------------- Reset Password --------------------*/}
{/*-------------------- Reset Password --------------------*/} {/*-------------------- Profile Picture --------------------*/}
{/*-------------------- Profile Picture --------------------*/} {/*-------------------- Regional Settings --------------------*/}
{/*-------------------- Regional Settings --------------------*/}
Permanently delete your account and all associated data.
); case 'notifications': return ( Notification Preferences {/*-------------------- All --------------------*/}
{/*-------------------- All --------------------*/} {/*-------------------- Meetings --------------------*/}
{/*-------------------- Meetings --------------------*/} {/*-------------------- Social --------------------*/}
{/*-------------------- Social --------------------*/}
); case 'calendarAvailability': return ( Calendar & Availability {/*-------------------- Date & Time Format --------------------*/}
{/*-------------------- Date & Time Format --------------------*/} {/*-------------------- Calendar --------------------*/}
{/*-------------------- Calendar --------------------*/} {/*-------------------- Availability --------------------*/}
Define your typical available hours (e.g., Monday-Friday, 9 AM - 5 PM).
{/*-------------------- Availability --------------------*/} {/*-------------------- iCalendar Integration --------------------*/}
{ e.preventDefault(); }} className='space-y-2' > Add Feed
Get iCal Export URL Download .ics File
{/*-------------------- iCalendar Integration --------------------*/}
); case 'sharingPrivacy': return ( Sharing & Privacy {/*-------------------- Privacy Settigs --------------------*/}
Default setting for new friends.
(Override for Default Visibility)
This setting will override the default visibility for your calendar. You can set specific friends or groups to see your full calendar details.
Prevent specific users from seeing your calendar or booking time. Manage Blocked Users
{/*-------------------- Privacy Settigs --------------------*/}
); case 'appearance': return ( Appearance {/*-------------------- Change Theme --------------------*/}
{/*-------------------- Change Theme --------------------*/}
); default: return null; } }; return (

Settings

{renderSettingsContent()}
); }