Merge branch 'develop' of https://github.com/syuilo/misskey into develop
This commit is contained in:
commit
2e1a9dffbe
@ -91,6 +91,7 @@ export default ($root: any) => {
|
|||||||
? Promise.resolve(file)
|
? Promise.resolve(file)
|
||||||
: $root.$chooseDriveFile({
|
: $root.$chooseDriveFile({
|
||||||
multiple: false,
|
multiple: false,
|
||||||
|
type: 'image/*',
|
||||||
title: locale['desktop']['choose-avatar']
|
title: locale['desktop']['choose-avatar']
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -91,6 +91,7 @@ export default ($root: any) => {
|
|||||||
? Promise.resolve(file)
|
? Promise.resolve(file)
|
||||||
: $root.$chooseDriveFile({
|
: $root.$chooseDriveFile({
|
||||||
multiple: false,
|
multiple: false,
|
||||||
|
type: 'image/*',
|
||||||
title: locale['desktop']['choose-banner']
|
title: locale['desktop']['choose-banner']
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -77,6 +77,7 @@ init(async (launch, os) => {
|
|||||||
if (document.body.clientWidth > 800) {
|
if (document.body.clientWidth > 800) {
|
||||||
const w = this.$root.new(MkChooseFileFromDriveWindow, {
|
const w = this.$root.new(MkChooseFileFromDriveWindow, {
|
||||||
title: o.title,
|
title: o.title,
|
||||||
|
type: o.type,
|
||||||
multiple: o.multiple,
|
multiple: o.multiple,
|
||||||
initFolder: o.currentFolder
|
initFolder: o.currentFolder
|
||||||
});
|
});
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
<x-drive
|
<x-drive
|
||||||
ref="browser"
|
ref="browser"
|
||||||
class="browser"
|
class="browser"
|
||||||
|
:type="type"
|
||||||
:multiple="multiple"
|
:multiple="multiple"
|
||||||
@selected="onSelected"
|
@selected="onSelected"
|
||||||
@change-selection="onChangeSelection"
|
@change-selection="onChangeSelection"
|
||||||
@ -33,6 +34,11 @@ export default Vue.extend({
|
|||||||
XDrive: () => import('./drive.vue').then(m => m.default),
|
XDrive: () => import('./drive.vue').then(m => m.default),
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: undefined
|
||||||
|
},
|
||||||
multiple: {
|
multiple: {
|
||||||
default: false
|
default: false
|
||||||
}
|
}
|
||||||
|
@ -80,6 +80,11 @@ export default Vue.extend({
|
|||||||
type: Object,
|
type: Object,
|
||||||
required: false
|
required: false
|
||||||
},
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: undefined
|
||||||
|
},
|
||||||
multiple: {
|
multiple: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
@ -540,6 +545,7 @@ export default Vue.extend({
|
|||||||
// ファイル一覧取得
|
// ファイル一覧取得
|
||||||
this.$root.api('drive/files', {
|
this.$root.api('drive/files', {
|
||||||
folderId: this.folder ? this.folder.id : null,
|
folderId: this.folder ? this.folder.id : null,
|
||||||
|
type: this.type,
|
||||||
limit: filesMax + 1
|
limit: filesMax + 1
|
||||||
}).then(files => {
|
}).then(files => {
|
||||||
if (files.length == filesMax + 1) {
|
if (files.length == filesMax + 1) {
|
||||||
@ -570,6 +576,7 @@ export default Vue.extend({
|
|||||||
// ファイル一覧取得
|
// ファイル一覧取得
|
||||||
this.$root.api('drive/files', {
|
this.$root.api('drive/files', {
|
||||||
folderId: this.folder ? this.folder.id : null,
|
folderId: this.folder ? this.folder.id : null,
|
||||||
|
type: this.type,
|
||||||
untilId: this.files[this.files.length - 1].id,
|
untilId: this.files[this.files.length - 1].id,
|
||||||
limit: max + 1
|
limit: max + 1
|
||||||
}).then(files => {
|
}).then(files => {
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
</header>
|
</header>
|
||||||
<x-drive class="drive" ref="browser"
|
<x-drive class="drive" ref="browser"
|
||||||
:select-file="true"
|
:select-file="true"
|
||||||
|
:type="type"
|
||||||
:multiple="multiple"
|
:multiple="multiple"
|
||||||
@change-selection="onChangeSelection"
|
@change-selection="onChangeSelection"
|
||||||
@selected="onSelected"
|
@selected="onSelected"
|
||||||
@ -25,7 +26,7 @@ export default Vue.extend({
|
|||||||
components: {
|
components: {
|
||||||
XDrive: () => import('./drive.vue').then(m => m.default),
|
XDrive: () => import('./drive.vue').then(m => m.default),
|
||||||
},
|
},
|
||||||
props: ['multiple'],
|
props: ['type', 'multiple'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
files: []
|
files: []
|
||||||
|
Loading…
Reference in New Issue
Block a user