mirror of
https://github.com/nkanaev/yarr.git
synced 2026-07-15 11:06:31 +00:00
ui: add search placeholder
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
- (fix) support for HTTP/2 (thanks to @Dean-Corso for the report)
|
- (fix) support for HTTP/2 (thanks to @Dean-Corso for the report)
|
||||||
- (fix) displaying correct title for custom Youtube feeds
|
- (fix) displaying correct title for custom Youtube feeds
|
||||||
- (etc) do not auto-refresh feeds on startup
|
- (etc) do not auto-refresh feeds on startup
|
||||||
|
- (etc) show current feed/folder in search placeholder
|
||||||
|
|
||||||
# v2.7 (2026-06-24)
|
# v2.7 (2026-06-24)
|
||||||
|
|
||||||
|
|||||||
@@ -335,6 +335,9 @@ select.form-control:not([multiple]):not([size]) {
|
|||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
padding: .25rem .5rem;
|
padding: .25rem .5rem;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbar-search:hover, .toolbar-search:focus {
|
.toolbar-search:hover, .toolbar-search:focus {
|
||||||
|
|||||||
@@ -153,6 +153,19 @@ export default {
|
|||||||
|
|
||||||
return {type: type, feed: feed, folder: folder}
|
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() {
|
itemSelectedContent: function() {
|
||||||
if (!this.itemSelected) return ''
|
if (!this.itemSelected) return ''
|
||||||
|
|
||||||
|
|||||||
@@ -191,6 +191,16 @@ import { FluentResource, FluentBundle } from '@fluent/bundle'
|
|||||||
"zh": "全部订阅",
|
"zh": "全部订阅",
|
||||||
"ru": "Все ленты"
|
"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": {
|
"refreshing_progress": {
|
||||||
"en": "Refreshing ({ $count } left)",
|
"en": "Refreshing ({ $count } left)",
|
||||||
"de": "Aktualisiere ({ $count } übrig)",
|
"de": "Aktualisiere ({ $count } übrig)",
|
||||||
|
|||||||
@@ -184,7 +184,7 @@
|
|||||||
<div class="input-icon flex-grow-1">
|
<div class="input-icon flex-grow-1">
|
||||||
<v-icon name="search" />
|
<v-icon name="search" />
|
||||||
<!-- id used by keybindings -->
|
<!-- 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>
|
</div>
|
||||||
<button class="toolbar-item ml-2"
|
<button class="toolbar-item ml-2"
|
||||||
@click="markItemsRead()"
|
@click="markItemsRead()"
|
||||||
|
|||||||
Reference in New Issue
Block a user