diff --git a/packages/web-pkg/src/composables/router/types.ts b/packages/web-pkg/src/composables/router/types.ts index f0880de49b6..99eff8bdeea 100644 --- a/packages/web-pkg/src/composables/router/types.ts +++ b/packages/web-pkg/src/composables/router/types.ts @@ -11,9 +11,13 @@ export type LocationParams = Dictionary export const authContextValues = ['anonymous', 'user', 'publicLink', 'hybrid'] as const export type AuthContext = typeof authContextValues[number] +export const pageLayoutValue = ['plain', 'loading', 'application'] as const +export type PageLayout = typeof pageLayoutValue[number] + export interface WebRouteMeta extends RouteMeta { title?: string authContext?: AuthContext + pageLayout?: PageLayout patchCleanPath?: boolean contextQueryItems?: string[] } diff --git a/packages/web-runtime/src/App.vue b/packages/web-runtime/src/App.vue index 40c93f34588..211734d79aa 100644 --- a/packages/web-runtime/src/App.vue +++ b/packages/web-runtime/src/App.vue @@ -70,18 +70,24 @@ export default defineComponent({ ...mapGetters(['configuration', 'capabilities', 'getSettingsValue']), ...mapGetters('runtime/auth', ['isUserContextReady', 'isPublicLinkContextReady']), layout() { + const pageLayouts = { + plain: LayoutPlain, + loading: LayoutLoading, + application: LayoutApplication + } + const pageLayoutKey = this.$route.meta.pageLayout if (!this.$route.name || isAnonymousContext(this.$router, this.$route)) { - return LayoutPlain + return pageLayouts[pageLayoutKey || 'plain'] } + const pageLayout = pageLayouts[pageLayoutKey || 'application'] if (isPublicLinkContext(this.$router, this.$route)) { - return this.isPublicLinkContextReady ? LayoutApplication : LayoutLoading + return this.isPublicLinkContextReady ? pageLayout : LayoutLoading } if (isUserContext(this.$router, this.$route)) { - return this.isUserContextReady ? LayoutApplication : LayoutLoading + return this.isUserContextReady ? pageLayout : LayoutLoading } - - return LayoutApplication + return pageLayout }, favicon() { return this.configuration.currentTheme.logo.favicon diff --git a/packages/web-runtime/src/layouts/Plain.vue b/packages/web-runtime/src/layouts/Plain.vue index 5dcf63037ac..56dd366f20d 100644 --- a/packages/web-runtime/src/layouts/Plain.vue +++ b/packages/web-runtime/src/layouts/Plain.vue @@ -1,13 +1,35 @@ diff --git a/packages/web-runtime/src/pages/accessDenied.vue b/packages/web-runtime/src/pages/accessDenied.vue index 7497e585cd3..1cda5ce3851 100644 --- a/packages/web-runtime/src/pages/accessDenied.vue +++ b/packages/web-runtime/src/pages/accessDenied.vue @@ -1,63 +1,63 @@ - - diff --git a/packages/web-runtime/src/pages/login.vue b/packages/web-runtime/src/pages/login.vue index 0fe6ddb7910..f3d3384bfa7 100644 --- a/packages/web-runtime/src/pages/login.vue +++ b/packages/web-runtime/src/pages/login.vue @@ -1,91 +1,76 @@ diff --git a/packages/web-runtime/src/pages/missingOrInvalidConfig.vue b/packages/web-runtime/src/pages/missingOrInvalidConfig.vue index 85237c32bc4..3268772c848 100644 --- a/packages/web-runtime/src/pages/missingOrInvalidConfig.vue +++ b/packages/web-runtime/src/pages/missingOrInvalidConfig.vue @@ -1,51 +1,54 @@ - diff --git a/packages/web-runtime/src/pages/oidcCallback.vue b/packages/web-runtime/src/pages/oidcCallback.vue index da860832c0a..4c954e829ba 100644 --- a/packages/web-runtime/src/pages/oidcCallback.vue +++ b/packages/web-runtime/src/pages/oidcCallback.vue @@ -1,68 +1,61 @@ - diff --git a/packages/web-runtime/src/pages/resolvePrivateLink.vue b/packages/web-runtime/src/pages/resolvePrivateLink.vue index a1e0cc8ce62..c2590f42702 100644 --- a/packages/web-runtime/src/pages/resolvePrivateLink.vue +++ b/packages/web-runtime/src/pages/resolvePrivateLink.vue @@ -1,50 +1,52 @@