diff --git a/dashboard/src/Index.vue b/dashboard/src/Index.vue index d58760b74..a5a17d4df 100644 --- a/dashboard/src/Index.vue +++ b/dashboard/src/Index.vue @@ -354,10 +354,12 @@ onMounted(async () => {
- - + + + + + - diff --git a/dashboard/src/views/AppsView.vue b/dashboard/src/views/AppsView.vue index fd6cfbb46..756081618 100644 --- a/dashboard/src/views/AppsView.vue +++ b/dashboard/src/views/AppsView.vue @@ -4,7 +4,7 @@ import { useI18n } from 'vue-i18n'; const i18n = useI18n(); const t = i18n.t; -import { ref, computed, useTemplateRef, onMounted, onUnmounted, inject } from 'vue'; +import { ref, computed, useTemplateRef, onActivated, onMounted, onUnmounted, inject } from 'vue'; import { Button, Menu, SingleSelect, Icon, TableView, TextInput, ProgressBar } from '@cloudron/pankow'; import { API_ORIGIN, APP_TYPES, HSTATES, ISTATES, RSTATES } from '../constants.js'; import AppsModel from '../models/AppsModel.js'; @@ -235,6 +235,10 @@ function toggleView() { localStorage.appsView = viewType.value; } +onActivated(async () => { + await refreshApps(); +}); + onMounted(async () => { await refreshApps(); diff --git a/dashboard/src/views/AppstoreView.vue b/dashboard/src/views/AppstoreView.vue index 78322c863..b4860d5b2 100644 --- a/dashboard/src/views/AppstoreView.vue +++ b/dashboard/src/views/AppstoreView.vue @@ -5,7 +5,7 @@ const i18n = useI18n(); const t = i18n.t; import moment from 'moment'; -import { ref, computed, useTemplateRef, onMounted, onUnmounted, inject, watch, nextTick } from 'vue'; +import { ref, computed, useTemplateRef, onActivated, onMounted, onUnmounted, inject, watch, nextTick } from 'vue'; import { TextInput, ProgressBar, InputDialog, SingleSelect } from '@cloudron/pankow'; import AppsModel from '../models/AppsModel.js'; import AppstoreModel from '../models/AppstoreModel.js'; @@ -178,6 +178,10 @@ function setItemWidth() { else itemWidth.value = Number((width-gap*4)/4).toFixed() + 'px'; } +onActivated(async () => { + await getInstalledApps(); +}); + onMounted(async () => { await getInstalledApps(); await getAppList();