Fix self-closing tags

This commit is contained in:
Jon Staab
2025-02-03 15:01:42 -08:00
parent 34477e8ea6
commit cfbff94b4c
26 changed files with 46 additions and 37 deletions
+1 -1
View File
@@ -65,7 +65,7 @@
<Avatar src={$profile?.picture} class="border border-solid border-base-content" size={8} /> <Avatar src={$profile?.picture} class="border border-solid border-base-content" size={8} />
</Button> </Button>
{:else} {:else}
<div class="w-8 min-w-8 max-w-8" /> <div class="w-8 min-w-8 max-w-8"></div>
{/if} {/if}
<div class="min-w-0 flex-grow pr-1"> <div class="min-w-0 flex-grow pr-1">
{#if showPubkey} {#if showPubkey}
+1 -1
View File
@@ -50,7 +50,7 @@
{/if} {/if}
</div> </div>
{#if !active && $notifications.has(path)} {#if !active && $notifications.has(path)}
<div class="h-2 w-2 rounded-full bg-primary" transition:fade /> <div class="h-2 w-2 rounded-full bg-primary" transition:fade></div>
{/if} {/if}
</div> </div>
<p class="overflow-hidden text-ellipsis whitespace-nowrap text-sm"> <p class="overflow-hidden text-ellipsis whitespace-nowrap text-sm">
+1 -1
View File
@@ -35,7 +35,7 @@
{:else} {:else}
{#await loadPreview()} {#await loadPreview()}
<div class="center my-12 w-full"> <div class="center my-12 w-full">
<span class="loading loading-spinner" /> <span class="loading loading-spinner"></span>
</div> </div>
{:then preview} {:then preview}
<div class="bg-alt flex max-w-xl flex-col leading-normal"> <div class="bg-alt flex max-w-xl flex-col leading-normal">
+1 -1
View File
@@ -57,7 +57,7 @@
</Field> </Field>
<Field> <Field>
<p slot="label">Details</p> <p slot="label">Details</p>
<textarea slot="input" class="textarea textarea-bordered" bind:value={content} /> <textarea slot="input" class="textarea textarea-bordered" bind:value={content}></textarea>
<p slot="info">Please provide any additional details relevant to your report.</p> <p slot="info">Please provide any additional details relevant to your report.</p>
</Field> </Field>
<ModalFooter> <ModalFooter>
+2 -2
View File
@@ -115,13 +115,13 @@
<SecondaryNavItem href={threadsPath} notification={$notifications.has(threadsPath)}> <SecondaryNavItem href={threadsPath} notification={$notifications.has(threadsPath)}>
<Icon icon="notes-minimalistic" /> Threads <Icon icon="notes-minimalistic" /> Threads
</SecondaryNavItem> </SecondaryNavItem>
<div class="h-2" /> <div class="h-2"></div>
<SecondaryNavHeader>Your Rooms</SecondaryNavHeader> <SecondaryNavHeader>Your Rooms</SecondaryNavHeader>
{#each $userRooms as room, i (room)} {#each $userRooms as room, i (room)}
<MenuSpaceRoomItem notify {url} {room} /> <MenuSpaceRoomItem notify {url} {room} />
{/each} {/each}
{#if $otherRooms.length > 0} {#if $otherRooms.length > 0}
<div class="h-2" /> <div class="h-2"></div>
<SecondaryNavHeader> <SecondaryNavHeader>
{#if $userRooms.length > 0} {#if $userRooms.length > 0}
Other Rooms Other Rooms
+1 -1
View File
@@ -16,6 +16,6 @@
<Button on:click={openMenu} class="btn btn-neutral btn-sm relative md:hidden"> <Button on:click={openMenu} class="btn btn-neutral btn-sm relative md:hidden">
<Icon icon="menu-dots" /> <Icon icon="menu-dots" />
{#if $notifications.has(path)} {#if $notifications.has(path)}
<div class="absolute right-0 top-0 -mr-1 -mt-1 h-2 w-2 rounded-full bg-primary" /> <div class="absolute right-0 top-0 -mr-1 -mt-1 h-2 w-2 rounded-full bg-primary"></div>
{/if} {/if}
</Button> </Button>
+1 -1
View File
@@ -18,7 +18,7 @@
<div slot="title" class="flex gap-1"> <div slot="title" class="flex gap-1">
<RelayName {url} /> <RelayName {url} />
{#if $notifications.has(path)} {#if $notifications.has(path)}
<div class="relative top-1 h-2 w-2 rounded-full bg-primary" /> <div class="relative top-1 h-2 w-2 rounded-full bg-primary"></div>
{/if} {/if}
</div> </div>
<div slot="info"><RelayDescription {url} /></div> <div slot="info"><RelayDescription {url} /></div>
+1 -1
View File
@@ -73,7 +73,7 @@
<slot /> <slot />
<!-- a little extra something for ios --> <!-- a little extra something for ios -->
<div class="fixed bottom-0 left-0 right-0 z-nav h-14 bg-base-100 md:hidden" /> <div class="fixed bottom-0 left-0 right-0 z-nav h-14 bg-base-100 md:hidden"></div>
<div <div
class="border-top bottom-sai fixed left-0 right-0 z-nav h-14 border border-base-200 bg-base-100 md:hidden"> class="border-top bottom-sai fixed left-0 right-0 z-nav h-14 border border-base-200 bg-base-100 md:hidden">
<div class="content-padding-x content-sizing flex justify-between px-2"> <div class="content-padding-x content-sizing flex justify-between px-2">
+2 -1
View File
@@ -50,7 +50,8 @@
class="textarea textarea-bordered leading-4" class="textarea textarea-bordered leading-4"
rows="3" rows="3"
bind:value={values.about} bind:value={values.about}
slot="input" /> slot="input">
</textarea>
</Field> </Field>
<Field> <Field>
<p slot="label">Nostr Address</p> <p slot="label">Nostr Address</p>
+2 -1
View File
@@ -29,6 +29,7 @@
<canvas <canvas
class="rounded-box" class="rounded-box"
bind:this={canvas} bind:this={canvas}
style={`transform-origin: top left; transform: scale(${scale}, ${scale})`} /> style={`transform-origin: top left; transform: scale(${scale}, ${scale})`}>
</canvas>
</div> </div>
</Button> </Button>
+1 -1
View File
@@ -69,7 +69,7 @@
</div> </div>
<div class="btn btn-neutral btn-xs relative hidden rounded-full sm:flex"> <div class="btn btn-neutral btn-xs relative hidden rounded-full sm:flex">
{#if $notifications.has(path)} {#if $notifications.has(path)}
<div class="h-2 w-2 rounded-full bg-primary" /> <div class="h-2 w-2 rounded-full bg-primary"></div>
{/if} {/if}
Active {formatTimestampRelative(lastActive)} Active {formatTimestampRelative(lastActive)}
</div> </div>
+1 -1
View File
@@ -59,7 +59,7 @@
{:else if canCancel || isPending} {:else if canCancel || isPending}
<div class="flex justify-end px-1 text-xs {$$props.class}"> <div class="flex justify-end px-1 text-xs {$$props.class}">
<span class="flex items-center gap-1 {$$props.class}"> <span class="flex items-center gap-1 {$$props.class}">
<span class="loading loading-spinner mx-1 h-3 w-3 translate-y-px" /> <span class="loading loading-spinner mx-1 h-3 w-3 translate-y-px"></span>
<span class="opacity-50">Sending...</span> <span class="opacity-50">Sending...</span>
{#if canCancel} {#if canCancel}
<Button class="link" on:click={abort}>Cancel</Button> <Button class="link" on:click={abort}>Cancel</Button>
+2 -1
View File
@@ -1,3 +1,4 @@
import type {Component} from "svelte"
import type {Writable} from "svelte/store" import type {Writable} from "svelte/store"
import {derived} from "svelte/store" import {derived} from "svelte/store"
import {createEditor, SvelteNodeViewRenderer} from "svelte-tiptap" import {createEditor, SvelteNodeViewRenderer} from "svelte-tiptap"
@@ -83,7 +84,7 @@ export const makeEditor = ({
editor: (this as any).editor, editor: (this as any).editor,
search: derived(profileSearch, s => s.searchValues), search: derived(profileSearch, s => s.searchValues),
getRelays: (pubkey: string) => ctx.app.router.FromPubkeys([pubkey]).getUrls(), getRelays: (pubkey: string) => ctx.app.router.FromPubkeys([pubkey]).getUrls(),
component: ProfileSuggestion, component: ProfileSuggestion as unknown as Component,
}), }),
] ]
}, },
+4 -4
View File
@@ -1,4 +1,4 @@
import type {ComponentType} from "svelte" import type {Component} from "svelte"
import {writable} from "svelte/store" import {writable} from "svelte/store"
import {randomId, always, assoc, Emitter} from "@welshman/lib" import {randomId, always, assoc, Emitter} from "@welshman/lib"
import {goto} from "$app/navigation" import {goto} from "$app/navigation"
@@ -12,7 +12,7 @@ export type ModalOptions = {
export type Modal = { export type Modal = {
id: string id: string
component: ComponentType component: Component
props: Record<string, any> props: Record<string, any>
options: ModalOptions options: ModalOptions
} }
@@ -22,7 +22,7 @@ export const emitter = new Emitter()
export const modals = writable<Record<string, Modal>>({}) export const modals = writable<Record<string, Modal>>({})
export const pushModal = ( export const pushModal = (
component: ComponentType, component: Component,
props: Record<string, any> = {}, props: Record<string, any> = {},
options: ModalOptions = {}, options: ModalOptions = {},
) => { ) => {
@@ -37,7 +37,7 @@ export const pushModal = (
} }
export const pushDrawer = ( export const pushDrawer = (
component: ComponentType, component: Component,
props: Record<string, any> = {}, props: Record<string, any> = {},
options: ModalOptions = {}, options: ModalOptions = {},
) => pushModal(component, props, {...options, drawer: true}) ) => pushModal(component, props, {...options, drawer: true})
+3 -1
View File
@@ -12,9 +12,11 @@
<div class="center fixed inset-0 z-modal"> <div class="center fixed inset-0 z-modal">
<button <button
aria-label="Close dialog"
class="absolute inset-0 cursor-pointer bg-black opacity-75" class="absolute inset-0 cursor-pointer bg-black opacity-75"
transition:fade={{duration: 300}} transition:fade={{duration: 300}}
on:click={onClose} /> on:click={onClose}>
</button>
<div class="scroll-container relative {extraClass}" transition:fly={{duration: 300}}> <div class="scroll-container relative {extraClass}" transition:fly={{duration: 300}}>
<slot /> <slot />
</div> </div>
+2 -2
View File
@@ -1,7 +1,7 @@
<div class="flex items-center gap-2 p-2 text-xs uppercase opacity-50"> <div class="flex items-center gap-2 p-2 text-xs uppercase opacity-50">
<div class="h-px flex-grow bg-base-content opacity-25" /> <div class="h-px flex-grow bg-base-content opacity-25"></div>
{#if $$slots.default} {#if $$slots.default}
<p><slot /></p> <p><slot /></p>
<div class="h-px flex-grow bg-base-content opacity-25" /> <div class="h-px flex-grow bg-base-content opacity-25"></div>
{/if} {/if}
</div> </div>
+3 -1
View File
@@ -6,9 +6,11 @@
<div class="drawer fixed inset-0 z-modal"> <div class="drawer fixed inset-0 z-modal">
<button <button
aria-label="Close drawer"
class="absolute inset-0 cursor-pointer bg-black opacity-50" class="absolute inset-0 cursor-pointer bg-black opacity-50"
transition:fade transition:fade
on:click={onClose} /> on:click={onClose}>
</button>
<div <div
class="scroll-container saiy sair absolute bottom-0 right-0 top-0 w-80 overflow-auto bg-base-200 text-base-content lg:w-96" class="scroll-container saiy sair absolute bottom-0 right-0 top-0 w-80 overflow-auto bg-base-200 text-base-content lg:w-96"
transition:translate={{axis: "x", duration: 300}}> transition:translate={{axis: "x", duration: 300}}>
+1 -1
View File
@@ -22,4 +22,4 @@
}) })
</script> </script>
<emoji-picker bind:this={element} /> <emoji-picker bind:this={element}></emoji-picker>
+2 -1
View File
@@ -174,4 +174,5 @@
<div <div
class={cx("inline-block", $$props.class)} class={cx("inline-block", $$props.class)}
style="mask-image: url({data}); width: {px}px; height: {px}px; min-width: {px}px; min-height: {px}px; background-color: currentcolor;" /> style="mask-image: url({data}); width: {px}px; height: {px}px; min-width: {px}px; min-height: {px}px; background-color: currentcolor;">
</div>
+2 -2
View File
@@ -19,7 +19,7 @@
data-tip={title}> data-tip={title}>
<slot /> <slot />
{#if !active && notification} {#if !active && notification}
<div class="absolute right-2 top-2 h-2 w-2 rounded-full bg-primary" /> <div class="absolute right-2 top-2 h-2 w-2 rounded-full bg-primary"></div>
{/if} {/if}
</div> </div>
</a> </a>
@@ -32,7 +32,7 @@
data-tip={title}> data-tip={title}>
<slot /> <slot />
{#if !active && notification} {#if !active && notification}
<div class="absolute right-2 top-2 h-2 w-2 rounded-full bg-primary" /> <div class="absolute right-2 top-2 h-2 w-2 rounded-full bg-primary"></div>
{/if} {/if}
</div> </div>
</Button> </Button>
+2 -2
View File
@@ -44,7 +44,7 @@
class:bg-base-100={active}> class:bg-base-100={active}>
<slot /> <slot />
{#if !active && notification} {#if !active && notification}
<div class="absolute right-2 top-5 h-2 w-2 rounded-full bg-primary" transition:fade /> <div class="absolute right-2 top-5 h-2 w-2 rounded-full bg-primary" transition:fade></div>
{/if} {/if}
</a> </a>
{:else} {:else}
@@ -58,7 +58,7 @@
class:text-base-content={active} class:text-base-content={active}
class:bg-base-100={active}> class:bg-base-100={active}>
{#if !active && notification} {#if !active && notification}
<div class="absolute right-2 top-5 h-2 w-2 rounded-full bg-primary" transition:fade /> <div class="absolute right-2 top-5 h-2 w-2 rounded-full bg-primary" transition:fade></div>
{/if} {/if}
<slot /> <slot />
</button> </button>
+1 -1
View File
@@ -7,7 +7,7 @@
<span class="flex min-h-10 items-center"> <span class="flex min-h-10 items-center">
{#if loading} {#if loading}
<span class="pr-3" transition:slide|local={{axis: "x"}}> <span class="pr-3" transition:slide|local={{axis: "x"}}>
<span class="loading loading-spinner" transition:fade|local={{duration: 100}} /> <span class="loading loading-spinner" transition:fade|local={{duration: 100}}></span>
</span> </span>
{/if} {/if}
<slot /> <slot />
+3 -3
View File
@@ -2,14 +2,14 @@
import "tippy.js/animations/shift-away.css" import "tippy.js/animations/shift-away.css"
import {onMount} from "svelte" import {onMount} from "svelte"
import type {SvelteComponent, ComponentType, ComponentProps} from "svelte" import type {Component, ComponentProps} from "svelte"
import tippy, {type Instance, type Props} from "tippy.js" import tippy, {type Instance, type Props} from "tippy.js"
export let component: ComponentType export let component: Component
export let props: ComponentProps<any> = {} export let props: ComponentProps<any> = {}
export let params: Partial<Props> = {} export let params: Partial<Props> = {}
export let popover: Instance | undefined = undefined export let popover: Instance | undefined = undefined
export let instance: SvelteComponent | undefined = undefined export let instance: Component | undefined = undefined
let element: Element let element: Element
+2 -2
View File
@@ -255,13 +255,13 @@
</svelte:head> </svelte:head>
{#await ready} {#await ready}
<div data-theme={$theme} /> <div data-theme={$theme}></div>
{:then} {:then}
<div data-theme={$theme}> <div data-theme={$theme}>
<AppContainer> <AppContainer>
<slot /> <slot />
</AppContainer> </AppContainer>
<ModalContainer /> <ModalContainer />
<div class="tippy-target" /> <div class="tippy-target"></div>
</div> </div>
{/await} {/await}
+3 -2
View File
@@ -126,7 +126,8 @@
{#if $notifications.has(threadsPath)} {#if $notifications.has(threadsPath)}
<div <div
class="absolute -right-3 -top-1 h-2 w-2 rounded-full bg-primary-content" class="absolute -right-3 -top-1 h-2 w-2 rounded-full bg-primary-content"
transition:fade /> transition:fade>
</div>
{/if} {/if}
</div> </div>
</Link> </Link>
@@ -142,7 +143,7 @@
<ChannelName {url} {room} /> <ChannelName {url} {room} />
</div> </div>
{#if $notifications.has(roomPath)} {#if $notifications.has(roomPath)}
<div class="absolute right-1 top-1 h-2 w-2 rounded-full bg-primary" transition:fade /> <div class="absolute right-1 top-1 h-2 w-2 rounded-full bg-primary" transition:fade></div>
{/if} {/if}
</Link> </Link>
{/each} {/each}
@@ -53,7 +53,7 @@
</script> </script>
<div class="relative flex flex-col-reverse gap-3 px-2"> <div class="relative flex flex-col-reverse gap-3 px-2">
<div class="absolute left-[51px] top-32 h-[calc(100%-248px)] w-[2px] bg-neutral" /> <div class="absolute left-[51px] top-32 h-[calc(100%-248px)] w-[2px] bg-neutral"></div>
{#if $event} {#if $event}
{#if !showReply} {#if !showReply}
<div class="flex justify-end px-2 pb-2"> <div class="flex justify-end px-2 pb-2">