Skip to content

Commit da41399

Browse files
Julien Veyssiernpmbuildbot-nextcloud[bot]
authored andcommitted
add action to clear all weather favorites
Signed-off-by: Julien Veyssier <eneiluj@posteo.net> Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
1 parent 5acabcf commit da41399

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

apps/weather_status/js/weather-status.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/weather_status/js/weather-status.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/weather_status/src/App.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@
6666
@click="onFavoriteClick(f)">
6767
{{ f }}
6868
</ActionButton>
69+
<ActionButton v-if="favorites.length > 0 && showFavorites"
70+
icon="icon-star-dark"
71+
@click="onClearFavoritesClick">
72+
{{ t('weather_status', 'Clear favorites') }}
73+
</ActionButton>
6974
</Actions>
7075
</div>
7176
</li>
@@ -444,6 +449,11 @@ export default {
444449
this.setAddress(favAddress)
445450
}
446451
},
452+
onClearFavoritesClick() {
453+
this.showFavorites = false
454+
this.favorites = []
455+
network.saveFavorites(this.favorites)
456+
},
447457
},
448458
}
449459
</script>

0 commit comments

Comments
 (0)