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
@@ -9,7 +9,7 @@
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores'
|
||||
import { page } from '$app/state'
|
||||
import { Button, Material, toast } from 'mono-svelte'
|
||||
import {
|
||||
ArrowDownTray,
|
||||
@@ -50,7 +50,7 @@
|
||||
let { alt = '', class: clazz = '', children }: Props = $props()
|
||||
</script>
|
||||
|
||||
{#if $page.state.openImage || '' != ''}
|
||||
{#if page.state.openImage || '' != ''}
|
||||
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
||||
@@ -68,7 +68,7 @@
|
||||
<img
|
||||
width={400}
|
||||
height={400}
|
||||
src={$page.state.openImage}
|
||||
src={page.state.openImage}
|
||||
class="{zoomed
|
||||
? 'object-cover'
|
||||
: 'object-contain'} max-w-max mx-auto my-auto overscroll-contain bg-white dark:bg-zinc-900"
|
||||
@@ -93,7 +93,7 @@
|
||||
>
|
||||
<Button
|
||||
download
|
||||
href={$page.state.openImage}
|
||||
href={page.state.openImage}
|
||||
color="tertiary"
|
||||
size="square-lg"
|
||||
rounding="pill"
|
||||
@@ -104,13 +104,13 @@
|
||||
<Button
|
||||
onclick={async () => {
|
||||
if (navigator.share) {
|
||||
const file = await downloadImage($page.state.openImage)
|
||||
const file = await downloadImage(page.state.openImage)
|
||||
|
||||
navigator?.share?.({
|
||||
files: [file],
|
||||
})
|
||||
} else {
|
||||
navigator.clipboard.writeText($page.state.openImage)
|
||||
navigator.clipboard.writeText(page.state.openImage)
|
||||
toast({ content: $t('toast.copied') })
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { invalidate } from '$app/navigation'
|
||||
import { page } from '$app/stores'
|
||||
import { page } from '$app/state'
|
||||
import { fly } from 'svelte/transition'
|
||||
|
||||
interface Props {
|
||||
@@ -47,7 +47,7 @@
|
||||
transition-colors duration-100 relative z-0 flex-shrink-0"
|
||||
>
|
||||
{route.name}
|
||||
{#if isSelected($page.url, currentRoute, route.href, defaultRoute)}
|
||||
{#if isSelected(page.url, currentRoute, route.href, defaultRoute)}
|
||||
<div
|
||||
class="rounded-full bg-slate-100/60 dark:bg-zinc-700/60
|
||||
absolute inset-0 w-full h-full -z-10"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores'
|
||||
import { page } from '$app/state'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Icon, type IconSource } from 'svelte-hero-icons'
|
||||
import { dockProps } from '../layout/Shell.svelte'
|
||||
@@ -28,7 +28,7 @@
|
||||
...rest
|
||||
}: Props = $props()
|
||||
|
||||
let isSelected = $derived(isSelectedFilter($page.url.pathname))
|
||||
let isSelected = $derived(isSelectedFilter(page.url.pathname))
|
||||
let isPanel = $derived(adaptive ? $dockProps.noGap : false)
|
||||
</script>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
import { profile, profileData } from '$lib/auth.svelte'
|
||||
import { getGroups, type Action, type Group } from './actions.svelte'
|
||||
import { themeData } from '$lib/ui/colors'
|
||||
import { page } from '$app/stores'
|
||||
import { page } from '$app/state'
|
||||
|
||||
interface Props {
|
||||
open?: boolean
|
||||
@@ -235,7 +235,7 @@
|
||||
$profile,
|
||||
$profileData.profiles,
|
||||
$themeData,
|
||||
$page.data.contextual?.actions,
|
||||
page.data.contextual?.actions,
|
||||
)
|
||||
})
|
||||
let flattenedActions = $derived(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { goto } from '$app/navigation'
|
||||
import { page } from '$app/stores'
|
||||
import { page } from '$app/state'
|
||||
import { setUserID, type Profile } from '$lib/auth.svelte'
|
||||
import {
|
||||
amModOfAny,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { goto } from '$app/navigation'
|
||||
import { page } from '$app/stores'
|
||||
import { page } from '$app/state'
|
||||
import { profile, setUserID, type Profile } from '$lib/auth.svelte.js'
|
||||
import SidebarButton from '$lib/components/ui/sidebar/SidebarButton.svelte'
|
||||
import { LINKED_INSTANCE_URL } from '$lib/instance'
|
||||
@@ -31,7 +31,7 @@
|
||||
await setUserID(prof.id)
|
||||
}
|
||||
|
||||
await goto($page.url, {
|
||||
await goto(page.url, {
|
||||
invalidateAll: true,
|
||||
})
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { run } from 'svelte/legacy'
|
||||
|
||||
import { page } from '$app/stores'
|
||||
import { page } from '$app/state'
|
||||
import { settings } from '$lib/settings.svelte.js'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Icon, type IconSource } from 'svelte-hero-icons'
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
run(() => {
|
||||
if (href != undefined) {
|
||||
selected = $page.url.pathname == href
|
||||
selected = page.url.pathname == href
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user