remove dead code
This commit is contained in:
parent
e6f0b6ec8a
commit
46097f3a15
3 changed files with 3 additions and 56 deletions
|
|
@ -60,8 +60,8 @@ jobs:
|
|||
export VITE_BUILD_HASH="${HEAD_SHA:0:8}"
|
||||
pnpm run build
|
||||
|
||||
# src/app.html hardcodes plausible with data-domain="flotilla.social";
|
||||
# a preview must not report into production analytics.
|
||||
# src/app.html carries a plausible tag pointed at production analytics,
|
||||
# whatever its data-domain says; a preview must not report into them.
|
||||
perl -0777 -i -pe \
|
||||
's|<script\s+defer\s+data-domain="[^"]*"\s+src="https://plausible\.coracle\.social/[^"]*"\s*></script>||gs' \
|
||||
build/index.html
|
||||
|
|
|
|||
|
|
@ -1,53 +0,0 @@
|
|||
<script lang="ts">
|
||||
import {formatTimestamp} from "@welshman/lib"
|
||||
import type {TrustedEvent} from "@welshman/util"
|
||||
import {tagSpec, tagValue} from "@welshman/util"
|
||||
import Link from "@lib/components/Link.svelte"
|
||||
import Cv from "@lib/components/Cv.svelte"
|
||||
import Content from "@app/components/Content.svelte"
|
||||
import ProfileLink from "@app/components/ProfileLink.svelte"
|
||||
import ThreadActions from "@app/components/ThreadActions.svelte"
|
||||
import type {FeedContext} from "@app/feeds"
|
||||
import RoomLink from "@app/components/RoomLink.svelte"
|
||||
import UnreadDot from "@app/components/UnreadDot.svelte"
|
||||
import {makeThreadPath} from "@app/routes"
|
||||
|
||||
type Props = {
|
||||
url: string
|
||||
event: TrustedEvent
|
||||
context: FeedContext
|
||||
}
|
||||
|
||||
const {url, event, context}: Props = $props()
|
||||
|
||||
const path = makeThreadPath(url, event.id)
|
||||
const title = tagValue(tagSpec("title"), event.tags)
|
||||
const h = tagValue(tagSpec("h"), event.tags)
|
||||
</script>
|
||||
|
||||
<Cv tag={Link} class="relative flex flex-col gap-2 card card-interactive w-full" href={path}>
|
||||
<UnreadDot {path} class="absolute right-3 top-3" />
|
||||
{#if title}
|
||||
<div class="flex w-full items-center justify-between gap-2">
|
||||
<p class="text-xl">{title}</p>
|
||||
<p class="text-sm opacity-75">
|
||||
{formatTimestamp(event.created_at)}
|
||||
</p>
|
||||
</div>
|
||||
{:else}
|
||||
<p class="mb-3 h-0 text-xs opacity-75">
|
||||
{formatTimestamp(event.created_at)}
|
||||
</p>
|
||||
{/if}
|
||||
<Content {event} {url} expandMode="inline" />
|
||||
<div class="flex w-full flex-col items-end justify-between gap-2 sm:flex-row">
|
||||
<span class="whitespace-nowrap py-1 text-sm opacity-75">
|
||||
Posted by
|
||||
<ProfileLink pubkey={event.pubkey} {url} />
|
||||
{#if h}
|
||||
in <RoomLink {url} {h} />
|
||||
{/if}
|
||||
</span>
|
||||
<ThreadActions showActivity {url} {event} {context} />
|
||||
</div>
|
||||
</Cv>
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
onMount(async () => {
|
||||
if (!pubkey) {
|
||||
return goto("/people", {replaceState: true})
|
||||
return goto("/", {replaceState: true})
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in a new issue