Skip to content
Snippets Groups Projects
Commit ca45100b authored by Martin Koerwien's avatar Martin Koerwien
Browse files

Merge branch 'restore-imprint-and-privacy' into 'develop'

fix: imprint and privacy pages from local components used again

See merge request piveau/hub/piveau-hub-ui!203
parents 7b9cca05 e74ea717
No related branches found
No related tags found
No related merge requests found
...@@ -14,8 +14,6 @@ import { ...@@ -14,8 +14,6 @@ import {
Datasets, Datasets,
Catalogues, Catalogues,
NotFound, NotFound,
Imprint,
PrivacyPolicy,
SparqlSearch, SparqlSearch,
DataProviderInterface, DataProviderInterface,
DataFetchingComponent, DataFetchingComponent,
...@@ -28,6 +26,9 @@ import { ...@@ -28,6 +26,9 @@ import {
decode, decode,
} from "@piveau/piveau-hub-ui-modules"; } from "@piveau/piveau-hub-ui-modules";
import Imprint from './components/Imprint.vue'
import PrivacyPolicy from './components/PrivacyPolicy.vue'
const title = GLUE_CONFIG.metadata.title; const title = GLUE_CONFIG.metadata.title;
const router = Router.createRouter({ const router = Router.createRouter({
...@@ -231,14 +232,14 @@ router.beforeEach((to, from, next) => { ...@@ -231,14 +232,14 @@ router.beforeEach((to, from, next) => {
let isLinkedDataRequest = false; let isLinkedDataRequest = false;
// RDF|N3|JSON-LD|TTL|NT redirects // RDF|N3|JSON-LD|TTL|NT redirects
if (/^\/(data\/)?datasets\/[a-z0-9-_]+(\.rdf|\.n3|\.jsonld|\.ttl|\.nt)/.test(to.path)) { if (/^\/(data\/)?datasets\/[a-z0-9-_]+(\.rdf|\.n3|\.jsonld|\.ttl|\.nt)/.test(to.path)) {
let locale = to.query.locale ? `&locale=${to.query.locale}` : ''; let locale = to.query.locale ? `&locale=${to.query.locale}` : '';
isLinkedDataRequest = true; isLinkedDataRequest = true;
window.location = `${GLUE_CONFIG.api.hubUrl}${to.path}?useNormalizedId=true${locale}`; window.location = `${GLUE_CONFIG.api.hubUrl}${to.path}?useNormalizedId=true${locale}`;
} }
if (/^\/(data\/)?api\/datasets\/[a-z0-9-_]+(\.rdf|\.n3|\.jsonld|\.ttl|\.nt)/.test(to.path)) { if (/^\/(data\/)?api\/datasets\/[a-z0-9-_]+(\.rdf|\.n3|\.jsonld|\.ttl|\.nt)/.test(to.path)) {
let locale = to.query.locale ? `?locale=${to.query.locale}` : ''; let locale = to.query.locale ? `?locale=${to.query.locale}` : '';
let returnPath = to.path.replace('/api', '') let returnPath = to.path.replace('/api', '')
.replace(/(\.rdf|\.n3|\.jsonld|\.ttl|\.nt)/, '') .replace(/(\.rdf|\.n3|\.jsonld|\.ttl|\.nt)/, '')
...@@ -286,7 +287,7 @@ router.beforeEach((to, from, next) => { ...@@ -286,7 +287,7 @@ router.beforeEach((to, from, next) => {
// else if (!to.query.locale && from.query.locale) { // else if (!to.query.locale && from.query.locale) {
// const pathWithCurrentLocale = `${to.path}?locale=${from.query.locale}`; // TODO: Other queries may get lost here? // const pathWithCurrentLocale = `${to.path}?locale=${from.query.locale}`; // TODO: Other queries may get lost here?
// next({ path: pathWithCurrentLocale }); // next({ path: pathWithCurrentLocale });
// } // }
else { else {
document.title = title; document.title = title;
next(); next();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment