feat(client): Implement default upload folder setting

Resolve #5985
This commit is contained in:
syuilo
2020-04-22 00:34:56 +09:00
parent e72011f1da
commit 1f998168e2
11 changed files with 140 additions and 208 deletions

View File

@ -42,11 +42,20 @@ import { faDownload, faLink, faICursor, faTrashAlt } from '@fortawesome/free-sol
export default Vue.extend({
i18n,
components: {
XFileThumbnail
},
props: {
file: {
type: Object,
required: true,
},
isSelected: {
type: Boolean,
required: false,
default: false,
},
selectMode: {
type: Boolean,
required: false,
@ -54,10 +63,6 @@ export default Vue.extend({
}
},
components: {
XFileThumbnail
},
data() {
return {
isDragging: false
@ -65,12 +70,10 @@ export default Vue.extend({
},
computed: {
// TODO: parentへの参照を無くす
browser(): any {
return this.$parent;
},
isSelected(): boolean {
return this.browser.selectedFiles.some(f => f.id == this.file.id);
},
title(): string {
return `${this.file.name}\n${this.file.type} ${Vue.filter('bytes')(this.file.size)}`;
}
@ -79,7 +82,7 @@ export default Vue.extend({
methods: {
onClick(ev) {
if (this.selectMode) {
this.browser.chooseFile(this.file);
this.$emit('chosen', this.file);
} else {
this.$root.menu({
items: [{