From 60af6e7a5c8aca818b8f7a04e723496b6ac003a4 Mon Sep 17 00:00:00 2001 From: Angelika Schneider Date: Tue, 18 Jul 2023 12:22:38 +0200 Subject: [PATCH] Add more fixes for endpoint /public/certificates (#460) * Add path check for endpoint /public/certificates * Add redirect from start page to cloud page if already logged in * Show empty message if no certificate exists --- src/lib/Navigation.svelte | 63 ++++++++++----------- src/routes/+layout.svelte | 2 +- src/routes/+layout.ts | 14 +++-- src/routes/+page.svelte | 6 ++ src/routes/public/certificates/+page.svelte | 2 +- src/routes/public/certificates/+page.ts | 3 +- 6 files changed, 49 insertions(+), 41 deletions(-) diff --git a/src/lib/Navigation.svelte b/src/lib/Navigation.svelte index e9c7bc1..a4946a2 100644 --- a/src/lib/Navigation.svelte +++ b/src/lib/Navigation.svelte @@ -18,40 +18,38 @@ function handleUpdate(event) { isOpen = event.detail.isOpen; } -let routes = [ - { - url: '/cloud', - name: 'Cloud Services' - }, - // We are hiding these paths for MEDINA, since they can be viewed on the service-specific views - // { - // url: '/discovery', - // name: 'Discovery' - // }, - // { - // url: '/assessment', - // name: 'Assessment' - // }, - { - url: '/metrics', - name: 'Metrics' - }, - { - url: '/catalogs', - name: 'Catalogues' - }, - { - url: '/certificates', - name: 'Certificates' - }, - { - name: 'Help' - } -]; +// let routes = [ +// { +// url: '/cloud', +// name: 'Cloud Services' +// }, +// // We are hiding these paths for MEDINA, since they can be viewed on the service-specific views +// // { +// // url: '/discovery', +// // name: 'Discovery' +// // }, +// // { +// // url: '/assessment', +// // name: 'Assessment' +// // }, +// { +// url: '/metrics', +// name: 'Metrics' +// }, +// { +// url: '/catalogs', +// name: 'Catalogues' +// }, +// { +// url: '/certificates', +// name: 'Certificates' +// }, +// { +// name: 'Help' +// } +// ]; let loggedIn = localStorage.token ? true : false; - -console.log($page.url); @@ -96,7 +94,6 @@ console.log($page.url); Login {/if} - Help diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index b621869..a05b627 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -52,7 +52,7 @@ function getVersionMessage(): string {
- +