From 29f6083e0ee90dc07c29bd7b05404faac1542805 Mon Sep 17 00:00:00 2001 From: nkanaev Date: Sat, 11 Jul 2026 14:22:44 +0100 Subject: [PATCH] ui: add search placeholder --- doc/changelog.md | 1 + src/frontend/css/app.css | 3 +++ src/frontend/js/app.ts | 13 +++++++++++++ src/frontend/js/i18n.ts | 10 ++++++++++ src/frontend/js/templates/index.html | 2 +- 5 files changed, 28 insertions(+), 1 deletion(-) diff --git a/doc/changelog.md b/doc/changelog.md index 67bc52a..6193dca 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -3,6 +3,7 @@ - (fix) support for HTTP/2 (thanks to @Dean-Corso for the report) - (fix) displaying correct title for custom Youtube feeds - (etc) do not auto-refresh feeds on startup +- (etc) show current feed/folder in search placeholder # v2.7 (2026-06-24) diff --git a/src/frontend/css/app.css b/src/frontend/css/app.css index cdc8bd4..4e07c88 100644 --- a/src/frontend/css/app.css +++ b/src/frontend/css/app.css @@ -335,6 +335,9 @@ select.form-control:not([multiple]):not([size]) { border-radius: 3px; padding: .25rem .5rem; line-height: 1; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } .toolbar-search:hover, .toolbar-search:focus { diff --git a/src/frontend/js/app.ts b/src/frontend/js/app.ts index 0730d89..e63297d 100644 --- a/src/frontend/js/app.ts +++ b/src/frontend/js/app.ts @@ -153,6 +153,19 @@ export default { return {type: type, feed: feed, folder: folder} }, + searchScope: function() { + void this.language + var type = (this.feedSelected || '').split(':', 2)[0] + if (type == 'feed') + return (this.feedsById[this.feedSelected.split(':', 2)[1]] || {}).title || '' + if (type == 'folder') + return (this.foldersById[this.feedSelected.split(':', 2)[1]] || {}).title || '' + if (this.filterSelected == 'unread') + return this.$t('all_unread') + if (this.filterSelected == 'starred') + return this.$t('all_starred') + return this.$t('all_feeds') + }, itemSelectedContent: function() { if (!this.itemSelected) return '' diff --git a/src/frontend/js/i18n.ts b/src/frontend/js/i18n.ts index dc72ac1..cc01814 100644 --- a/src/frontend/js/i18n.ts +++ b/src/frontend/js/i18n.ts @@ -191,6 +191,16 @@ import { FluentResource, FluentBundle } from '@fluent/bundle' "zh": "全部订阅", "ru": "Все ленты" }, + "search_placeholder": { + "en": "Search: { $scope }", + "de": "Suche: { $scope }", + "fr": "Rechercher : { $scope }", + "es": "Buscar: { $scope }", + "ja": "検索: { $scope }", + "pt": "Pesquisar: { $scope }", + "zh": "搜索:{ $scope }", + "ru": "Поиск: { $scope }" + }, "refreshing_progress": { "en": "Refreshing ({ $count } left)", "de": "Aktualisiere ({ $count } übrig)", diff --git a/src/frontend/js/templates/index.html b/src/frontend/js/templates/index.html index bce5f2f..0811304 100644 --- a/src/frontend/js/templates/index.html +++ b/src/frontend/js/templates/index.html @@ -184,7 +184,7 @@
- +