forked from mirror/misskey
fix: Make more than 10 announcements visible on Admin (#11720)
This commit is contained in:
parent
e8ff281db0
commit
49fc4cce3c
@ -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 New Issue
Block a user