mirror of
https://github.com/directus/directus.git
synced 2026-01-28 13:38:10 -05:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user