This commit is contained in:
tglide committed 2023-04-28 19:22:47 +01:00
1 parent 811716de79
commit 5017dbbfb8
4 files changed
+21 -15

No files matched your search

+12 -9
View File
@@ -21,6 +21,7 @@
import { Submit, trackEvent } from '$lib/actions/analytics';
import { sdkForConsole } from '$lib/stores/sdk';
import { slide } from 'svelte/transition';
import { isCloud } from '$lib/system';
let showFeedback = false;
let showDropdown = false;
@@ -212,15 +213,17 @@
</li>
</ul>
</section>
<section class="drop-section">
<a
class="claim"
title="Gradient Border"
href="/card"
data-sveltekit-reload>
Claim your Cloud card
</a>
</section>
{#if isCloud}
<section class="drop-section">
<a
class="claim"
title="Gradient Border"
href="/card"
data-sveltekit-reload>
Claim your Cloud card
</a>
</section>
{/if}
</div>
{/if}
</div>
-3
View File
@@ -1,10 +1,7 @@
<script lang="ts">
import Display from '../display.svelte';
import { getCardImgUrls } from '../helpers';
export let data;
const { ogImg } = getCardImgUrls(data.userId);
</script>
<Display userId={data.userId} variant="external" />
+3
View File
@@ -1,6 +1,9 @@
import { redirect } from '@sveltejs/kit';
import { getCardImgUrls } from '../helpers.js';
export const prerender = true;
export const ssr = true;
export async function load({ params }) {
const userId = params.uid;
const { frontImg } = getCardImgUrls(userId);
+6 -3
View File
@@ -8,6 +8,7 @@
import { Modal } from '$lib/components';
import Code from '$lib/components/code.svelte';
import Button from '$lib/elements/forms/button.svelte';
import { browser } from '$app/environment';
export let userId: string;
export let variant: 'owner' | 'external';
@@ -29,7 +30,8 @@
const { frontImg, ogImg } = getCardImgUrls(userId);
$: title = variant === 'owner' ? 'Welcome to the cloud' : 'Join the Appwrite Cloud';
$: shareableLink = `${window.location.origin}/card/${userId}`;
$: shareableLink =
typeof window !== 'undefined' ? `${window.location.origin}/card/${userId}` : '';
$: embedCode = [
`<a href="${shareableLink}">`,
`\t<img src="${frontImg}" alt="Appwrite Cloud Card" />`,
@@ -71,7 +73,6 @@
<meta name="description" content={seo.description} />
<!-- Facebook Meta Tags -->
<meta property="og:url" content={window.location.href} />
<meta property="og:type" content="website" />
<meta property="og:title" content={seo.title} />
<meta property="og:description" content={seo.description} />
@@ -178,7 +179,9 @@
fallDistance="50px" />
</div>
{/if}
<Card bind:active={cardActive} bind:isFlipped={cardIsFlipped} {userId} />
{#if browser}
<Card bind:active={cardActive} bind:isFlipped={cardIsFlipped} {userId} />
{/if}
</div>
{#if cardActive}
<div