Skip to content

Commit ceb148a

Browse files
authored
Merge pull request #95 from nemozak1/develop
add VITE_SHOW_API_MANAGER_BUTTON option in env
2 parents 1569ee6 + 0f34429 commit ceb148a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.env.example

+4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ VITE_OBP_API_VERSION=v5.1.0
1111
#The default version of the root page, it has the default value `OBP+VITE_OBP_API_VERSION`
1212
#The format must follow standard+Version, e.g., OBPv5.1.0, BGv1, or BGv1.3.
1313
#VITE_OBP_API_DEFAULT_RESOURCE_DOC_VERSION=OBPv5.1.0
14+
15+
# API Manager
1416
VITE_OBP_API_MANAGER_HOST=https://apimanagersandbox.openbankproject.com
17+
VITE_SHOW_API_MANAGER_BUTTON=false
18+
1519
VITE_OBP_API_EXPLORER_HOST=http://localhost:5173
1620
VITE_OBP_CONSUMER_KEY=your_consumer_key
1721
VITE_OBP_CONSUMER_SECRET=your_consumer_secret

src/components/HeaderNav.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ const obpApiPortalHost = ref(import.meta.env.VITE_OBP_API_PORTAL_HOST)
4646
const obpApiHybridPost = computed(() => obpApiPortalHost.value ? obpApiPortalHost.value : obpApiHost.value)
4747
const obpApiManagerHost = ref(import.meta.env.VITE_OBP_API_MANAGER_HOST)
4848
const hasObpApiManagerHost = computed(() => obpApiManagerHost.value ? true : false)
49+
const showObpApiManagerButton = computed(() => import.meta.env.VITE_SHOW_API_MANAGER_BUTTON === 'true')
4950
const loginUsername = ref('')
5051
const logoffurl = ref('')
5152
const obpApiVersions = ref(inject(obpApiActiveVersionsKey)!)
@@ -126,7 +127,7 @@ watchEffect(() => {
126127
<RouterLink class="router-link" id="header-nav-glossary" to="/glossary">{{
127128
$t('header.glossary')
128129
}}</RouterLink>
129-
<a v-bind:href="obpApiManagerHost" v-show="hasObpApiManagerHost" class="router-link" id="header-nav-api-manager">
130+
<a v-if="showObpApiManagerButton && hasObpApiManagerHost" v-bind:href="obpApiManagerHost" class="router-link" id="header-nav-api-manager">
130131
{{ $t('header.api_manager') }}
131132
</a>
132133
<span class="el-dropdown-link">

0 commit comments

Comments
 (0)