Skip to content

Commit

Permalink
Update search page titles to include query
Browse files Browse the repository at this point in the history
  • Loading branch information
kommunarr committed Nov 23, 2024
1 parent df6a34c commit 25bf653
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/renderer/helpers/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ export function translateWindowTitle(title) {
return i18n.t('About.About')
case 'Profile Settings':
return i18n.t('Profile.Profile Settings')
case 'Search Results':
return i18n.t('Search Filters.Search Results')
case 'Playlist':
return i18n.t('Playlist.Playlist')
default:
Expand Down
9 changes: 8 additions & 1 deletion src/renderer/views/Search/Search.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtLoader from '../../components/ft-loader/ft-loader.vue'
import FtCard from '../../components/ft-card/ft-card.vue'
import FtElementList from '../../components/FtElementList/FtElementList.vue'
Expand All @@ -11,6 +12,7 @@ import {
} from '../../helpers/utils'
import { getLocalSearchContinuation, getLocalSearchResults } from '../../helpers/api/local'
import { invidiousAPICall } from '../../helpers/api/invidious'
import packageDetails from '../../../../package.json'
import { SEARCH_CHAR_LIMIT } from '../../../constants'

export default defineComponent({
Expand Down Expand Up @@ -76,6 +78,7 @@ export default defineComponent({

this.query = query

this.setAppTitle(`${this.query} - ${packageDetails.productName}`)
this.checkSearchCache(payload)
}
},
Expand Down Expand Up @@ -360,6 +363,10 @@ export default defineComponent({
} else if (channels.length > 1) {
this.$store.dispatch('batchUpdateSubscriptionDetails', channels)
}
}
},

...mapActions([
'setAppTitle',
]),
}
})

0 comments on commit 25bf653

Please sign in to comment.