selection: move to custom dialog
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/783/head
parent
60281c1f7f
commit
7eb9ffc3bf
|
@ -768,10 +768,16 @@ export default defineComponent({
|
||||||
* Download the currently selected files
|
* Download the currently selected files
|
||||||
*/
|
*/
|
||||||
async downloadSelection(selection: Selection) {
|
async downloadSelection(selection: Selection) {
|
||||||
if (selection.size >= 100) {
|
if (
|
||||||
if (!confirm(this.t('memories', 'You are about to download a large number of files. Are you sure?'))) {
|
selection.size >= 100 &&
|
||||||
return;
|
!(await utils.confirmDestructive({
|
||||||
}
|
title: this.t('memories', 'Download'),
|
||||||
|
message: this.t('memories', 'You are about to download a large number of files.'),
|
||||||
|
confirm: this.t('memories', 'Continue'),
|
||||||
|
cancel: this.t('memories', 'Cancel'),
|
||||||
|
}))
|
||||||
|
) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
await dav.downloadFilesByPhotos(selection.photosNoDupFileId());
|
await dav.downloadFilesByPhotos(selection.photosNoDupFileId());
|
||||||
},
|
},
|
||||||
|
@ -798,10 +804,16 @@ export default defineComponent({
|
||||||
* Delete the currently selected photos
|
* Delete the currently selected photos
|
||||||
*/
|
*/
|
||||||
async deleteSelection(selection: Selection) {
|
async deleteSelection(selection: Selection) {
|
||||||
if (selection.size >= 100) {
|
if (
|
||||||
if (!confirm(this.t('memories', 'You are about to delete a large number of files. Are you sure?'))) {
|
selection.size >= 100 &&
|
||||||
return;
|
!(await utils.confirmDestructive({
|
||||||
}
|
title: this.t('memories', 'Delete'),
|
||||||
|
message: this.t('memories', 'You are about to delete a large number of files'),
|
||||||
|
confirm: this.t('memories', 'Continue'),
|
||||||
|
cancel: this.t('memories', 'Cancel'),
|
||||||
|
}))
|
||||||
|
) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -834,10 +846,16 @@ export default defineComponent({
|
||||||
* Archive the currently selected photos
|
* Archive the currently selected photos
|
||||||
*/
|
*/
|
||||||
async archiveSelection(selection: Selection) {
|
async archiveSelection(selection: Selection) {
|
||||||
if (selection.size >= 100) {
|
if (
|
||||||
if (!confirm(this.t('memories', 'You are about to move a large number of files. Are you sure?'))) {
|
selection.size >= 100 &&
|
||||||
return;
|
!(await utils.confirmDestructive({
|
||||||
}
|
title: this.t('memories', 'Move'),
|
||||||
|
message: this.t('memories', 'You are about to move a large number of files'),
|
||||||
|
confirm: this.t('memories', 'Continue'),
|
||||||
|
cancel: this.t('memories', 'Cancel'),
|
||||||
|
}))
|
||||||
|
) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for await (let delIds of dav.archiveFilesByIds(Array.from(selection.fileids()), !this.routeIsArchive)) {
|
for await (let delIds of dav.archiveFilesByIds(Array.from(selection.fileids()), !this.routeIsArchive)) {
|
||||||
|
|
Loading…
Reference in New Issue