@@ -79,22 +93,25 @@
-
diff --git a/frontend/src/routes/(app)/dashboard/projects/[id]/links/[linkid]/qr/+page.svelte b/frontend/src/routes/(app)/dashboard/projects/[id]/links/[linkid]/qr/+page.svelte
index 94a49a3..10f0d94 100644
--- a/frontend/src/routes/(app)/dashboard/projects/[id]/links/[linkid]/qr/+page.svelte
+++ b/frontend/src/routes/(app)/dashboard/projects/[id]/links/[linkid]/qr/+page.svelte
@@ -3,8 +3,10 @@
import type { PageData } from './$types'
import QR from './(components)/qr.svelte'
- export let data: PageData
- export let shallowRouting = false
+ let {
+ data,
+ shallowRouting,
+ }: { data: PageData; shallowRouting: boolean } = $props()
const url =
data.project.enable_custom_domain && data.project.custom_domain
diff --git a/frontend/src/routes/(app)/dashboard/projects/[id]/settings/(components)/DemoQR.svelte b/frontend/src/routes/(app)/dashboard/projects/[id]/settings/(components)/DemoQR.svelte
index 7326bf0..a92721f 100644
--- a/frontend/src/routes/(app)/dashboard/projects/[id]/settings/(components)/DemoQR.svelte
+++ b/frontend/src/routes/(app)/dashboard/projects/[id]/settings/(components)/DemoQR.svelte
@@ -2,16 +2,25 @@
import { onMount } from 'svelte'
import { browser } from '$app/environment'
- export let background = '#fff'
- export let color = '#000'
- export let value = 'example.com/abcdefgh'
- export let cornerSquareStyle: 'dot' | 'square' | 'extra-rounded' =
- 'square'
- export let dotStyle: 'square' | 'rounded' = 'square'
- export let existingQrImage: string | null = null
- export let qrImage: File | null = null
+ let {
+ background = '#fff',
+ color = '#000',
+ value = 'example.com/abcdefgh',
+ cornerSquareStyle = 'square',
+ dotStyle = 'square',
+ existingQrImage = null,
+ qrImage = null,
+ }: {
+ background: string
+ color: string
+ value: string
+ cornerSquareStyle: 'dot' | 'square' | 'extra-rounded'
+ dotStyle: 'square' | 'rounded'
+ existingQrImage: string | null
+ qrImage: File | null
+ } = $props()
- let image = ''
+ let image = $state('')
async function generateQrCode() {
if (!document || !window) {
@@ -58,13 +67,18 @@
}
}
- $: browser &&
- background &&
- color &&
- cornerSquareStyle &&
- dotStyle &&
- (qrImage === null || qrImage) &&
- generateQrCode()
+ $effect(() => {
+ if (
+ browser &&
+ background &&
+ color &&
+ cornerSquareStyle &&
+ dotStyle &&
+ (qrImage === null || qrImage)
+ ) {
+ generateQrCode()
+ }
+ })
onMount(() => {
generateQrCode()
diff --git a/frontend/src/routes/(app)/dashboard/projects/[id]/settings/(components)/dns-info.svelte b/frontend/src/routes/(app)/dashboard/projects/[id]/settings/(components)/dns-info.svelte
index 99b176f..7ceff19 100644
--- a/frontend/src/routes/(app)/dashboard/projects/[id]/settings/(components)/dns-info.svelte
+++ b/frontend/src/routes/(app)/dashboard/projects/[id]/settings/(components)/dns-info.svelte
@@ -2,10 +2,17 @@
import * as Tabs from '$lib/components/ui/tabs/index.js'
import * as Card from '$lib/components/ui/card/index.js'
- export let host: string
- export let cname_record: string
- export let a_record: string
- export let aaaa_record: string
+ let {
+ host,
+ a_record,
+ aaaa_record,
+ cname_record,
+ }: {
+ host: string
+ cname_record: string
+ a_record: string
+ aaaa_record: string
+ } = $props()
const defaultValue = cname_record ? 'cname' : 'a'
diff --git a/frontend/src/routes/(app)/dashboard/projects/[id]/settings/(components)/dns-tooltip.svelte b/frontend/src/routes/(app)/dashboard/projects/[id]/settings/(components)/dns-tooltip.svelte
index cce878b..cc46c2d 100644
--- a/frontend/src/routes/(app)/dashboard/projects/[id]/settings/(components)/dns-tooltip.svelte
+++ b/frontend/src/routes/(app)/dashboard/projects/[id]/settings/(components)/dns-tooltip.svelte
@@ -2,11 +2,19 @@
import * as Tooltip from '$lib/components/ui/tooltip/index.js'
import { InfoIcon } from 'lucide-svelte'
- export let domain: string
- export let custom_ip: string | null
- export let cname_record: string
- export let a_record: string
- export let aaaa_record: string
+ let {
+ a_record,
+ aaaa_record,
+ cname_record,
+ custom_ip,
+ domain,
+ }: {
+ domain: string
+ custom_ip: string | null
+ cname_record: string
+ a_record: string
+ aaaa_record: string
+ } = $props()
diff --git a/frontend/src/routes/(app)/dashboard/projects/[id]/settings/(components)/form.svelte b/frontend/src/routes/(app)/dashboard/projects/[id]/settings/(components)/form.svelte
index 8ecf4c5..6feda62 100644
--- a/frontend/src/routes/(app)/dashboard/projects/[id]/settings/(components)/form.svelte
+++ b/frontend/src/routes/(app)/dashboard/projects/[id]/settings/(components)/form.svelte
@@ -14,11 +14,17 @@
import DemoQr from './DemoQR.svelte'
import { cn } from '$lib/utils'
- export let data: SuperValidated>
- export let qrImageBase64: string | null = null
- export let isPro: boolean = false
+ let {
+ data,
+ qrImageBase64 = null,
+ isPro = false,
+ }: {
+ data: SuperValidated>
+ qrImageBase64: string | null
+ isPro: boolean
+ } = $props()
- let qrImageInput: HTMLInputElement
+ let qrImageInput: HTMLInputElement | undefined = $state()
const form = superForm(data, {
validators: zodClient(formSchema),
@@ -84,7 +90,7 @@
{#if !$formData.qrImage && !qrImageBase64}
{
+ onclick={(e) => {
e.preventDefault()
qrImageInput.click()
}}>
@@ -94,7 +100,7 @@
{:else}
{
+ onclick={(e) => {
e.preventDefault()
qrImageInput.click()
}}>
@@ -119,7 +125,7 @@
accept="image/png, image/jpeg"
type="file"
disabled={!isPro}
- on:input={(e) => {
+ oninput={(e) => {
const file = e.currentTarget.files?.item(0)
if (!file) return
@@ -147,7 +153,7 @@
($formData.qrCornerSquareStyle = 'square')}
+ onclick={() => ($formData.qrCornerSquareStyle = 'square')}
class={cn(
'flex flex-col gap-3 border p-12',
$formData.qrCornerSquareStyle === 'square'
@@ -159,7 +165,7 @@
($formData.qrCornerSquareStyle = 'dot')}
+ onclick={() => ($formData.qrCornerSquareStyle = 'dot')}
class={cn(
'flex flex-col gap-3 border p-12',
$formData.qrCornerSquareStyle === 'dot'
@@ -171,7 +177,7 @@
+ onclick={() =>
($formData.qrCornerSquareStyle = 'extra-rounded')}
class={cn(
'flex flex-col gap-3 border p-12',
@@ -199,7 +205,7 @@
($formData.qrDotStyle = 'square')}
+ onclick={() => ($formData.qrDotStyle = 'square')}
class={cn(
'flex flex-col gap-3 border p-12',
$formData.qrDotStyle === 'square'
@@ -211,7 +217,7 @@
($formData.qrDotStyle = 'rounded')}
+ onclick={() => ($formData.qrDotStyle = 'rounded')}
class={cn(
'flex flex-col gap-3 border p-12',
$formData.qrDotStyle === 'rounded'
diff --git a/frontend/src/routes/(app)/dashboard/projects/[id]/settings/+page.svelte b/frontend/src/routes/(app)/dashboard/projects/[id]/settings/+page.svelte
index 8a13bd0..1340898 100644
--- a/frontend/src/routes/(app)/dashboard/projects/[id]/settings/+page.svelte
+++ b/frontend/src/routes/(app)/dashboard/projects/[id]/settings/+page.svelte
@@ -26,9 +26,9 @@
import DnsInfo from './(components)/dns-info.svelte'
import DnsTooltip from './(components)/dns-tooltip.svelte'
- export let data
+ let { data } = $props()
- let deleteDialogOpen = false
+ let deleteDialogOpen = $state(false)
const form = superForm(data.deleteForm, {
invalidateAll: 'force',
@@ -211,7 +211,7 @@
Cancel
-
+
{#if $enableCustomDomainSubmitting}
{/if}
@@ -239,7 +239,7 @@
Cancel
{
+ onclick={async () => {
await fetch('?/disable_custom_domain', {
method: 'POST',
headers: {
@@ -368,7 +368,7 @@
(deleteDialogOpen = false)}>
+ onclick={() => (deleteDialogOpen = false)}>
Cancel
diff --git a/frontend/src/routes/(app)/dashboard/settings/(components)/sidebar-nav.svelte b/frontend/src/routes/(app)/dashboard/settings/(components)/sidebar-nav.svelte
index 70056a4..1b2d9ec 100644
--- a/frontend/src/routes/(app)/dashboard/settings/(components)/sidebar-nav.svelte
+++ b/frontend/src/routes/(app)/dashboard/settings/(components)/sidebar-nav.svelte
@@ -2,8 +2,12 @@
import { cn } from '$lib/utils'
import { page } from '$app/stores'
import { Button } from '$lib/components/ui/button'
- let className: string | undefined | null = undefined
- export { className as class }
+
+ let {
+ class: className = undefined,
+ }: {
+ class: string | undefined | null
+ } = $props()
const items = [
{
diff --git a/frontend/src/routes/(app)/dashboard/settings/account/+page.svelte b/frontend/src/routes/(app)/dashboard/settings/account/+page.svelte
index c47fd1b..1f31ac0 100644
--- a/frontend/src/routes/(app)/dashboard/settings/account/+page.svelte
+++ b/frontend/src/routes/(app)/dashboard/settings/account/+page.svelte
@@ -8,7 +8,7 @@
import { toast } from 'svelte-sonner'
import { LoaderCircle, CheckIcon, XIcon } from 'lucide-svelte'
- export let data
+ let { data } = $props()
const form = superForm(data.form, {
validators: zodClient(formSchema),
diff --git a/frontend/src/routes/(app)/dashboard/settings/qr/(components)/DemoQR.svelte b/frontend/src/routes/(app)/dashboard/settings/qr/(components)/DemoQR.svelte
index 9117529..aaed3e0 100644
--- a/frontend/src/routes/(app)/dashboard/settings/qr/(components)/DemoQR.svelte
+++ b/frontend/src/routes/(app)/dashboard/settings/qr/(components)/DemoQR.svelte
@@ -2,16 +2,25 @@
import { onMount } from 'svelte'
import { browser } from '$app/environment'
- export let background = '#fff'
- export let color = '#000'
- export let value = 'abcdefghajskdadsj'
- export let cornerSquareStyle: 'dot' | 'square' | 'extra-rounded' =
- 'square'
- export let dotStyle: 'square' | 'rounded' = 'square'
- export let existingQrImage: string | null = null
- export let qrImage: File | null = null
+ let {
+ background = '#fff',
+ color = '#000',
+ value = 'abcdefghajskdadsj',
+ cornerSquareStyle = 'square',
+ dotStyle = 'square',
+ existingQrImage = null,
+ qrImage = null,
+ }: {
+ background: string
+ color: string
+ value: string
+ cornerSquareStyle: 'dot' | 'square' | 'extra-rounded'
+ dotStyle: 'square' | 'rounded'
+ existingQrImage: string | null
+ qrImage: File | null
+ } = $props()
- let image = ''
+ let image = $state('')
async function generateQrCode() {
if (!document || !window) {
@@ -58,13 +67,18 @@
}
}
- $: browser &&
- background &&
- color &&
- cornerSquareStyle &&
- dotStyle &&
- (qrImage === null || qrImage) &&
- generateQrCode()
+ $effect(() => {
+ if (
+ browser &&
+ background &&
+ color &&
+ cornerSquareStyle &&
+ dotStyle &&
+ (qrImage === null || qrImage)
+ ) {
+ generateQrCode()
+ }
+ })
onMount(() => {
generateQrCode()
diff --git a/frontend/src/routes/(app)/dashboard/settings/qr/+page.svelte b/frontend/src/routes/(app)/dashboard/settings/qr/+page.svelte
index ceb79c4..946cabd 100644
--- a/frontend/src/routes/(app)/dashboard/settings/qr/+page.svelte
+++ b/frontend/src/routes/(app)/dashboard/settings/qr/+page.svelte
@@ -1,6 +1,5 @@
>
+ let { data }: { data: SuperValidated> } = $props()
const form = superForm(data, {
validators: zodClient(formSchema),
diff --git a/frontend/src/routes/(auth)/login/+page.svelte b/frontend/src/routes/(auth)/login/+page.svelte
index fd8d1a5..b5512cd 100644
--- a/frontend/src/routes/(auth)/login/+page.svelte
+++ b/frontend/src/routes/(auth)/login/+page.svelte
@@ -2,14 +2,13 @@
import ThemeToggle from '$lib/components/theme-toggle.svelte'
import Form from './(components)/form.svelte'
- import type { PageData } from './$types'
import { Button } from '$lib/components/ui/button'
import { LoaderIcon } from 'lucide-svelte'
import Google from '$lib/components/icons/google.svelte'
- export let data: PageData
+ let { data } = $props()
- let isLoading = false
+ let isLoading = $state(false)
const loginGoogle = async () => {
// isLoading = true
diff --git a/frontend/src/routes/(auth)/signup/(components)/form.svelte b/frontend/src/routes/(auth)/signup/(components)/form.svelte
index 1c42e14..24f22c5 100644
--- a/frontend/src/routes/(auth)/signup/(components)/form.svelte
+++ b/frontend/src/routes/(auth)/signup/(components)/form.svelte
@@ -11,7 +11,7 @@
import { toast } from 'svelte-sonner'
import { LoaderCircle } from 'lucide-svelte'
- export let data: SuperValidated>
+ let { data }: { data: SuperValidated> } = $props()
const form = superForm(data, {
validators: zodClient(formSchema),
diff --git a/frontend/src/routes/(auth)/signup/+page.svelte b/frontend/src/routes/(auth)/signup/+page.svelte
index 61c579f..2d194dc 100644
--- a/frontend/src/routes/(auth)/signup/+page.svelte
+++ b/frontend/src/routes/(auth)/signup/+page.svelte
@@ -1,9 +1,8 @@
diff --git a/frontend/src/routes/(public)/url/[id]/qr/+page.svelte b/frontend/src/routes/(public)/url/[id]/qr/+page.svelte
index 485ee76..c956d1a 100644
--- a/frontend/src/routes/(public)/url/[id]/qr/+page.svelte
+++ b/frontend/src/routes/(public)/url/[id]/qr/+page.svelte
@@ -5,9 +5,9 @@
import { onMount } from 'svelte'
import * as Card from '$lib/components/ui/card'
- export let data
+ let { data } = $props()
- let image = ''
+ let image = $state('')
const copyImageToClipboard = async () => {
if (!image) return
@@ -79,7 +79,7 @@
alt={data.url + '/' + data.shortenerId}
width={300}
height={300} />
-
+
Copy Image