Lint/format

This commit is contained in:
Jon Staab
2024-10-18 16:09:17 -07:00
parent b79a274944
commit 8bb2a12a2d
10 changed files with 41 additions and 50 deletions
-1
View File
@@ -36,7 +36,6 @@ import {
getWriteRelayUrls,
loadFollows,
loadMutes,
getFollows,
tagEvent,
tagReactionTo,
getRelayUrls,
+7 -8
View File
@@ -1,15 +1,14 @@
<script lang="ts">
import {nip19} from 'nostr-tools'
import {ctx} from '@welshman/lib'
import {nip19} from "nostr-tools"
import {ctx} from "@welshman/lib"
import Icon from "@lib/components/Icon.svelte"
import FieldInline from "@lib/components/FieldInline.svelte"
import Button from "@lib/components/Button.svelte"
import ModalHeader from "@lib/components/ModalHeader.svelte"
import {clip} from '@app/toast'
import {clip} from "@app/toast"
export let event
const relays = ctx.app.router.Event(event).getUrls()
const note1 = nip19.noteEncode(event.id)
const npub1 = nip19.npubEncode(event.pubkey)
const json = JSON.stringify(event, null, 2)
@@ -27,7 +26,7 @@
<p slot="label">Event ID</p>
<label class="input input-bordered flex w-full items-center gap-2" slot="input">
<Icon icon="file" />
<input type="text" class="grow ellipsize" value={note1} />
<input type="text" class="ellipsize grow" value={note1} />
<Button on:click={copyId} class="flex items-center">
<Icon icon="copy" />
</Button>
@@ -37,7 +36,7 @@
<p slot="label">Author Pubkey</p>
<label class="input input-bordered flex w-full items-center gap-2" slot="input">
<Icon icon="user-circle" />
<input type="text" class="grow ellipsize" value={npub1} />
<input type="text" class="ellipsize grow" value={npub1} />
<Button on:click={copyPubkey} class="flex items-center">
<Icon icon="copy" />
</Button>
@@ -45,8 +44,8 @@
</FieldInline>
<div class="relative">
<pre class="card2 card2-sm bg-alt overflow-auto"><code>{json}</code></pre>
<p class="absolute right-2 top-2 flex justify-between items-center flex-grow">
<Button on:click={copyJson} class="flex items-center btn btn-sm btn-neutral">
<p class="absolute right-2 top-2 flex flex-grow items-center justify-between">
<Button on:click={copyJson} class="btn btn-neutral btn-sm flex items-center">
<Icon icon="copy" /> Copy
</Button>
</p>
+4 -4
View File
@@ -1,7 +1,7 @@
<script lang="ts">
import {page} from "$app/stores"
import {goto} from "$app/navigation"
import {displayRelayUrl} from '@welshman/util'
import {displayRelayUrl} from "@welshman/util"
import Icon from "@lib/components/Icon.svelte"
import Link from "@lib/components/Link.svelte"
import Button from "@lib/components/Button.svelte"
@@ -28,7 +28,7 @@
let space = $page.params?.nrelay ? decodeNRelay($page.params?.nrelay) : undefined
let showSettings = false
const assertNotNil = <T>(x: T) => x!
const assertNotNil = <T,>(x: T) => x!
const resetSpace = () => {
space = ""
@@ -63,7 +63,7 @@
<div class="column menu gap-2">
{#if showSettings}
<p class="mb-4 text-2xl text-center">
<p class="mb-4 text-center text-2xl">
Settings for <span class="text-primary">{displayRelayUrl(assertNotNil(space))}</span>
</p>
{#if getMembershipUrls($userMembership).includes(space || "")}
@@ -82,7 +82,7 @@
Go Back
</Button>
{:else if space}
<p class="mb-4 text-2xl text-center">
<p class="mb-4 text-center text-2xl">
Actions for <span class="text-primary">{displayRelayUrl(space)}</span>
</p>
<div class="grid grid-cols-3 gap-2">
+2 -2
View File
@@ -44,7 +44,7 @@
})
</script>
<Button class="card2 bg-alt shadow-xl flex flex-col" on:click={onClick}>
<Button class="card2 bg-alt flex flex-col shadow-xl" on:click={onClick}>
<Profile {pubkey} />
<ProfileInfo {pubkey} />
{#if roots.length > 0}
@@ -53,7 +53,7 @@
{@const nevent = nip19.neventEncode({id: event.id, relays})}
{@const following = getPubkeyTagValues(getListTags($userFollows)).includes(pubkey)}
<div class="divider" />
<button type="button" class="chat chat-start cursor-default flex" on:click|stopPropagation>
<button type="button" class="chat chat-start flex cursor-default" on:click|stopPropagation>
<div class="bg-alt col-4 chat-bubble text-left">
<Content showEntire hideMedia={!following} {event} />
<Link external href={entityLink(nevent)} class="row-2 group justify-end whitespace-nowrap">
+2 -1
View File
@@ -81,7 +81,8 @@
<slot />
<div class="fixed bottom-0 left-0 right-0 z-nav h-14 bg-base-100 md:hidden border border-top border-base-200">
<div
class="border-top fixed bottom-0 left-0 right-0 z-nav h-14 border border-base-200 bg-base-100 md:hidden">
<div class="m-auto flex max-w-md justify-between px-2">
<div class="flex gap-4 sm:gap-8">
<PrimaryNavItem title="Home" on:click={showHomeMenu}>
-7
View File
@@ -1,13 +1,6 @@
<script lang="ts">
import {ctx} from "@welshman/lib"
import {repository} from "@welshman/app"
import {getReplyFilters} from "@welshman/util"
import {deriveEvents} from "@welshman/store"
import Icon from "@lib/components/Icon.svelte"
import Link from "@lib/components/Link.svelte"
import Content from "@app/components/Content.svelte"
import NoteCard from "@app/components/NoteCard.svelte"
import {entityLink} from "@app/state"
export let event
</script>