diff --git a/app/server/src/controllers/configController.ts b/app/server/src/controllers/configController.ts index 282f0ad1..ded4f330 100644 --- a/app/server/src/controllers/configController.ts +++ b/app/server/src/controllers/configController.ts @@ -23,7 +23,7 @@ export const configDefaults = (appType: string) => { }; export class ConfigController { - static readAppConfigFile = ( + static _readAppConfigFile = ( appName: string, appsPath: string, _baseUrl: string, @@ -54,7 +54,7 @@ export class ConfigController { configReader, appsPath, defaultCodeReader, appHelpReader, baseUrl } = req.app.locals as AppLocals; - const config = this.readAppConfigFile( + const config = this._readAppConfigFile( appName, appsPath, baseUrl, diff --git a/app/static/src/components/WodinSession.vue b/app/static/src/components/WodinSession.vue index b7742bcd..6b71484a 100644 --- a/app/static/src/components/WodinSession.vue +++ b/app/static/src/components/WodinSession.vue @@ -12,7 +12,6 @@ import { localStorageManager } from "../localStorageManager"; import { AppStateGetter } from "../store/appState/getters"; import { SessionMetadata } from "../types/responseTypes"; import { SessionsMutation } from "../store/sessions/mutations"; -import { STATIC_BUILD } from "@/parseEnv"; export default defineComponent({ name: "WodinSession", @@ -32,9 +31,7 @@ export default defineComponent({ const store = useStore(); const initialised = ref(false); - const appInitialised = computed(() => STATIC_BUILD ? - !!store.state.config : - !!store.state.config && !!store.state.sessions.sessionsMetadata); + const appInitialised = computed(() => !!store.state.config && !!store.state.sessions.sessionsMetadata); // These props won't change as provided by server // eslint-disable-next-line vue/no-setup-props-destructure @@ -58,18 +55,16 @@ export default defineComponent({ }); watch(appInitialised, () => { - if (!STATIC_BUILD) { - // Child component will either be SessionsPage or WodinApp depending on route - both will need the latest - // session id so delay rendering these until this has been committed - const baseUrlPath = store.getters[AppStateGetter.baseUrlPath]; - const sessions = localStorageManager.getSessionIds(store.state.appName, baseUrlPath); - const sessionId = sessions.length ? sessions[0] : null; - // check latest session id is actually available from the back end - const sessionAvailable = - sessionId && !!store.state.sessions.sessionsMetadata.find((s: SessionMetadata) => s.id === sessionId); - if (sessionAvailable) { - store.commit(`sessions/${SessionsMutation.SetLatestSessionId}`, sessionId); - } + // Child component will either be SessionsPage or WodinApp depending on route - both will need the latest + // session id so delay rendering these until this has been committed + const baseUrlPath = store.getters[AppStateGetter.baseUrlPath]; + const sessions = localStorageManager.getSessionIds(store.state.appName, baseUrlPath); + const sessionId = sessions.length ? sessions[0] : null; + // check latest session id is actually available from the back end + const sessionAvailable = + sessionId && !!store.state.sessions.sessionsMetadata.find((s: SessionMetadata) => s.id === sessionId); + if (sessionAvailable) { + store.commit(`sessions/${SessionsMutation.SetLatestSessionId}`, sessionId); } initialised.value = true; }); diff --git a/app/static/src/components/WodinTabs.vue b/app/static/src/components/WodinTabs.vue index 8da7f1a5..b555cf4f 100644 --- a/app/static/src/components/WodinTabs.vue +++ b/app/static/src/components/WodinTabs.vue @@ -22,13 +22,17 @@