mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 15:25:46 +00:00
fix(shortcuts): keep shortcut contract in config/ (Rust include_str! path)
The shortcut contract (shortcutActions.ts + shortcutTypes.ts) is NOT a
pure-frontend file: src-tauri/src/cli/parse.rs include_str!s
'/../src/config/shortcutActions.ts' at compile time, so moving it to
lib/shortcuts/ (slice 7ad19671) broke the Rust build (couldn't read the file ->
dev build won't start). Revert the contract back to src/config/ — it has a
build-time backend path contract and belongs where Rust anchors it, not in lib/.
No Rust file touched (fix = restore the frontend path the backend expects).
cargo check green (13s), tsc 0, lint 0/0, frontend suite 319/2353 green.
Lesson: grep src-tauri for include_str!/include_bytes! '../src/...' before
moving ANY frontend file — Rust can pin a TS file by path.
This commit is contained in:
@@ -13,7 +13,7 @@ import { switchActiveServer } from '../../utils/server/switchActiveServer';
|
||||
import i18n from '@/lib/i18n';
|
||||
import { usePlayerStore } from '../../store/playerStore';
|
||||
import { useAuthStore } from '../../store/authStore';
|
||||
import { executeCliPlayerCommand } from '@/lib/shortcuts/shortcutActions';
|
||||
import { executeCliPlayerCommand } from '@/config/shortcutActions';
|
||||
|
||||
/** The full `cli:*` listener surface forwarded from the Rust single-instance
|
||||
* handler: audio-device, instant-mix, library / server resolution, search and
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useEffect } from 'react';
|
||||
import type { NavigateFunction } from 'react-router-dom';
|
||||
import { useKeybindingsStore, buildInAppBinding } from '../../store/keybindingsStore';
|
||||
import { useGlobalShortcutsStore } from '../../store/globalShortcutsStore';
|
||||
import { DEFAULT_IN_APP_BINDINGS, executeRuntimeAction } from '@/lib/shortcuts/shortcutActions';
|
||||
import { DEFAULT_IN_APP_BINDINGS, executeRuntimeAction } from '@/config/shortcutActions';
|
||||
import { matchInAppShortcutAction } from '../../shortcuts/runtime';
|
||||
|
||||
/** Configurable in-app keybindings: matches keydown chords against the user's
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
executeRuntimeAction,
|
||||
isGlobalShortcutActionId,
|
||||
isShortcutAction,
|
||||
} from '@/lib/shortcuts/shortcutActions';
|
||||
} from '@/config/shortcutActions';
|
||||
|
||||
/** Media keys, tray actions, global / cross-window shortcut events, relative &
|
||||
* absolute seek + volume, and the window-close / force-quit exit flow. */
|
||||
|
||||
Reference in New Issue
Block a user