diff --git a/src/components/buttons/icon-button.tsx b/src/components/buttons/icon-button.tsx index 17f9945..7a88800 100644 --- a/src/components/buttons/icon-button.tsx +++ b/src/components/buttons/icon-button.tsx @@ -1,19 +1,20 @@ import { Button } from '@/components/ui/button'; - -import { IconProp } from '@fortawesome/fontawesome-svg-core'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { LucideProps } from 'lucide-react'; +import React, { ForwardRefExoticComponent, RefAttributes } from 'react'; export function IconButton({ icon, children, ...props }: { - icon: IconProp; + icon?: ForwardRefExoticComponent< + Omit & RefAttributes + >; children: React.ReactNode; } & React.ComponentProps) { return ( ); diff --git a/src/components/buttons/sso-login-button.tsx b/src/components/buttons/sso-login-button.tsx index 013ef73..ae0238a 100644 --- a/src/components/buttons/sso-login-button.tsx +++ b/src/components/buttons/sso-login-button.tsx @@ -1,6 +1,6 @@ import { signIn } from '@/auth'; import { IconButton } from '@/components/buttons/icon-button'; -import { faOpenid } from '@fortawesome/free-brands-svg-icons'; +import { Fingerprint, ScanEye } from 'lucide-react'; export default function SSOLogin({ provider, @@ -22,7 +22,7 @@ export default function SSOLogin({ className='w-full' type='submit' variant='secondary' - icon={faOpenid} + icon={Fingerprint} {...props} > Login with {providerDisplayName} diff --git a/src/components/custom-ui/app-sidebar.tsx b/src/components/custom-ui/app-sidebar.tsx index ef01ca9..a39e7e1 100644 --- a/src/components/custom-ui/app-sidebar.tsx +++ b/src/components/custom-ui/app-sidebar.tsx @@ -62,18 +62,20 @@ export function AppSidebar() { <> - - + + + + diff --git a/src/components/custom-ui/labeled-input.tsx b/src/components/custom-ui/labeled-input.tsx index 5ea9caf..3fb69d0 100644 --- a/src/components/custom-ui/labeled-input.tsx +++ b/src/components/custom-ui/labeled-input.tsx @@ -1,8 +1,8 @@ import { Input, Textarea } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; -import React from 'react'; +import React, { ForwardRefExoticComponent, RefAttributes } from 'react'; import { Button } from '../ui/button'; -import { Eye, EyeOff } from 'lucide-react'; +import { Eye, EyeOff, LucideProps } from 'lucide-react'; import { cn } from '@/lib/utils'; export default function LabeledInput({ @@ -12,6 +12,7 @@ export default function LabeledInput({ placeholder, value, name, + icon, variantSize = 'default', autocomplete, error, @@ -22,11 +23,22 @@ export default function LabeledInput({ placeholder?: string; value?: string; name?: string; + icon?: ForwardRefExoticComponent< + Omit & RefAttributes + >; variantSize?: 'default' | 'big' | 'textarea'; autocomplete?: string; error?: string; } & React.InputHTMLAttributes) { const [passwordVisible, setPasswordVisible] = React.useState(false); + const [inputValue, setInputValue] = React.useState(value || ''); + + const handleInputChange = (e: React.ChangeEvent) => { + setInputValue(e.target.value); + if (rest.onChange) { + rest.onChange(e); + } + }; return (
@@ -50,18 +62,32 @@ export default function LabeledInput({ className={cn( type === 'password' ? 'pr-[50px]' : '', variantSize === 'big' - ? 'h-12 file:h-10 text-lg gplaceholder:text-lg sm:text-2xl sm:placeholder:text-2xl' + ? 'h-12 file:h-10 text-lg placeholder:text-lg sm:text-2xl sm:placeholder:text-2xl' : '', + icon && inputValue === '' ? 'pl-10' : '', + 'transition-all duration-300 ease-in-out', )} type={passwordVisible ? 'text' : type} placeholder={placeholder} - defaultValue={value} + value={inputValue} id={name} name={name} autoComplete={autocomplete} + onChange={handleInputChange} {...rest} /> - + {icon && ( + + {React.createElement(icon)} + + )} {type === 'password' && (
); diff --git a/src/components/forms/login-form.tsx b/src/components/forms/login-form.tsx index c1139b4..fdcceac 100644 --- a/src/components/forms/login-form.tsx +++ b/src/components/forms/login-form.tsx @@ -4,11 +4,21 @@ import React, { useState, useRef } from 'react'; import { useRouter } from 'next/navigation'; import LabeledInput from '@/components/custom-ui/labeled-input'; -import { Button } from '@/components/ui/button'; import useZodForm from '@/lib/hooks/useZodForm'; import { loginSchema, registerSchema } from '@/lib/auth/validation'; import { loginAction } from '@/lib/auth/login'; import { registerAction } from '@/lib/auth/register'; +import { IconButton } from '../buttons/icon-button'; +import { + FileKey, + FileKey2, + LogIn, + MailOpen, + RotateCcwKey, + UserCheck, + UserPen, + UserPlus, +} from 'lucide-react'; function LoginFormElement({ setIsSignUp, @@ -56,6 +66,7 @@ function LoginFormElement({
- - +
{formState.errors.root?.message && ( @@ -156,27 +174,30 @@ function RegisterFormElement({ {...register('lastName')} data-cy='last-name-input' /> - +
- - +
{formState.errors.root?.message && ( diff --git a/src/components/misc/settings-page.tsx b/src/components/misc/settings-page.tsx index 3aeb3e4..df37608 100644 --- a/src/components/misc/settings-page.tsx +++ b/src/components/misc/settings-page.tsx @@ -9,7 +9,7 @@ import { CardHeader, CardTitle, } from '@/components/ui/card'; -import { Input } from '@/components/ui/input'; + import { Label } from '@/components/ui/label'; import { ScrollableSettingsWrapper } from '@/components/wrappers/settings-scroll'; import { Switch } from '@/components/ui/switch'; @@ -28,8 +28,24 @@ import LabeledInput from '../custom-ui/labeled-input'; import { GroupWrapper } from '../wrappers/group-wrapper'; import ProfilePictureUpload from './profile-picture-upload'; -import { LogOut } from 'lucide-react'; -import { signOut } from '@/auth'; +import { + CalendarArrowDown, + CalendarArrowUp, + CalendarCheck, + CalendarClock, + CalendarCog, + CalendarPlus, + CalendarPlus2, + ClockAlert, + ClockFading, + FileKey, + FileKey2, + MailOpen, + RotateCcwKey, + UserLock, + UserPen, +} from 'lucide-react'; +import { IconButton } from '../buttons/icon-button'; export default function SettingsPage() { const router = useRouter(); @@ -46,29 +62,31 @@ export default function SettingsPage() { Account Settings - + + {/*-------------------- General Settings --------------------*/}
@@ -77,6 +95,7 @@ export default function SettingsPage() { @@ -87,39 +106,42 @@ export default function SettingsPage() {
+ {/*-------------------- General Settings --------------------*/} + {/*-------------------- Reset Password --------------------*/}
+ {/*-------------------- Reset Password --------------------*/} + {/*-------------------- Profile Picture --------------------*/}
+ {/*-------------------- Profile Picture --------------------*/} + {/*-------------------- Regional Settings --------------------*/}
@@ -127,6 +149,7 @@ export default function SettingsPage() { type='text' label='Timezone' placeholder='Europe/Berlin' + icon={CalendarClock} defaultValue={data?.data.user.timezone ?? ''} >
@@ -146,23 +169,26 @@ export default function SettingsPage() {
-
- - - Permanently delete your account and all associated data. - -
+ {/*-------------------- Regional Settings --------------------*/} + +
+ + + Permanently delete your account and all associated data. + +
+
@@ -175,8 +201,9 @@ export default function SettingsPage() { Notification Preferences - - + + {/*-------------------- All --------------------*/} +
- + {/*-------------------- All --------------------*/} + {/*-------------------- Meetings --------------------*/}
@@ -239,6 +267,8 @@ export default function SettingsPage() {
+ {/*-------------------- Meetings --------------------*/} + {/*-------------------- Social --------------------*/}
@@ -255,6 +285,7 @@ export default function SettingsPage() {
+ {/*-------------------- Social --------------------*/}
@@ -267,8 +298,39 @@ export default function SettingsPage() { Calendar & Availability - - {/*--------------------* Calendar --------------------*/} + + {/*-------------------- Date & Time Format --------------------*/} + +
+
+ + +
+
+ + +
+
+
+ {/*-------------------- Date & Time Format --------------------*/} + {/*-------------------- Calendar --------------------*/}
@@ -306,9 +368,8 @@ export default function SettingsPage() {
- {/*--------------------* Calendar --------------------*/} - - {/*--------------------* Availability --------------------*/} + {/*-------------------- Calendar --------------------*/} + {/*-------------------- Availability --------------------*/}
@@ -325,8 +386,9 @@ export default function SettingsPage() {
@@ -334,43 +396,65 @@ export default function SettingsPage() {
- {/*--------------------* Availability --------------------*/} - - {/*--------------------* iCalendar Integration --------------------*/} -
- - iCalendar Integration - -
- - + {/*-------------------- Availability --------------------*/} + {/*-------------------- iCalendar Integration --------------------*/} + +
+
{ + e.preventDefault(); + }} + className='space-y-2' + > + + + Add Feed + +
+
+ + + Get iCal Export URL + + + Download .ics File + +
-
- - - -
-
- {/*--------------------* iCalendar Integration --------------------*/} + + {/*-------------------- iCalendar Integration --------------------*/} @@ -383,79 +467,94 @@ export default function SettingsPage() { Sharing & Privacy - -
- - -
-
- - - (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. - -
+ + {/*-------------------- 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 --------------------*/}
@@ -468,36 +567,15 @@ export default function SettingsPage() { Appearance - -
- - -
-
- - -
-
- - -
+ + {/*-------------------- Change Theme --------------------*/} + +
+ + +
+
+ {/*-------------------- Change Theme --------------------*/}