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
+5 -1
View File
@@ -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();