This commit is contained in:
kakkokari-gtyih 2024-04-08 18:58:57 +09:00
parent b13446f8d8
commit aa2ab698b5
2 changed files with 3 additions and 2 deletions

View File

@ -557,11 +557,12 @@ export async function selectDriveFile(multiple: boolean, excludeSensitive: boole
}); });
} }
export async function selectDriveFolder(multiple: boolean): Promise<Misskey.entities.DriveFolder[]> { export async function selectDriveFolder(multiple: boolean, excludeSensitive: boolean): Promise<Misskey.entities.DriveFolder[]> {
return new Promise(resolve => { return new Promise(resolve => {
popup(defineAsyncComponent(() => import('@/components/MkDriveSelectDialog.vue')), { popup(defineAsyncComponent(() => import('@/components/MkDriveSelectDialog.vue')), {
type: 'folder', type: 'folder',
multiple, multiple,
excludeSensitive,
}, { }, {
done: folders => { done: folders => {
if (folders) { if (folders) {

View File

@ -90,7 +90,7 @@ function select(src: any, label: string | null, multiple: boolean, excludeSensit
title: i18n.ts.cannotSelectSensitiveMedia, title: i18n.ts.cannotSelectSensitiveMedia,
text: i18n.ts.cannotSelectSensitiveMediaDescription, text: i18n.ts.cannotSelectSensitiveMediaDescription,
}); });
rej(); rej(new Error('Sensitive media is selected'));
return; return;
} }