お知らせの固定表示 (#5887)
* お知らせの固定
* ✌️
* Update index.home.vue
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
parent
e78e5274d3
commit
ac5453232f
5 changed files with 135 additions and 7 deletions
|
|
@ -13,6 +13,11 @@ export const meta = {
|
|||
default: 10
|
||||
},
|
||||
|
||||
withUnreads: {
|
||||
validator: $.optional.boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
sinceId: {
|
||||
validator: $.optional.type(ID),
|
||||
},
|
||||
|
|
@ -38,5 +43,5 @@ export default define(meta, async (ps, user) => {
|
|||
}
|
||||
}
|
||||
|
||||
return announcements;
|
||||
return ps.withUnreads ? announcements.filter((a: any) => !a.isRead) : announcements;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue