misc: Add list-none
This commit is contained in:
1 parent
db966fe2ca
commit
f8278d0419
4 files changed
+14
-7
No files matched your search
@@ -35,13 +35,13 @@
|
|||||||
>
|
>
|
||||||
<slot name="button" {toggleOpen} />
|
<slot name="button" {toggleOpen} />
|
||||||
{#if open}
|
{#if open}
|
||||||
<div
|
<ul
|
||||||
transition:scale|local={{
|
transition:scale|local={{
|
||||||
duration: 200,
|
duration: 200,
|
||||||
start: 0.95,
|
start: 0.95,
|
||||||
easing: expoOut,
|
easing: expoOut,
|
||||||
}}
|
}}
|
||||||
class="absolute max-h-64 z-30 overflow-auto {rtl
|
class="list-none absolute max-h-64 z-30 overflow-auto {rtl
|
||||||
? 'origin-top-right right-0'
|
? 'origin-top-right right-0'
|
||||||
: 'origin-top-left left-0'}
|
: 'origin-top-left left-0'}
|
||||||
{top ? 'bottom-[100%] origin-bottom-left' : 'top-[100%]'}
|
{top ? 'bottom-[100%] origin-bottom-left' : 'top-[100%]'}
|
||||||
@@ -50,8 +50,10 @@
|
|||||||
: 'bg-white dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800'}"
|
: 'bg-white dark:bg-zinc-900 border border-slate-200 dark:border-zinc-800'}"
|
||||||
>
|
>
|
||||||
{#if open}
|
{#if open}
|
||||||
<slot {toggleOpen} />
|
<div on:click={toggleOpen}>
|
||||||
|
<slot {toggleOpen} />
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</ul>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
? ExclamationCircle
|
? ExclamationCircle
|
||||||
: ExclamationCircle}
|
: ExclamationCircle}
|
||||||
/>
|
/>
|
||||||
<div class="flex flex-col p-4 pl-0">
|
<div class="flex flex-col p-4 pl-0 max-w-[90%]">
|
||||||
{#if toast.title}
|
{#if toast.title}
|
||||||
<h1 class="text-base font-bold">{toast.title}</h1>
|
<h1 class="text-base font-bold">{toast.title}</h1>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import {
|
|||||||
} from 'lemmy-js-client'
|
} from 'lemmy-js-client'
|
||||||
import { get, writable } from 'svelte/store'
|
import { get, writable } from 'svelte/store'
|
||||||
import { PUBLIC_PROXY_URL } from '$env/static/public'
|
import { PUBLIC_PROXY_URL } from '$env/static/public'
|
||||||
|
import { ToastType, toast } from '$lib/components/ui/toasts/toasts.js'
|
||||||
|
|
||||||
export const DEFAULT_INSTANCE_URL = 'lemmy.world'
|
export const DEFAULT_INSTANCE_URL = 'lemmy.world'
|
||||||
export let instance_url = writable(DEFAULT_INSTANCE_URL)
|
export let instance_url = writable(DEFAULT_INSTANCE_URL)
|
||||||
@@ -83,6 +84,10 @@ authData.subscribe(async (data) => {
|
|||||||
localStorage.setItem('user', JSON.stringify(data))
|
localStorage.setItem('user', JSON.stringify(data))
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
toast({
|
||||||
|
content: 'Failed to fetch your user. Is your instance down?',
|
||||||
|
type: ToastType.error,
|
||||||
|
})
|
||||||
console.error(error)
|
console.error(error)
|
||||||
authData.set(undefined)
|
authData.set(undefined)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
try {
|
try {
|
||||||
await getClient(instance).getSite({})
|
await getClient(instance).getSite({})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
throw new Error('Invalid instance URL')
|
throw new Error('Failed to contact that instance. Is it down?')
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
data.loading = true
|
data.loading = true
|
||||||
try {
|
try {
|
||||||
if (!(await validateURL(data.instance))) {
|
if (!(await validateURL(data.instance))) {
|
||||||
throw new Error('Invalid instance URL')
|
throw new Error('Failed to contact that instance. Is it down?')
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await getClient(data.instance).login({
|
const response = await getClient(data.instance).login({
|
||||||
|
|||||||
Reference in new issue
Block a user