enhance(frontend): ノートプレビューにCWが反映されるように (#12509)
* enhance(frontend): ノートプレビューにCWが反映されるように
* Update CHANGELOG.md
* refactor: 不要な条件を除去
* Revert "refactor: 不要な条件を除去"
This reverts commit e4eff689bd
.
* fix: やっぱり不要な条件だった
This commit is contained in:
@@ -16,7 +16,22 @@ import MkButton from '@/components/MkButton.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean;
|
||||
note: Misskey.entities.Note;
|
||||
text: string | null;
|
||||
files: Misskey.entities.DriveFile[];
|
||||
poll?: {
|
||||
expiresAt: string | null;
|
||||
multiple: boolean;
|
||||
choices: {
|
||||
isVoted: boolean;
|
||||
text: string;
|
||||
votes: number;
|
||||
}[];
|
||||
} | {
|
||||
choices: string[];
|
||||
multiple: boolean;
|
||||
expiresAt: string | null;
|
||||
expiredAfter: string | null;
|
||||
};
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -25,9 +40,9 @@ const emit = defineEmits<{
|
||||
|
||||
const label = computed(() => {
|
||||
return concat([
|
||||
props.note.text ? [i18n.t('_cw.chars', { count: props.note.text.length })] : [],
|
||||
props.note.files && props.note.files.length !== 0 ? [i18n.t('_cw.files', { count: props.note.files.length })] : [],
|
||||
props.note.poll != null ? [i18n.ts.poll] : [],
|
||||
props.text ? [i18n.t('_cw.chars', { count: props.text.length })] : [],
|
||||
props.files.length !== 0 ? [i18n.t('_cw.files', { count: props.files.length })] : [],
|
||||
props.poll != null ? [i18n.ts.poll] : [],
|
||||
] as string[][]).join(' / ');
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user