cluster: refresh on config change

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/653/head
Varun Patil 2023-04-24 17:46:31 -07:00
parent fe8fb6b164
commit 8735ac2159
1 changed files with 10 additions and 0 deletions

View File

@ -13,6 +13,8 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { subscribe, unsubscribe } from '@nextcloud/event-bus';
import UserConfig from '../mixins/UserConfig';
import TopMatter from './top-matter/TopMatter.vue';
import ClusterGrid from './ClusterGrid.vue';
@ -50,6 +52,14 @@ export default defineComponent({
this.routeChange();
},
created() {
subscribe(this.config_eventName, this.routeChange);
},
beforeDestroy() {
unsubscribe(this.config_eventName, this.routeChange);
},
watch: {
async $route() {
this.routeChange();