Updates on search and something
Former-commit-id: 229baefa76ee3202dcf4aac3249a461b6cc51eed [formerly 2773046c33eee1ff79ef1d02238de37e14860726] [formerly 2d50f10c3f809c6135cc861eaf0360092a23ea3f [formerly 14ff4f2b74]]
Former-commit-id: e766887e65390514cf827700c3ab0d5ed000c480 [formerly 7429be72884d3eb154e45dc638fd17dfcfdfaa62]
Former-commit-id: d23373bf316295d6579e4bbc780f5b963c632c4d
This commit is contained in:
1 parent
9c0c2d7a02
commit
231e1e1147
21 files changed
+92
-50
No files matched your search
@@ -5,7 +5,7 @@
|
||||
<p v-show="req.kind === 'listing'">Are you sure you want to delete {{ selectedCount }} file(s)?</p>
|
||||
<div>
|
||||
<button @click="submit" autofocus>Delete</button>
|
||||
<button @click="closePrompts" class="cancel">Cancel</button>
|
||||
<button @click="closeHovers" class="cancel">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -22,9 +22,9 @@ export default {
|
||||
...mapState(['req', 'selected'])
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['closePrompts']),
|
||||
...mapMutations(['closeHovers']),
|
||||
submit: function (event) {
|
||||
this.closePrompts()
|
||||
this.closeHovers()
|
||||
// buttons.setLoading('delete')
|
||||
|
||||
if (this.req.kind !== 'listing') {
|
||||
|
||||
@@ -34,7 +34,7 @@ export default {
|
||||
api.download(format, ...files)
|
||||
}
|
||||
|
||||
this.$store.commit('closePrompts')
|
||||
this.$store.commit('closeHovers')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<button type="submit" @click="$store.commit('closePrompts')" class="ok">OK</button>
|
||||
<button type="submit" @click="$store.commit('closeHovers')" class="ok">OK</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</section>
|
||||
|
||||
<div>
|
||||
<button type="submit" @click="$store.commit('closePrompts')" class="ok">OK</button>
|
||||
<button type="submit" @click="$store.commit('closeHovers')" class="ok">OK</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<div>
|
||||
<button class="ok" @click="move">Move</button>
|
||||
<button class="cancel" @click="$store.commit('closePrompts')">Cancel</button>
|
||||
<button class="cancel" @click="$store.commit('closeHovers')">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<input autofocus type="text" @keyup.enter="submit" v-model.trim="name">
|
||||
<div>
|
||||
<button class="ok" @click="submit">Create</button>
|
||||
<button class="cancel" @click="$store.commit('closePrompts')">Cancel</button>
|
||||
<button class="cancel" @click="$store.commit('closeHovers')">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -45,7 +45,7 @@ export default {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
this.$store.commit('closePrompts')
|
||||
this.$store.commit('closeHovers')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<input autofocus type="text" @keyup.enter="submit" v-model.trim="name">
|
||||
<div>
|
||||
<button class="ok" @click="submit">Create</button>
|
||||
<button class="cancel" @click="$store.commit('closePrompts')">Cancel</button>
|
||||
<button class="cancel" @click="$store.commit('closeHovers')">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -45,7 +45,7 @@ export default {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
this.$store.commit('closePrompts')
|
||||
this.$store.commit('closeHovers')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import Download from './Download'
|
||||
import Move from './Move'
|
||||
import NewFile from './NewFile'
|
||||
import NewDir from './NewDir'
|
||||
import {mapState} from 'vuex'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'prompts',
|
||||
@@ -37,20 +37,22 @@ export default {
|
||||
Help
|
||||
},
|
||||
computed: {
|
||||
...mapState(['prompt']),
|
||||
showInfo: function () { return this.prompt === 'info' },
|
||||
showHelp: function () { return this.prompt === 'help' },
|
||||
showDelete: function () { return this.prompt === 'delete' },
|
||||
showRename: function () { return this.prompt === 'rename' },
|
||||
showMove: function () { return this.prompt === 'move' },
|
||||
showNewFile: function () { return this.prompt === 'newFile' },
|
||||
showNewDir: function () { return this.prompt === 'newDir' },
|
||||
showDownload: function () { return this.prompt === 'download' },
|
||||
showOverlay: function () { return this.prompt !== null }
|
||||
...mapState(['show']),
|
||||
showInfo: function () { return this.show === 'info' },
|
||||
showHelp: function () { return this.show === 'help' },
|
||||
showDelete: function () { return this.show === 'delete' },
|
||||
showRename: function () { return this.show === 'rename' },
|
||||
showMove: function () { return this.show === 'move' },
|
||||
showNewFile: function () { return this.show === 'newFile' },
|
||||
showNewDir: function () { return this.show === 'newDir' },
|
||||
showDownload: function () { return this.show === 'download' },
|
||||
showOverlay: function () {
|
||||
return (this.show !== null && this.show !== 'search')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
resetPrompts () {
|
||||
this.$store.commit('closePrompts')
|
||||
this.$store.commit('closeHovers')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ export default {
|
||||
computed: mapState(['req', 'selected', 'selectedCount']),
|
||||
methods: {
|
||||
cancel: function (event) {
|
||||
this.$store.commit('closePrompts')
|
||||
this.$store.commit('closeHovers')
|
||||
},
|
||||
oldName: function () {
|
||||
if (this.req.kind !== 'listing') {
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
this.$store.commit('closePrompts')
|
||||
this.$store.commit('closeHovers')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user