misc: Add list-none

This commit is contained in:
Xyphyn committed 2023-07-14 13:02:51 -07:00
1 parent db966fe2ca
commit f8278d0419
4 files changed
+14 -7

No files matched your search

+6 -4
View File
@@ -35,13 +35,13 @@
>
<slot name="button" {toggleOpen} />
{#if open}
<div
<ul
transition:scale|local={{
duration: 200,
start: 0.95,
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-left left-0'}
{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'}"
>
{#if open}
<slot {toggleOpen} />
<div on:click={toggleOpen}>
<slot {toggleOpen} />
</div>
{/if}
</div>
</ul>
{/if}
</div>
+1 -1
View File
@@ -42,7 +42,7 @@
? 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}
<h1 class="text-base font-bold">{toast.title}</h1>
{/if}
+5
View File
@@ -7,6 +7,7 @@ import {
} from 'lemmy-js-client'
import { get, writable } from 'svelte/store'
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 let instance_url = writable(DEFAULT_INSTANCE_URL)
@@ -83,6 +84,10 @@ authData.subscribe(async (data) => {
localStorage.setItem('user', JSON.stringify(data))
}
} catch (error) {
toast({
content: 'Failed to fetch your user. Is your instance down?',
type: ToastType.error,
})
console.error(error)
authData.set(undefined)
}
+2 -2
View File
@@ -25,7 +25,7 @@
try {
await getClient(instance).getSite({})
} catch (err) {
throw new Error('Invalid instance URL')
throw new Error('Failed to contact that instance. Is it down?')
}
return true
@@ -35,7 +35,7 @@
data.loading = true
try {
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({