diff --git a/src/client/components/drive-select-dialog.vue b/src/client/components/drive-select-dialog.vue
new file mode 100644
index 000000000..5221bdbb6
--- /dev/null
+++ b/src/client/components/drive-select-dialog.vue
@@ -0,0 +1,70 @@
+
+
+
+ {{ multiple ? ((type === 'file') ? $t('selectFiles') : $t('selectFolders')) : ((type === 'file') ? $t('selectFile') : $t('selectFolder')) }}
+ ({{ number(selected.length) }})
+
+
+
+
+
+
diff --git a/src/client/components/drive-window.vue b/src/client/components/drive-window.vue
index d989d982d..0806fc180 100644
--- a/src/client/components/drive-window.vue
+++ b/src/client/components/drive-window.vue
@@ -1,72 +1,44 @@
-
- {{ multiple ? ((type === 'file') ? $t('selectFiles') : $t('selectFolders')) : ((type === 'file') ? $t('selectFile') : $t('selectFolder')) }}
- ({{ number(selected.length) }})
+ {{ $t('drive') }}
-
-
-
-
+
+
diff --git a/src/client/components/drive.folder.vue b/src/client/components/drive.folder.vue
index bf2c9b649..5664fb8c6 100644
--- a/src/client/components/drive.folder.vue
+++ b/src/client/components/drive.folder.vue
@@ -2,6 +2,7 @@
import { defineComponent } from 'vue';
-import { faFolder, faFolderOpen } from '@fortawesome/free-regular-svg-icons';
+import { faFolder, faFolderOpen, faTrashAlt, faWindowRestore } from '@fortawesome/free-regular-svg-icons';
import * as os from '@/os';
+import { faICursor } from '@fortawesome/free-solid-svg-icons';
export default defineComponent({
props: {
@@ -241,6 +243,28 @@ export default defineComponent({
value: this.folder.id
});
},
+
+ onContextmenu(e) {
+ os.contextMenu([{
+ text: this.$t('openInWindow'),
+ icon: faWindowRestore,
+ action: async () => {
+ os.popup(await import('./drive-window.vue'), {
+ initialFolder: this.folder
+ }, {
+ }, 'closed');
+ }
+ }, null, {
+ text: this.$t('rename'),
+ icon: faICursor,
+ action: this.rename
+ }, null, {
+ text: this.$t('delete'),
+ icon: faTrashAlt,
+ danger: true,
+ action: this.deleteFolder
+ }], e);
+ },
}
});
diff --git a/src/client/components/drive.vue b/src/client/components/drive.vue
index 2c3203b38..f25d25da0 100644
--- a/src/client/components/drive.vue
+++ b/src/client/components/drive.vue
@@ -64,7 +64,7 @@ export default defineComponent({
},
props: {
- initFolder: {
+ initialFolder: {
type: Object,
required: false
},
@@ -151,8 +151,8 @@ export default defineComponent({
this.connection.on('folderUpdated', this.onStreamDriveFolderUpdated);
this.connection.on('folderDeleted', this.onStreamDriveFolderDeleted);
- if (this.initFolder) {
- this.move(this.initFolder);
+ if (this.initialFolder) {
+ this.move(this.initialFolder);
} else {
this.fetch();
}
@@ -639,6 +639,10 @@ export default defineComponent({