File tree Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ import { useI18n } from "vue-i18n"
5555import { customVueTemplateEnabled } from " ./config/env"
5656import CustomDashboardLayout from " ../../var/vue_templates/components/layout/DashboardLayout.vue"
5757import EmptyLayout from " ./components/layout/EmptyLayout.vue"
58+ import DashboardLayout from " ./components/layout/DashboardLayout.vue"
5859import { useMediaElementLoader } from " ./composables/mediaElementLoader"
5960
6061import apolloClient from " ./config/apolloClient"
@@ -79,14 +80,14 @@ const layout = computed(() => {
7980 (queryParams .has (" lp_id" ) && " view" === queryParams .get (" action" )) ||
8081 (queryParams .has (" origin" ) && " learnpath" === queryParams .get (" origin" ))
8182 ) {
82- return " EmptyLayout"
83+ return EmptyLayout
8384 }
8485
8586 if (customVueTemplateEnabled) {
8687 return CustomDashboardLayout
8788 }
8889
89- return ` ${ router .currentRoute .value .meta .layout ?? " Dashboard " }Layout`
90+ return router .currentRoute .value .meta .layout ? ` ${ router . currentRoute . value . meta . layout } Layout` : DashboardLayout
9091})
9192
9293const legacyContainer = ref (null )
@@ -117,15 +118,6 @@ watchEffect(() => {
117118 }
118119})
119120
120- watchEffect(async () => {
121- try {
122- const component = ` ${route .meta .layout }.vue `
123- layout.value = component?.default || "Dashboard"
124- } catch (e) {
125- layout.value = "Dashboard"
126- }
127- })
128-
129121const securityStore = useSecurityStore ()
130122const notification = useNotification ()
131123
Original file line number Diff line number Diff line change @@ -31,9 +31,6 @@ import VueFlatPickr from "vue-flatpickr-component"
3131import "flatpickr/dist/flatpickr.css"
3232import "@mdi/font/css/materialdesignicons.css"
3333
34- import DashboardLayout from "./components/layout/DashboardLayout.vue"
35- import EmptyLayout from "./components/layout/EmptyLayout.vue"
36-
3734// Prime
3835import PrimeVue from "primevue/config"
3936import DataView from "primevue/dataview"
@@ -188,8 +185,6 @@ app.component("Button", Button)
188185app . component ( "Column" , Column )
189186app . component ( "ColumnGroup" , ColumnGroup )
190187app . component ( "Toolbar" , Toolbar )
191- app . component ( "DashboardLayout" , DashboardLayout )
192- app . component ( "EmptyLayout" , EmptyLayout )
193188app . component ( "BaseAppLink" , BaseAppLink )
194189
195190app . config . globalProperties . axios = axios
You can’t perform that action at this time.
0 commit comments