From fd7ffc6c0fc63ae61a1c85d2ea79bdbef56eb220 Mon Sep 17 00:00:00 2001 From: ian Date: Wed, 22 Sep 2021 23:03:44 +0800 Subject: [PATCH] Allow links with custom URL schemes (#8225) * Fix module bar relative links from opening externally * Remove conditional logic from vue template * Cleanup link rendering * Allow links with custom URL schemes Co-authored-by: rijkvanzanten --- app/src/views/private/components/module-bar.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/views/private/components/module-bar.vue b/app/src/views/private/components/module-bar.vue index 2a9376e6a3..06ff2c896b 100644 --- a/app/src/views/private/components/module-bar.vue +++ b/app/src/views/private/components/module-bar.vue @@ -60,10 +60,10 @@ export default defineComponent({ if (modulePart.type === 'link') { const link = omit>(modulePart, ['url']); - if (modulePart.url.startsWith('http')) { - link.href = modulePart.url; - } else { + if (modulePart.url.startsWith('/')) { link.to = modulePart.url; + } else { + link.href = modulePart.url; } return translate(link);