diff --git a/src/lib/components/Actions.svelte b/src/lib/components/Actions.svelte
index 8c91ab5f..0e04a159 100644
--- a/src/lib/components/Actions.svelte
+++ b/src/lib/components/Actions.svelte
@@ -2,6 +2,7 @@
import Card from '$/components/Card/Card.svelte';
import CopyButton from '$/components/CopyButton.svelte';
import CopyInput from '$/components/CopyInput.svelte';
+ import ExternalLinkWrapper from '$/components/ExternalLinkWrapper.svelte';
import { Button } from '$/components/ui/button';
import { Input } from '$/components/ui/input';
import { Separator } from '$/components/ui/separator';
@@ -204,11 +205,11 @@ ${svgString}`);
{text}
- {#if url}
+
- {/if}
+
{/snippet}
@@ -235,22 +236,27 @@ ${svgString}`);
{@render dualActionButton('PNG', onDownloadPNG, $urlsStore.png)}
{@render dualActionButton('SVG', onDownloadSVG, $urlsStore.svg)}
- {#if env.krokiRendererUrl}
+
- {/if}
+
diff --git a/src/lib/components/ExternalLinkWrapper.svelte b/src/lib/components/ExternalLinkWrapper.svelte
new file mode 100644
index 00000000..be0c885c
--- /dev/null
+++ b/src/lib/components/ExternalLinkWrapper.svelte
@@ -0,0 +1,59 @@
+
+
+{#if isVisible}
+
+
+
+
+ {@render children()}
+
+
+
+
+ {#if shouldDisableComponent}
+
+ This diagram type is not supported in {domain}
+
+ {:else}
+
+
+ {labelPrefix}
+ {domain}
+
+ {/if}
+
+
+
+
+{/if}
diff --git a/src/lib/components/MainMenu.svelte b/src/lib/components/MainMenu.svelte
index b0f838a9..91bf8e26 100644
--- a/src/lib/components/MainMenu.svelte
+++ b/src/lib/components/MainMenu.svelte
@@ -29,16 +29,20 @@
href: $urlsStore.mermaidChart({ medium: 'main_menu' }).playground
},
{
- label: 'Plugins',
- icon: PluginIcon,
+ checkDiagramType: false,
href: $urlsStore.mermaidChart({ medium: 'main_menu' }).plugins,
- checkDiagramType: false
+ icon: PluginIcon,
+ label: 'Plugins',
+ sharesData: false,
+ tooltipPrefix: 'Opens a new tab in'
},
{
- label: 'MermaidChart',
- icon: MermaidChartIcon,
+ checkDiagramType: false,
href: $urlsStore.mermaidChart({ medium: 'main_menu' }).home,
- checkDiagramType: false
+ icon: MermaidChartIcon,
+ label: 'MermaidChart',
+ sharesData: false,
+ tooltipPrefix: 'Opens a new tab in'
}
]);
@@ -76,7 +80,11 @@
{#each mermaidChartMenuItems as item}
-