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
|
|
@ -212,7 +212,7 @@ import * as Misskey from 'misskey-js';
|
|||
import { isLink } from '@@/js/is-link.js';
|
||||
import { shouldCollapsed } from '@@/js/collapsed.js';
|
||||
import { host } from '@@/js/config.js';
|
||||
import { appendContentWarning } from '@@/js/append-content-warning.js';
|
||||
import { computeMergedCw } from '@@/js/compute-merged-cw.js';
|
||||
import type { MenuItem } from '@/types/menu.js';
|
||||
import MkNoteSub from '@/components/MkNoteSub.vue';
|
||||
import MkNoteHeader from '@/components/MkNoteHeader.vue';
|
||||
|
|
@ -351,13 +351,7 @@ const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
|||
url: `https://${host}/notes/${appearNote.value.id}`,
|
||||
}));
|
||||
|
||||
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