mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-07-09 14:25:12 +02:00
Try fixing titlebar thing for Windows
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import './main.css';
|
import './main.css';
|
||||||
import { RouterProvider } from '@tanstack/react-router';
|
import { RouterProvider } from '@tanstack/react-router';
|
||||||
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow';
|
|
||||||
import { type } from '@tauri-apps/plugin-os';
|
import { type } from '@tauri-apps/plugin-os';
|
||||||
import { changeModelStoreWorkspace, initModelStore } from '@yaakapp-internal/models';
|
import { changeModelStoreWorkspace, initModelStore } from '@yaakapp-internal/models';
|
||||||
import { StrictMode } from 'react';
|
import { StrictMode } from 'react';
|
||||||
@@ -10,12 +9,7 @@ import { initGlobalListeners } from './lib/initGlobalListeners';
|
|||||||
import { jotaiStore } from './lib/jotai';
|
import { jotaiStore } from './lib/jotai';
|
||||||
import { router } from './lib/router';
|
import { router } from './lib/router';
|
||||||
|
|
||||||
// Hide decorations here because it doesn't work in Rust for some reason (bug?)
|
|
||||||
const osType = type();
|
const osType = type();
|
||||||
if (osType !== 'macos') {
|
|
||||||
await getCurrentWebviewWindow().setDecorations(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
document.documentElement.setAttribute('data-platform', osType);
|
document.documentElement.setAttribute('data-platform', osType);
|
||||||
|
|
||||||
window.addEventListener('keydown', (e) => {
|
window.addEventListener('keydown', (e) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user