feat(mobx): start work on migrations

This commit is contained in:
Paul Makles
2021-12-20 12:01:45 +00:00
parent 89dda8fe82
commit 68578d2620
8 changed files with 105 additions and 99 deletions

View File

@@ -34,7 +34,13 @@ import { ThemeBaseSelector } from "./appearance/ThemeBaseSelector";
export const ThemeBaseSelectorShim = observer(() => {
const theme = useApplicationState().settings.theme;
return (
<ThemeBaseSelector value={theme.getBase()} setValue={theme.setBase} />
<ThemeBaseSelector
value={theme.isModified() ? undefined : theme.getBase()}
setValue={(base) => {
theme.setBase(base);
theme.reset();
}}
/>
);
});
@@ -97,10 +103,6 @@ export const ThemeCustomCSSShim = observer(() => {
);
});
export const ThemeImporterShim = observer(() => {
return <a></a>;
});
/**
* Component providing a way to switch between compact and normal message view.
*/

View File

@@ -92,7 +92,7 @@ export function EmojiSelector({ value, setValue }: Props) {
<div
class="button"
onClick={() => setValue("mutant")}
data-active={value === "mutant"}>
data-active={!value || value === "mutant"}>
<img
loading="eager"
src={mutantSVG}