diff options
Diffstat (limited to 'plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue')
-rw-r--r-- | plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue b/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue index 08181aa906..52884f6815 100644 --- a/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue +++ b/plugins/CoreHome/vue/src/SiteSelector/SiteSelector.vue @@ -32,7 +32,7 @@ /> <span> <span - v-text="decodedName || firstSiteNameDecoded" + v-text="selectedSite?.name || firstSiteName" v-if="selectedSite?.name || !placeholder" /> <span @@ -151,7 +151,7 @@ export default defineComponent({ Object, default: { id: Matomo.idSite, - name: Matomo.siteName, + name: Matomo.helper.htmlDecode(Matomo.siteName), }, }, showSelectedSite: { @@ -209,7 +209,7 @@ export default defineComponent({ sites: [], selectedSite: { id: Matomo.idSite, - name: Matomo.siteName, + name: Matomo.helper.htmlDecode(Matomo.siteName), }, autocompleteMinSites: parseInt(Matomo.config.autocomplete_min_sites as string, 10), }; @@ -242,13 +242,6 @@ export default defineComponent({ this.onSearchInputKeydown = debounce(this.onSearchInputKeydown.bind(this)); }, computed: { - decodedName() { - if (!this.selectedSite) { - return null; - } - - return Matomo.helper.htmlDecode(this.selectedSite.name); - }, shouldFocusOnSearch() { return (this.showSitesList && this.autocompleteMinSites <= this.sites.length) || this.searchTerm; @@ -264,9 +257,6 @@ export default defineComponent({ firstSiteName() { return this.sites && this.sites.length > 0 ? this.sites[0].name : ''; }, - firstSiteNameDecoded() { - return Matomo.helper.htmlDecode(this.firstSiteName); - }, urlAllSites() { const newQuery = MatomoUrl.stringify({ ...MatomoUrl.urlParsed.value, |