summaryrefslogtreecommitdiff
path: root/src/client/app
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2019-07-04 14:45:33 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-07-04 14:45:33 +0900
commit2e1a9dffbea4c8cb8665d71be05ccb677465768c (patch)
tree69ad1af9ff8aafba5b9e16d4b128d80b04c9113e /src/client/app
parentAPNG support (diff)
parentアバターファイル選択でimage以外は表示しないように (#5098) (diff)
downloadsharkey-2e1a9dffbea4c8cb8665d71be05ccb677465768c.tar.gz
sharkey-2e1a9dffbea4c8cb8665d71be05ccb677465768c.tar.bz2
sharkey-2e1a9dffbea4c8cb8665d71be05ccb677465768c.zip
Merge branch 'develop' of https://github.com/syuilo/misskey into develop
Diffstat (limited to 'src/client/app')
-rw-r--r--src/client/app/desktop/api/update-avatar.ts1
-rw-r--r--src/client/app/desktop/api/update-banner.ts1
-rw-r--r--src/client/app/desktop/script.ts1
-rw-r--r--src/client/app/desktop/views/components/choose-file-from-drive-window.vue6
-rw-r--r--src/client/app/desktop/views/components/drive.vue7
-rw-r--r--src/client/app/mobile/views/components/drive-file-chooser.vue3
6 files changed, 18 insertions, 1 deletions
diff --git a/src/client/app/desktop/api/update-avatar.ts b/src/client/app/desktop/api/update-avatar.ts
index e2da55fc97..a095491b69 100644
--- a/src/client/app/desktop/api/update-avatar.ts
+++ b/src/client/app/desktop/api/update-avatar.ts
@@ -91,6 +91,7 @@ export default ($root: any) => {
? Promise.resolve(file)
: $root.$chooseDriveFile({
multiple: false,
+ type: 'image/*',
title: locale['desktop']['choose-avatar']
});
diff --git a/src/client/app/desktop/api/update-banner.ts b/src/client/app/desktop/api/update-banner.ts
index e62277338d..c23a325364 100644
--- a/src/client/app/desktop/api/update-banner.ts
+++ b/src/client/app/desktop/api/update-banner.ts
@@ -91,6 +91,7 @@ export default ($root: any) => {
? Promise.resolve(file)
: $root.$chooseDriveFile({
multiple: false,
+ type: 'image/*',
title: locale['desktop']['choose-banner']
});
diff --git a/src/client/app/desktop/script.ts b/src/client/app/desktop/script.ts
index ce0b96e0ac..8065241714 100644
--- a/src/client/app/desktop/script.ts
+++ b/src/client/app/desktop/script.ts
@@ -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
});
diff --git a/src/client/app/desktop/views/components/choose-file-from-drive-window.vue b/src/client/app/desktop/views/components/choose-file-from-drive-window.vue
index 8b39e6e00b..71c430edeb 100644
--- a/src/client/app/desktop/views/components/choose-file-from-drive-window.vue
+++ b/src/client/app/desktop/views/components/choose-file-from-drive-window.vue
@@ -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
}
diff --git a/src/client/app/desktop/views/components/drive.vue b/src/client/app/desktop/views/components/drive.vue
index 4b64d4f22a..2eb9581359 100644
--- a/src/client/app/desktop/views/components/drive.vue
+++ b/src/client/app/desktop/views/components/drive.vue
@@ -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 => {
diff --git a/src/client/app/mobile/views/components/drive-file-chooser.vue b/src/client/app/mobile/views/components/drive-file-chooser.vue
index b72c796c1d..8795102f97 100644
--- a/src/client/app/mobile/views/components/drive-file-chooser.vue
+++ b/src/client/app/mobile/views/components/drive-file-chooser.vue
@@ -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: []