1
0

upd: add corner roundness setting

This commit is contained in:
ShittyKopper
2023-10-31 21:21:29 +03:00
parent 5ab8dcf2be
commit e1844db11b
7 changed files with 34 additions and 0 deletions
@@ -114,6 +114,7 @@ type Profile = {
hot: Record<keyof typeof defaultStoreSaveKeys, unknown>;
cold: Record<keyof typeof coldDeviceStorageSaveKeys, unknown>;
fontSize: string | null;
cornerRadius: string | null;
useSystemFont: 't' | null;
wallpaper: string | null;
};
@@ -171,6 +172,7 @@ function getSettings(): Profile['settings'] {
hot,
cold,
fontSize: miLocalStorage.getItem('fontSize'),
cornerRadius: miLocalStorage.getItem('cornerRadius'),
useSystemFont: miLocalStorage.getItem('useSystemFont') as 't' | null,
wallpaper: miLocalStorage.getItem('wallpaper'),
};
@@ -284,6 +286,13 @@ async function applyProfile(id: string): Promise<void> {
miLocalStorage.removeItem('fontSize');
}
// cornerRadius
if (settings.cornerRadius) {
miLocalStorage.setItem('cornerRadius', settings.cornerRadius);
} else {
miLocalStorage.removeItem('cornerRadius');
}
// useSystemFont
if (settings.useSystemFont) {
miLocalStorage.setItem('useSystemFont', settings.useSystemFont);