@@ -6,6 +6,7 @@ import Image from 'next/image'
66import { useRouter } from 'next/navigation'
77import {
88 Button ,
9+ Combobox ,
910 Label ,
1011 Modal ,
1112 ModalBody ,
@@ -43,6 +44,62 @@ function getInitials(name: string | undefined | null): string {
4344 return parts [ 0 ] [ 0 ] . toUpperCase ( )
4445}
4546
47+ /**
48+ * Skeleton component for general settings loading state.
49+ * Matches the exact layout structure of the General component.
50+ */
51+ function GeneralSkeleton ( ) {
52+ return (
53+ < div className = 'flex h-full flex-col gap-[16px]' >
54+ { /* User Info Section */ }
55+ < div className = 'flex items-center gap-[12px]' >
56+ < Skeleton className = 'h-9 w-9 rounded-full' />
57+ < div className = 'flex flex-1 flex-col justify-center gap-[1px]' >
58+ < div className = 'flex items-center gap-[8px]' >
59+ < Skeleton className = 'h-5 w-24' />
60+ < Skeleton className = 'h-[10.5px] w-[10.5px]' />
61+ </ div >
62+ < Skeleton className = 'h-5 w-40' />
63+ </ div >
64+ </ div >
65+
66+ { /* Theme selector row */ }
67+ < div className = 'flex items-center justify-between border-b pb-[12px]' >
68+ < Skeleton className = 'h-4 w-12' />
69+ < Skeleton className = 'h-8 w-[100px] rounded-[4px]' />
70+ </ div >
71+
72+ { /* Auto-connect row */ }
73+ < div className = 'flex items-center justify-between pt-[12px]' >
74+ < Skeleton className = 'h-4 w-36' />
75+ < Skeleton className = 'h-[17px] w-[30px] rounded-full' />
76+ </ div >
77+
78+ { /* Error notifications row */ }
79+ < div className = 'flex items-center justify-between' >
80+ < Skeleton className = 'h-4 w-40' />
81+ < Skeleton className = 'h-[17px] w-[30px] rounded-full' />
82+ </ div >
83+
84+ { /* Telemetry row */ }
85+ < div className = 'flex items-center justify-between border-t pt-[12px]' >
86+ < Skeleton className = 'h-4 w-44' />
87+ < Skeleton className = 'h-[17px] w-[30px] rounded-full' />
88+ </ div >
89+
90+ { /* Telemetry description */ }
91+ < Skeleton className = 'h-[12px] w-full' />
92+ < Skeleton className = '-mt-2 h-[12px] w-4/5' />
93+
94+ { /* Action buttons */ }
95+ < div className = 'mt-auto flex items-center gap-[8px]' >
96+ < Skeleton className = 'h-8 w-20 rounded-[4px]' />
97+ < Skeleton className = 'h-8 w-28 rounded-[4px]' />
98+ </ div >
99+ </ div >
100+ )
101+ }
102+
46103interface GeneralProps {
47104 onOpenChange ?: ( open : boolean ) => void
48105}
@@ -400,7 +457,7 @@ export function General({ onOpenChange }: GeneralProps) {
400457 </ div >
401458 { uploadError && < p className = 'text-[13px] text-[var(--text-error)]' > { uploadError } </ p > }
402459
403- { /* <div className='flex items-center justify-between border-b pb-[12px]'>
460+ < div className = 'flex items-center justify-between border-b pb-[12px]' >
404461 < Label htmlFor = 'theme-select' > Theme</ Label >
405462 < div className = 'w-[100px]' >
406463 < Combobox
@@ -417,7 +474,7 @@ export function General({ onOpenChange }: GeneralProps) {
417474 ] }
418475 />
419476 </ div >
420- </div> */ }
477+ </ div >
421478
422479 < div className = 'flex items-center justify-between pt-[12px]' >
423480 < Label htmlFor = 'auto-connect' > Auto-connect on drop</ Label >
@@ -536,63 +593,4 @@ export function General({ onOpenChange }: GeneralProps) {
536593 </ Modal >
537594 </ div >
538595 )
539- }
540-
541- /**
542- * Skeleton component for general settings loading state.
543- * Matches the exact layout structure of the General component.
544- */
545- function GeneralSkeleton ( ) {
546- return (
547- < div className = 'flex h-full flex-col gap-[16px]' >
548- { /* User Info Section */ }
549- < div className = 'flex items-center gap-[12px]' >
550- < Skeleton className = 'h-9 w-9 rounded-full' />
551- < div className = 'flex flex-1 flex-col justify-center gap-[1px]' >
552- < div className = 'flex items-center gap-[8px]' >
553- < Skeleton className = 'h-5 w-24' />
554- < Skeleton className = 'h-[10.5px] w-[10.5px]' />
555- </ div >
556- < Skeleton className = 'h-5 w-40' />
557- </ div >
558- </ div >
559-
560- { /* Auto-connect row */ }
561- < div className = 'flex items-center justify-between pt-[12px]' >
562- < Skeleton className = 'h-4 w-36' />
563- < Skeleton className = 'h-[17px] w-[30px] rounded-full' />
564- </ div >
565-
566- { /* Snap to grid row */ }
567- < div className = 'flex items-center justify-between' >
568- < Skeleton className = 'h-4 w-24' />
569- < div className = 'flex items-center gap-[12px]' >
570- < Skeleton className = 'h-3 w-[32px]' />
571- < Skeleton className = 'h-[6px] w-[100px] rounded-[20px]' />
572- </ div >
573- </ div >
574-
575- { /* Error notifications row */ }
576- < div className = 'flex items-center justify-between' >
577- < Skeleton className = 'h-4 w-40' />
578- < Skeleton className = 'h-[17px] w-[30px] rounded-full' />
579- </ div >
580-
581- { /* Telemetry row */ }
582- < div className = 'flex items-center justify-between border-t pt-[12px]' >
583- < Skeleton className = 'h-4 w-44' />
584- < Skeleton className = 'h-[17px] w-[30px] rounded-full' />
585- </ div >
586-
587- { /* Telemetry description */ }
588- < Skeleton className = 'h-[12px] w-full' />
589- < Skeleton className = '-mt-2 h-[12px] w-4/5' />
590-
591- { /* Action buttons */ }
592- < div className = 'mt-auto flex items-center gap-[8px]' >
593- < Skeleton className = 'h-8 w-20 rounded-[4px]' />
594- < Skeleton className = 'h-8 w-28 rounded-[4px]' />
595- </ div >
596- </ div >
597- )
598- }
596+ }
0 commit comments