Show some error in filemanager if pasting fails
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<template>
|
||||
<MainLayout>
|
||||
<template #dialogs>
|
||||
<Notification />
|
||||
|
||||
<Dialog ref="fatalErrorDialog" modal title="Error">
|
||||
<p>{{ fatalError }}</p>
|
||||
</Dialog>
|
||||
@@ -97,7 +99,7 @@
|
||||
|
||||
import { marked } from 'marked';
|
||||
|
||||
import { fetcher, Dialog, DirectoryView, TopBar, Breadcrumb, BottomBar, Button, InputDialog, MainLayout, Menu, FileUploader, Spinner } from 'pankow';
|
||||
import { fetcher, Dialog, DirectoryView, TopBar, Breadcrumb, BottomBar, Button, InputDialog, MainLayout, Menu, Notification, FileUploader, Spinner } from 'pankow';
|
||||
import { sanitize, sleep } from 'pankow/utils';
|
||||
|
||||
import { ISTATES } from '../constants.js';
|
||||
@@ -124,6 +126,7 @@ export default {
|
||||
InputDialog,
|
||||
MainLayout,
|
||||
Menu,
|
||||
Notification,
|
||||
Breadcrumb,
|
||||
PreviewPanel,
|
||||
Spinner,
|
||||
@@ -477,7 +480,12 @@ export default {
|
||||
window.addEventListener('beforeunload', beforeUnloadListener, { capture: true });
|
||||
this.$refs.pasteInProgressDialog.open();
|
||||
|
||||
await this.directoryModel.paste(targetPath, action, files);
|
||||
try {
|
||||
await this.directoryModel.paste(targetPath, action, files);
|
||||
} catch (e) {
|
||||
window.pankow.notify({ type: 'danger', text: e, persistent: true })
|
||||
}
|
||||
|
||||
this.clipboard = {};
|
||||
await this.loadCwd();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user