enhance(client): 広告・お知らせが新規登録時に増殖しないように (#10412)

This commit is contained in:
atsuchan
2023-04-08 17:42:08 +09:00
committed by GitHub
parent 6892e9fbb7
commit 5cd93834d1
2 changed files with 51 additions and 2 deletions

View File

@@ -69,6 +69,7 @@ function save(announcement) {
type: 'success',
text: i18n.ts.saved,
});
refresh();
}).catch(err => {
os.alert({
type: 'error',
@@ -90,6 +91,14 @@ function save(announcement) {
}
}
function refresh() {
os.api('admin/announcements/list').then(announcementResponse => {
announcements = announcementResponse;
});
}
refresh();
const headerActions = $computed(() => [{
asFullButton: true,
icon: 'ti ti-plus',