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