forked from abner/for-legacy-web
Server Sidebar: Add home icon hover.
Home Sidebar: Remove top bar.
This commit is contained in:
@@ -46,15 +46,3 @@ export type Action =
|
||||
| NotificationsAction
|
||||
| SectionToggleAction
|
||||
| { type: "__INIT"; state: State };
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export function filter(obj: any, keys: string[]) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const newObj: any = {};
|
||||
for (const key of keys) {
|
||||
const v = obj[key];
|
||||
if (v) newObj[key] = v;
|
||||
}
|
||||
|
||||
return newObj;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ import type { Theme, ThemeOptions } from "../../context/Theme";
|
||||
|
||||
import { setEmojiPack } from "../../components/common/Emoji";
|
||||
|
||||
import { filter } from ".";
|
||||
import type { Sounds } from "../../assets/sounds/Audio";
|
||||
import type { SyncUpdateAction } from "./sync";
|
||||
|
||||
@@ -67,7 +66,7 @@ export function settings(
|
||||
return {
|
||||
...state,
|
||||
theme: {
|
||||
...filter(state.theme, ["custom", "preset", "ligatures"]),
|
||||
...state.theme,
|
||||
...action.theme,
|
||||
},
|
||||
};
|
||||
@@ -94,7 +93,7 @@ export function settings(
|
||||
return {
|
||||
...state,
|
||||
appearance: {
|
||||
...filter(state.appearance, ["emojiPack"]),
|
||||
...state.appearance,
|
||||
...action.options,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user