Keep both apps and appstore views alive in vue to avoid frequent reloading
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user