mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 19:10:40 +00:00
contextmenu refactoring
This commit is contained in:
+8
@@ -331,6 +331,14 @@ const FunctionHelpers = {
|
||||
Vue.prototype.$closePopup = function () {
|
||||
events.$emit('popup:close')
|
||||
}
|
||||
|
||||
Vue.prototype.$openInDetailPanel = function (entry) {
|
||||
// Dispatch load file info detail
|
||||
this.$store.commit('ADD_ITEM_TO_CLIPBOARD', entry)
|
||||
|
||||
// Show panel if is not open
|
||||
this.$store.dispatch('fileInfoToggle', true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+14
@@ -6,6 +6,14 @@ import store from "../store";
|
||||
|
||||
const itemHelpers = {
|
||||
install(Vue) {
|
||||
Vue.prototype.$emptyTrash = function () {
|
||||
this.$store.dispatch('emptyTrash')
|
||||
}
|
||||
|
||||
Vue.prototype.$shareCancel = function () {
|
||||
this.$store.dispatch('shareCancel')
|
||||
}
|
||||
|
||||
Vue.prototype.$renameFileOrFolder = function (entry) {
|
||||
events.$emit('popup:open', {name: 'rename-item', item: entry})
|
||||
}
|
||||
@@ -14,6 +22,12 @@ const itemHelpers = {
|
||||
events.$emit('popup:open', {name: 'move', item: [entry]})
|
||||
}
|
||||
|
||||
Vue.prototype.$createFolder = function () {
|
||||
this.$store.dispatch('createFolder', {
|
||||
name: this.$t('popup_create_folder.folder_default_name')
|
||||
})
|
||||
}
|
||||
|
||||
Vue.prototype.$createTeamFolder = function (entry) {
|
||||
events.$emit('popup:open', {name: 'create-team-folder'})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user