diff --git a/apps/weather_status/src/App.vue b/apps/weather_status/src/App.vue index 48e1198d555940d9ece8be05036182132480e8cd..a5844e2f3edb6093e6b8eba28f3326863b5bbea0 100644 --- a/apps/weather_status/src/App.vue +++ b/apps/weather_status/src/App.vue @@ -41,9 +41,11 @@ {{ locationText }} </NcActionLink> <NcActionButton v-if="gotWeather" - :icon="addRemoveFavoriteIcon" :aria-hidden="true" @click="onAddRemoveFavoriteClick"> + <template #icon> + <component :is="addRemoveFavoriteIcon" :size="20" class="favorite-color" /> + </template> {{ addRemoveFavoriteText }} </NcActionButton> <NcActionSeparator v-if="address && !errorMessage" /> @@ -68,12 +70,14 @@ @click="showFavorites = !showFavorites"> {{ t('weather_status', 'Favorites') }} </NcActionButton> - <NcActionButton v-for="f in displayedFavorites" - :key="f" - icon="icon-starred" + <NcActionButton v-for="favorite in displayedFavorites" + :key="favorite" :aria-hidden="true" - @click="onFavoriteClick($event, f)"> - {{ f }} + @click="onFavoriteClick($event, favorite)"> + <template #icon> + <IconStar :size="20" :class="{'favorite-color': address === favorite}" /> + </template> + {{ favorite }} </NcActionButton> </NcActions> </div> @@ -84,6 +88,8 @@ import { showError } from '@nextcloud/dialogs' import moment from '@nextcloud/moment' import { getLocale } from '@nextcloud/l10n' +import IconStar from 'vue-material-design-icons/Star.vue' +import IconStarOutline from 'vue-material-design-icons/StarOutline.vue' import NcActions from '@nextcloud/vue/dist/Components/NcActions.js' import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js' import NcActionInput from '@nextcloud/vue/dist/Components/NcActionInput.js' @@ -202,6 +208,7 @@ const weatherOptions = { export default { name: 'App', components: { + IconStar, NcActions, NcActionButton, NcActionInput, @@ -289,8 +296,8 @@ export default { }, addRemoveFavoriteIcon() { return this.currentAddressIsFavorite - ? 'icon-starred' - : 'icon-star' + ? IconStar + : IconStarOutline }, addRemoveFavoriteText() { return this.currentAddressIsFavorite @@ -602,6 +609,11 @@ export default { min-height: 44px !important; } +// Set color to primary element for current / active favorite address +.favorite-color { + color: #a08b00; +} + li:not(.inline) .weather-status-menu-item { &__header { display: block; diff --git a/dist/core-common.js b/dist/core-common.js index 3eeb707a8c81ec4bee6f0aac3c4efb6c4ae617e9..0f8422b67e5626d39424de3f9bb3dca2e7919694 100644 Binary files a/dist/core-common.js and b/dist/core-common.js differ diff --git a/dist/core-common.js.map b/dist/core-common.js.map index 5739e13962ce916059a160ba764f567fb2650813..d7e6f5c8c22deb6568934a2bdde0de572fa63082 100644 Binary files a/dist/core-common.js.map and b/dist/core-common.js.map differ diff --git a/dist/files-sidebar.js b/dist/files-sidebar.js index 2cf46bcf973019b212e042abec9ed38c85b8ba3c..aab2fbf9e6bea652d54b5bcd4e31a6e393054167 100644 Binary files a/dist/files-sidebar.js and b/dist/files-sidebar.js differ diff --git a/dist/files-sidebar.js.map b/dist/files-sidebar.js.map index 6c0c89cd97e466a14d41a71e23ea9b2203c78d10..99dcbf5bfb64494a7e653b45f63e6eda66c2c8d0 100644 Binary files a/dist/files-sidebar.js.map and b/dist/files-sidebar.js.map differ diff --git a/dist/settings-apps-view-7418.js b/dist/settings-apps-view-7418.js index 7a181efb12bad1a2bf6f85089ff5b7addc1e1470..41c1a0362d24c9c1f23c90326ef122e9a673a04c 100644 Binary files a/dist/settings-apps-view-7418.js and b/dist/settings-apps-view-7418.js differ diff --git a/dist/settings-apps-view-7418.js.map b/dist/settings-apps-view-7418.js.map index b82571f479ff0f006fda6e8092258705a6e3ec05..6bc20df41956a87087e911474c960a740f6d6e4a 100644 Binary files a/dist/settings-apps-view-7418.js.map and b/dist/settings-apps-view-7418.js.map differ diff --git a/dist/settings-vue-settings-apps-users-management.js b/dist/settings-vue-settings-apps-users-management.js index c01347ee6da3d3b5ac37b927de4bf3b42c235013..cc858a7c93fba0339172ccdf5efac584c70a873b 100644 Binary files a/dist/settings-vue-settings-apps-users-management.js and b/dist/settings-vue-settings-apps-users-management.js differ diff --git a/dist/settings-vue-settings-apps-users-management.js.map b/dist/settings-vue-settings-apps-users-management.js.map index e5a62235027a01f30a9d6b8f44b3fde7edd4715a..b20f0d1e92e86d4201a8d30ec33f77981ffa58ba 100644 Binary files a/dist/settings-vue-settings-apps-users-management.js.map and b/dist/settings-vue-settings-apps-users-management.js.map differ diff --git a/dist/weather_status-weather-status.js b/dist/weather_status-weather-status.js index 6c8cc011fdc40ff48b44fec88d57cce616cbb4fe..9c1b487d9d641e6b4f4d0b610b81ccb8cba033b5 100644 Binary files a/dist/weather_status-weather-status.js and b/dist/weather_status-weather-status.js differ diff --git a/dist/weather_status-weather-status.js.map b/dist/weather_status-weather-status.js.map index cc06bbea16494eaef341f7e69573abec04b3eecb..19a141120e56df0f719f9a8962823e6830ac2da9 100644 Binary files a/dist/weather_status-weather-status.js.map and b/dist/weather_status-weather-status.js.map differ