ui: add search placeholder

This commit is contained in:
nkanaev
2026-07-11 14:22:44 +01:00
parent 1841933ded
commit 29f6083e0e
5 changed files with 28 additions and 1 deletions

View File

@@ -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)

View File

@@ -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 {

View File

@@ -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 ''

View File

@@ -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)",

View File

@@ -184,7 +184,7 @@
<div class="input-icon flex-grow-1">
<v-icon name="search" />
<!-- id used by keybindings -->
<input id="searchbar" type="" class="d-block toolbar-search" v-model="itemSearch" @keydown.enter="$event.target.blur()">
<input id="searchbar" type="" class="d-block toolbar-search" v-model="itemSearch" :placeholder="$t('search_placeholder', {scope: searchScope})" @keydown.enter="$event.target.blur()">
</div>
<button class="toolbar-item ml-2"
@click="markItemsRead()"