cleanup: use native html forms for earch and communities
This commit is contained in:
1 parent
e46422c27b
commit
73a4c16322
37 files changed
+254
-246
No files matched your search
@@ -4,14 +4,14 @@
|
||||
|
||||
import SidebarButton from '$lib/components/ui/sidebar/SidebarButton.svelte'
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
import { page } from '$app/stores'
|
||||
import { page } from '$app/state'
|
||||
/**
|
||||
* @typedef {Object} Props
|
||||
* @property {import('svelte').Snippet} [children]
|
||||
*/
|
||||
|
||||
/** @type {Props} */
|
||||
let { children } = $props();
|
||||
let { children } = $props()
|
||||
|
||||
const routes = [
|
||||
{
|
||||
@@ -38,7 +38,7 @@
|
||||
</script>
|
||||
|
||||
<Header pageHeader>
|
||||
{routes.find((r) => $page.url.pathname == r.url)?.name}
|
||||
{routes.find((r) => page.url.pathname == r.url)?.name}
|
||||
</Header>
|
||||
<div class="flex flex-row gap-12">
|
||||
<nav class="flex flex-col gap-2 flex-1 max-sm:hidden">
|
||||
@@ -46,7 +46,7 @@
|
||||
<SidebarButton
|
||||
size="lg"
|
||||
rounding="lg"
|
||||
selected={$page.url.pathname == route.url}
|
||||
selected={page.url.pathname == route.url}
|
||||
href={route.url}
|
||||
>
|
||||
{route.name}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { goto } from '$app/navigation'
|
||||
import { page } from '$app/stores'
|
||||
import { page } from '$app/state'
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
import { client } from '$lib/lemmy.js'
|
||||
import { t } from '$lib/translations.js'
|
||||
@@ -31,7 +31,7 @@
|
||||
type: 'success',
|
||||
})
|
||||
|
||||
goto($page.url, { invalidateAll: true })
|
||||
goto(page.url, { invalidateAll: true })
|
||||
} else {
|
||||
const res = await client().generateTotpSecret()
|
||||
totpLink = res.totp_secret_url
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script>
|
||||
import { goto } from '$app/navigation'
|
||||
import { page } from '$app/stores'
|
||||
import { page } from '$app/state'
|
||||
|
||||
import MultiSelect from '$lib/components/input/Switch.svelte'
|
||||
import Tabs from '$lib/components/ui/layout/pages/Tabs.svelte'
|
||||
@@ -22,7 +22,7 @@
|
||||
*/
|
||||
|
||||
/** @type {Props} */
|
||||
let { children } = $props();
|
||||
let { children } = $props()
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -65,9 +65,8 @@
|
||||
{#if feature('mediaAndVotes', $site?.version)}
|
||||
<Menu class="flex-1" placement="bottom-end">
|
||||
{#snippet target()}
|
||||
<Button
|
||||
<Button
|
||||
title={$t('post.actions.more.label')}
|
||||
|
||||
size="square-lg"
|
||||
rounding="pill"
|
||||
color="none"
|
||||
@@ -78,23 +77,23 @@
|
||||
>
|
||||
<Icon src={EllipsisHorizontal} size="16" mini />
|
||||
</Button>
|
||||
{/snippet}
|
||||
{/snippet}
|
||||
<MenuButton href="/profile/media">
|
||||
{#snippet prefix()}
|
||||
<Icon src={Photo} size="16" mini />
|
||||
{/snippet}
|
||||
<Icon src={Photo} size="16" mini />
|
||||
{/snippet}
|
||||
{$t('routes.profile.media.title')}
|
||||
</MenuButton>
|
||||
<MenuButton href="/profile/voted/up">
|
||||
{#snippet prefix()}
|
||||
<Icon src={ArrowUp} size="16" micro />
|
||||
{/snippet}
|
||||
<Icon src={ArrowUp} size="16" micro />
|
||||
{/snippet}
|
||||
{$t('routes.profile.upvoted')}
|
||||
</MenuButton>
|
||||
<MenuButton href="/profile/voted/down">
|
||||
{#snippet prefix()}
|
||||
<Icon src={ArrowDown} size="16" micro />
|
||||
{/snippet}
|
||||
<Icon src={ArrowDown} size="16" micro />
|
||||
{/snippet}
|
||||
{$t('routes.profile.downvoted')}
|
||||
</MenuButton>
|
||||
</Menu>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores'
|
||||
import { page } from '$app/state'
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
import Pageination from '$lib/components/ui/Pageination.svelte'
|
||||
import { t } from '$lib/translations'
|
||||
@@ -33,9 +33,9 @@
|
||||
</div>
|
||||
{#if data.images.length == 20}
|
||||
<Pageination
|
||||
page={Number($page.url.searchParams.get('page')) || 1}
|
||||
page={Number(page.url.searchParams.get('page')) || 1}
|
||||
on:change={(p) => {
|
||||
searchParam($page.url, 'page', p.detail.toString())
|
||||
searchParam(page.url, 'page', p.detail.toString())
|
||||
}}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
Reference in new issue
Block a user