making WEB

Signed-off-by: faumaray <faumaray@gmail.com>
This commit is contained in:
faumaray committed 2026-07-11 00:47:52 +03:00
1 parent 7a18682b0e
commit 24fecc90f3
107 files changed
+14935 -1919

No files matched your search

@@ -0,0 +1,34 @@
import { appStore } from '../lib/app';
import { useStore } from '../lib/store';
import { SHORTCUTS } from '../lib/shortcuts';
import { t } from '../i18n';
// Cheat-sheet overlay for keyboard shortcuts, toggled with "?".
export function ShortcutsHelp() {
const s = useStore(appStore);
if (!s.shortcutsOpen) return null;
return (
<div
className="modal-backdrop"
onClick={() => appStore.set({ shortcutsOpen: false })}
>
<div className="modal shortcuts-modal" onClick={(e) => e.stopPropagation()}>
<h2>{t('Keyboard shortcuts')}</h2>
<div className="shortcuts-list">
{SHORTCUTS.map((sc) => (
<div key={sc.keys} className="shortcut-row">
<kbd>{sc.keys}</kbd>
<span>{t(sc.label)}</span>
</div>
))}
</div>
<button
className="btn btn-ghost"
onClick={() => appStore.set({ shortcutsOpen: false })}
>
{t('Close')}
</button>
</div>
</div>
);
}