Add interface languages and improve themes and workspace controls for 0.1.36
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
<script lang="ts">
|
||||
import { syncLocale } from '$lib/i18n';
|
||||
import { onMount } from 'svelte';
|
||||
import { APPEARANCE_KEY, applyAppearance, parseAppearance } from './appearance';
|
||||
import { CUSTOM_THEMES_KEY } from './customThemes';
|
||||
onMount(() => {
|
||||
const stopLocale = syncLocale();
|
||||
const read = () => {
|
||||
try {
|
||||
const raw = localStorage.getItem(APPEARANCE_KEY);
|
||||
@@ -17,7 +19,7 @@
|
||||
read();
|
||||
window.addEventListener('storage', sync);
|
||||
window.addEventListener('focus', read);
|
||||
return () => { window.removeEventListener('storage', sync); window.removeEventListener('focus', read); };
|
||||
return () => { stopLocale(); window.removeEventListener('storage', sync); window.removeEventListener('focus', read); };
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user