11import { AppBar } from 'mai-ui/dist/components/appbar' ;
2- import {
3- Input ,
4- RangeRow ,
5- Select ,
6- ToggleRow ,
7- } from 'mai-ui/dist/components/form' ;
8- import {
9- View ,
10- ViewHeader ,
11- ViewTab ,
12- ViewTabBar ,
13- } from 'mai-ui/dist/components/view' ;
2+ import { Input , RangeRow , Select , ToggleRow } from 'mai-ui/dist/components/form' ;
3+ import { View , ViewTab , ViewTabBar } from 'mai-ui/dist/components/view' ;
144import { useListNav } from 'mai-ui/dist/hooks' ;
155import { h , VNode } from 'preact' ;
166import { route } from 'preact-router' ;
177import { FoxcastsAppMenu } from '../components/FoxcastsAppMenu' ;
8+ import Statusbar from '../components/Statusbar' ;
189import { useSettings } from '../contexts/SettingsProvider' ;
1910import { SelectablePriority } from '../enums' ;
2011import {
@@ -40,10 +31,7 @@ export default function AppSettings({ tabId }: Props): VNode {
4031 updateRouteOnChange : false ,
4132 } ) ;
4233
43- function handleSettingSelect < T extends keyof Settings > (
44- key : T ,
45- value : Settings [ T ]
46- ) : void {
34+ function handleSettingSelect < T extends keyof Settings > ( key : T , value : Settings [ T ] ) : void {
4735 if ( key === 'theme' ) {
4836 // We want to use the theme's original accent color
4937 const theme = themes . find ( ( a ) => a . id === value ) as ThemeConfig ;
@@ -59,7 +47,7 @@ export default function AppSettings({ tabId }: Props): VNode {
5947
6048 return (
6149 < View >
62- < ViewHeader > Settings</ ViewHeader >
50+ < Statusbar text = " Settings" / >
6351 < ViewTabBar
6452 tabs = { [
6553 { id : 'display' , label : 'display' } ,
@@ -150,8 +138,7 @@ export default function AppSettings({ tabId }: Props): VNode {
150138 selected : selectedId === 'accentColor' ,
151139 } }
152140 onChange = { ( value ) =>
153- value . match ( / [ 0 - 9 a - f A - F ] { 6 } / ) &&
154- handleSettingSelect ( 'accentColor' , value )
141+ value . match ( / [ 0 - 9 a - f A - F ] { 6 } / ) && handleSettingSelect ( 'accentColor' , value )
155142 }
156143 />
157144 < ToggleRow
@@ -170,9 +157,7 @@ export default function AppSettings({ tabId }: Props): VNode {
170157 id : 'dynamicThemeColor' ,
171158 selected : selectedId === 'dynamicThemeColor' ,
172159 } }
173- onChange = { ( value ) : void =>
174- handleSettingSelect ( 'dynamicThemeColor' , value )
175- }
160+ onChange = { ( value ) : void => handleSettingSelect ( 'dynamicThemeColor' , value ) }
176161 />
177162 < ToggleRow
178163 label = "Dynamic Background"
@@ -181,9 +166,7 @@ export default function AppSettings({ tabId }: Props): VNode {
181166 id : 'dynamicBackgrounds' ,
182167 selected : selectedId === 'dynamicBackgrounds' ,
183168 } }
184- onChange = { ( value ) : void =>
185- handleSettingSelect ( 'dynamicBackgrounds' , value )
186- }
169+ onChange = { ( value ) : void => handleSettingSelect ( 'dynamicBackgrounds' , value ) }
187170 />
188171 </ ViewTab >
189172 < ViewTab tabId = "player" activeTabId = { tabId } >
@@ -224,9 +207,7 @@ export default function AppSettings({ tabId }: Props): VNode {
224207 id : 'playbackSkipBack' ,
225208 selected : selectedId === 'playbackSkipBack' ,
226209 } }
227- onChange = { ( value ) : void =>
228- handleSettingSelect ( 'playbackSkipBack' , value )
229- }
210+ onChange = { ( value ) : void => handleSettingSelect ( 'playbackSkipBack' , value ) }
230211 />
231212 < RangeRow
232213 label = "Skip Forward"
@@ -239,9 +220,7 @@ export default function AppSettings({ tabId }: Props): VNode {
239220 id : 'playbackSkipForward' ,
240221 selected : selectedId === 'playbackSkipForward' ,
241222 } }
242- onChange = { ( value ) : void =>
243- handleSettingSelect ( 'playbackSkipForward' , value )
244- }
223+ onChange = { ( value ) : void => handleSettingSelect ( 'playbackSkipForward' , value ) }
245224 />
246225 < RangeRow
247226 label = "Playback Speed"
@@ -254,9 +233,7 @@ export default function AppSettings({ tabId }: Props): VNode {
254233 id : 'playbackSpeed' ,
255234 selected : selectedId === 'playbackSpeed' ,
256235 } }
257- onChange = { ( value ) : void =>
258- handleSettingSelect ( 'playbackSpeed' , value )
259- }
236+ onChange = { ( value ) : void => handleSettingSelect ( 'playbackSpeed' , value ) }
260237 />
261238 < ToggleRow
262239 label = "Auto Delete Download"
@@ -266,9 +243,7 @@ export default function AppSettings({ tabId }: Props): VNode {
266243 id : 'autoDeleteDownload' ,
267244 selected : selectedId === 'autoDeleteDownload' ,
268245 } }
269- onChange = { ( value ) : void =>
270- handleSettingSelect ( 'autoDeleteDownload' , value )
271- }
246+ onChange = { ( value ) : void => handleSettingSelect ( 'autoDeleteDownload' , value ) }
272247 />
273248 </ ViewTab >
274249 < AppBar appMenuContent = { < FoxcastsAppMenu /> } />
0 commit comments