@@ -40,6 +40,7 @@ const SettingsPage: React.FC<{ hasUpdate: boolean; onUpdate: () => void }> = ({
40
40
const [ storageInfo , setStorageInfo ] = useState < { usage : string ; quota : string } | undefined > ( )
41
41
const [ imageQuality , setImageQuality , clearImagequality ] = useSettings < boolean > ( "ImagesAreHQ" , false )
42
42
const [ deviceTheme , setDeviceTheme ] = useSettings < DeviceMode > ( "DeviceTheme" , "ios" )
43
+ const [ restartAlert , setRestartAlert ] = useState < boolean > ( false )
43
44
const appVersion = import . meta. env . VITE_VER ?? "Unknown"
44
45
const ionConfig = getConfig ( )
45
46
const currentMode = ionConfig ?. get ( "mode" ) || "ios"
@@ -135,11 +136,13 @@ const SettingsPage: React.FC<{ hasUpdate: boolean; onUpdate: () => void }> = ({
135
136
< IonList inset = { true } >
136
137
< IonItem color = { lightMode } >
137
138
< IonSelect
138
- id = "changed-theme"
139
139
label = "Theme mode"
140
140
interface = "action-sheet"
141
141
value = { deviceTheme }
142
- onIonChange = { ( e ) => setDeviceTheme ( e . detail . value ) }
142
+ onIonChange = { ( e ) => {
143
+ setDeviceTheme ( e . detail . value )
144
+ setRestartAlert ( true )
145
+ } }
143
146
>
144
147
< IonSelectOption value = "ios" > Apple</ IonSelectOption >
145
148
< IonSelectOption value = "md" > Android (beta)</ IonSelectOption >
@@ -226,9 +229,10 @@ const SettingsPage: React.FC<{ hasUpdate: boolean; onUpdate: () => void }> = ({
226
229
] }
227
230
/>
228
231
< IonAlert
229
- trigger = "changed-theme"
232
+ isOpen = { restartAlert }
233
+ onDidDismiss = { ( ) => setRestartAlert ( false ) }
230
234
header = "Reload required"
231
- message = "For changes to take effect, you will need to reload the app."
235
+ message = "For these changes to take effect, you will need to reload the app."
232
236
buttons = { [ "OK" ] }
233
237
/>
234
238
< IonNote color = "medium" class = "ion-margin-horizontal" style = { { display : "block" , textAlign : "center" } } >
0 commit comments