mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-01 18:50:40 +01:00
fix: Make more than 10 announcements visible on Admin (#11720)
This commit is contained in:
parent
e8ff281db0
commit
49fc4cce3c
1 changed files with 9 additions and 0 deletions
|
@ -57,6 +57,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
</div>
|
||||
</MkFolder>
|
||||
<MkButton class="button" @click="more()">
|
||||
<i class="ti ti-reload"></i>{{ i18n.ts.more }}
|
||||
</MkButton>
|
||||
</div>
|
||||
</MkSpacer>
|
||||
</MkStickyContainer>
|
||||
|
@ -124,6 +127,12 @@ async function save(announcement) {
|
|||
}
|
||||
}
|
||||
|
||||
function more() {
|
||||
os.api('admin/announcements/list', { untilId: announcements.reduce((acc, announcement) => announcement.id != null ? announcement : acc).id }).then(announcementResponse => {
|
||||
announcements = announcements.concat(announcementResponse);
|
||||
});
|
||||
}
|
||||
|
||||
function refresh() {
|
||||
os.api('admin/announcements/list').then(announcementResponse => {
|
||||
announcements = announcementResponse;
|
||||
|
|
Loading…
Reference in a new issue