mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-24 18:46:43 -06: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>
|
||||||
</div>
|
</div>
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
|
<MkButton class="button" @click="more()">
|
||||||
|
<i class="ti ti-reload"></i>{{ i18n.ts.more }}
|
||||||
|
</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</MkSpacer>
|
</MkSpacer>
|
||||||
</MkStickyContainer>
|
</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() {
|
function refresh() {
|
||||||
os.api('admin/announcements/list').then(announcementResponse => {
|
os.api('admin/announcements/list').then(announcementResponse => {
|
||||||
announcements = announcementResponse;
|
announcements = announcementResponse;
|
||||||
|
|
Loading…
Reference in a new issue