mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-26 17:43:08 +02:00
port changes from MkNote*
to SkNote*
This commit is contained in:
parent
a3b4ca782a
commit
886f5dd391
2 changed files with 13 additions and 8 deletions
|
@ -103,7 +103,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</div>
|
</div>
|
||||||
<MkReactionsViewer v-if="appearNote.reactionAcceptance !== 'likeOnly'" :note="appearNote" :maxNumber="16" @click.stop @mockUpdateMyReaction="emitUpdReaction">
|
<MkReactionsViewer v-if="appearNote.reactionAcceptance !== 'likeOnly'" :note="appearNote" :maxNumber="16" @click.stop @mockUpdateMyReaction="emitUpdReaction">
|
||||||
<template #more>
|
<template #more>
|
||||||
<div :class="$style.reactionOmitted">{{ i18n.ts.more }}</div>
|
<MkA :to="`/notes/${appearNote.id}/reactions`" :class="[$style.reactionOmitted]">{{ i18n.ts.more }}</MkA>
|
||||||
</template>
|
</template>
|
||||||
</MkReactionsViewer>
|
</MkReactionsViewer>
|
||||||
<footer :class="$style.footer">
|
<footer :class="$style.footer">
|
||||||
|
@ -276,6 +276,7 @@ if (noteViewInterruptors.length > 0) {
|
||||||
|
|
||||||
const isRenote = (
|
const isRenote = (
|
||||||
note.value.renote != null &&
|
note.value.renote != null &&
|
||||||
|
note.value.reply == null &&
|
||||||
note.value.text == null &&
|
note.value.text == null &&
|
||||||
note.value.cw == null &&
|
note.value.cw == null &&
|
||||||
note.value.fileIds && note.value.fileIds.length === 0 &&
|
note.value.fileIds && note.value.fileIds.length === 0 &&
|
||||||
|
@ -1288,10 +1289,9 @@ function emitUpdReaction(emoji: string, delta: number) {
|
||||||
|
|
||||||
.reactionOmitted {
|
.reactionOmitted {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 32px;
|
margin-left: 8px;
|
||||||
margin: 2px;
|
|
||||||
padding: 0 6px;
|
|
||||||
opacity: .8;
|
opacity: .8;
|
||||||
|
font-size: 95%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clickToOpen {
|
.clickToOpen {
|
||||||
|
|
|
@ -78,7 +78,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<div :class="$style.noteContent">
|
<div :class="$style.noteContent">
|
||||||
<p v-if="appearNote.cw != null" :class="$style.cw">
|
<p v-if="appearNote.cw != null" :class="$style.cw">
|
||||||
<Mfm v-if="appearNote.cw != ''" style="margin-right: 8px;" :text="appearNote.cw" :author="appearNote.user" :nyaize="'respect'"/>
|
<Mfm v-if="appearNote.cw != ''" style="margin-right: 8px;" :text="appearNote.cw" :author="appearNote.user" :nyaize="'respect'"/>
|
||||||
<MkCwButton v-model="showContent" :text="appearNote.text" :files="appearNote.files" :poll="appearNote.poll"/>
|
<MkCwButton v-model="showContent" :text="appearNote.text" :renote="appearNote.renote" :files="appearNote.files" :poll="appearNote.poll"/>
|
||||||
</p>
|
</p>
|
||||||
<div v-show="appearNote.cw == null || showContent">
|
<div v-show="appearNote.cw == null || showContent">
|
||||||
<span v-if="appearNote.isHidden" style="opacity: 0.5">({{ i18n.ts.private }})</span>
|
<span v-if="appearNote.isHidden" style="opacity: 0.5">({{ i18n.ts.private }})</span>
|
||||||
|
@ -272,10 +272,13 @@ import MkButton from '@/components/MkButton.vue';
|
||||||
import { boostMenuItems, type Visibility } from '@/scripts/boost-quote.js';
|
import { boostMenuItems, type Visibility } from '@/scripts/boost-quote.js';
|
||||||
import { isEnabledUrlPreview } from '@/instance.js';
|
import { isEnabledUrlPreview } from '@/instance.js';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
note: Misskey.entities.Note;
|
note: Misskey.entities.Note;
|
||||||
expandAllCws?: boolean;
|
expandAllCws?: boolean;
|
||||||
}>();
|
initialTab: string;
|
||||||
|
}>(), {
|
||||||
|
initialTab: 'replies',
|
||||||
|
});
|
||||||
|
|
||||||
const inChannel = inject('inChannel', null);
|
const inChannel = inject('inChannel', null);
|
||||||
|
|
||||||
|
@ -302,7 +305,9 @@ if (noteViewInterruptors.length > 0) {
|
||||||
|
|
||||||
const isRenote = (
|
const isRenote = (
|
||||||
note.value.renote != null &&
|
note.value.renote != null &&
|
||||||
|
note.value.reply == null &&
|
||||||
note.value.text == null &&
|
note.value.text == null &&
|
||||||
|
note.value.cw == null &&
|
||||||
note.value.fileIds && note.value.fileIds.length === 0 &&
|
note.value.fileIds && note.value.fileIds.length === 0 &&
|
||||||
note.value.poll == null
|
note.value.poll == null
|
||||||
);
|
);
|
||||||
|
@ -366,7 +371,7 @@ provide('react', (reaction: string) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const tab = ref('replies');
|
const tab = ref(props.initialTab);
|
||||||
const reactionTabType = ref<string | null>(null);
|
const reactionTabType = ref<string | null>(null);
|
||||||
|
|
||||||
const renotesPagination = computed<Paging>(() => ({
|
const renotesPagination = computed<Paging>(() => ({
|
||||||
|
|
Loading…
Reference in a new issue