Merge pull request #70 from constantine2nd/develop

feature/Enable API Explorer II for OBP API split portal/API mode 2
This commit is contained in:
Simon Redfern 2024-11-26 11:45:09 +01:00 committed by GitHub
commit d79e18b0cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "api-explorer",
"version": "1.0.23",
"version": "1.0.24",
"private": true,
"scripts": {
"dev": "vite & ts-node server/app.ts",

View File

@ -26,7 +26,7 @@
-->
<script setup lang="ts">
import { ref, inject, watchEffect, onMounted } from 'vue'
import { ref, inject, watchEffect, onMounted, computed } from 'vue'
import { ArrowDown } from '@element-plus/icons-vue'
import { useRoute, useRouter } from 'vue-router'
import { OBP_API_VERSION, getCurrentUser } from '../obp'
@ -41,7 +41,9 @@ import { obpApiActiveVersionsKey, obpGroupedMessageDocsKey, obpMyCollectionsEndp
const route = useRoute()
const router = useRouter()
const obpApiHost = ref(import.meta.env.VITE_OBP_API_PORTAL_HOST || import.meta.env.VITE_OBP_API_HOST);
const obpApiHost = ref(import.meta.env.VITE_OBP_API_HOST)
const obpApiPortalHost = ref(import.meta.env.VITE_OBP_API_PORTAL_HOST)
const obpApiHybridPost = computed(() => obpApiPortalHost.value || obpApiHost.value)
const obpApiManagerHost = ref(import.meta.env.VITE_OBP_API_MANAGER_HOST)
const loginUsername = ref('')
const logoffurl = ref('')
@ -115,7 +117,7 @@ watchEffect(() => {
<img alt="OBP logo" class="logo" v-show="!logo" src="@/assets/logo2x-1.png" />
<nav id="nav">
<RouterView name="header">
<a v-bind:href="obpApiHost" class="router-link" id="header-nav-home">
<a v-bind:href="obpApiHybridPost" class="router-link" id="header-nav-home">
{{ $t('header.portal_home') }}
</a>
<RouterLink class="router-link" id="header-nav-tags" :to="'/operationid?version=OBP' + OBP_API_VERSION">{{