Compare commits
3 Commits
8c4f95d52e
...
c53400d7b7
| Author | SHA1 | Date | |
|---|---|---|---|
| c53400d7b7 | |||
| ef1ddb58a0 | |||
| d6f2956bcb |
@@ -129,13 +129,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function setClipboard(text) {
|
||||
const type = "text/plain";
|
||||
const clipboardItemData = {
|
||||
[type]: text,
|
||||
};
|
||||
const clipboardItem = new ClipboardItem(clipboardItemData);
|
||||
await navigator.clipboard.write([clipboardItem]);
|
||||
function constructMailToLink() {
|
||||
const subject = "Link zum Tatvorgang";
|
||||
const link = $page.url.toString().split('?')[0];
|
||||
const body = `Hallo,
|
||||
|
||||
hier ist der Link zum Tatvorgang:
|
||||
${link}
|
||||
|
||||
Der Zugangs-PIN wird zur Sicherheit über einen zweiten Kommunikationskanal übermittelt.
|
||||
|
||||
Mit freundlichen Grüßen,
|
||||
`;
|
||||
|
||||
const mailtoLink = `mailto:?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
|
||||
|
||||
return mailtoLink;
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -144,7 +153,7 @@
|
||||
<h1 class="text-xl">Vorgang {vorgang.name}</h1>
|
||||
{#if data?.user?.admin}
|
||||
Zugangs-PIN: {vorgang.pin}
|
||||
<Button on:click={() => setClipboard($page.url.toString().split('?')[0])}>Copy Link</Button>
|
||||
<a href="{constructMailToLink()}"><Button>Share Link</Button></a>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="mx-auto flex justify-center max-w-7xl h-full">
|
||||
|
||||
Reference in New Issue
Block a user