mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-26 03:46:25 -08:00
chore: add changeset and fix formatting
This commit is contained in:
1 parent
73517807e2
commit
a2d5260465
3 files changed
+18
-8
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
default: minor
|
||||
---
|
||||
|
||||
Add a customizable Global shortcut to show or hide the app window
|
||||
@@ -7,13 +7,14 @@ import { defaultSettings, settingsAtom } from '$state/settings';
|
||||
import type * as PlatformUtils from '$utils/platform';
|
||||
import { KeyboardShortcuts } from './KeyboardShortcuts';
|
||||
|
||||
const { mockGetDesktopRuntimeState, mockIsDesktopTauri, mockSetToggleWindowShortcut } =
|
||||
vi.hoisted(() => ({
|
||||
const { mockGetDesktopRuntimeState, mockIsDesktopTauri, mockSetToggleWindowShortcut } = vi.hoisted(
|
||||
() => ({
|
||||
mockGetDesktopRuntimeState: vi.fn<() => Promise<DesktopRuntimeState>>(),
|
||||
mockIsDesktopTauri: vi.fn<() => boolean>(() => true),
|
||||
mockSetToggleWindowShortcut: vi
|
||||
.fn<(params: { binding: string | null }) => Promise<DesktopRuntimeState>>(),
|
||||
}));
|
||||
mockSetToggleWindowShortcut:
|
||||
vi.fn<(params: { binding: string | null }) => Promise<DesktopRuntimeState>>(),
|
||||
})
|
||||
);
|
||||
|
||||
vi.mock('$generated/tauri/commands', () => ({
|
||||
getDesktopRuntimeState: mockGetDesktopRuntimeState,
|
||||
|
||||
@@ -17,7 +17,11 @@ import {
|
||||
getShortcutBinding,
|
||||
isDesktopOnlyShortcut,
|
||||
} from '../../../keyboard/shortcuts';
|
||||
import type { ShortcutDefinition, ShortcutId, ShortcutOverrides } from '../../../keyboard/shortcuts';
|
||||
import type {
|
||||
ShortcutDefinition,
|
||||
ShortcutId,
|
||||
ShortcutOverrides,
|
||||
} from '../../../keyboard/shortcuts';
|
||||
|
||||
function ShortcutKeys({ binding }: { binding: string | null }) {
|
||||
const label = formatShortcut(binding);
|
||||
@@ -226,8 +230,8 @@ export function KeyboardShortcuts({ requestBack, requestClose }: KeyboardShortcu
|
||||
<PageContent>
|
||||
<Box direction="Column" gap="600">
|
||||
<Text size="T300" priority="300">
|
||||
Choose Change, then press a new key combination. App-wide shortcuts do not run
|
||||
while typing unless the action specifically supports it.
|
||||
Choose Change, then press a new key combination. App-wide shortcuts do not run while
|
||||
typing unless the action specifically supports it.
|
||||
</Text>
|
||||
{CATEGORIES.map((category) => (
|
||||
<Box key={category} direction="Column" gap="100">
|
||||
|
||||
Reference in new issue
Block a user