✨ Re: #255 - Adds an option for landing URL in workspace
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="work-space">
|
||||
<SideBar :sections="sections" @launch-app="launchApp" />
|
||||
<SideBar :sections="sections" @launch-app="launchApp" :initUrl="getInitialUrl()" />
|
||||
<WebContent :url="url" v-if="!isMultiTaskingEnabled" />
|
||||
<MultiTaskingWebComtent :url="url" v-else />
|
||||
</div>
|
||||
@@ -21,7 +21,7 @@ export default {
|
||||
appConfig: Object,
|
||||
},
|
||||
data: () => ({
|
||||
url: '', // this.$route.query.url || '',
|
||||
url: '',
|
||||
GetTheme,
|
||||
ApplyLocalTheme,
|
||||
ApplyCustomVariables,
|
||||
@@ -51,16 +51,21 @@ export default {
|
||||
fontAwesomeScript.setAttribute('src', `https://kit.fontawesome.com/${faKey}.js`);
|
||||
document.head.appendChild(fontAwesomeScript);
|
||||
},
|
||||
repositionFooter() {
|
||||
document.getElementsByTagName('footer')[0].style.position = 'fixed';
|
||||
/* Returns a service URL, if set as a URL param, or if user has specified landing URL */
|
||||
getInitialUrl() {
|
||||
const route = this.$route;
|
||||
if (route.query && route.query.url) {
|
||||
return decodeURI(route.query.url);
|
||||
} else if (this.appConfig.workspaceLandingUrl) {
|
||||
return this.appConfig.workspaceLandingUrl;
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
const route = this.$route;
|
||||
if (route.query && route.query.url) this.url = decodeURI(route.query.url);
|
||||
this.setTheme();
|
||||
this.initiateFontAwesome();
|
||||
// this.repositionFooter();
|
||||
this.url = this.getInitialUrl();
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user