|
@@ -18,6 +18,11 @@
|
|
|
notify("warning", "Recipe mode off.")
|
|
notify("warning", "Recipe mode off.")
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ const copyLink = ()=>{
|
|
|
|
|
+ navigator.clipboard.writeText(`https://${location.hostname}/recipe/${data.recipe.id}`);
|
|
|
|
|
+ notify("success", "Link copied to clipboard");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
onMount(()=>{
|
|
onMount(()=>{
|
|
|
const stop = attachVisibilityReacquire(()=>on);
|
|
const stop = attachVisibilityReacquire(()=>on);
|
|
|
|
|
|
|
@@ -78,9 +83,9 @@
|
|
|
>Share</button>
|
|
>Share</button>
|
|
|
{#if shareOpen}
|
|
{#if shareOpen}
|
|
|
<div class="shareMenu" role="menu">
|
|
<div class="shareMenu" role="menu">
|
|
|
- <button type="button" role="menuitem">Copy link</button>
|
|
|
|
|
- <button type="button" role="menuitem">Print</button>
|
|
|
|
|
- <button type="button" role="menuitem">Download</button>
|
|
|
|
|
|
|
+ <button role="menuitem" onclick={copyLink}>Copy link</button>
|
|
|
|
|
+ <button role="menuitem">Print</button>
|
|
|
|
|
+ <button role="menuitem">Download</button>
|
|
|
</div>
|
|
</div>
|
|
|
{/if}
|
|
{/if}
|
|
|
</div>
|
|
</div>
|