feat: tempcommit

This commit is contained in:
Maximilian Liebmann 2025-06-27 23:06:19 +02:00
parent bf4f0b61ed
commit 6b46177dc0
2 changed files with 82 additions and 67 deletions

View file

@ -15,12 +15,7 @@ export default function ProfilePictureUpload({
<> <>
<div className='grid grid-cols-1 gap-1'> <div className='grid grid-cols-1 gap-1'>
<span className='relative flex space-6'> <span className='relative flex space-6'>
<Input <Input className={className} id='pic-upload' type='file' />
className={className}
id='pic-upload'
type='file'
defaultValue={data?.data.user.image ?? undefined}
/>
<Avatar className='flex justify-center items-center ml-6 shadow-md border h-[36px] w-[36px]'> <Avatar className='flex justify-center items-center ml-6 shadow-md border h-[36px] w-[36px]'>
{data?.data.user.image ? ( {data?.data.user.image ? (
<Image <Image

View file

@ -5,7 +5,6 @@ import { Button } from '@/components/ui/button';
import { import {
Card, Card,
CardContent, CardContent,
CardDescription,
CardFooter, CardFooter,
CardHeader, CardHeader,
CardTitle, CardTitle,
@ -27,9 +26,7 @@ import { useGetApiUserMe } from '@/generated/api/user/user';
import { ThemePicker } from './theme-picker'; import { ThemePicker } from './theme-picker';
import LabeledInput from '../custom-ui/labeled-input'; import LabeledInput from '../custom-ui/labeled-input';
import { GroupWrapper } from '../wrappers/group-wrapper'; import { GroupWrapper } from '../wrappers/group-wrapper';
import { Avatar } from '../ui/avatar';
import Image from 'next/image';
import { User } from 'lucide-react';
import ProfilePictureUpload from './profile-picture-upload'; import ProfilePictureUpload from './profile-picture-upload';
export default function SettingsPage() { export default function SettingsPage() {
@ -117,7 +114,7 @@ export default function SettingsPage() {
</GroupWrapper> </GroupWrapper>
<GroupWrapper title='Profile Picture'> <GroupWrapper title='Profile Picture'>
<div className='space-y-2 grid grid-cols-[1fr_auto]'> <div className='space-y-2 grid grid-cols-[1fr_auto]'>
<ProfilePictureUpload className='file:border file:rounded-xl' /> <ProfilePictureUpload className='file:border file:rounded-md file:hover:bg-disabled-destructive' />
</div> </div>
</GroupWrapper> </GroupWrapper>
<GroupWrapper title='Regional Settings'> <GroupWrapper title='Regional Settings'>
@ -127,7 +124,7 @@ export default function SettingsPage() {
type='text' type='text'
label='Timezone' label='Timezone'
placeholder='Europe/Berlin' placeholder='Europe/Berlin'
defaultValue={data?.data.user.timezone} defaultValue={data?.data.user.timezone ?? ''}
></LabeledInput> ></LabeledInput>
</div> </div>
<div> <div>
@ -147,7 +144,12 @@ export default function SettingsPage() {
</div> </div>
</GroupWrapper> </GroupWrapper>
<div className='flex items-center justify-evenly sm:flex-row flex-col gap-6'> <div className='flex items-center justify-evenly sm:flex-row flex-col gap-6'>
<Button variant='destructive'>Delete Account</Button> <Button
// onClick={() => DeleteAccount }
variant='destructive'
>
Delete Account
</Button>
<span className='text-sm text-muted-foreground pt-1'> <span className='text-sm text-muted-foreground pt-1'>
Permanently delete your account and all associated data. Permanently delete your account and all associated data.
</span> </span>
@ -165,67 +167,85 @@ export default function SettingsPage() {
<CardTitle>Notification Preferences</CardTitle> <CardTitle>Notification Preferences</CardTitle>
</CardHeader> </CardHeader>
<CardContent className='space-y-6'> <CardContent className='space-y-6'>
<div className='flex items-center justify-between space-x-2 p-3 rounded-md border'> <GroupWrapper>
<Label <div className='flex items-center justify-between'>
htmlFor='masterEmailNotifications'
className='font-normal'
>
Enable All Email Notifications
</Label>
<Switch id='masterEmailNotifications' />
</div>
<div className='space-y-4 pl-2 border-l-2 ml-2'>
<div className='flex items-center justify-between space-x-2'>
<Label htmlFor='newMeetingBookings' className='font-normal'>
New Meeting Bookings
</Label>
<Switch id='newMeetingBookings' />
</div>
<div className='flex items-center justify-between space-x-2'>
<Label <Label
htmlFor='meetingConfirmations' htmlFor='masterEmailNotifications'
className='font-normal' className='font-normal'
> >
Meeting Confirmations/Cancellations Enable All Email Notifications
</Label> </Label>
<Switch id='meetingConfirmations' /> <Switch id='masterEmailNotifications' />
</div> </div>
<div className='flex items-center justify-between space-x-2'> </GroupWrapper>
<Label
htmlFor='enableMeetingReminders' <GroupWrapper title='Meetings'>
className='font-normal' <div className='space-y-4'>
> <div className='flex items-center justify-between space-x-2'>
Meeting Reminders <Label
</Label> htmlFor='newMeetingBookings'
<Switch id='enableMeetingReminders' /> className='font-normal'
>
New Meeting Bookings
</Label>
<Switch id='newMeetingBookings' />
</div>
<div className='flex items-center justify-between space-x-2'>
<Label
htmlFor='meetingConfirmations'
className='font-normal'
>
Meeting Confirmations/Cancellations
</Label>
<Switch id='meetingConfirmations' />
</div>
<div className='space-y-4 grid grid-cols-[1fr_1fr_auto] items-center'>
<div className='flex items-center justify-between space-x-2'>
<Label
htmlFor='enableMeetingReminders'
className='font-normal'
>
Meeting Reminders
</Label>
</div>
<div>
<Label className='text-sm' htmlFor='remindBefore'>
Remind me before
</Label>
<Select>
<SelectTrigger id='remindBefore'>
<SelectValue placeholder='Select reminder time' />
</SelectTrigger>
<SelectContent>
<SelectItem value='15m'>15 minutes</SelectItem>
<SelectItem value='30m'>30 minutes</SelectItem>
<SelectItem value='1h'>1 hour</SelectItem>
<SelectItem value='1d'>1 day</SelectItem>
</SelectContent>
</Select>
</div>
<div>
<Switch id='enableMeetingReminders' />
</div>
</div>
</div> </div>
<div className='space-y-2 pl-6'> </GroupWrapper>
<Label htmlFor='remindBefore'>Remind me before</Label> <GroupWrapper title='Social'>
<Select> <div className='space-y-4'>
<SelectTrigger id='remindBefore'> <div className='flex items-center justify-between space-x-2'>
<SelectValue placeholder='Select reminder time' /> <Label htmlFor='friendRequests' className='font-normal'>
</SelectTrigger> Friend Requests
<SelectContent> </Label>
<SelectItem value='15m'>15 minutes</SelectItem> <Switch id='friendRequests' />
<SelectItem value='30m'>30 minutes</SelectItem> </div>
<SelectItem value='1h'>1 hour</SelectItem> <div className='flex items-center justify-between space-x-2'>
<SelectItem value='1d'>1 day</SelectItem> <Label htmlFor='groupUpdates' className='font-normal'>
</SelectContent> Group Invitations/Updates
</Select> </Label>
<Switch id='groupUpdates' />
</div>
</div> </div>
<div className='flex items-center justify-between space-x-2'> </GroupWrapper>
<Label htmlFor='friendRequests' className='font-normal'>
Friend Requests
</Label>
<Switch id='friendRequests' />
</div>
<div className='flex items-center justify-between space-x-2'>
<Label htmlFor='groupUpdates' className='font-normal'>
Group Invitations/Updates
</Label>
<Switch id='groupUpdates' />
</div>
</div>
</CardContent> </CardContent>
</ScrollableSettingsWrapper> </ScrollableSettingsWrapper>
</Card> </Card>