mirror of
https://github.com/misskey-dev/misskey
synced 2024-12-12 05:39:00 +09:00
アバターファイル選択でimage以外は表示しないように (#5098)
This commit is contained in:
parent
5e7a4e4752
commit
97002400a8
@ -91,6 +91,7 @@ export default ($root: any) => {
|
||||
? Promise.resolve(file)
|
||||
: $root.$chooseDriveFile({
|
||||
multiple: false,
|
||||
type: 'image/*',
|
||||
title: locale['desktop']['choose-avatar']
|
||||
});
|
||||
|
||||
|
@ -91,6 +91,7 @@ export default ($root: any) => {
|
||||
? Promise.resolve(file)
|
||||
: $root.$chooseDriveFile({
|
||||
multiple: false,
|
||||
type: 'image/*',
|
||||
title: locale['desktop']['choose-banner']
|
||||
});
|
||||
|
||||
|
@ -77,6 +77,7 @@ init(async (launch, os) => {
|
||||
if (document.body.clientWidth > 800) {
|
||||
const w = this.$root.new(MkChooseFileFromDriveWindow, {
|
||||
title: o.title,
|
||||
type: o.type,
|
||||
multiple: o.multiple,
|
||||
initFolder: o.currentFolder
|
||||
});
|
||||
|
@ -11,6 +11,7 @@
|
||||
<x-drive
|
||||
ref="browser"
|
||||
class="browser"
|
||||
:type="type"
|
||||
:multiple="multiple"
|
||||
@selected="onSelected"
|
||||
@change-selection="onChangeSelection"
|
||||
@ -33,6 +34,11 @@ export default Vue.extend({
|
||||
XDrive: () => import('./drive.vue').then(m => m.default),
|
||||
},
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: undefined
|
||||
},
|
||||
multiple: {
|
||||
default: false
|
||||
}
|
||||
|
@ -80,6 +80,11 @@ export default Vue.extend({
|
||||
type: Object,
|
||||
required: false
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: undefined
|
||||
},
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
@ -540,6 +545,7 @@ export default Vue.extend({
|
||||
// ファイル一覧取得
|
||||
this.$root.api('drive/files', {
|
||||
folderId: this.folder ? this.folder.id : null,
|
||||
type: this.type,
|
||||
limit: filesMax + 1
|
||||
}).then(files => {
|
||||
if (files.length == filesMax + 1) {
|
||||
@ -570,6 +576,7 @@ export default Vue.extend({
|
||||
// ファイル一覧取得
|
||||
this.$root.api('drive/files', {
|
||||
folderId: this.folder ? this.folder.id : null,
|
||||
type: this.type,
|
||||
untilId: this.files[this.files.length - 1].id,
|
||||
limit: max + 1
|
||||
}).then(files => {
|
||||
|
@ -8,6 +8,7 @@
|
||||
</header>
|
||||
<x-drive class="drive" ref="browser"
|
||||
:select-file="true"
|
||||
:type="type"
|
||||
:multiple="multiple"
|
||||
@change-selection="onChangeSelection"
|
||||
@selected="onSelected"
|
||||
@ -25,7 +26,7 @@ export default Vue.extend({
|
||||
components: {
|
||||
XDrive: () => import('./drive.vue').then(m => m.default),
|
||||
},
|
||||
props: ['multiple'],
|
||||
props: ['type', 'multiple'],
|
||||
data() {
|
||||
return {
|
||||
files: []
|
||||
|
Loading…
Reference in New Issue
Block a user