Keep both apps and appstore views alive in vue to avoid frequent reloading

This commit is contained in:
Johannes Zellner
2025-09-29 20:17:32 +02:00
parent e05fef18a0
commit 5c6ceb2307
3 changed files with 15 additions and 5 deletions

View File

@@ -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();