master
veypi 9 months ago
parent 7739626284
commit 3e955243b7

@ -30,10 +30,12 @@ import { computed, watch, ref, onMounted, provide, onBeforeUnmount } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { RouteLocationNamedRaw } from 'vue-router'; import { RouteLocationNamedRaw } from 'vue-router';
import menus from './menus' import menus from './menus'
import { useUserStore } from 'src/stores/user';
let route = useRoute(); let route = useRoute();
let id = computed(() => route.params.id) let id = computed(() => route.params.id)
let app = ref({} as modelsApp) let app = ref({} as modelsApp)
let user = useUserStore()
provide('app', app) provide('app', app)
@ -42,6 +44,9 @@ const sync_app = () => {
api.app.get(id.value as string).then((e: modelsApp) => { api.app.get(id.value as string).then((e: modelsApp) => {
app.value = e app.value = e
let links = menus.appLinks.value.concat([]) let links = menus.appLinks.value.concat([])
if (!user.auth.Get('app', id.value).CanDelete()) {
links = [links[0]]
}
links[0].title = e.name links[0].title = e.name
if (menus.uniqueLinks[tid]?.length) { if (menus.uniqueLinks[tid]?.length) {
for (let r of menus.uniqueLinks[tid]) { for (let r of menus.uniqueLinks[tid]) {

Loading…
Cancel
Save