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> <template>
<router-view></router-view> <router-view />
</template> </template>
<script setup></script> <script setup></script>

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

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

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