factor out shared "compute-merged-cw" routine
This commit is contained in:
parent
e60fe879d6
commit
b2d43040b1
13 changed files with 41 additions and 96 deletions
|
|
@ -250,7 +250,7 @@ import * as mfm from '@transfem-org/sfm-js';
|
|||
import * as Misskey from 'misskey-js';
|
||||
import { isLink } from '@@/js/is-link.js';
|
||||
import { host } from '@@/js/config.js';
|
||||
import { appendContentWarning } from '@@/js/append-content-warning.js';
|
||||
import { computeMergedCw } from '@@/js/compute-merged-cw.js';
|
||||
import SkNoteSub from '@/components/SkNoteSub.vue';
|
||||
import SkNoteSimple from '@/components/SkNoteSimple.vue';
|
||||
import MkReactionsViewer from '@/components/MkReactionsViewer.vue';
|
||||
|
|
@ -355,13 +355,7 @@ const quotes = ref<Misskey.entities.Note[]>([]);
|
|||
const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || (appearNote.value.visibility === 'followers' && appearNote.value.userId === $i?.id));
|
||||
const defaultLike = computed(() => defaultStore.state.like ? defaultStore.state.like : null);
|
||||
|
||||
const mergedCW = computed(() => {
|
||||
let cw = appearNote.value.cw;
|
||||
if (appearNote.value.user.mandatoryCW) {
|
||||
cw = appendContentWarning(cw, appearNote.value.user.mandatoryCW);
|
||||
}
|
||||
return cw;
|
||||
});
|
||||
const mergedCW = computed(() => computeMergedCw(appearNote.value));
|
||||
|
||||
const renoteTooltip = computeRenoteTooltip(renoted);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue