fix: more opendyslexic stuff

This commit is contained in:
Draconizations 2022-04-25 19:10:17 +02:00
parent 9a4699da46
commit 196a71e1b1
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ import DiscordLogin from "./pages/DiscordLogin.svelte";
onMount(() => {
let settings = JSON.parse(localStorage.getItem("pk-settings"));
if (settings && settings.accessibility.opendyslexic === true) {
if (settings && settings.accessibility && settings.accessibility.opendyslexic === true) {
document.getElementById("app").classList.add("dyslexic");
}
});

View File

@ -67,7 +67,7 @@
<Row>
<Col xs={12} lg={4} class="mb-2">
<span id="s-opendyslexic">Use the opendyslexic font?</span> <Toggle hideLabel style="display: inline" label="Use the opendyslexic font" toggled={settings.accessibility.opendyslexic} on:toggle={() => {settings.accessibility.opendyslexic = !settings.accessibility.opendyslexic; localStorage.setItem("pk-settings", JSON.stringify(settings)); toggleOpenDyslexic();}}/>
<Tooltip target="s-bannertop" placement="bottom">If enabled, uses the opendyslexic font as it's main font.</Tooltip>
<Tooltip target="s-opendyslexic" placement="bottom">If enabled, uses the opendyslexic font as it's main font.</Tooltip>
</Col>
</Row>
</CardBody>