chore: formatting
This commit is contained in:
parent
afd244351b
commit
d88d74c8e0
|
@ -1,8 +1,20 @@
|
||||||
<template>
|
<template>
|
||||||
<div :aria-label="accessibleLabel" v-if="!muted.muted" v-show="!isDeleted" ref="el" v-hotkey="keymap"
|
<div
|
||||||
v-size="{ max: [500, 450, 350, 300] }" class="tkcbzcuz note-container" :tabindex="!isDeleted ? '-1' : null"
|
:aria-label="accessibleLabel"
|
||||||
:class="{ renote: isRenote }">
|
v-if="!muted.muted"
|
||||||
<MkNoteSub v-if="appearNote.reply && !detailedView" :note="appearNote.reply" class="reply-to" />
|
v-show="!isDeleted"
|
||||||
|
ref="el"
|
||||||
|
v-hotkey="keymap"
|
||||||
|
v-size="{ max: [500, 450, 350, 300] }"
|
||||||
|
class="tkcbzcuz note-container"
|
||||||
|
:tabindex="!isDeleted ? '-1' : null"
|
||||||
|
:class="{ renote: isRenote }"
|
||||||
|
>
|
||||||
|
<MkNoteSub
|
||||||
|
v-if="appearNote.reply && !detailedView"
|
||||||
|
:note="appearNote.reply"
|
||||||
|
class="reply-to"
|
||||||
|
/>
|
||||||
<div v-if="!detailedView" class="note-context" @click="noteClick">
|
<div v-if="!detailedView" class="note-context" @click="noteClick">
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
<div v-if="appearNote._prId_" class="info">
|
<div v-if="appearNote._prId_" class="info">
|
||||||
|
@ -18,47 +30,80 @@
|
||||||
{{ i18n.ts.featured }}
|
{{ i18n.ts.featured }}
|
||||||
</div>
|
</div>
|
||||||
<div v-if="pinned" class="info">
|
<div v-if="pinned" class="info">
|
||||||
<i class="ph-push-pin ph-bold ph-lg"></i>{{ i18n.ts.pinnedNote }}
|
<i class="ph-push-pin ph-bold ph-lg"></i
|
||||||
|
>{{ i18n.ts.pinnedNote }}
|
||||||
</div>
|
</div>
|
||||||
<div v-if="isRenote" class="renote">
|
<div v-if="isRenote" class="renote">
|
||||||
<i class="ph-repeat ph-bold ph-lg"></i>
|
<i class="ph-repeat ph-bold ph-lg"></i>
|
||||||
<I18n :src="i18n.ts.renotedBy" tag="span">
|
<I18n :src="i18n.ts.renotedBy" tag="span">
|
||||||
<template #user>
|
<template #user>
|
||||||
<MkA v-user-preview="note.userId" class="name" :to="userPage(note.user)" @click.stop>
|
<MkA
|
||||||
|
v-user-preview="note.userId"
|
||||||
|
class="name"
|
||||||
|
:to="userPage(note.user)"
|
||||||
|
@click.stop
|
||||||
|
>
|
||||||
<MkUserName :user="note.user" />
|
<MkUserName :user="note.user" />
|
||||||
</MkA>
|
</MkA>
|
||||||
</template>
|
</template>
|
||||||
</I18n>
|
</I18n>
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<button ref="renoteTime" class="_button time" @click.stop="showRenoteMenu()">
|
<button
|
||||||
<i v-if="isMyRenote" class="ph-dots-three-outline ph-bold ph-lg dropdownIcon"></i>
|
ref="renoteTime"
|
||||||
|
class="_button time"
|
||||||
|
@click.stop="showRenoteMenu()"
|
||||||
|
>
|
||||||
|
<i
|
||||||
|
v-if="isMyRenote"
|
||||||
|
class="ph-dots-three-outline ph-bold ph-lg dropdownIcon"
|
||||||
|
></i>
|
||||||
<MkTime :time="note.createdAt" />
|
<MkTime :time="note.createdAt" />
|
||||||
</button>
|
</button>
|
||||||
<MkVisibility :note="note" />
|
<MkVisibility :note="note" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<article class="article" @contextmenu.stop="onContextmenu" @click="noteClick">
|
<article
|
||||||
|
class="article"
|
||||||
|
@contextmenu.stop="onContextmenu"
|
||||||
|
@click="noteClick"
|
||||||
|
>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="header-container">
|
<div class="header-container">
|
||||||
<MkAvatar class="avatar" :user="appearNote.user" />
|
<MkAvatar class="avatar" :user="appearNote.user" />
|
||||||
<XNoteHeader class="header" :note="appearNote" :mini="true" />
|
<XNoteHeader
|
||||||
|
class="header"
|
||||||
|
:note="appearNote"
|
||||||
|
:mini="true"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<MkSubNoteContent class="text" :note="appearNote" :detailed="true" :detailedView="detailedView"
|
<MkSubNoteContent
|
||||||
:parentId="appearNote.parentId" @push="(e) => router.push(notePage(e))"
|
class="text"
|
||||||
@focusfooter="footerEl.focus()" @expanded="(e) => setPostExpanded(e)"></MkSubNoteContent>
|
:note="appearNote"
|
||||||
|
:detailed="true"
|
||||||
|
:detailedView="detailedView"
|
||||||
|
:parentId="appearNote.parentId"
|
||||||
|
@push="(e) => router.push(notePage(e))"
|
||||||
|
@focusfooter="footerEl.focus()"
|
||||||
|
@expanded="(e) => setPostExpanded(e)"
|
||||||
|
></MkSubNoteContent>
|
||||||
<div v-if="translating || translation" class="translation">
|
<div v-if="translating || translation" class="translation">
|
||||||
<MkLoading v-if="translating" mini />
|
<MkLoading v-if="translating" mini />
|
||||||
<div v-else class="translated">
|
<div v-else class="translated">
|
||||||
<b>{{
|
<b
|
||||||
|
>{{
|
||||||
i18n.t("translatedFrom", {
|
i18n.t("translatedFrom", {
|
||||||
x: translation.sourceLang,
|
x: translation.sourceLang,
|
||||||
})
|
})
|
||||||
}}:
|
}}:
|
||||||
</b>
|
</b>
|
||||||
<Mfm :text="translation.text" :author="appearNote.user" :i="$i"
|
<Mfm
|
||||||
:custom-emojis="appearNote.emojis" />
|
:text="translation.text"
|
||||||
|
:author="appearNote.user"
|
||||||
|
:i="$i"
|
||||||
|
:custom-emojis="appearNote.emojis"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -440,7 +485,7 @@ const accessibleLabel = computed(() => {
|
||||||
if (props.note.renote) {
|
if (props.note.renote) {
|
||||||
label += `${i18n.t("renoted")} ${props.note.renote.user.username}; `;
|
label += `${i18n.t("renoted")} ${props.note.renote.user.username}; `;
|
||||||
if (props.note.renote.cw) {
|
if (props.note.renote.cw) {
|
||||||
label += `${i18n.t('cw')}: ${props.note.renote.cw}; `;
|
label += `${i18n.t("cw")}: ${props.note.renote.cw}; `;
|
||||||
if (postIsExpanded.value) {
|
if (postIsExpanded.value) {
|
||||||
label += `${props.note.renote.text}; `;
|
label += `${props.note.renote.text}; `;
|
||||||
}
|
}
|
||||||
|
@ -460,7 +505,7 @@ const accessibleLabel = computed(() => {
|
||||||
const date = new Date(props.note.createdAt);
|
const date = new Date(props.note.createdAt);
|
||||||
label += `${date.toLocaleTimeString()}`;
|
label += `${date.toLocaleTimeString()}`;
|
||||||
return label;
|
return label;
|
||||||
})
|
});
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
focus,
|
focus,
|
||||||
|
|
|
@ -33,14 +33,12 @@
|
||||||
detailedView
|
detailedView
|
||||||
></MkNote>
|
></MkNote>
|
||||||
|
|
||||||
<MkTab
|
<MkTab v-model="tab" :style="'underline'" @update:modelValue="loadTab">
|
||||||
v-model="tab"
|
|
||||||
:style="'underline'"
|
|
||||||
@update:modelValue="loadTab"
|
|
||||||
>
|
|
||||||
<option value="replies">
|
<option value="replies">
|
||||||
<!-- <i class="ph-arrow-u-up-left ph-bold ph-lg"></i> -->
|
<!-- <i class="ph-arrow-u-up-left ph-bold ph-lg"></i> -->
|
||||||
<span v-if="appearNote.repliesCount > 0" class="count">{{ appearNote.repliesCount }}</span>
|
<span v-if="appearNote.repliesCount > 0" class="count">{{
|
||||||
|
appearNote.repliesCount
|
||||||
|
}}</span>
|
||||||
{{ i18n.ts._notification._types.reply }}
|
{{ i18n.ts._notification._types.reply }}
|
||||||
</option>
|
</option>
|
||||||
<option value="renotes" v-if="appearNote.renoteCount > 0">
|
<option value="renotes" v-if="appearNote.renoteCount > 0">
|
||||||
|
|
|
@ -120,7 +120,11 @@
|
||||||
><i class="ph-circle ph-fill"></i
|
><i class="ph-circle ph-fill"></i
|
||||||
></span>
|
></span>
|
||||||
</button>
|
</button>
|
||||||
<button :aria-label="i18n.t('home')" class="button home _button" @click="mainRouter.push('/')">
|
<button
|
||||||
|
:aria-label="i18n.t('home')"
|
||||||
|
class="button home _button"
|
||||||
|
@click="mainRouter.push('/')"
|
||||||
|
>
|
||||||
<i class="ph-house ph-bold ph-lg"></i>
|
<i class="ph-house ph-bold ph-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
|
@ -133,7 +137,11 @@
|
||||||
><i class="ph-circle ph-fill"></i
|
><i class="ph-circle ph-fill"></i
|
||||||
></span>
|
></span>
|
||||||
</button>
|
</button>
|
||||||
<button :aria-label="i18n.t('note')" class="button post _button" @click="os.post()">
|
<button
|
||||||
|
:aria-label="i18n.t('note')"
|
||||||
|
class="button post _button"
|
||||||
|
@click="os.post()"
|
||||||
|
>
|
||||||
<i class="ph-pencil ph-bold ph-lg"></i>
|
<i class="ph-pencil ph-bold ph-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue