Unify simple router view layout

* Delete from main.js since it is not used in any place without
importing the component
* Use this layout to link and glossary pages
pull/4789/head
Daniel Gayoso González 2 years ago
parent c3bf43f996
commit b9bdb44432
  1. 7
      assets/vue/components/layout/EmptyLayout.vue
  2. 2
      assets/vue/components/layout/SimpleRouterViewLayout.vue
  3. 2
      assets/vue/main.js
  4. 42
      assets/vue/router/glossary.js
  5. 42
      assets/vue/router/links.js
  6. 9
      assets/vue/views/links/LinksLayout.vue

@ -1,7 +0,0 @@
<template>
<slot />
<router-view />
</template>
<script setup>
</script>

@ -1,5 +1,5 @@
<template>
<router-view></router-view>
<router-view />
</template>
<script setup></script>

@ -211,7 +211,6 @@ const options = {
const vuetify = createVuetify(options);
import DashboardLayout from './components/layout/DashboardLayout.vue'
import EmptyLayout from './components/layout/EmptyLayout.vue'
// Vue setup.
const app = createApp(App);
@ -256,7 +255,6 @@ app.component('Column', Column);
app.component('ColumnGroup', ColumnGroup);
app.component('Toolbar', Toolbar);
app.component('DashboardLayout', DashboardLayout);
app.component('EmptyLayout', EmptyLayout);
app.component('TinyEditor', Editor);
app.config.globalProperties.axios = axios;

@ -1,34 +1,34 @@
export default {
path: '/resources/glossary/:node/',
path: "/resources/glossary/:node/",
meta: { requiresAuth: true, showBreadcrumb: true },
name: 'glossary',
component: () => import('../components/glossary/GlossaryLayout.vue'),
redirect: { name: 'GlossaryList' },
name: "glossary",
component: () => import("../components/layout/SimpleRouterViewLayout.vue"),
redirect: { name: "GlossaryList" },
children: [
{
name: 'GlossaryList',
path: '',
component: () => import('../views/glossary/GlossaryList.vue')
name: "GlossaryList",
path: "",
component: () => import("../views/glossary/GlossaryList.vue"),
},
{
name: 'CreateTerm',
path: 'create',
component: () => import('../views/glossary/GlossaryTermCreate.vue')
name: "CreateTerm",
path: "create",
component: () => import("../views/glossary/GlossaryTermCreate.vue"),
},
{
name: 'UpdateTerm',
path: 'edit/:id',
component: () => import('../views/glossary/GlossaryTermUpdate.vue')
name: "UpdateTerm",
path: "edit/:id",
component: () => import("../views/glossary/GlossaryTermUpdate.vue"),
},
{
name: 'ImportGlossary',
path: '',
component: () => import('../views/glossary/GlossaryImport.vue')
name: "ImportGlossary",
path: "",
component: () => import("../views/glossary/GlossaryImport.vue"),
},
{
name: 'ExportGlossary',
path: '',
component: () => import('../views/glossary/GlossaryExport.vue')
name: "ExportGlossary",
path: "",
component: () => import("../views/glossary/GlossaryExport.vue"),
},
]
};
],
}

@ -1,34 +1,34 @@
export default {
path: '/resources/links/:node/',
path: "/resources/links/:node/",
meta: { requiresAuth: true, showBreadcrumb: true },
name: 'links',
component: () => import('../views/links/LinksLayout.vue'),
redirect: { name: 'LinksList' },
name: "links",
component: () => import("../components/layout/SimpleRouterViewLayout.vue"),
redirect: { name: "LinksList" },
children: [
{
name: 'LinksList',
path: '',
component: () => import('../views/links/LinksList.vue')
name: "LinksList",
path: "",
component: () => import("../views/links/LinksList.vue"),
},
{
name: 'CreateLink',
path: 'create',
component: () => import('../views/links/LinksCreate.vue')
name: "CreateLink",
path: "create",
component: () => import("../views/links/LinksCreate.vue"),
},
{
name: 'UpdateLink',
path: 'edit/:id',
component: () => import('../views/links/LinksUpdate.vue')
name: "UpdateLink",
path: "edit/:id",
component: () => import("../views/links/LinksUpdate.vue"),
},
{
name: 'CreateLinkCategory',
path: 'create_link_category',
component: () => import('../views/links/LinksCategoryCreate.vue')
name: "CreateLinkCategory",
path: "create_link_category",
component: () => import("../views/links/LinksCategoryCreate.vue"),
},
{
name: 'UpdateLinkCategory',
path: 'update_link_category/:id',
component: () => import('../views/links/LinksCategoryUpdate.vue')
name: "UpdateLinkCategory",
path: "update_link_category/:id",
component: () => import("../views/links/LinksCategoryUpdate.vue"),
},
]
};
],
}

@ -1,9 +0,0 @@
<template>
<router-view></router-view>
</template>
<script>
export default {
name: 'LinkLayout'
}
</script>
Loading…
Cancel
Save