88import { useCallback , useEffect , useState } from 'react' ;
99import Link from 'next/link' ;
1010import { MainLayout } from '@/components/layout' ;
11+ import { LoadingSpinner , SearchIcon } from '@/components/ui/icons' ;
1112
1213interface PublicYouTubeAccount {
1314 id : string ;
@@ -106,7 +107,7 @@ export function YouTubeContent(): React.ReactElement {
106107 { accounts && accounts . length > 1 ? < select
107108 value = { activeAccountId ?? '' }
108109 onChange = { ( e ) => setActiveAccountId ( e . target . value ) }
109- className = "rounded border border-border bg-background px-2 py-1 text-sm"
110+ className = "rounded-lg border border-border-default bg-bg-secondary px-4 py-2 text-sm text-text-primary focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary "
110111 >
111112 { accounts . map ( ( a ) => (
112113 < option key = { a . id } value = { a . id } >
@@ -117,7 +118,7 @@ export function YouTubeContent(): React.ReactElement {
117118 </ select > : null }
118119 < Link
119120 href = "/youtube/accounts"
120- className = "rounded border border-border px-3 py-1 text-sm hover:bg-accent "
121+ className = "rounded-lg border border-border-default bg-bg-secondary px-4 py-2 text-sm text-text-primary transition-colors hover:bg-bg-hover "
121122 >
122123 Manage accounts
123124 </ Link >
@@ -139,21 +140,32 @@ export function YouTubeContent(): React.ReactElement {
139140 and accept the YouTube permission prompt.
140141 </ div > : null }
141142
142- < form onSubmit = { handleSearch } className = "mb-6 flex gap-2" >
143- < input
144- type = "text"
145- value = { query }
146- onChange = { ( e ) => setQuery ( e . target . value ) }
147- placeholder = "Search YouTube…"
148- className = "flex-1 rounded border border-border bg-background px-3 py-2"
149- disabled = { noAccounts || needsReconnect }
150- />
143+ < form onSubmit = { handleSearch } className = "mb-6 flex flex-col gap-3 md:flex-row" >
144+ < div className = "relative flex-1" >
145+ < div className = "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-4" >
146+ < SearchIcon className = "text-text-muted" size = { 18 } />
147+ </ div >
148+ < input
149+ type = "text"
150+ value = { query }
151+ onChange = { ( e ) => setQuery ( e . target . value ) }
152+ placeholder = "Search YouTube…"
153+ className = "w-full rounded-lg border border-border-default bg-bg-secondary py-3 pl-11 pr-4 text-sm text-text-primary placeholder:text-text-muted focus:border-accent-primary focus:outline-none focus:ring-1 focus:ring-accent-primary"
154+ disabled = { noAccounts || needsReconnect }
155+ />
156+ </ div >
151157 < button
152158 type = "submit"
153159 disabled = { searching || noAccounts || needsReconnect }
154- className = "rounded bg-red-600 px-4 py-2 font-medium text-white hover:bg-red-700 disabled:opacity-50"
160+ className = "flex items-center justify-center gap-2 rounded-lg bg-accent-primary px-5 py-3 text-sm font-medium text-white transition-colors hover:bg-accent-primary/90 disabled:cursor-not-allowed disabled: opacity-50 md:min-w-[140px] "
155161 >
156- { searching ? 'Searching…' : 'Search' }
162+ { searching ? < >
163+ < LoadingSpinner className = "text-white" size = { 18 } />
164+ < span > Searching…</ span >
165+ </ > : < >
166+ < SearchIcon className = "text-white" size = { 18 } />
167+ < span > Search</ span >
168+ </ > }
157169 </ button >
158170 </ form >
159171
0 commit comments