From 0f344292cbb79d8462bab05740a6744277f9be4d Mon Sep 17 00:00:00 2001 From: Nemo Godebski-Pedersen Date: Fri, 28 Feb 2025 09:58:19 +0000 Subject: [PATCH] add VITE_SHOW_API_MANAGER_BUTTON option in env --- .env.example | 4 ++++ src/components/HeaderNav.vue | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index f12f9b1..a87944f 100644 --- a/.env.example +++ b/.env.example @@ -11,7 +11,11 @@ VITE_OBP_API_VERSION=v5.1.0 #The default version of the root page, it has the default value `OBP+VITE_OBP_API_VERSION` #The format must follow standard+Version, e.g., OBPv5.1.0, BGv1, or BGv1.3. #VITE_OBP_API_DEFAULT_RESOURCE_DOC_VERSION=OBPv5.1.0 + +# API Manager VITE_OBP_API_MANAGER_HOST=https://apimanagersandbox.openbankproject.com +VITE_SHOW_API_MANAGER_BUTTON=false + VITE_OBP_API_EXPLORER_HOST=http://localhost:5173 VITE_OBP_CONSUMER_KEY=your_consumer_key VITE_OBP_CONSUMER_SECRET=your_consumer_secret diff --git a/src/components/HeaderNav.vue b/src/components/HeaderNav.vue index 8e9e358..69429cd 100644 --- a/src/components/HeaderNav.vue +++ b/src/components/HeaderNav.vue @@ -46,6 +46,7 @@ const obpApiPortalHost = ref(import.meta.env.VITE_OBP_API_PORTAL_HOST) const obpApiHybridPost = computed(() => obpApiPortalHost.value ? obpApiPortalHost.value : obpApiHost.value) const obpApiManagerHost = ref(import.meta.env.VITE_OBP_API_MANAGER_HOST) const hasObpApiManagerHost = computed(() => obpApiManagerHost.value ? true : false) +const showObpApiManagerButton = computed(() => import.meta.env.VITE_SHOW_API_MANAGER_BUTTON === 'true') const loginUsername = ref('') const logoffurl = ref('') const obpApiVersions = ref(inject(obpApiActiveVersionsKey)!) @@ -126,7 +127,7 @@ watchEffect(() => { {{ $t('header.glossary') }} - + {{ $t('header.api_manager') }}