mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-05-09 11:42:57 +00:00

Former-commit-id: 419fb04f20d9be50358b0d87285fa92855906f97 [formerly fd974c12d0c06b0bde92e201f636c977a1638608] [formerly faa13a4e0c06720f217e7e4387ca0bf9e367365d [formerly 39f39cca2951018d900ff777b36a9b8f720c4356]] Former-commit-id: b2df427ca1f97e407a549848649bad020eb5453f [formerly 484d32224ca56fa68d6b5b0f01626d69eaa0528b] Former-commit-id: 81103561b811e456c4e50dd0d8a6e555e8584839
40 lines
1.4 KiB
Vue
40 lines
1.4 KiB
Vue
<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>
|
|
</template>
|
|
|
|
<script>
|
|
var $ = window.info
|
|
|
|
export default {
|
|
name: 'download-button',
|
|
methods: {
|
|
count: function () {
|
|
return this.$store.getters.selectedCount
|
|
},
|
|
download: function (event) {
|
|
if ($.req.kind !== 'listing') {
|
|
window.location = 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!')
|
|
}
|
|
}
|
|
}
|
|
</script>
|