diff options
author | maTh <1645099+math-GH@users.noreply.github.com> | 2025-02-03 08:47:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-03 08:47:25 +0100 |
commit | a697ca54ad7f723e52fc6591761e1f2f8b7877d6 (patch) | |
tree | 7a0d7a852b90d5df41e16e33233cbb9c203cf2a1 | |
parent | 7e90dfd0485a6684f5dfe7f2abdd92c6f7acb9d0 (diff) | |
download | freshrss-a697ca54ad7f723e52fc6591761e1f2f8b7877d6.tar.gz freshrss-a697ca54ad7f723e52fc6591761e1f2f8b7877d6.zip |
Shortcuts for adding labels (#7274)
* add shortcut in config
* open my labels menu with shortcut
* the first 9 items are selectable + input field
* i18n
* Update app/i18n/nl/conf.php
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
* index.menu.mylabels
* order fixed
---------
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
37 files changed, 93 insertions, 38 deletions
diff --git a/app/Models/Context.php b/app/Models/Context.php index 8bee4630a..d20d8ed17 100644 --- a/app/Models/Context.php +++ b/app/Models/Context.php @@ -485,7 +485,7 @@ final class FreshRSS_Context { case 'T': $tagDAO = FreshRSS_Factory::createTagDao(); self::$current_get['tags'] = true; - self::$name = _t('index.menu.tags'); + self::$name = _t('index.menu.mylabels'); self::$get_unread = $tagDAO->countNotRead(); break; default: diff --git a/app/i18n/cs/index.php b/app/i18n/cs/index.php index 8658969c8..851952142 100644 --- a/app/i18n/cs/index.php +++ b/app/i18n/cs/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Označit kategorii jako přečtenou', 'mark_feed_read' => 'Označit kanál jako přečtený', 'mark_selection_unread' => 'Označit výběr jako nepřečtený', + 'mylabels' => 'Mé popisky', 'newer_first' => 'Nejdříve novější', 'non-starred' => 'Zobrazit neoblíbené', 'normal_view' => 'Normální zobrazení', @@ -90,7 +91,6 @@ return array( 'starred' => 'Zobrazit oblíbené', 'stats' => 'Statistika', 'subscription' => 'Správa odběrů', - 'tags' => 'Mé popisky', 'unread' => 'Zobrazit nepřečtené', ), 'share' => 'Sdílet', diff --git a/app/i18n/de/index.php b/app/i18n/de/index.php index d587dcf72..7d0bfc784 100644 --- a/app/i18n/de/index.php +++ b/app/i18n/de/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Kategorie als gelesen markieren', 'mark_feed_read' => 'Feed als gelesen markieren', 'mark_selection_unread' => 'Auswahl als ungelesen markieren', + 'mylabels' => 'Meine Labels', 'newer_first' => 'Neuere zuerst', 'non-starred' => 'Alle außer Favoriten zeigen', 'normal_view' => 'Normale Ansicht', @@ -90,7 +91,6 @@ return array( 'starred' => 'Nur Favoriten zeigen', 'stats' => 'Statistiken', 'subscription' => 'Abonnementverwaltung', - 'tags' => 'Meine Labels', 'unread' => 'Nur ungelesene zeigen', ), 'share' => 'Teilen', diff --git a/app/i18n/el/index.php b/app/i18n/el/index.php index cd2758a87..115300df0 100644 --- a/app/i18n/el/index.php +++ b/app/i18n/el/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Mark category as read', // TODO 'mark_feed_read' => 'Mark feed as read', // TODO 'mark_selection_unread' => 'Mark selection as unread', // TODO + 'mylabels' => 'My labels', // TODO 'newer_first' => 'Newer first', // TODO 'non-starred' => 'Show non-favourites', // TODO 'normal_view' => 'Normal view', // TODO @@ -90,7 +91,6 @@ return array( 'starred' => 'Show favourites', // TODO 'stats' => 'Statistics', // TODO 'subscription' => 'Subscription management', // TODO - 'tags' => 'My labels', // TODO 'unread' => 'Show unread', // TODO ), 'share' => 'Share', // TODO diff --git a/app/i18n/en-us/index.php b/app/i18n/en-us/index.php index 69f34e262..5e7e33090 100644 --- a/app/i18n/en-us/index.php +++ b/app/i18n/en-us/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Mark category as read', // IGNORE 'mark_feed_read' => 'Mark feed as read', // IGNORE 'mark_selection_unread' => 'Mark selection as unread', // IGNORE + 'mylabels' => 'My labels', // IGNORE 'newer_first' => 'Newer first', // IGNORE 'non-starred' => 'Show non-favorites', 'normal_view' => 'Normal view', // IGNORE @@ -90,7 +91,6 @@ return array( 'starred' => 'Show favorites', 'stats' => 'Statistics', // IGNORE 'subscription' => 'Subscription management', // IGNORE - 'tags' => 'My labels', // IGNORE 'unread' => 'Show unread', // IGNORE ), 'share' => 'Share', // IGNORE diff --git a/app/i18n/en/index.php b/app/i18n/en/index.php index dcb318e79..0492a4694 100644 --- a/app/i18n/en/index.php +++ b/app/i18n/en/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Mark category as read', 'mark_feed_read' => 'Mark feed as read', 'mark_selection_unread' => 'Mark selection as unread', + 'mylabels' => 'My labels', 'newer_first' => 'Newer first', 'non-starred' => 'Show non-favourites', 'normal_view' => 'Normal view', @@ -90,7 +91,6 @@ return array( 'starred' => 'Show favourites', 'stats' => 'Statistics', 'subscription' => 'Subscription management', - 'tags' => 'My labels', 'unread' => 'Show unread', ), 'share' => 'Share', diff --git a/app/i18n/es/index.php b/app/i18n/es/index.php index 9ebd93dbc..5b8a35634 100644 --- a/app/i18n/es/index.php +++ b/app/i18n/es/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Marcar categoría como leída', 'mark_feed_read' => 'Marcar fuente como leída', 'mark_selection_unread' => 'Marcar la selección como no leída', + 'mylabels' => 'Mis etiquetas', 'newer_first' => 'Nuevos primero', 'non-starred' => 'Mostrar todos menos los favoritos', 'normal_view' => 'Vista normal', @@ -90,7 +91,6 @@ return array( 'starred' => 'Mostrar solo los favoritos', 'stats' => 'Estadísticas', 'subscription' => 'Administración de suscripciones', - 'tags' => 'Mis etiquetas', 'unread' => 'Mostrar solo no leídos', ), 'share' => 'Compartir', diff --git a/app/i18n/fa/index.php b/app/i18n/fa/index.php index 9a1d17624..e184a0617 100644 --- a/app/i18n/fa/index.php +++ b/app/i18n/fa/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => ' دسته را به عنوان خوانده شده علامت گذاری کنید', 'mark_feed_read' => ' فید را به عنوان خوانده شده علامت گذاری کنید', 'mark_selection_unread' => ' انتخاب را به عنوان خوانده نشده علامت گذاری کنید', + 'mylabels' => ' برچسب های من', 'newer_first' => ' ابتدا جدیدتر', 'non-starred' => ' موارد غیر مورد علاقه را نشان دهید', 'normal_view' => ' نمای عادی', @@ -90,7 +91,6 @@ return array( 'starred' => ' نمایش موارد دلخواه', 'stats' => ' آمار', 'subscription' => ' مدیریت اشتراک', - 'tags' => ' برچسب های من', 'unread' => ' نمایش خوانده نشده', ), 'share' => ' به اشتراک بگذارید', diff --git a/app/i18n/fi/index.php b/app/i18n/fi/index.php index 229d31168..9cc0a4ad0 100644 --- a/app/i18n/fi/index.php +++ b/app/i18n/fi/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Merkitse luokka luetuksi', 'mark_feed_read' => 'Merkitse syöte luetuksi', 'mark_selection_unread' => 'Merkitse valitut lukemattomiksi', + 'mylabels' => 'Omat tunnisteet', 'newer_first' => 'Uusin ensin', 'non-starred' => 'Näytä muut kuin suosikit', 'normal_view' => 'Tavallinen näkymä', @@ -90,7 +91,6 @@ return array( 'starred' => 'Näytä suosikit', 'stats' => 'Tilastot', 'subscription' => 'Tilausten hallinta', - 'tags' => 'Omat tunnisteet', 'unread' => 'Näytä lukemattomat', ), 'share' => 'Jaa', diff --git a/app/i18n/fr/index.php b/app/i18n/fr/index.php index 709387d18..c1cb5647c 100644 --- a/app/i18n/fr/index.php +++ b/app/i18n/fr/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Marquer la catégorie comme lue', 'mark_feed_read' => 'Marquer le flux comme lu', 'mark_selection_unread' => 'Marquer la sélection comme non-lue', + 'mylabels' => 'Mes étiquettes', 'newer_first' => 'Plus récents en premier', 'non-starred' => 'Afficher les non-favoris', 'normal_view' => 'Vue normale', @@ -90,7 +91,6 @@ return array( 'starred' => 'Afficher les favoris', 'stats' => 'Statistiques', 'subscription' => 'Gestion des abonnements', - 'tags' => 'Mes étiquettes', 'unread' => 'Afficher les non-lus', ), 'share' => 'Partager', diff --git a/app/i18n/he/index.php b/app/i18n/he/index.php index c73feec05..6e75eff27 100644 --- a/app/i18n/he/index.php +++ b/app/i18n/he/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'סימון קטגוריה כנקראה', 'mark_feed_read' => 'סימון הזנה כנקראה', 'mark_selection_unread' => 'Mark selection as unread', // TODO + 'mylabels' => 'My labels', // TODO 'newer_first' => 'חדשים בראש', 'non-starred' => 'הצגת הכל פרט למועדפים', 'normal_view' => 'תצוגה רגילה', @@ -90,7 +91,6 @@ return array( 'starred' => 'הצגת מועדפים בלבד', 'stats' => 'סטטיסטיקות', 'subscription' => 'ניהול הרשמות', - 'tags' => 'My labels', // TODO 'unread' => 'הצגת מאמרים שלא נקראו בלבד', ), 'share' => 'שיתוף', diff --git a/app/i18n/hu/index.php b/app/i18n/hu/index.php index a1e7907b3..b5406ed98 100644 --- a/app/i18n/hu/index.php +++ b/app/i18n/hu/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Kategória megjelölése olvasottként', 'mark_feed_read' => 'Hírforrás megjelölése olvasottként', 'mark_selection_unread' => 'Kijelöltek olvasatlanná tétele', + 'mylabels' => 'Címkék', 'newer_first' => 'Újabbak elöl', 'non-starred' => 'Nem kedvencek megjelenítése', 'normal_view' => 'Normál nézet', @@ -90,7 +91,6 @@ return array( 'starred' => 'Kedvencek megjelenítése', 'stats' => 'Statisztika', 'subscription' => 'Hírforrások kezelése', - 'tags' => 'Címkék', 'unread' => 'Olvasatlanok megjelenítése', ), 'share' => 'Megosztás', diff --git a/app/i18n/id/index.php b/app/i18n/id/index.php index 8ce20c9be..2cacf7547 100644 --- a/app/i18n/id/index.php +++ b/app/i18n/id/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Mark category as read', // TODO 'mark_feed_read' => 'Mark feed as read', // TODO 'mark_selection_unread' => 'Mark selection as unread', // TODO + 'mylabels' => 'My labels', // TODO 'newer_first' => 'Newer first', // TODO 'non-starred' => 'Show non-favorites', 'normal_view' => 'Normal view', // TODO @@ -90,7 +91,6 @@ return array( 'starred' => 'Show favorites', 'stats' => 'Statistics', // TODO 'subscription' => 'Subscription management', // TODO - 'tags' => 'My labels', // TODO 'unread' => 'Show unread', // TODO ), 'share' => 'Share', // TODO diff --git a/app/i18n/it/index.php b/app/i18n/it/index.php index ff2dc080c..95a5c14d1 100644 --- a/app/i18n/it/index.php +++ b/app/i18n/it/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Segna la categoria come letta', 'mark_feed_read' => 'Segna il feed come letto', 'mark_selection_unread' => 'Segna i selezionati come non letti', + 'mylabels' => 'Le mie etichette', 'newer_first' => 'Mostra prima i recenti', 'non-starred' => 'Escludi preferiti', 'normal_view' => 'Vista elenco', @@ -90,7 +91,6 @@ return array( 'starred' => 'Mostra solo preferiti', 'stats' => 'Statistiche', 'subscription' => 'Gestione sottoscrizioni', - 'tags' => 'Le mie etichette', 'unread' => 'Mostra solo non letti', ), 'share' => 'Condividi', diff --git a/app/i18n/ja/index.php b/app/i18n/ja/index.php index d10188689..5503ac9a7 100644 --- a/app/i18n/ja/index.php +++ b/app/i18n/ja/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'カテゴリを既読にする', 'mark_feed_read' => 'フィードを既読にする', 'mark_selection_unread' => '選択した記事を未読にする', + 'mylabels' => 'ラベル', 'newer_first' => '最新の記事を先頭にする', 'non-starred' => 'お気に入りに登録されてない記事を表示する', 'normal_view' => 'ノーマルビュー', @@ -90,7 +91,6 @@ return array( 'starred' => 'お気に入りを表示する', 'stats' => '統計', 'subscription' => '購読フィードの管理', - 'tags' => 'ラベル', 'unread' => '未読の記事を表示する', ), 'share' => '共有', diff --git a/app/i18n/ko/index.php b/app/i18n/ko/index.php index 09c1f4ebe..ed6612aac 100644 --- a/app/i18n/ko/index.php +++ b/app/i18n/ko/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => '카테고리를 읽음으로 표시', 'mark_feed_read' => '피드를 읽음으로 표시', 'mark_selection_unread' => '선택된 글을 읽지 않음으로 표시', + 'mylabels' => '내 라벨', 'newer_first' => '최근 글 먼저', 'non-starred' => '즐겨찾기를 제외하고 표시', 'normal_view' => '일반 모드', @@ -90,7 +91,6 @@ return array( 'starred' => '즐겨찾기만 표시', 'stats' => '통계', 'subscription' => '구독 관리', - 'tags' => '내 라벨', 'unread' => '읽지 않은 글만 표시', ), 'share' => '공유', diff --git a/app/i18n/lv/index.php b/app/i18n/lv/index.php index f52476abe..96bd80a4d 100644 --- a/app/i18n/lv/index.php +++ b/app/i18n/lv/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Atzīmēt kategoriju kā izlasītu', 'mark_feed_read' => 'Atzīmēt barotni kā izlasītu', 'mark_selection_unread' => 'Atzīmēt izvēlni kā izlasītu', + 'mylabels' => 'Manas birkas', 'newer_first' => 'Sākumā jaunākos', 'non-starred' => 'Rādīt neiecienītākos', 'normal_view' => 'Parastais skats', @@ -90,7 +91,6 @@ return array( 'starred' => 'Rādīt mīļākos', 'stats' => 'Statistika', 'subscription' => 'Abonementa pārvalde', - 'tags' => 'Manas birkas', 'unread' => 'Rādīt neizlasītos', ), 'share' => 'Dalīties', diff --git a/app/i18n/nl/index.php b/app/i18n/nl/index.php index 4b9d2e6a9..4175ef92c 100644 --- a/app/i18n/nl/index.php +++ b/app/i18n/nl/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Markeer categorie als gelezen', 'mark_feed_read' => 'Markeer feed als gelezen', 'mark_selection_unread' => 'Markeer selectie als ongelezen', + 'mylabels' => 'Mijn labels', 'newer_first' => 'Nieuwste eerst', 'non-starred' => 'Laat alles zien behalve favorieten', 'normal_view' => 'Normale weergave', @@ -90,7 +91,6 @@ return array( 'starred' => 'Laat alleen favorieten zien', 'stats' => 'Statistieken', 'subscription' => 'Abonnementen beheer', - 'tags' => 'Mijn labels', 'unread' => 'Laat alleen ongelezen zien', ), 'share' => 'Delen', diff --git a/app/i18n/oc/index.php b/app/i18n/oc/index.php index 89e28f6ed..02bda23c6 100644 --- a/app/i18n/oc/index.php +++ b/app/i18n/oc/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Marcar la categoria coma legida', 'mark_feed_read' => 'Marcar lo flux coma legit', 'mark_selection_unread' => 'Marcar la seleccion coma pas legida', + 'mylabels' => 'Mas etiquetas', 'newer_first' => 'Mai recents en primièr', 'non-starred' => 'Mostrar los pas favorits', 'normal_view' => 'Vista normala', @@ -90,7 +91,6 @@ return array( 'starred' => 'Mostrar los favorits', 'stats' => 'Estatisticas', 'subscription' => 'Gestion dels abonaments', - 'tags' => 'Mas etiquetas', 'unread' => 'Mostar los pas legits', ), 'share' => 'Partejar', diff --git a/app/i18n/pl/index.php b/app/i18n/pl/index.php index bf5386e0a..953621a9f 100644 --- a/app/i18n/pl/index.php +++ b/app/i18n/pl/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Oznacz kategorię jako przeczytaną', 'mark_feed_read' => 'Oznacz kanał jako przeczytany', 'mark_selection_unread' => 'Oznacz wiadomości jako nieprzeczytane', + 'mylabels' => 'Własne etykiety', 'newer_first' => 'Najpierw najnowsze', 'non-starred' => 'Pokaż wiadomości, które nie są ulubione', 'normal_view' => 'Widok normalny', @@ -90,7 +91,6 @@ return array( 'starred' => 'Pokaż ulubione', 'stats' => 'Statystyki', 'subscription' => 'Zarządzanie subskrypcjami', - 'tags' => 'Własne etykiety', 'unread' => 'Pokaż nieprzeczytane', ), 'share' => 'Podaj dalej', diff --git a/app/i18n/pt-br/index.php b/app/i18n/pt-br/index.php index 8dcf57e7c..4f173d69e 100644 --- a/app/i18n/pt-br/index.php +++ b/app/i18n/pt-br/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Marcar categoria como lida', 'mark_feed_read' => 'Marcar feed com lido', 'mark_selection_unread' => 'Marcar seleção como não lida', + 'mylabels' => 'Minhas etiquetas', 'newer_first' => 'Novos primeiro', 'non-starred' => 'Mostrar todos, exceto favoritos', 'normal_view' => 'visualização normal', @@ -90,7 +91,6 @@ return array( 'starred' => 'Mostrar apenas os favoritos', 'stats' => 'Estatísticas', 'subscription' => 'Gerenciamento de inscrições', - 'tags' => 'Minhas etiquetas', 'unread' => 'Mostrar apenas os não lidos', ), 'share' => 'Compartilhar', diff --git a/app/i18n/ru/index.php b/app/i18n/ru/index.php index dca1cf062..457fc3fee 100644 --- a/app/i18n/ru/index.php +++ b/app/i18n/ru/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Отметить категорию прочитанной', 'mark_feed_read' => 'Отметить ленту прочитанной', 'mark_selection_unread' => 'Отметить выделение прочитанным', + 'mylabels' => 'Мои метки', 'newer_first' => 'Сначала новые', 'non-starred' => 'Показать неизбранное', 'normal_view' => 'Обычный вид', @@ -90,7 +91,6 @@ return array( 'starred' => 'Показать избранное', 'stats' => 'Статистика', 'subscription' => 'Управление подписками', - 'tags' => 'Мои метки', 'unread' => 'Показать непрочитанное', ), 'share' => 'Обмен', diff --git a/app/i18n/sk/index.php b/app/i18n/sk/index.php index 0a32fab82..daa611ee5 100644 --- a/app/i18n/sk/index.php +++ b/app/i18n/sk/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Označiť kategóriu ako prečítanú', 'mark_feed_read' => 'Označiť kanál ako prečítaný', 'mark_selection_unread' => 'Označiť označené ako prečítané', + 'mylabels' => 'Moje nálepky', 'newer_first' => 'Novšie hore', 'non-starred' => 'Zobraziť všetko okrem obľúbených', 'normal_view' => 'Základné zobrazenie', @@ -90,7 +91,6 @@ return array( 'starred' => 'Zobraziť obľúbené', 'stats' => 'Štatistiky', 'subscription' => 'Správca odberov', - 'tags' => 'Moje nálepky', 'unread' => 'Zobraziť neprečítané', ), 'share' => 'Zdieľať', diff --git a/app/i18n/tr/index.php b/app/i18n/tr/index.php index f2ad267ca..7268044e7 100644 --- a/app/i18n/tr/index.php +++ b/app/i18n/tr/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => 'Kategoriyi okundu olarak işaretle', 'mark_feed_read' => 'Akışı okundu olarak işaretle', 'mark_selection_unread' => 'Seçilenleri okunmadı olarak işaretleMark selection as unread', + 'mylabels' => 'Etiketlerim', 'newer_first' => 'Önce yeniler', 'non-starred' => 'Favori dışındakileri göster', 'normal_view' => 'Normal görünüm', @@ -90,7 +91,6 @@ return array( 'starred' => 'Favorileri göster', 'stats' => 'İstatistikler', 'subscription' => 'Abonelik yönetimi', - 'tags' => 'Etiketlerim', 'unread' => 'Okunmamışları göster', ), 'share' => 'Paylaş', diff --git a/app/i18n/zh-cn/index.php b/app/i18n/zh-cn/index.php index 1499f8571..c42d95647 100644 --- a/app/i18n/zh-cn/index.php +++ b/app/i18n/zh-cn/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => '此分类设为已读', 'mark_feed_read' => '此订阅源设为已读', 'mark_selection_unread' => '选中设为已读', + 'mylabels' => '我的标签', 'newer_first' => '由新至旧', 'non-starred' => '显示未收藏', 'normal_view' => '普通视图', @@ -90,7 +91,6 @@ return array( 'starred' => '显示收藏', 'stats' => '统计', 'subscription' => '订阅管理', - 'tags' => '我的标签', 'unread' => '显示未读', ), 'share' => '分享', diff --git a/app/i18n/zh-tw/index.php b/app/i18n/zh-tw/index.php index 4daab5cf6..e01707863 100644 --- a/app/i18n/zh-tw/index.php +++ b/app/i18n/zh-tw/index.php @@ -66,6 +66,7 @@ return array( 'mark_cat_read' => '此分類設為已讀', 'mark_feed_read' => '此訂閱源設為已讀', 'mark_selection_unread' => '選中設為已讀', + 'mylabels' => '我的標籤', 'newer_first' => '由新至舊', 'non-starred' => '顯示未收藏', 'normal_view' => '普通視圖', @@ -90,7 +91,6 @@ return array( 'starred' => '顯示收藏', 'stats' => '統計', 'subscription' => '訂閱管理', - 'tags' => '我的標籤', 'unread' => '顯示未讀', ), 'share' => '分享', diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index 166d3954d..ca4fd1911 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -53,7 +53,7 @@ ?> <li id="tags" class="tree-folder category tags<?= $t_active ? ' active' : '' ?>" data-unread="<?= format_number($this->nbUnreadTags) ?>"> <a href="<?= _url('index', $actual_view, 'get', 'T') . $state_filter_manual ?>" class="tree-folder-title"> - <button class="dropdown-toggle" title="<?= _t('sub.category.expand') ?>"><?= _i($t_show ? 'up' : 'down') ?></button><span class="title" title="<?= _t('sub.category.open') ?>" data-unread="<?= format_number($this->nbUnreadTags) ?>"><?= _t('index.menu.tags') ?></span> + <button class="dropdown-toggle" title="<?= _t('sub.category.expand') ?>"><?= _i($t_show ? 'up' : 'down') ?></button><span class="title" title="<?= _t('sub.category.open') ?>" data-unread="<?= format_number($this->nbUnreadTags) ?>"><?= _t('index.menu.mylabels') ?></span> </a> <ul class="tree-folder-items<?= $t_show ? ' active' : '' ?>"> <?php diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml index 1f2828f82..995d54006 100644 --- a/app/views/configure/display.phtml +++ b/app/views/configure/display.phtml @@ -188,7 +188,7 @@ <th> </th> <th title="<?= _t('conf.shortcut.mark_read') ?>"><?= _i('read') ?></th> <th title="<?= _t('conf.shortcut.mark_favorite') ?>"><?= _i('starred') ?></th> - <th title="<?= _t('index.menu.tags') ?>"><?= _i('label') ?></th> + <th title="<?= _t('index.menu.mylabels') ?>"><?= _i('label') ?></th> <th title="<?= _t('conf.display.icon.related_tags') ?>"><?= _i('tag') ?></th> <th title="<?= _t('conf.display.icon.sharing') ?>"><?= _i('share') ?></th> <th><?= _t('conf.display.icon.summary') ?></th> diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml index 822bcf6b3..2e9a4fa8c 100644 --- a/app/views/configure/shortcut.phtml +++ b/app/views/configure/shortcut.phtml @@ -159,6 +159,14 @@ </div> <div class="form-group"> + <label class="group-name" for="mylabels_shortcut"><?= _t('index.menu.mylabels') ?></label> + <div class="group-controls"> + <input type="text" id="mylabels_shortcut" name="shortcuts[mylabels]" list="keys" value="<?= $s['mylabels'] ?>" + data-leave-validation="<?= $s['mylabels'] ?>"/> + </div> + </div> + + <div class="form-group"> <label class="group-name" for="collapse_entry"><?= _t('conf.shortcut.collapse_article') ?></label> <div class="group-controls"> <input type="text" id="collapse_entry" name="shortcuts[collapse_entry]" list="keys" value="<?= $s['collapse_entry'] ?>" diff --git a/app/views/helpers/configure/query.phtml b/app/views/helpers/configure/query.phtml index f0f339276..b078e1ed1 100644 --- a/app/views/helpers/configure/query.phtml +++ b/app/views/helpers/configure/query.phtml @@ -126,7 +126,7 @@ <option value="a" <?= in_array($this->query->getGet(), ['', 'a'], true) ? 'selected="selected"' : '' ?>><?= _t('index.feed.title') ?></option> <option value="i" <?= 'i' === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= _t('index.menu.important') ?></option> <option value="s" <?= 's' === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= _t('index.feed.title_fav') ?></option> - <option value="T" <?= 'T' === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= _t('index.menu.tags') ?></option> + <option value="T" <?= 'T' === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= _t('index.menu.mylabels') ?></option> <optgroup label="<?= _t('conf.query.filter.tags') ?>"> <?php foreach ($this->tags as $tag): ?> <option value="t_<?= $tag->id() ?>" <?= "t_{$tag->id()}" === $this->query->getGet() ? 'selected="selected"' : '' ?>><?= $tag->name() ?></option> diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml index 0394405ad..f3c363275 100644 --- a/app/views/helpers/index/normal/entry_bottom.phtml +++ b/app/views/helpers/index/normal/entry_bottom.phtml @@ -39,7 +39,7 @@ <div class="item-element dropdown dynamictags"> <div id="dropdown-labels-<?= $this->entry->id() ?>" class="dropdown-target"></div> <a class="dropdown-toggle" href="#dropdown-labels-<?= $this->entry->id() ?>"> - <?= _i('label') ?><span class="dropdown-label"><?= _t('index.menu.tags') ?></span> + <?= _i('label') ?><span class="dropdown-label"><?= _t('index.menu.mylabels') ?></span> </a> </div> </li><?php diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml index 459e4d180..0f90d8949 100644 --- a/app/views/helpers/index/normal/entry_header.phtml +++ b/app/views/helpers/index/normal/entry_header.phtml @@ -72,7 +72,7 @@ <li class="item labels"> <div class="item-element dropdown dynamictags"> <div id="dropdown-labels2-<?= $this->entry->id() ?>" class="dropdown-target"></div> - <a class="dropdown-toggle" href="#dropdown-labels2-<?= $this->entry->id() ?>" title="<?= _t('index.menu.tags') ?>"> + <a class="dropdown-toggle" href="#dropdown-labels2-<?= $this->entry->id() ?>" title="<?= _t('index.menu.mylabels') ?>"> <?= _i('label') ?> </a> <?php /* labels_article_template */ ?> diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 14af408a6..cadaf9331 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -46,6 +46,7 @@ echo htmlspecialchars(json_encode([ 'last_entry' => @$s['last_entry'], 'collapse_entry' => @$s['collapse_entry'], 'load_more' => @$s['load_more'], + 'mylabels' => @$s['mylabels'], 'auto_share' => @$s['auto_share'], 'focus_search' => @$s['focus_search'], 'user_filter' => @$s['user_filter'], diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml index 527c0b9c4..4be568fd0 100644 --- a/app/views/index/global.phtml +++ b/app/views/index/global.phtml @@ -25,7 +25,7 @@ <div class="dropdown-menu"> <ul class="dropdown-menu-scrollable scrollbar-thin"> <li class="dropdown-header"> - <?= _t('index.menu.tags') ?> + <?= _t('index.menu.mylabels') ?> <?php if (FreshRSS_Auth::hasAccess()) { ?> <a href="<?= _url('tag', 'index') ?>"><?= _i('configure') ?></a> <?php } ?> diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml index aca3b8f0a..a5e973e1b 100644 --- a/app/views/index/normal.phtml +++ b/app/views/index/normal.phtml @@ -27,7 +27,7 @@ $today = @strtotime('today'); <div class="dropdown-menu"> <ul class="dropdown-menu-scrollable scrollbar-thin"> <li class="dropdown-header"> - <?= _t('index.menu.tags') ?> + <?= _t('index.menu.mylabels') ?> <?php if (FreshRSS_Auth::hasAccess()) { ?> <a href="<?= _url('tag', 'index') ?>"><?= _i('configure') ?></a> <?php } ?> diff --git a/config-user.default.php b/config-user.default.php index b742c3693..9f1ab4bf3 100644 --- a/config-user.default.php +++ b/config-user.default.php @@ -84,6 +84,7 @@ return array ( 'last_entry' => 'end', 'collapse_entry' => 'c', 'load_more' => 'm', + 'mylabels' => 'l', 'auto_share' => 's', 'focus_search' => 'a', 'user_filter' => 'u', diff --git a/p/scripts/main.js b/p/scripts/main.js index 2face429d..112b38bce 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -747,6 +747,41 @@ function show_share_menu(el) { return true; } +function mylabels(key) { + const mylabelsDropdown = document.querySelector('.flux.current.active .dropdown-target[id^="dropdown-labels"]'); + + if (!mylabelsDropdown) { + return; + } + + if (typeof key === 'undefined') { + show_labels_menu(mylabelsDropdown); + } + // Display the mylabels div + location.hash = mylabelsDropdown.id; + // Force scrolling to the mylabels div + const scrollTop = needsScroll(mylabelsDropdown.closest('.horizontal-list')); + if (scrollTop !== 0) { + if (mylabelsDropdown.closest('.horizontal-list.flux_header')) { + mylabelsDropdown.nextElementSibling.nextElementSibling.scrollIntoView({ behavior: "smooth", block: "start" }); + } else { + mylabelsDropdown.nextElementSibling.nextElementSibling.scrollIntoView({ behavior: "smooth", block: "end" }); + } + } + + key = parseInt(key); + + if (key === 0) { + mylabelsDropdown.parentElement.querySelector('.dropdown-menu .item .newTag').focus(); + } else { + const mylabelsCheckboxes = mylabelsDropdown.parentElement.querySelectorAll('.dropdown-menu .item .checkboxTag'); + + if (key <= mylabelsCheckboxes.length) { + mylabelsCheckboxes[key].click(); + } + } +} + function auto_share(key) { const share = document.querySelector('.flux.current.active .dropdown-target[id^="dropdown-share"]'); if (!share) { @@ -987,11 +1022,19 @@ function init_shortcuts() { if (location.hash.match(/^#dropdown-/)) { const n = parseInt(k); - if (n) { - if (location.hash === '#dropdown-query') { - user_filter(n); - } else { - auto_share(n); + if (Number.isInteger(n)) { + switch (location.hash.substring(0, 15)) { + case '#dropdown-query': + user_filter(n); + break; + case '#dropdown-share': + auto_share(n); + break; + case '#dropdown-label': + mylabels(n); + break; + default: + return; } ev.preventDefault(); return; @@ -1107,6 +1150,7 @@ function init_shortcuts() { if (k === s.skip_next_entry) { next_entry(true); ev.preventDefault(); return; } if (k === s.skip_prev_entry) { prev_entry(true); ev.preventDefault(); return; } if (k === s.collapse_entry) { collapse_entry(); ev.preventDefault(); return; } + if (k === s.mylabels) { mylabels(); ev.preventDefault(); return; } if (k === s.auto_share) { auto_share(); ev.preventDefault(); return; } if (k === s.user_filter) { user_filter(); ev.preventDefault(); return; } if (k === s.load_more) { load_more_posts(); ev.preventDefault(); return; } @@ -1431,6 +1475,7 @@ function loadDynamicTags(div) { const input_newTag = document.createElement('input'); input_newTag.setAttribute('type', 'text'); input_newTag.setAttribute('name', 'newTag'); + input_newTag.setAttribute('class', 'newTag'); input_newTag.setAttribute('list', 'datalist-labels'); input_newTag.addEventListener('keydown', function (ev) { if (ev.key.toUpperCase() == 'ENTER') { this.parentNode.previousSibling.click(); } }); |