2021-12-20 00:39:39 +01:00
|
|
|
<template>
|
|
|
|
|
<div class="page-container">
|
2021-12-20 13:03:56 +01:00
|
|
|
<page-tree :id="$route.params.id" />
|
2022-01-12 17:15:05 +01:00
|
|
|
<router-view v-if="!isOverview" />
|
2022-01-12 14:11:41 +01:00
|
|
|
<overview-actions v-if="isOverview" @create="create" />
|
2021-12-20 00:39:39 +01:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
|
import api from './api';
|
|
|
|
|
import { defineComponent } from 'vue';
|
|
|
|
|
import PageTree from './partials/page-tree.vue';
|
2022-01-12 14:11:41 +01:00
|
|
|
import OverviewActions from './partials/overview-actions.vue';
|
|
|
|
|
import actions from './actions';
|
2021-12-20 00:39:39 +01:00
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
|
|
2021-12-20 13:03:56 +01:00
|
|
|
props: [ 'id' ],
|
|
|
|
|
|
2022-01-12 14:11:41 +01:00
|
|
|
components: { PageTree, OverviewActions },
|
|
|
|
|
|
|
|
|
|
data: () => ({
|
|
|
|
|
cache: []
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
|
isOverview()
|
|
|
|
|
{
|
|
|
|
|
return !this.$route.params.id && !this.$route.params.flavor && this.$route.name !== 'recyclebin';
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mounted()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
|
|
async create(parent)
|
|
|
|
|
{
|
|
|
|
|
await actions.create(this.$router, parent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2021-12-20 00:39:39 +01:00
|
|
|
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
.page-container
|
|
|
|
|
{
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: auto 1fr;
|
|
|
|
|
gap: 2px;
|
|
|
|
|
justify-content: stretch;
|
|
|
|
|
height: calc(100vh - 70px);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.page-overview
|
|
|
|
|
{
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
margin-left: 80px;
|
|
|
|
|
padding-top: 115px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.page-overview-action
|
|
|
|
|
{
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
font-size: var(--font-size);
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: auto 1fr;
|
|
|
|
|
gap: 35px;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.page-overview-action + .page-overview-action
|
|
|
|
|
{
|
|
|
|
|
margin-top: var(--padding);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.page-overview-action-icon
|
|
|
|
|
{
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
width: 90px;
|
|
|
|
|
height: 90px;
|
|
|
|
|
background: var(--color-box);
|
|
|
|
|
border-radius: var(--radius);
|
|
|
|
|
box-shadow: var(--shadow-short);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.page-overview-action-text
|
|
|
|
|
{
|
|
|
|
|
line-height: 1.3;
|
|
|
|
|
color: var(--color-text-dim);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.page-overview-action-text strong
|
|
|
|
|
{
|
|
|
|
|
display: inline-block;
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
font-size: var(--font-size-l);
|
|
|
|
|
}
|
|
|
|
|
</style>
|