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:
Taso authored and Taso committed 2021-03-04 11:33:25 -05:00
1 parent 5969d33dc3
commit 64c4e0ec16
11 files changed
+290 -210

No files matched your search

+11 -10
View File
@@ -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);
};