Skip to content

Commit

Permalink
Merge pull request #1591 from appwrite/fix-qr-on-sites
Browse files Browse the repository at this point in the history
Fix QR on sites
  • Loading branch information
ernstmul authored Jan 2, 2025
2 parents fded265 + b104fd8 commit b4c2187
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
export let proxyRuleList: Models.ProxyRuleList = { total: 0, rules: [] };
let show = false;
const siteUrl =
deployment.domain ?? (proxyRuleList.total > 0 ? proxyRuleList.rules[0].domain : undefined);
$: totalSize = humanFileSize((deployment?.buildSize ?? 0) + (deployment?.size ?? 0));
</script>
Expand Down Expand Up @@ -53,7 +55,10 @@
</Layout.Stack>
{/if}
</Layout.Stack>
<Button icon text on:click={() => (show = true)}><Icon icon={IconQrcode} /></Button>
{#if siteUrl}
<Button icon text on:click={() => (show = true)}
><Icon icon={IconQrcode} /></Button>
{/if}
</Layout.Stack>
{#if proxyRuleList?.total}
<Layout.Stack gap="xs">
Expand Down Expand Up @@ -112,6 +117,6 @@
</Layout.Stack>
</Card>

{#if show && deployment.domain}
<OpenOnMobileModal bind:show siteURL={deployment.domain} />
{#if show && siteUrl}
<OpenOnMobileModal bind:show siteURL={siteUrl} />
{/if}

0 comments on commit b4c2187

Please sign in to comment.