mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-26 03:11:12 +01:00
[WIP] Encryption for secure values (#183)
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { emit, listen } from '@tauri-apps/api/event';
|
||||
import { listen } from '@tauri-apps/api/event';
|
||||
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow';
|
||||
import { setWindowTheme } from '@yaakapp-internal/mac-window';
|
||||
import type { ModelPayload } from '@yaakapp-internal/models';
|
||||
import { getSettings } from './lib/settings';
|
||||
import type { Appearance } from './lib/theme/appearance';
|
||||
import { getCSSAppearance, subscribeToPreferredAppearance } from './lib/theme/appearance';
|
||||
import { getResolvedTheme } from './lib/theme/themes';
|
||||
import { addThemeStylesToDocument, setThemeOnDocument, type YaakTheme } from './lib/theme/window';
|
||||
import { addThemeStylesToDocument, setThemeOnDocument } from './lib/theme/window';
|
||||
|
||||
// NOTE: CSS appearance isn't as accurate as getting it async from the window (next step), but we want
|
||||
// a good appearance guess so we're not waiting too long
|
||||
@@ -40,10 +41,7 @@ async function configureTheme() {
|
||||
);
|
||||
addThemeStylesToDocument(theme.active);
|
||||
setThemeOnDocument(theme.active);
|
||||
emitBgChange(theme.active);
|
||||
}
|
||||
|
||||
function emitBgChange(t: YaakTheme) {
|
||||
if (t.surface == null) return;
|
||||
emit('yaak_bg_changed', t.surface.hexNoAlpha()).catch(console.error);
|
||||
if (theme.active.surface != null) {
|
||||
setWindowTheme(theme.active.surface.hexNoAlpha());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user