From 49fc4cce3c778afd4c9540b0042d750fad77cfca Mon Sep 17 00:00:00 2001 From: atsuchan <83960488+atsu1125@users.noreply.github.com> Date: Mon, 21 Aug 2023 17:26:21 +0900 Subject: [PATCH] fix: Make more than 10 announcements visible on Admin (#11720) --- packages/frontend/src/pages/admin/announcements.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/frontend/src/pages/admin/announcements.vue b/packages/frontend/src/pages/admin/announcements.vue index bb903af45..a0a7b569f 100644 --- a/packages/frontend/src/pages/admin/announcements.vue +++ b/packages/frontend/src/pages/admin/announcements.vue @@ -57,6 +57,9 @@ SPDX-License-Identifier: AGPL-3.0-only + + {{ i18n.ts.more }} + @@ -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;