mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-09 18:53:38 +02:00
Allow disabling window decorations/controls (#176)
Co-authored-by: Gregory Schier <gschier1990@gmail.com>
This commit is contained in:
committed by
GitHub
parent
432b366105
commit
be82b67ed3
@@ -2,7 +2,6 @@ import { type } from '@tauri-apps/plugin-os';
|
||||
import { debounce } from '@yaakapp-internal/lib';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { capitalize } from '../lib/capitalize';
|
||||
import { useOsInfo } from './useOsInfo';
|
||||
|
||||
const HOLD_KEYS = ['Shift', 'Control', 'Command', 'Alt', 'Meta'];
|
||||
|
||||
@@ -176,13 +175,12 @@ export function useHotKeyLabel(action: HotkeyAction): string {
|
||||
}
|
||||
|
||||
export function useFormattedHotkey(action: HotkeyAction | null): string[] | null {
|
||||
const osInfo = useOsInfo();
|
||||
const trigger = action != null ? (hotkeys[action]?.[0] ?? null) : null;
|
||||
if (trigger == null || osInfo == null) {
|
||||
if (trigger == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const os = osInfo.osType;
|
||||
const os = type();
|
||||
const parts = trigger.split('+');
|
||||
const labelParts: string[] = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user