mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-30 04:46:17 -08:00
Overlay 2.0 (#12)
This commit is contained in:
1 parent
45df3c466b
commit
44c7761c7c
397 files changed
+15139
-7127
No files matched your search
@@ -10,7 +10,6 @@ import type { ConfiguredShortcuts } from '../../core/utils/shortcut-config';
|
||||
function createShortcuts(): ConfiguredShortcuts {
|
||||
return {
|
||||
toggleVisibleOverlayGlobal: 'CommandOrControl+Shift+O',
|
||||
toggleInvisibleOverlayGlobal: 'CommandOrControl+Shift+I',
|
||||
copySubtitle: 's',
|
||||
copySubtitleMultiple: 'CommandOrControl+s',
|
||||
updateLastCardFromClipboard: 'c',
|
||||
@@ -58,18 +57,16 @@ test('register global shortcuts handler passes through callbacks and shortcuts',
|
||||
assert.equal(options.isDev, true);
|
||||
assert.equal(options.getMainWindow(), mainWindow);
|
||||
options.onToggleVisibleOverlay();
|
||||
options.onToggleInvisibleOverlay();
|
||||
options.onOpenYomitanSettings();
|
||||
},
|
||||
onToggleVisibleOverlay: () => calls.push('toggle-visible'),
|
||||
onToggleInvisibleOverlay: () => calls.push('toggle-invisible'),
|
||||
onOpenYomitanSettings: () => calls.push('open-yomitan'),
|
||||
isDev: true,
|
||||
getMainWindow: () => mainWindow,
|
||||
});
|
||||
|
||||
registerGlobalShortcuts();
|
||||
assert.deepEqual(calls, ['register', 'toggle-visible', 'toggle-invisible', 'open-yomitan']);
|
||||
assert.deepEqual(calls, ['register', 'toggle-visible', 'open-yomitan']);
|
||||
});
|
||||
|
||||
test('refresh global and overlay shortcuts unregisters then re-registers', () => {
|
||||
|
||||
Reference in new issue
Block a user