Appearance setting and gzip/etc support

This commit is contained in:
Gregory Schier
2024-01-12 13:39:08 -08:00
parent 138943bfb6
commit 39f7d9c113
15 changed files with 180 additions and 75 deletions

View File

@@ -2,9 +2,7 @@ import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { attachConsole } from 'tauri-plugin-log-api';
import { App } from './components/App';
import { getKeyValue } from './lib/keyValueStore';
import { maybeRestorePathname } from './lib/persistPathname';
import { getPreferredAppearance, setAppearance } from './lib/theme/window';
import './main.css';
await attachConsole();
@@ -15,13 +13,6 @@ document.addEventListener('keydown', (e) => {
if (e.key === 'Backspace') e.preventDefault();
});
setAppearance(
await getKeyValue({
key: 'appearance',
fallback: getPreferredAppearance(),
}),
);
createRoot(document.getElementById('root') as HTMLElement).render(
<StrictMode>
<App />