add report link copy dropdown

This commit is contained in:
bytedream 2023-09-30 17:29:14 +02:00
parent 6eb44cc33b
commit 74e56d0ec8

View File

@ -146,10 +146,31 @@
class="relative flex flex-col w-2/5 bg-base-200/50 px-4 py-6 overflow-scroll" class="relative flex flex-col w-2/5 bg-base-200/50 px-4 py-6 overflow-scroll"
transition:fly={{ x: 200, duration: 200 }} transition:fly={{ x: 200, duration: 200 }}
> >
<button <div class="absolute right-2 top-2 flex justify-center">
class="btn btn-sm btn-circle btn-ghost absolute right-2 top-2" <form class="dropdown dropdown-end">
on:click={() => (activeReport = null)}>✕</button <!-- svelte-ignore a11y-no-noninteractive-tabindex a11y-label-has-associated-control -->
<label tabindex="0" class="btn btn-sm btn-circle btn-ghost text-center">
<IconOutline name="share-outline" height="1rem" width="auto" />
</label>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<ul
tabindex="0"
class="dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-max"
> >
<li>
<button
on:click={() =>
navigator.clipboard.writeText(
`${window.location.protocol}//${window.location.host}${env.PUBLIC_BASE_PATH}/report/${activeReport.url_hash}`
)}>Öffentlichen Link kopieren</button
>
</li>
</ul>
</form>
<button class="btn btn-sm btn-circle btn-ghost" on:click={() => (activeReport = null)}
>✕</button
>
</div>
<h3 class="font-roboto font-semibold text-2xl">Report</h3> <h3 class="font-roboto font-semibold text-2xl">Report</h3>
<div class="break-words my-2"> <div class="break-words my-2">
<i class="font-medium">{activeReport.reporter.username}</i> hat <i class="font-medium">{activeReport.reporter.username}</i> hat