Add initial uninstall view and ensure location hash is updated on tab change
This commit is contained in:
@@ -9,6 +9,7 @@ const t = i18n.t;
|
||||
import { ref, onMounted, useTemplateRef } from 'vue';
|
||||
import { Button, ButtonGroup, TabView } from 'pankow';
|
||||
import Info from '../components/app/Info.vue';
|
||||
import Uninstall from '../components/app/Uninstall.vue';
|
||||
import AppsModel from '../models/AppsModel.js';
|
||||
import { APP_TYPES } from '../constants.js';
|
||||
|
||||
@@ -40,6 +41,10 @@ const link = ref('');
|
||||
const infoMenu = ref([]);
|
||||
const hasLocalStorage = ref(false);
|
||||
|
||||
function onTabChanged(tab) {
|
||||
window.location.hash = `/app/${id.value}/${tab}`;
|
||||
}
|
||||
|
||||
async function refresh() {
|
||||
const [error, result] = await appsModel.get(id.value);
|
||||
if (error) return console.error(error);
|
||||
@@ -137,7 +142,7 @@ onMounted(async () => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<TabView ref="tabView" :tabs="tabs">
|
||||
<TabView ref="tabView" :tabs="tabs" @changed="onTabChanged">
|
||||
<template #info><Info :app="app"/></template>
|
||||
<template #display>Display</template>
|
||||
<template #location></template>
|
||||
@@ -154,7 +159,7 @@ onMounted(async () => {
|
||||
<template #backups></template>
|
||||
<template #repair></template>
|
||||
<template #eventlog></template>
|
||||
<template #uninstall></template>
|
||||
<template #uninstall><Uninstall :app="app"/></template>
|
||||
</TabView>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user