mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
refactor: 🔥 Remove old files
This commit is contained in:
parent
348b1ba2b0
commit
42e0b38fd8
6 changed files with 22 additions and 252 deletions
|
|
@ -27,9 +27,9 @@
|
|||
</span>
|
||||
</div>
|
||||
<div class="flex flex-col gap-1 justify-center items-end" v-if="!smallLayout">
|
||||
<span class="text-xs text-muted-foreground" :title="visibilities[visibility].text">
|
||||
<NuxtLink :href="noteUrlAsPath" class="text-xs text-muted-foreground" :title="visibilities[visibility].text">
|
||||
<component :is="visibilities[visibility].icon" class="size-5" />
|
||||
</span>
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -44,7 +44,7 @@ import type {
|
|||
import { AtSign, Globe, Lock, LockOpen } from "lucide-vue-next";
|
||||
import CopyableText from "./copyable-text.vue";
|
||||
|
||||
const { acct, createdAt, url } = defineProps<{
|
||||
const { acct, createdAt, url, noteUrl } = defineProps<{
|
||||
avatar: string;
|
||||
cornerAvatar?: string;
|
||||
acct: string;
|
||||
|
|
@ -52,6 +52,7 @@ const { acct, createdAt, url } = defineProps<{
|
|||
emojis: Emoji[];
|
||||
visibility: StatusVisibility;
|
||||
url: string;
|
||||
noteUrl: string;
|
||||
createdAt: Date;
|
||||
smallLayout?: boolean;
|
||||
}>();
|
||||
|
|
@ -59,6 +60,7 @@ const { acct, createdAt, url } = defineProps<{
|
|||
const [username, instance] = acct.split("@");
|
||||
const digitRegex = /\d/;
|
||||
const urlAsPath = new URL(url).pathname;
|
||||
const noteUrlAsPath = new URL(noteUrl).pathname;
|
||||
const timeAgo = useTimeAgo(createdAt, {
|
||||
messages: {
|
||||
justNow: "now",
|
||||
|
|
|
|||
|
|
@ -4,16 +4,23 @@
|
|||
<ReblogHeader v-if="note.reblog" :avatar="note.account.avatar" :display-name="note.account.display_name"
|
||||
:url="reblogAccountUrl" :emojis="note.account.emojis" />
|
||||
<Header :avatar="noteToUse.account.avatar" :corner-avatar="note.reblog ? note.account.avatar : undefined"
|
||||
:acct="noteToUse.account.acct" :display-name="noteToUse.account.display_name"
|
||||
:note-url="url" :acct="noteToUse.account.acct" :display-name="noteToUse.account.display_name"
|
||||
:visibility="noteToUse.visibility" :url="accountUrl" :created-at="new Date(noteToUse.created_at)"
|
||||
:small-layout="smallLayout" :emojis="noteToUse.account.emojis" />
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<Content :content="noteToUse.content" :quote="note.quote ?? undefined" :attachments="noteToUse.media_attachments" :plain-content="noteToUse.plain_content ?? undefined" :emojis="noteToUse.emojis" />
|
||||
<Content :content="noteToUse.content" :quote="note.quote ?? undefined"
|
||||
:attachments="noteToUse.media_attachments" :plain-content="noteToUse.plain_content ?? undefined"
|
||||
:emojis="noteToUse.emojis" />
|
||||
</CardContent>
|
||||
<CardFooter v-if="!hideActions" class="p-4 pt-0">
|
||||
<Actions :reply-count="noteToUse.replies_count" :like-count="noteToUse.favourites_count" :url="url"
|
||||
:api-note-string="JSON.stringify(note, null, 4)" :reblog-count="noteToUse.reblogs_count" :remote-url="noteToUse.url" :is-remote="isRemote" :author-id="noteToUse.account.id" @edit="useEvent('composer:edit', note)" @reply="useEvent('composer:reply', note)" @quote="useEvent('composer:quote', note)" @delete="useEvent('note:delete', note)" :note-id="noteToUse.id" :liked="noteToUse.favourited ?? false" :reblogged="noteToUse.reblogged ?? false" />
|
||||
:api-note-string="JSON.stringify(note, null, 4)" :reblog-count="noteToUse.reblogs_count"
|
||||
:remote-url="noteToUse.url" :is-remote="isRemote" :author-id="noteToUse.account.id"
|
||||
@edit="useEvent('composer:edit', note)" @reply="useEvent('composer:reply', note)"
|
||||
@quote="useEvent('composer:quote', note)" @delete="useEvent('note:delete', note)"
|
||||
:note-id="noteToUse.id" :liked="noteToUse.favourited ?? false"
|
||||
:reblogged="noteToUse.reblogged ?? false" />
|
||||
</CardFooter>
|
||||
</Card>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue