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