なんかもうめっちゃ変えた
This commit is contained in:
parent
d9ab03f086
commit
b75184ec8e
946 changed files with 41219 additions and 28839 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { Packed } from './schema.js';
|
||||
import type { Packed } from './schema.js';
|
||||
|
||||
/**
|
||||
* 投稿を表す文字列を取得します。
|
||||
|
|
@ -6,11 +6,11 @@ import { Packed } from './schema.js';
|
|||
*/
|
||||
export const getNoteSummary = (note: Packed<'Note'>): string => {
|
||||
if (note.deletedAt) {
|
||||
return `(❌⛔)`;
|
||||
return '(❌⛔)';
|
||||
}
|
||||
|
||||
if (note.isHidden) {
|
||||
return `(⛔)`;
|
||||
return '(⛔)';
|
||||
}
|
||||
|
||||
let summary = '';
|
||||
|
|
@ -23,13 +23,13 @@ export const getNoteSummary = (note: Packed<'Note'>): string => {
|
|||
}
|
||||
|
||||
// ファイルが添付されているとき
|
||||
if ((note.files || []).length !== 0) {
|
||||
if ((note.files ?? []).length !== 0) {
|
||||
summary += ` (📎${note.files!.length})`;
|
||||
}
|
||||
|
||||
// 投票が添付されているとき
|
||||
if (note.poll) {
|
||||
summary += ` (📊)`;
|
||||
summary += ' (📊)';
|
||||
}
|
||||
|
||||
// 返信のとき
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue