mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-01-20 11:15:03 +01:00
add confirm dialog
This commit is contained in:
parent
b7192e5ac6
commit
9c4e40f83f
1 changed files with 10 additions and 1 deletions
|
@ -239,11 +239,20 @@ async function onDrop(ev: DragEvent) {
|
|||
},
|
||||
),
|
||||
);
|
||||
} catch (err: any) {
|
||||
} catch (err) {
|
||||
// ダイアログは共通部品側で出ているはずなので何もしない
|
||||
return;
|
||||
}
|
||||
|
||||
const confirm = await os.confirm({
|
||||
type: 'info',
|
||||
title: '確認',
|
||||
text: `ドラッグ&ドロップされた${uploadedItems.length}個のファイルをドライブにアップロードします。実行しますか?`,
|
||||
});
|
||||
if (confirm.canceled) {
|
||||
return;
|
||||
}
|
||||
|
||||
const items = uploadedItems.map(({ droppedFile, driveFile }) => {
|
||||
const item = fromDriveFile(driveFile);
|
||||
if (directoryToCategory.value) {
|
||||
|
|
Loading…
Reference in a new issue