Basic Linux/Windows integrated titlebar

This commit is contained in:
Gregory Schier
2024-01-13 23:40:32 -08:00
parent 3086d815c1
commit 3a4a76c58d
11 changed files with 133 additions and 60 deletions

View File

@@ -1,8 +1,8 @@
import type { OsType } from '@tauri-apps/api/os';
import { useEffect, useRef } from 'react';
import { capitalize } from '../lib/capitalize';
import { debounce } from '../lib/debounce';
import { useOsInfo } from './useOsInfo';
import type {OsType} from '@tauri-apps/api/os';
import {useEffect, useRef} from 'react';
import {capitalize} from '../lib/capitalize';
import {debounce} from '../lib/debounce';
import {useOsInfo} from './useOsInfo';
export type HotkeyAction =
| 'request.send'
@@ -87,6 +87,8 @@ export function useAnyHotkey(
currentKeys.current.add(normalizeKey(e.key, os));
console.log("HOTKEY", e.key);
for (const [hkAction, hkKeys] of Object.entries(hotkeys) as [HotkeyAction, string[]][]) {
for (const hkKey of hkKeys) {
const keys = hkKey.split('+');