web/DonateShareCard: hide share button if user agent doesn't support it
This commit is contained in:
parent
e7386234bc
commit
ffea8e6f2e
1 changed files with 13 additions and 10 deletions
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
import CobaltQr from "$lib/icons/CobaltQR.svelte";
|
import CobaltQr from "$lib/icons/CobaltQR.svelte";
|
||||||
import CopyIcon from "$components/misc/CopyIcon.svelte";
|
import CopyIcon from "$components/misc/CopyIcon.svelte";
|
||||||
|
import { device } from "$lib/device";
|
||||||
|
|
||||||
const cobaltUrl = "https://cobalt.tools/";
|
const cobaltUrl = "https://cobalt.tools/";
|
||||||
|
|
||||||
|
@ -50,16 +51,18 @@
|
||||||
copy
|
copy
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
{#if device.supports.share}
|
||||||
id="action-button-share"
|
<button
|
||||||
class="action-button"
|
id="action-button-share"
|
||||||
on:click={async () => shareURL(cobaltUrl)}
|
class="action-button"
|
||||||
>
|
on:click={async () => shareURL(cobaltUrl)}
|
||||||
<div class="action-button-icon">
|
>
|
||||||
<IconShare2 />
|
<div class="action-button-icon">
|
||||||
</div>
|
<IconShare2 />
|
||||||
{$t("button.share")}
|
</div>
|
||||||
</button>
|
{$t("button.share")}
|
||||||
|
</button>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<button
|
<button
|
||||||
id="action-button-github"
|
id="action-button-github"
|
||||||
|
|
Loading…
Reference in a new issue