Skip to content

Commit

Permalink
Merge pull request #95 from nemozak1/develop
Browse files Browse the repository at this point in the history
add VITE_SHOW_API_MANAGER_BUTTON option in env
  • Loading branch information
simonredfern authored Feb 28, 2025
2 parents 1569ee6 + 0f34429 commit ceb148a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/components/HeaderNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)!)
Expand Down Expand Up @@ -126,7 +127,7 @@ watchEffect(() => {
<RouterLink class="router-link" id="header-nav-glossary" to="/glossary">{{
$t('header.glossary')
}}</RouterLink>
<a v-bind:href="obpApiManagerHost" v-show="hasObpApiManagerHost" class="router-link" id="header-nav-api-manager">
<a v-if="showObpApiManagerButton && hasObpApiManagerHost" v-bind:href="obpApiManagerHost" class="router-link" id="header-nav-api-manager">
{{ $t('header.api_manager') }}
</a>
<span class="el-dropdown-link">
Expand Down

0 comments on commit ceb148a

Please # to comment.