fix: some errors
This commit is contained in:
1 parent
adc5dc3ad3
commit
04b29c1407
7 files changed
+22
-12
No files matched your search
+2
-2
@@ -9,7 +9,7 @@
|
|||||||
"@sveltejs/adapter-auto": "^3.3.1",
|
"@sveltejs/adapter-auto": "^3.3.1",
|
||||||
"@sveltejs/adapter-node": "^5.2.9",
|
"@sveltejs/adapter-node": "^5.2.9",
|
||||||
"@sveltejs/adapter-vercel": "^5.4.6",
|
"@sveltejs/adapter-vercel": "^5.4.6",
|
||||||
"@sveltejs/kit": "^2.7.3",
|
"@sveltejs/kit": "^2.15.0",
|
||||||
"@sveltejs/vite-plugin-svelte": "^3.1.2",
|
"@sveltejs/vite-plugin-svelte": "^3.1.2",
|
||||||
"@tailwindcss/container-queries": "^0.1.1",
|
"@tailwindcss/container-queries": "^0.1.1",
|
||||||
"@tanstack/svelte-virtual": "^3.8.1",
|
"@tanstack/svelte-virtual": "^3.8.1",
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"prettier-plugin-svelte": "^3.2.7",
|
"prettier-plugin-svelte": "^3.2.7",
|
||||||
"rollup-plugin-visualizer": "^5.9.2",
|
"rollup-plugin-visualizer": "^5.9.2",
|
||||||
"svelte": "^5.1.3",
|
"svelte": "^5.15.0",
|
||||||
"svelte-check": "^4.0.0",
|
"svelte-check": "^4.0.0",
|
||||||
"svelte-floating-ui": "^1.5.9",
|
"svelte-floating-ui": "^1.5.9",
|
||||||
"svelte-focus-trap": "^1.2.0",
|
"svelte-focus-trap": "^1.2.0",
|
||||||
|
|||||||
@@ -8,14 +8,17 @@
|
|||||||
} from 'svelte-hero-icons'
|
} from 'svelte-hero-icons'
|
||||||
import Avatar from '../../Avatar.svelte'
|
import Avatar from '../../Avatar.svelte'
|
||||||
import type { Action } from './actions.svelte'
|
import type { Action } from './actions.svelte'
|
||||||
|
import type { HTMLButtonAttributes } from 'svelte/elements'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
action: Action
|
action: Action
|
||||||
class?: string
|
class?: string
|
||||||
children?: import('svelte').Snippet
|
children?: import('svelte').Snippet
|
||||||
|
onclick?: HTMLButtonAttributes['onclick']
|
||||||
|
[key: string]: any
|
||||||
}
|
}
|
||||||
|
|
||||||
let { action, class: clazz = '', children }: Props = $props()
|
let { action, class: clazz = '', children, ...rest }: Props = $props()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
@@ -27,6 +30,7 @@
|
|||||||
class="focus:bg-slate-200 focus:dark:bg-zinc-800 block w-full {clazz}"
|
class="focus:bg-slate-200 focus:dark:bg-zinc-800 block w-full {clazz}"
|
||||||
data-sveltekit-preload-code="viewport"
|
data-sveltekit-preload-code="viewport"
|
||||||
data-sveltekit-preload-data="tap"
|
data-sveltekit-preload-data="tap"
|
||||||
|
{...rest}
|
||||||
>
|
>
|
||||||
{#if typeof action.icon === 'string'}
|
{#if typeof action.icon === 'string'}
|
||||||
<Avatar url={action.icon} width={20} />
|
<Avatar url={action.icon} width={20} />
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
let { open = $bindable(false), groups = $bindable([]) }: Props = $props()
|
let { open = $bindable(false), groups = $bindable([]) }: Props = $props()
|
||||||
|
|
||||||
let search = $state('')
|
let search = $state('')
|
||||||
let container: HTMLElement = $state()
|
let container: HTMLElement | undefined = $state()
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
let selectedIndex = $state(0)
|
let selectedIndex = $state(0)
|
||||||
let filteredGroups: Group[] = $state([])
|
let filteredGroups: Group[] = $state([])
|
||||||
@@ -202,6 +202,7 @@
|
|||||||
if (!browser) return
|
if (!browser) return
|
||||||
|
|
||||||
const listItems = container?.querySelectorAll('li')
|
const listItems = container?.querySelectorAll('li')
|
||||||
|
if (!listItems) return
|
||||||
listItems[index % listItems.length].focus()
|
listItems[index % listItems.length].focus()
|
||||||
listItems[index % listItems.length].scrollIntoView({
|
listItems[index % listItems.length].scrollIntoView({
|
||||||
behavior: 'smooth',
|
behavior: 'smooth',
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { settings } from '$lib/settings.svelte.js'
|
import { settings } from '$lib/settings.svelte.js'
|
||||||
import { Button } from 'mono-svelte'
|
import { Button } from 'mono-svelte'
|
||||||
import { Icon, type IconSource } from 'svelte-hero-icons'
|
import { Icon, type IconSource } from 'svelte-hero-icons'
|
||||||
|
import type { HTMLButtonAttributes } from 'svelte/elements'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
href?: string | undefined
|
href?: string | undefined
|
||||||
|
|||||||
@@ -98,6 +98,12 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let error = $state(null)
|
||||||
|
|
||||||
|
function onerror(e: any, r: any) {
|
||||||
|
error = e
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
@@ -129,6 +135,7 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
Skip Navigation
|
Skip Navigation
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Shell
|
<Shell
|
||||||
dir={$locale == 'he' && settings.useRtl ? 'rtl' : 'ltr'}
|
dir={$locale == 'he' && settings.useRtl ? 'rtl' : 'ltr'}
|
||||||
class="min-h-screen "
|
class="min-h-screen "
|
||||||
|
|||||||
@@ -56,6 +56,7 @@
|
|||||||
<Header pageHeader class="justify-between">
|
<Header pageHeader class="justify-between">
|
||||||
<span>{$t('routes.communities.title')}</span>
|
<span>{$t('routes.communities.title')}</span>
|
||||||
</Header>
|
</Header>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="mt-4 mb-0 sticky z-30"
|
class="mt-4 mb-0 sticky z-30"
|
||||||
style="top: max(1.5rem, {$contentPadding.top}px);"
|
style="top: max(1.5rem, {$contentPadding.top}px);"
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { run, preventDefault } from 'svelte/legacy'
|
|
||||||
|
|
||||||
import { goto } from '$app/navigation'
|
import { goto } from '$app/navigation'
|
||||||
import { page } from '$app/stores'
|
import { page } from '$app/stores'
|
||||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||||
@@ -14,11 +12,9 @@
|
|||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
let totpLink: string | undefined = $state(undefined)
|
let totpLink: string | undefined = $state(undefined)
|
||||||
let totpEnabled
|
let totpEnabled = $state(
|
||||||
run(() => {
|
data.my_user?.local_user_view.local_user.totp_2fa_enabled,
|
||||||
totpEnabled =
|
)
|
||||||
data.my_user?.local_user_view.local_user.totp_2fa_enabled ?? totpLink
|
|
||||||
})
|
|
||||||
|
|
||||||
let verify_totp = $state('')
|
let verify_totp = $state('')
|
||||||
|
|
||||||
@@ -83,7 +79,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<form
|
<form
|
||||||
class="flex flex-col gap-2 w-full"
|
class="flex flex-col gap-2 w-full"
|
||||||
onsubmit={preventDefault(() => {})}
|
onsubmit={(e) => e.preventDefault()}
|
||||||
>
|
>
|
||||||
<TextInput
|
<TextInput
|
||||||
bind:value={verify_totp}
|
bind:value={verify_totp}
|
||||||
|
|||||||
Reference in new issue
Block a user