You've already forked filebrowser
mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-11-26 14:25:26 +08:00
Updates :D
Former-commit-id: 4aab1964b9462d1fdee92999dd5a7d03f17b4457 [formerly 22352202547980b191886cf29f68ce8e9cc4c39b] [formerly 1a66bae34022092936c2912ea3a323a6984fe7e4 [formerly 1e7c4e6468]]
Former-commit-id: 94170b15369b05e8f4985e88242ba453b5545116 [formerly 2a0b57bebcd48c0189974f4f9e72679b5c67f37b]
Former-commit-id: 635be5ad2826c1659670997900122d024a46de24
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<p>Insert a new name for <code>{{ oldName() }}</code>:</p>
|
||||
<input autofocus type="text" @keyup.enter="submit" v-model.trim="name">
|
||||
<div>
|
||||
<button @click="submit" type="submit" autofocus>Rename</button>
|
||||
<button @click="submit" type="submit">Rename</button>
|
||||
<button @click="cancel" class="cancel">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -33,12 +33,12 @@ export default {
|
||||
return $.req.data.name
|
||||
}
|
||||
|
||||
if ($.listing.selected.length === 0 || $.listing.selected.length > 1) {
|
||||
if ($.selected.length === 0 || $.selected.length > 1) {
|
||||
// This shouldn't happen.
|
||||
return
|
||||
}
|
||||
|
||||
return $.req.data.items[$.listing.selected[0]].name
|
||||
return $.req.data.items[$.selected[0]].name
|
||||
},
|
||||
submit: function (event) {
|
||||
let oldLink = ''
|
||||
@@ -47,7 +47,7 @@ export default {
|
||||
if ($.req.kind !== 'listing') {
|
||||
oldLink = $.req.data.url
|
||||
} else {
|
||||
oldLink = $.req.data.items[$.listing.selected[0]].url
|
||||
oldLink = $.req.data.items[$.selected[0]].url
|
||||
}
|
||||
|
||||
newLink = page.removeLastDir(oldLink) + '/' + this.name
|
||||
@@ -56,6 +56,10 @@ export default {
|
||||
|
||||
webdav.move(oldLink, newLink)
|
||||
.then(() => {
|
||||
if ($.req.kind !== 'listing') {
|
||||
page.open(newLink)
|
||||
return
|
||||
}
|
||||
// TODO: keep selected after reload?
|
||||
page.reload()
|
||||
// buttons.setDone('rename')
|
||||
|
||||
Reference in New Issue
Block a user