diff --git a/apps/weather_status/js/weather-status.js b/apps/weather_status/js/weather-status.js index fe7ce30f6ee13498f82c8a4b3ad8e2ca780a96d4..9e7bbc1f46bad97e5b2d0f7d3faf238d21ebead2 100644 Binary files a/apps/weather_status/js/weather-status.js and b/apps/weather_status/js/weather-status.js differ diff --git a/apps/weather_status/js/weather-status.js.map b/apps/weather_status/js/weather-status.js.map index aa04f462faf66c98bf48b429e165d3833904d911..b71979013ae3d08af5b1f25b665e9d344b0584d2 100644 Binary files a/apps/weather_status/js/weather-status.js.map and b/apps/weather_status/js/weather-status.js.map differ diff --git a/apps/weather_status/src/App.vue b/apps/weather_status/src/App.vue index 81edc28eaf458dc1bfd3ad9cf43ebf7ffc8812e9..6fcc764ac978485df4fd39c37ba8cead7e47f6a9 100644 --- a/apps/weather_status/src/App.vue +++ b/apps/weather_status/src/App.vue @@ -63,7 +63,7 @@ <ActionButton v-for="f in displayedFavorites" :key="f" icon="icon-starred" - @click="onFavoriteClick(f)"> + @click="onFavoriteClick($event, f)"> {{ f }} </ActionButton> </Actions> @@ -439,8 +439,16 @@ export default { } network.saveFavorites(this.favorites) }, - onFavoriteClick(favAddress) { - if (favAddress !== this.address) { + onFavoriteClick(e, favAddress) { + // clicked on the icon + if (e.target.classList.contains('action-button__icon')) { + const i = this.favorites.indexOf(favAddress) + if (i !== -1) { + this.favorites.splice(i, 1) + } + network.saveFavorites(this.favorites) + } else if (favAddress !== this.address) { + // clicked on the text this.setAddress(favAddress) } },