Fix(frontend): ドライブクリーナーから画像を削除した際、リロードしなくても画面に反映されるよう修正 (#16888)

* ドライブクリーナーでファイル削除後、リロードなしで画面に反映されるように修正

* CHANGELOG.mdを修正

* CHANGELOGがおかしかったので修正
This commit is contained in:
kami8 2025-12-26 09:19:32 +09:00 committed by GitHub
parent a33b003282
commit bc78bb9b8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -4,10 +4,10 @@
- -
### Client ### Client
- - Fix: ドライブクリーナーでファイルを削除しても画面に反映されない問題を修正 #16061
### Server ### Server
- -
## 2025.12.2 ## 2025.12.2

View File

@ -60,6 +60,7 @@ import bytes from '@/filters/bytes.js';
import { definePage } from '@/page.js'; import { definePage } from '@/page.js';
import MkSelect from '@/components/MkSelect.vue'; import MkSelect from '@/components/MkSelect.vue';
import { useMkSelect } from '@/composables/use-mkselect.js'; import { useMkSelect } from '@/composables/use-mkselect.js';
import { useGlobalEvent } from '@/events.js';
import { getDriveFileMenu } from '@/utility/get-drive-file-menu.js'; import { getDriveFileMenu } from '@/utility/get-drive-file-menu.js';
import { Paginator } from '@/utility/paginator.js'; import { Paginator } from '@/utility/paginator.js';
@ -123,6 +124,12 @@ function onContextMenu(ev: MouseEvent, file): void {
os.contextMenu(getDriveFileMenu(file), ev); os.contextMenu(getDriveFileMenu(file), ev);
} }
useGlobalEvent('driveFilesDeleted', (files) => {
for (const f of files) {
paginator.removeItem(f.id);
}
});
definePage(() => ({ definePage(() => ({
title: i18n.ts.drivecleaner, title: i18n.ts.drivecleaner,
icon: 'ti ti-trash', icon: 'ti ti-trash',