From 7a4096240ce4faf70a785d047945388baa0daab3 Mon Sep 17 00:00:00 2001 From: Eloy Robillard Date: Thu, 15 Feb 2024 04:02:36 +0100 Subject: [PATCH 1/7] Show all duplicate notes on click (#636) * Show all duplicate notes on click * Change 'notesView' to 'viewNotes' * Replace api.noteView with api.viewNotes * Update "viewNote" action to "viewNotes" in options util * Update options-util test with "viewNotes" action * Replace uses of "viewNote" with "viewNotes" * Replace _viewNote with _viewNotes * Rename /*ViewNote*/ methods to /*ViewNotes*/ --- ext/data/schemas/options-schema.json | 2 +- ext/display-templates.html | 4 +- ext/js/background/backend.js | 13 +++--- ext/js/comm/anki-connect.js | 8 ++++ ext/js/comm/api.js | 12 ++--- ext/js/data/options-util.js | 17 ++++++- ext/js/display/display-anki.js | 46 ++++++++++--------- ext/js/pages/settings/anki-controller.js | 2 +- .../settings/keyboard-shortcuts-controller.js | 2 +- ext/settings.html | 2 +- test/options-util.test.js | 4 +- types/ext/api.d.ts | 4 +- 12 files changed, 70 insertions(+), 46 deletions(-) diff --git a/ext/data/schemas/options-schema.json b/ext/data/schemas/options-schema.json index 24f3a6b0e4..ea7caf0fcd 100644 --- a/ext/data/schemas/options-schema.json +++ b/ext/data/schemas/options-schema.json @@ -1187,7 +1187,7 @@ {"action": "addNoteTermKanji", "argument": "", "key": "KeyE", "modifiers": ["alt"], "scopes": ["popup", "search"], "enabled": true}, {"action": "addNoteTermKana", "argument": "", "key": "KeyR", "modifiers": ["alt"], "scopes": ["popup", "search"], "enabled": true}, {"action": "playAudio", "argument": "", "key": "KeyP", "modifiers": ["alt"], "scopes": ["popup", "search"], "enabled": true}, - {"action": "viewNote", "argument": "", "key": "KeyV", "modifiers": ["alt"], "scopes": ["popup", "search"], "enabled": true}, + {"action": "viewNotes", "argument": "", "key": "KeyV", "modifiers": ["alt"], "scopes": ["popup", "search"], "enabled": true}, {"action": "copyHostSelection", "argument": "", "key": "KeyC", "modifiers": ["ctrl"], "scopes": ["popup"], "enabled": true} ] } diff --git a/ext/display-templates.html b/ext/display-templates.html index a50cea3b9d..caf5920c8e 100644 --- a/ext/display-templates.html +++ b/ext/display-templates.html @@ -8,7 +8,7 @@ - @@ -111,7 +111,7 @@
-
-