More vue updates

Former-commit-id: ec29aa7447e3ad1c90dea24e94072d51f212333e [formerly d370cb523dde06fb6d5aab614bf6ec1d94097363] [formerly bbabc4da0a6128b3bd8ecfa226156c9c2be7297e [formerly 2789ff2161cb4c1b1dc51282cb7aaa539a272966]]
Former-commit-id: fb3ae368534aa2bd7cc08283463ac9d8e0d1d825 [formerly efbb60cc4dd2856bbc004fcbdc0567540c72f5b3]
Former-commit-id: d0c3699029c88a3ed2a8f5ab72c70d0f5289292d
This commit is contained in:
Henrique Dias
2017-06-30 10:25:35 +01:00
parent effa906f7c
commit 4f964faf6e
21 changed files with 421 additions and 136 deletions

View File

@@ -10,7 +10,7 @@ export default {
name: 'delete-button',
methods: {
show: function (event) {
window.info.showDelete = true
this.$store.commit('showDelete', true)
}
}
}

View File

@@ -23,10 +23,10 @@ export default {
},
methods: {
cancel: function (event) {
$.showDelete = false
this.$store.commit('showDelete', false)
},
submit: function (event) {
$.showDelete = false
this.$store.commit('showDelete', false)
// buttons.setLoading('delete')
if ($.req.kind !== 'listing') {

View File

@@ -10,7 +10,7 @@ export default {
name: 'info-button',
methods: {
show: function (event) {
window.info.showInfo = true
this.$store.commit('showInfo', true)
}
}
}

View File

@@ -102,7 +102,7 @@ export default {
request.send()
},
close: function () {
this.showInfo = false
this.$store.commit('showInfo', false)
}
}
}

View File

@@ -10,7 +10,7 @@ export default {
name: 'move-button',
methods: {
show: function (event) {
window.info.showMove = true
this.$store.commit('showMove', true)
}
}
}

View File

@@ -53,7 +53,7 @@ export default {
},
methods: {
cancel: function (event) {
$.showMove = false
this.$store.commit('showMove', false)
},
move: function (event) {
event.preventDefault()
@@ -76,7 +76,7 @@ export default {
promises.push(webdav.move(from, to))
}
$.showMove = false
this.$store.commit('showMove', false)
Promise.all(promises)
.then(() => {

View File

@@ -14,8 +14,6 @@
import page from '../page'
import webdav from '../webdav'
var $ = window.info
export default {
name: 'new-dir-prompt',
data: function () {
@@ -25,7 +23,7 @@ export default {
},
methods: {
cancel: function () {
$.showNewDir = false
this.$store.commit('showNewDir', false)
},
submit: function (event) {
event.preventDefault()
@@ -45,7 +43,7 @@ export default {
console.log(e)
})
$.showNewDir = false
this.$store.commit('showNewDir', false)
}
}
}

View File

@@ -14,8 +14,6 @@
import page from '../page'
import webdav from '../webdav'
var $ = window.info
export default {
name: 'new-file-prompt',
data: function () {
@@ -25,7 +23,7 @@ export default {
},
methods: {
cancel: function () {
$.showNewFile = false
this.$store.commit('showNewFile', false)
},
submit: function (event) {
event.preventDefault()
@@ -42,7 +40,7 @@ export default {
console.log(e)
})
$.showNewFile = false
this.$store.commit('showNewFile', false)
}
}
}

View File

@@ -10,7 +10,7 @@ export default {
name: 'rename-button',
methods: {
show: function (event) {
window.info.showRename = true
this.$store.commit('showRename', true)
}
}
}

View File

@@ -25,7 +25,7 @@ export default {
},
methods: {
cancel: function (event) {
$.showRename = false
this.$store.commit('showRename', false)
},
oldName: function () {
if ($.req.kind !== 'listing') {
@@ -68,7 +68,7 @@ export default {
})
this.name = ''
$.showRename = false
this.$store.commit('showRename', false)
return
}
}

View File

@@ -85,7 +85,7 @@ export default {
url = page.removeLastDir(url)
}
let protocol = $.ssl ? 'wss:' : 'ws:'
let protocol = this.$store.state.ssl ? 'wss:' : 'ws:'
if (this.supported() && $.user.allowCommands) {
let conn = new window.WebSocket(`${protocol}//${url}?command=true`)