mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
enhance(phone/settings): Added labels to settings and misc cleanup
This change alters the default localStorage schema, please clear your localStorage cache for testing
This commit is contained in:
1 parent
5969d33dc3
commit
64c4e0ec16
11 files changed
+290
-210
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { atom, DefaultValue, useRecoilState } from 'recoil';
|
||||
import config from '../../../config/default.json';
|
||||
import { SettingOption } from '../../../ui/hooks/useContextMenu';
|
||||
|
||||
const localStorageEffect = (key) => ({ setSelf, onSet }) => {
|
||||
const savedVal = localStorage.getItem(key);
|
||||
@@ -23,19 +24,19 @@ export const settingsState = atom({
|
||||
});
|
||||
|
||||
export interface IPhoneSettings {
|
||||
wallpaper: string;
|
||||
frame: string;
|
||||
theme: string;
|
||||
zoom: number;
|
||||
ringtone: string;
|
||||
wallpaper: SettingOption;
|
||||
frame: SettingOption;
|
||||
theme: SettingOption;
|
||||
zoom: SettingOption;
|
||||
ringtone: SettingOption;
|
||||
ringtoneVol: number;
|
||||
notification: string;
|
||||
notificationVol: number;
|
||||
TWITTER_notification: string;
|
||||
TWITTER_notificationVol: number;
|
||||
notiSound: SettingOption;
|
||||
notiSoundVol: number;
|
||||
TWITTER_notiSound: SettingOption;
|
||||
TWITTER_notiSoundVol: number;
|
||||
TWITTER_notifyNewFeedTweet: boolean;
|
||||
}
|
||||
|
||||
export const useSettings = () => {
|
||||
return useRecoilState<IPhoneSettings>(settingsState);
|
||||
return useRecoilState(settingsState);
|
||||
};
|
||||
Reference in new issue
Block a user