From 83ca1a50c6bc5896d1fde522c734239112e7a590 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Wed, 21 Feb 2024 19:03:52 -0600 Subject: [PATCH] if `config.require_login: true`, do not show panels --- client/src/composables/usePanels.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/src/composables/usePanels.ts b/client/src/composables/usePanels.ts index 46f6f334cc68..9102187ab192 100644 --- a/client/src/composables/usePanels.ts +++ b/client/src/composables/usePanels.ts @@ -3,14 +3,19 @@ import { useRoute } from "vue-router/composables"; import { useUserStore } from "@/stores/userStore"; +import { useConfig } from "./config"; + export function usePanels() { const userStore = useUserStore(); const route = useRoute(); + const { config, isConfigLoaded } = useConfig(); const showPanels = computed(() => { const panels = route.query.hide_panels; if (panels !== undefined && panels !== null && typeof panels === "string") { return panels.toLowerCase() != "true"; + } else if (isConfigLoaded.value && config.value.require_login === true) { + return false; } return true; });