web/SavingDialog: hide buttons when actions are not supported

This commit is contained in:
wukko 2024-07-28 12:49:13 +06:00
parent 32743360be
commit 2fa1ad8f12
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -1,6 +1,7 @@
<script lang="ts"> <script lang="ts">
import { t } from "$lib/i18n/translations"; import { t } from "$lib/i18n/translations";
import { app, device } from "$lib/device";
import { copyURL, openURL, shareURL } from "$lib/download"; import { copyURL, openURL, shareURL } from "$lib/download";
import DialogContainer from "$components/dialog/DialogContainer.svelte"; import DialogContainer from "$components/dialog/DialogContainer.svelte";
@ -33,6 +34,7 @@
</h2> </h2>
</div> </div>
<div class="action-buttons"> <div class="action-buttons">
{#if !(app.is.installed && device.is.iOS)}
<VerticalActionButton <VerticalActionButton
id="save-download" id="save-download"
fill fill
@ -42,6 +44,9 @@
<IconDownload /> <IconDownload />
{$t("dialog.button.download")} {$t("dialog.button.download")}
</VerticalActionButton> </VerticalActionButton>
{/if}
{#if navigator.share !== undefined}
<VerticalActionButton <VerticalActionButton
id="save-share" id="save-share"
fill fill
@ -51,6 +56,8 @@
<IconShare2 /> <IconShare2 />
{$t("dialog.button.share")} {$t("dialog.button.share")}
</VerticalActionButton> </VerticalActionButton>
{/if}
<VerticalActionButton <VerticalActionButton
id="save-copy" id="save-copy"
fill fill