Organisation and reworking stuff
Former-commit-id: 01621444e51316cc9f125e4d541caf9d6c9d37a1 [formerly 733a976b594348754cb34b27c594c485fd5b0df4] [formerly 36a2f39b0e471ee231343ebaed474ae247764b37 [formerly 8d891f0d51]]
Former-commit-id: 505c381e3135c0e0607e984a37e908672e8100a3 [formerly a6e70288608c6ee1edc380af76ee3e82ff62861a]
Former-commit-id: d946069b4f8ad1b19da7ee087901762b3f4b7936
This commit is contained in:
1 parent
8b98abedea
commit
bae3c341f6
23 files changed
+47
-87
No files matched your search
@@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<button @click="show" aria-label="Delete" title="Delete" class="action">
|
||||
<i class="material-icons">delete</i>
|
||||
<span>Delete</span>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'delete-button',
|
||||
methods: {
|
||||
show: function (event) {
|
||||
this.$store.commit('showDelete', true)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<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>
|
||||
import {mapGetters, mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'download-button',
|
||||
computed: {
|
||||
...mapState(['req']),
|
||||
...mapGetters(['selectedCount'])
|
||||
},
|
||||
methods: {
|
||||
download: function (event) {
|
||||
if (this.req.kind !== 'listing') {
|
||||
window.open(`${window.location.pathname}?download=true`)
|
||||
return
|
||||
}
|
||||
|
||||
this.$store.commit('showDownload', true)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<button title="Info" aria-label="Info" class="action" @click="$store.commit('showInfo', true)">
|
||||
<i class="material-icons">info</i>
|
||||
<span>Info</span>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {name: 'info-button'}
|
||||
</script>
|
||||
@@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<button @click="$store.commit('showMove', true)" aria-label="Move" title="Move" class="action">
|
||||
<i class="material-icons">forward</i>
|
||||
<span>Move file</span>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {name: 'move-button'}
|
||||
</script>
|
||||
@@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<button @click="$store.commit('showRename', true)" aria-label="Rename" title="Rename" class="action">
|
||||
<i class="material-icons">mode_edit</i>
|
||||
<span>Rename</span>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {name: 'rename-button'}
|
||||
</script>
|
||||
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<button @click="change" aria-label="Switch View" title="Switch View" class="action">
|
||||
<i class="material-icons">{{ icon() }}</i>
|
||||
<span>Switch view</span>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'switch-button',
|
||||
methods: {
|
||||
change: function (event) {
|
||||
let display = 'mosaic'
|
||||
|
||||
if (this.$store.state.req.display === 'mosaic') {
|
||||
display = 'list'
|
||||
}
|
||||
|
||||
this.$store.commit('listingDisplay', display)
|
||||
document.cookie = `display=${display}; max-age=31536000; path=${this.$store.state.baseURL}`
|
||||
},
|
||||
icon: function () {
|
||||
if (this.$store.state.req.display === 'mosaic') return 'view_list'
|
||||
return 'view_module'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<button @click="upload" aria-label="Upload" title="Upload" class="action">
|
||||
<i class="material-icons">file_upload</i>
|
||||
<span>Upload</span>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'upload-button',
|
||||
methods: {
|
||||
upload: function (event) {
|
||||
document.getElementById('upload-input').click()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in new issue
Block a user