mirror of
https://github.com/pockethost/pockethost.git
synced 2025-11-24 06:25:48 +00:00
dashboard pricing card login fix
This commit is contained in:
parent
f9ef2a11c4
commit
72c580a738
@ -15,6 +15,11 @@
|
|||||||
]
|
]
|
||||||
export let startDate: Date | null = null
|
export let startDate: Date | null = null
|
||||||
export let endDate: Date | null = null
|
export let endDate: Date | null = null
|
||||||
|
|
||||||
|
const logInFirst = () => {
|
||||||
|
alert('Please log in and verify your account first.')
|
||||||
|
window.location.href = '/login'
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<PricingCard
|
<PricingCard
|
||||||
@ -27,6 +32,7 @@
|
|||||||
description="Epic elite! The Flounder's Edition is almost as good as the Founder's edition, and you'll help PocketHost go global."
|
description="Epic elite! The Flounder's Edition is almost as good as the Founder's edition, and you'll help PocketHost go global."
|
||||||
{priceMonthly}
|
{priceMonthly}
|
||||||
{priceAnnually}
|
{priceAnnually}
|
||||||
|
requireAuthenticatedUser
|
||||||
checkoutMonthURL="https://store.pockethost.io/buy/9ff8775b-6b9e-4aa8-a0ab-dc5e58e25408?checkout[custom][user_id]={$userStore?.id}&checkout[email]={$userStore?.email}&checkout[discount_code]=G0MTI0OQ"
|
checkoutMonthURL="https://store.pockethost.io/buy/9ff8775b-6b9e-4aa8-a0ab-dc5e58e25408?checkout[custom][user_id]={$userStore?.id}&checkout[email]={$userStore?.email}&checkout[discount_code]=G0MTI0OQ"
|
||||||
checkoutYearURL="https://store.pockethost.io/buy/82d79f7c-64f6-4c2b-9f58-dcc8951f1cdd?checkout[custom][user_id]={$userStore?.id}&checkout[email]={$userStore?.email}&checkout[discount_code]=G0MTI0OQ"
|
checkoutYearURL="https://store.pockethost.io/buy/82d79f7c-64f6-4c2b-9f58-dcc8951f1cdd?checkout[custom][user_id]={$userStore?.id}&checkout[email]={$userStore?.email}&checkout[discount_code]=G0MTI0OQ"
|
||||||
features={[
|
features={[
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { faClock, faCheck, faTimes } from '@fortawesome/free-solid-svg-icons'
|
import { faClock, faCheck, faTimes } from '@fortawesome/free-solid-svg-icons'
|
||||||
|
import { userStore } from '$util/stores'
|
||||||
import Fa from 'svelte-fa'
|
import Fa from 'svelte-fa'
|
||||||
import { onMount, onDestroy } from 'svelte'
|
import { onMount, onDestroy } from 'svelte'
|
||||||
import { writable } from 'svelte/store'
|
import { writable } from 'svelte/store'
|
||||||
@ -18,6 +19,7 @@
|
|||||||
export let fundingGoals: string[] = []
|
export let fundingGoals: string[] = []
|
||||||
export let startDate: Date | null = null
|
export let startDate: Date | null = null
|
||||||
export let endDate: Date | null = null
|
export let endDate: Date | null = null
|
||||||
|
export let requireAuthenticatedUser = false
|
||||||
|
|
||||||
const comingSoon = startDate && startDate > new Date()
|
const comingSoon = startDate && startDate > new Date()
|
||||||
|
|
||||||
@ -73,6 +75,9 @@
|
|||||||
} else if (qtyRemaining <= 0) {
|
} else if (qtyRemaining <= 0) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
alert(soldOutText)
|
alert(soldOutText)
|
||||||
|
} else if (requireAuthenticatedUser && !$userStore?.verified) {
|
||||||
|
event.preventDefault()
|
||||||
|
alert('Please create and verify your account first.')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user