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 <rijkvanzanten@me.com>
This commit is contained in:
ian
2021-09-22 23:03:44 +08:00
committed by GitHub
parent 78f0915099
commit fd7ffc6c0f

View File

@@ -60,10 +60,10 @@ export default defineComponent({
if (modulePart.type === 'link') {
const link = omit<Record<string, any>>(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);