From a44ba4abcb0515e93e8d21ca06155de6edcd7361 Mon Sep 17 00:00:00 2001 From: Martin Vietz Date: Mon, 6 Feb 2023 05:51:51 +0100 Subject: [PATCH] Add toggle open/close entry attachments shortcut --- locale/translations/de_DE.json | 1 + locale/translations/el_EL.json | 1 + locale/translations/en_US.json | 1 + locale/translations/es_ES.json | 1 + locale/translations/fi_FI.json | 1 + locale/translations/fr_FR.json | 1 + locale/translations/hi_IN.json | 1 + locale/translations/it_IT.json | 1 + locale/translations/ja_JP.json | 1 + locale/translations/nl_NL.json | 1 + locale/translations/pl_PL.json | 1 + locale/translations/pt_BR.json | 1 + locale/translations/ru_RU.json | 1 + locale/translations/tr_TR.json | 1 + locale/translations/uk_UA.json | 1 + locale/translations/zh_CN.json | 1 + locale/translations/zh_TW.json | 1 + template/templates/common/layout.html | 1 + ui/static/js/bootstrap.js | 1 + 19 files changed, 19 insertions(+) diff --git a/locale/translations/de_DE.json b/locale/translations/de_DE.json index 4bea3fcc..e374e6c9 100644 --- a/locale/translations/de_DE.json +++ b/locale/translations/de_DE.json @@ -162,6 +162,7 @@ "page.keyboard_shortcuts.scroll_item_to_top": "Artikel nach oben blättern", "page.keyboard_shortcuts.remove_feed": "Dieses Abonnement entfernen", "page.keyboard_shortcuts.go_to_search": "Fokus auf das Suchformular setzen", + "page.keyboard_shortcuts.toggle_entry_attachments": "Artikel Anhänge öffnen/schließen", "page.keyboard_shortcuts.close_modal": "Liste der Tastenkürzel schließen", "page.users.title": "Benutzer", "page.users.username": "Benutzername", diff --git a/locale/translations/el_EL.json b/locale/translations/el_EL.json index d1aa0747..014f5db6 100644 --- a/locale/translations/el_EL.json +++ b/locale/translations/el_EL.json @@ -162,6 +162,7 @@ "page.keyboard_shortcuts.scroll_item_to_top": "Μετακινηση στοιχείου στην κορυφή", "page.keyboard_shortcuts.remove_feed": "Κατάργηση αυτής της ροής", "page.keyboard_shortcuts.go_to_search": "Ορίστε εστίαση στη φόρμα αναζήτησης", + "page.keyboard_shortcuts.toggle_entry_attachments": "Toggle open/close entry attachments", "page.keyboard_shortcuts.close_modal": "Κλείσιμο παραθύρου διαλόγου", "page.users.title": "Χρήστες", "page.users.username": "Χρήστης", diff --git a/locale/translations/en_US.json b/locale/translations/en_US.json index b797a0d5..5c498169 100644 --- a/locale/translations/en_US.json +++ b/locale/translations/en_US.json @@ -162,6 +162,7 @@ "page.keyboard_shortcuts.scroll_item_to_top": "Scroll item to top", "page.keyboard_shortcuts.remove_feed": "Remove this feed", "page.keyboard_shortcuts.go_to_search": "Set focus on search form", + "page.keyboard_shortcuts.toggle_entry_attachments": "Toggle open/close entry attachments", "page.keyboard_shortcuts.close_modal": "Close modal dialog", "page.users.title": "Users", "page.users.username": "Username", diff --git a/locale/translations/es_ES.json b/locale/translations/es_ES.json index 554fbb65..5a5e9306 100644 --- a/locale/translations/es_ES.json +++ b/locale/translations/es_ES.json @@ -162,6 +162,7 @@ "page.keyboard_shortcuts.scroll_item_to_top": "Desplazar elemento hacia arriba", "page.keyboard_shortcuts.remove_feed": "Quitar esta fuente", "page.keyboard_shortcuts.go_to_search": "Centrarse en el cuadro de búsqueda", + "page.keyboard_shortcuts.toggle_entry_attachments": "Toggle open/close entry attachments", "page.keyboard_shortcuts.close_modal": "Cerrar el cuadro de diálogo modal", "page.users.title": "Usuarios", "page.users.username": "Nombre de usuario", diff --git a/locale/translations/fi_FI.json b/locale/translations/fi_FI.json index 945ae938..67e416ce 100644 --- a/locale/translations/fi_FI.json +++ b/locale/translations/fi_FI.json @@ -162,6 +162,7 @@ "page.keyboard_shortcuts.scroll_item_to_top": "Vieritä ylös", "page.keyboard_shortcuts.remove_feed": "Poista tämä syöte", "page.keyboard_shortcuts.go_to_search": "Aseta painopiste hakukenttään", + "page.keyboard_shortcuts.toggle_entry_attachments": "Toggle open/close entry attachments", "page.keyboard_shortcuts.close_modal": "Sulje modaalinen valintaikkuna", "page.users.title": "Käyttäjät", "page.users.username": "Käyttäjätunnus", diff --git a/locale/translations/fr_FR.json b/locale/translations/fr_FR.json index b1a8dbec..bf41b130 100644 --- a/locale/translations/fr_FR.json +++ b/locale/translations/fr_FR.json @@ -162,6 +162,7 @@ "page.keyboard_shortcuts.scroll_item_to_top": "Faire défiler l'élément vers le haut", "page.keyboard_shortcuts.remove_feed": "Supprimer ce flux", "page.keyboard_shortcuts.go_to_search": "Mettre le focus sur le champ de recherche", + "page.keyboard_shortcuts.toggle_entry_attachments": "Toggle open/close entry attachments", "page.keyboard_shortcuts.close_modal": "Fermer la boite de dialogue", "page.users.title": "Utilisateurs", "page.users.username": "Nom d'utilisateur", diff --git a/locale/translations/hi_IN.json b/locale/translations/hi_IN.json index a9249f6a..3d9b5e32 100644 --- a/locale/translations/hi_IN.json +++ b/locale/translations/hi_IN.json @@ -162,6 +162,7 @@ "page.keyboard_shortcuts.scroll_item_to_top": "आइटम को ऊपर तक स्क्रॉल करें", "page.keyboard_shortcuts.remove_feed": "यह फ़ीड हटाएं", "page.keyboard_shortcuts.go_to_search": "सर्च फॉर्म पर फोकस सेट करें", + "page.keyboard_shortcuts.toggle_entry_attachments": "Toggle open/close entry attachments", "page.keyboard_shortcuts.close_modal": "मोडल डायलॉग बंद करें", "page.users.title": "उपभोक्ता", "page.users.username": "यूसर्नेम", diff --git a/locale/translations/it_IT.json b/locale/translations/it_IT.json index 26aad01f..d56f07fb 100644 --- a/locale/translations/it_IT.json +++ b/locale/translations/it_IT.json @@ -162,6 +162,7 @@ "page.keyboard_shortcuts.scroll_item_to_top": "Scorri l'articolo in alto", "page.keyboard_shortcuts.remove_feed": "Rimuovi questo feed", "page.keyboard_shortcuts.go_to_search": "Apri la casella di ricerca", + "page.keyboard_shortcuts.toggle_entry_attachments": "Toggle open/close entry attachments", "page.keyboard_shortcuts.close_modal": "Chiudi la finestra di dialogo", "page.users.title": "Utenti", "page.users.username": "Nome utente", diff --git a/locale/translations/ja_JP.json b/locale/translations/ja_JP.json index 5692d3cb..8c693286 100644 --- a/locale/translations/ja_JP.json +++ b/locale/translations/ja_JP.json @@ -162,6 +162,7 @@ "page.keyboard_shortcuts.scroll_item_to_top": "アイテムが上端になるようにスクロール", "page.keyboard_shortcuts.remove_feed": "このフィードを削除", "page.keyboard_shortcuts.go_to_search": "検索フォームに移動", + "page.keyboard_shortcuts.toggle_entry_attachments": "Toggle open/close entry attachments", "page.keyboard_shortcuts.close_modal": "モーダルダイアログを閉じる", "page.users.title": "ユーザー一覧", "page.users.username": "ユーザー名", diff --git a/locale/translations/nl_NL.json b/locale/translations/nl_NL.json index 5d4879d9..0d856424 100644 --- a/locale/translations/nl_NL.json +++ b/locale/translations/nl_NL.json @@ -163,6 +163,7 @@ "page.keyboard_shortcuts.scroll_item_to_top": "Scroll artikel naar boven", "page.keyboard_shortcuts.remove_feed": "Verwijder deze feed", "page.keyboard_shortcuts.go_to_search": "Focus instellen op zoekformulier", + "page.keyboard_shortcuts.toggle_entry_attachments": "Toggle open/close entry attachments", "page.keyboard_shortcuts.close_modal": "Sluit dialoogscherm", "page.users.title": "Gebruikers", "page.users.username": "Gebruikersnaam", diff --git a/locale/translations/pl_PL.json b/locale/translations/pl_PL.json index 49dffe9f..c14f67e0 100644 --- a/locale/translations/pl_PL.json +++ b/locale/translations/pl_PL.json @@ -164,6 +164,7 @@ "page.keyboard_shortcuts.scroll_item_to_top": "Przewiń artykuł do góry", "page.keyboard_shortcuts.remove_feed": "Usuń ten kanał", "page.keyboard_shortcuts.go_to_search": "Ustaw fokus na formularzu wyszukiwania", + "page.keyboard_shortcuts.toggle_entry_attachments": "Toggle open/close entry attachments", "page.keyboard_shortcuts.close_modal": "Zamknij listę skrótów klawiszowych", "page.users.title": "Użytkownicy", "page.users.username": "Nazwa użytkownika", diff --git a/locale/translations/pt_BR.json b/locale/translations/pt_BR.json index 3c00cce3..8e048a72 100644 --- a/locale/translations/pt_BR.json +++ b/locale/translations/pt_BR.json @@ -162,6 +162,7 @@ "page.keyboard_shortcuts.scroll_item_to_top": "Role o item para cima", "page.keyboard_shortcuts.remove_feed": "Remover essa fonte", "page.keyboard_shortcuts.go_to_search": "Ir para o campo de busca", + "page.keyboard_shortcuts.toggle_entry_attachments": "Toggle open/close entry attachments", "page.keyboard_shortcuts.close_modal": "Fechar janela", "page.users.title": "Usuários", "page.users.username": "Nome de usuário", diff --git a/locale/translations/ru_RU.json b/locale/translations/ru_RU.json index 7d692aaa..9e9603ff 100644 --- a/locale/translations/ru_RU.json +++ b/locale/translations/ru_RU.json @@ -164,6 +164,7 @@ "page.keyboard_shortcuts.scroll_item_to_top": "Прокрутите элемент вверх", "page.keyboard_shortcuts.remove_feed": "Удалить эту подписку", "page.keyboard_shortcuts.go_to_search": "Установить фокус в поисковой форме", + "page.keyboard_shortcuts.toggle_entry_attachments": "Toggle open/close entry attachments", "page.keyboard_shortcuts.close_modal": "Закрыть модальный диалог", "page.users.title": "Пользователи", "page.users.username": "Имя пользователя", diff --git a/locale/translations/tr_TR.json b/locale/translations/tr_TR.json index 11cf8bbe..285c1d1a 100644 --- a/locale/translations/tr_TR.json +++ b/locale/translations/tr_TR.json @@ -162,6 +162,7 @@ "page.keyboard_shortcuts.scroll_item_to_top": "Öğeyi en üste kaydır", "page.keyboard_shortcuts.remove_feed": "Bu beslemeyi kaldır", "page.keyboard_shortcuts.go_to_search": "Arama formuna odakla", + "page.keyboard_shortcuts.toggle_entry_attachments": "Toggle open/close entry attachments", "page.keyboard_shortcuts.close_modal": "İletişim kutusunu kapat", "page.users.title": "Kullanıcılar", "page.users.username": "Kullanıcı adı", diff --git a/locale/translations/uk_UA.json b/locale/translations/uk_UA.json index 0e0015a3..0a45a5c5 100644 --- a/locale/translations/uk_UA.json +++ b/locale/translations/uk_UA.json @@ -161,6 +161,7 @@ "page.keyboard_shortcuts.scroll_item_to_top": "Прокрутити запис догори", "page.keyboard_shortcuts.remove_feed": "Видалити цю стрічку", "page.keyboard_shortcuts.go_to_search": "Поставити фокус на поле пошуку", + "page.keyboard_shortcuts.toggle_entry_attachments": "Toggle open/close entry attachments", "page.keyboard_shortcuts.close_modal": "Закрити модальне діалогове вікно", "page.users.title": "Користувачі", "page.users.username": "Ім’я користувача", diff --git a/locale/translations/zh_CN.json b/locale/translations/zh_CN.json index f3aa8db7..affcdc2f 100644 --- a/locale/translations/zh_CN.json +++ b/locale/translations/zh_CN.json @@ -160,6 +160,7 @@ "page.keyboard_shortcuts.scroll_item_to_top": "滚动到顶部", "page.keyboard_shortcuts.remove_feed": "删除此源", "page.keyboard_shortcuts.go_to_search": "将焦点放在搜索表单上", + "page.keyboard_shortcuts.toggle_entry_attachments": "Toggle open/close entry attachments", "page.keyboard_shortcuts.close_modal": "关闭对话窗口", "page.users.title": "用户", "page.users.username": "用户名", diff --git a/locale/translations/zh_TW.json b/locale/translations/zh_TW.json index 4cfa1e68..8c81190e 100644 --- a/locale/translations/zh_TW.json +++ b/locale/translations/zh_TW.json @@ -162,6 +162,7 @@ "page.keyboard_shortcuts.scroll_item_to_top": "滾動到頂部", "page.keyboard_shortcuts.remove_feed": "刪除此Feed", "page.keyboard_shortcuts.go_to_search": "將焦點放在搜尋表單上", + "page.keyboard_shortcuts.toggle_entry_attachments": "Toggle open/close entry attachments", "page.keyboard_shortcuts.close_modal": "關閉對話視窗", "page.users.title": "使用者", "page.users.username": "使用者名稱", diff --git a/template/templates/common/layout.html b/template/templates/common/layout.html index 75898a75..64641280 100644 --- a/template/templates/common/layout.html +++ b/template/templates/common/layout.html @@ -158,6 +158,7 @@
  • {{ t "page.keyboard_shortcuts.download_content" }} = d
  • {{ t "page.keyboard_shortcuts.toggle_bookmark_status" }} = f
  • {{ t "page.keyboard_shortcuts.save_article" }} = s
  • +
  • {{ t "page.keyboard_shortcuts.toggle_entry_attachments" }} = a
  • {{ t "page.keyboard_shortcuts.scroll_item_to_top" }} = z + t
  • {{ t "page.keyboard_shortcuts.refresh_all_feeds" }} = R
  • {{ t "page.keyboard_shortcuts.remove_feed" }} = #
  • diff --git a/ui/static/js/bootstrap.js b/ui/static/js/bootstrap.js index e21efc73..1942ac7f 100644 --- a/ui/static/js/bootstrap.js +++ b/ui/static/js/bootstrap.js @@ -35,6 +35,7 @@ document.addEventListener("DOMContentLoaded", function () { keyboardHandler.on("+", () => goToAddSubscription()); keyboardHandler.on("#", () => unsubscribeFromFeed()); keyboardHandler.on("/", (e) => setFocusToSearchInput(e)); + keyboardHandler.on("a", () => document.querySelector('.entry-enclosures').toggleAttribute('open')); keyboardHandler.on("Escape", () => ModalHandler.close()); keyboardHandler.listen(); }