Updates and more features
Former-commit-id: 9f1f09311813203910d5b323ba80712553ee2741 [formerly 0be00be1de305d786affc6bf0886aed9b20fbc51] [formerly 04597463117e94830b24b87faaaccf3d35284427 [formerly 3f2dc3f1c5]]
Former-commit-id: 8d26cc1d96faed73c7974ea7e5e78bf268af3ad9 [formerly a083ac8f68c90a636843c3565bd349657c0ec383]
Former-commit-id: ef10f3b3c388d65ceac40785b45dbac190a6cc99
This commit is contained in:
1 parent
3535f34c4f
commit
713e89eb68
26 files changed
+217
-259
No files matched your search
@@ -1,38 +1,28 @@
|
||||
<template>
|
||||
<button @click="download" aria-label="Download" title="Download" class="action">
|
||||
<i class="material-icons">file_download</i>
|
||||
<span>Download</span>
|
||||
<span v-if="count() > 0" class="counter">{{ count() }}</span>
|
||||
</button>
|
||||
<button @click="download" aria-label="Download" title="Download" class="action">
|
||||
<i class="material-icons">file_download</i>
|
||||
<span>Download</span>
|
||||
<span v-if="selectedCount > 0" class="counter">{{ selectedCount }}</span>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var $ = window.info
|
||||
import {mapGetters, mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'download-button',
|
||||
computed: {
|
||||
...mapState(['req']),
|
||||
...mapGetters(['selectedCount'])
|
||||
},
|
||||
methods: {
|
||||
count: function () {
|
||||
return this.$store.getters.selectedCount
|
||||
},
|
||||
download: function (event) {
|
||||
if ($.req.kind !== 'listing') {
|
||||
window.location = window.location.pathname + '?download=true'
|
||||
if (this.req.kind !== 'listing') {
|
||||
window.open(`${window.location.pathname}?download=true`)
|
||||
return
|
||||
}
|
||||
|
||||
/*
|
||||
<ul class="dropdown" id="download-drop">
|
||||
<a tabindex="0" aria-label="Download as Zip" data-format="zip" href="?download=zip"><li>zip</li></a>
|
||||
<a tabindex="0" aria-label="Download as Tar" data-format="tar" href="?download=tar"><li>tar</li></a>
|
||||
<a tabindex="0" aria-label="Download as TarGz" data-format="targz" href="?download=targz"><li>tar.gz</li></a>
|
||||
<a tabindex="0" aria-label="Download as TarBz2" data-format="tarbz2" href="?download=tarbz2"><li>tar.bz2</li></a>
|
||||
<a tabindex="0" aria-label="Download as TarXz" data-format="tarbz2" href="?download=tarxz"><li>tar.xz</li></a>
|
||||
</ul>
|
||||
*/
|
||||
// document.getElementById('upload-input').click()
|
||||
// TODO
|
||||
alert('Not Implemented!')
|
||||
this.$store.commit('showDownload', true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user