mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-16 15:07:36 -07:00
Client: Make drive folder deletable
This commit is contained in:
parent
98191b5318
commit
de77861c68
2 changed files with 11 additions and 4 deletions
|
@ -67,12 +67,12 @@ export default Vue.extend({
|
||||||
text: '%i18n:@contextmenu.rename%',
|
text: '%i18n:@contextmenu.rename%',
|
||||||
icon: '%fa:i-cursor%',
|
icon: '%fa:i-cursor%',
|
||||||
action: this.rename
|
action: this.rename
|
||||||
}/*, null, {
|
}, null, {
|
||||||
type: 'item',
|
type: 'item',
|
||||||
text: '%i18n:common.delete%',
|
text: '%i18n:common.delete%',
|
||||||
icon: '%fa:R trash-alt%',
|
icon: '%fa:R trash-alt%',
|
||||||
action: this.deleteFolder
|
action: this.deleteFolder
|
||||||
}*/], {
|
}], {
|
||||||
closed: () => {
|
closed: () => {
|
||||||
this.isContextmenuShowing = false;
|
this.isContextmenuShowing = false;
|
||||||
}
|
}
|
||||||
|
@ -207,7 +207,9 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
deleteFolder() {
|
deleteFolder() {
|
||||||
alert('not implemented yet');
|
(this as any).api('drive/folders/delete', {
|
||||||
|
folderId: this.folder.id
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -98,7 +98,7 @@ export default Vue.extend({
|
||||||
hierarchyFolders: [],
|
hierarchyFolders: [],
|
||||||
selectedFiles: [],
|
selectedFiles: [],
|
||||||
uploadings: [],
|
uploadings: [],
|
||||||
connection: null
|
connection: null,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ドロップされようとしているか
|
* ドロップされようとしているか
|
||||||
|
@ -122,6 +122,7 @@ export default Vue.extend({
|
||||||
this.connection.on('fileDeleted', this.onStreamDriveFileDeleted);
|
this.connection.on('fileDeleted', this.onStreamDriveFileDeleted);
|
||||||
this.connection.on('folderCreated', this.onStreamDriveFolderCreated);
|
this.connection.on('folderCreated', this.onStreamDriveFolderCreated);
|
||||||
this.connection.on('folderUpdated', this.onStreamDriveFolderUpdated);
|
this.connection.on('folderUpdated', this.onStreamDriveFolderUpdated);
|
||||||
|
this.connection.on('folderDeleted', this.onStreamDriveFolderDeleted);
|
||||||
|
|
||||||
if (this.initFolder) {
|
if (this.initFolder) {
|
||||||
this.move(this.initFolder);
|
this.move(this.initFolder);
|
||||||
|
@ -182,6 +183,10 @@ export default Vue.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onStreamDriveFolderDeleted(folderId) {
|
||||||
|
this.removeFolder(folderId);
|
||||||
|
},
|
||||||
|
|
||||||
onChangeUploaderUploads(uploads) {
|
onChangeUploaderUploads(uploads) {
|
||||||
this.uploadings = uploads;
|
this.uploadings = uploads;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue