Refactor commands and DB

This commit is contained in:
Gregory Schier
2024-02-01 02:29:24 -08:00
parent 3ab1f5308c
commit c655557313
46 changed files with 534 additions and 540 deletions

View File

@@ -1,15 +1,12 @@
import { invoke } from '@tauri-apps/api';
import { type } from '@tauri-apps/api/os';
import { appWindow } from '@tauri-apps/api/window';
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { attachConsole } from 'tauri-plugin-log-api';
import { App } from './components/App';
import { maybeRestorePathname } from './lib/persistPathname';
import './main.css';
import { getSettings } from './lib/store';
import type { Appearance } from './lib/theme/window';
import { setAppearanceOnDocument } from './lib/theme/window';
import { appWindow } from '@tauri-apps/api/window';
import { type } from '@tauri-apps/api/os';
// Hide decorations here because it doesn't work in Rust for some reason (bug?)
const osType = await type();
@@ -17,8 +14,8 @@ if (osType !== 'Darwin') {
await appWindow.setDecorations(false);
}
await attachConsole();
await maybeRestorePathname();
// await attachConsole();
// await maybeRestorePathname();
const settings = await getSettings();
setAppearanceOnDocument(settings.appearance as Appearance);