Fix UTF8 characters encoding on file rename and display #99
Former-commit-id: e97af869293632e19a6af1c5834f6d00609a2405 [formerly 912200dce77db373ccce68ed4bf1bf16ca4e66e8] [formerly 4e222647913369d96d518e4078018e12c8dee8f9 [formerly 1871981fea42df162c08512d54838b21f1e579de]] Former-commit-id: 8442a168025179ea117265bc56cd79d85a43a6d5 [formerly c07adbeb5c51b5ded79e9829a6e9eedef57cadd1] Former-commit-id: 692840e184784622a971f5f52007691da52137bb
This commit is contained in:
parent
43468dfa2b
commit
33d8082601
|
@ -85,7 +85,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
base64: function (name) {
|
base64: function (name) {
|
||||||
return window.btoa(name)
|
return window.btoa(unescape(encodeURIComponent(name)))
|
||||||
},
|
},
|
||||||
dragEnter: function (event) {
|
dragEnter: function (event) {
|
||||||
let items = document.getElementsByClassName('item')
|
let items = document.getElementsByClassName('item')
|
||||||
|
|
|
@ -6,8 +6,7 @@
|
||||||
@drop="drop"
|
@drop="drop"
|
||||||
@click="click"
|
@click="click"
|
||||||
@dblclick="open"
|
@dblclick="open"
|
||||||
:aria-selected="isSelected()"
|
:aria-selected="isSelected()">
|
||||||
:id="base64()">
|
|
||||||
<div>
|
<div>
|
||||||
<i class="material-icons">{{ icon() }}</i>
|
<i class="material-icons">{{ icon() }}</i>
|
||||||
</div>
|
</div>
|
||||||
|
@ -57,9 +56,6 @@ export default {
|
||||||
humanTime: function () {
|
humanTime: function () {
|
||||||
return moment(this.modified).fromNow()
|
return moment(this.modified).fromNow()
|
||||||
},
|
},
|
||||||
base64: function () {
|
|
||||||
return window.btoa(this.name)
|
|
||||||
},
|
|
||||||
dragStart: function (event) {
|
dragStart: function (event) {
|
||||||
if (this.selectedCount === 0) {
|
if (this.selectedCount === 0) {
|
||||||
this.addSelected(this.index)
|
this.addSelected(this.index)
|
||||||
|
|
|
@ -49,6 +49,7 @@ export default {
|
||||||
oldLink = this.req.data.items[this.selected[0]].url
|
oldLink = this.req.data.items[this.selected[0]].url
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.name = encodeURIComponent(this.name)
|
||||||
newLink = page.removeLastDir(oldLink) + '/' + this.name
|
newLink = page.removeLastDir(oldLink) + '/' + this.name
|
||||||
|
|
||||||
// buttons.setLoading('rename')
|
// buttons.setLoading('rename')
|
||||||
|
|
Loading…
Reference in New Issue