diff --git a/src/client/store.js b/src/client/store.js index 5181950..332b877 100644 --- a/src/client/store.js +++ b/src/client/store.js @@ -59,6 +59,7 @@ export const schemeFetchPromise = fetch( }) export const schemes = computed(() => state.schemes) +export const schemesAsConceptSchemes = computed(() => state.schemes?.map(scheme => new jskos.ConceptScheme(scheme)) || []) import { cdk } from "cocoda-sdk" diff --git a/src/client/utils.js b/src/client/utils.js index 4d2f416..51516c5 100644 --- a/src/client/utils.js +++ b/src/client/utils.js @@ -3,6 +3,9 @@ import config from "@/config.js" export const routerBasePath = "/" + config.namespace.pathname.replace(import.meta.env.BASE_URL, "") export function getRouterUrl({ scheme, concept, params = {} }) { + if (!scheme && concept?.inScheme?.[0]) { + scheme = concept.inScheme[0] + } let url = (() => { if (concept?.uri.startsWith(config.namespace) && (!scheme?.uri || concept?.uri.startsWith(scheme?.uri))) { return `${routerBasePath}${concept.uri.replace(config.namespace, "")}` diff --git a/src/client/views/HomeView.vue b/src/client/views/HomeView.vue index 1b00636..632b474 100644 --- a/src/client/views/HomeView.vue +++ b/src/client/views/HomeView.vue @@ -1,13 +1,14 @@