summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-09-05 19:32:46 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-09-05 19:32:46 +0900
commita1b82e97230eab994c06fc7c902e71539664d3d7 (patch)
tree18501f85f8d406777a3c11ef1d938657c256b32f /src/client
parent:art: (diff)
downloadmisskey-a1b82e97230eab994c06fc7c902e71539664d3d7.tar.gz
misskey-a1b82e97230eab994c06fc7c902e71539664d3d7.tar.bz2
misskey-a1b82e97230eab994c06fc7c902e71539664d3d7.zip
#2620
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/common/scripts/parse-search-query.ts53
-rw-r--r--src/client/app/common/views/components/welcome-timeline.vue2
-rw-r--r--src/client/app/desktop/views/components/note-detail.vue6
-rw-r--r--src/client/app/desktop/views/components/notes.note.vue6
-rw-r--r--src/client/app/desktop/views/components/notes.vue2
-rw-r--r--src/client/app/desktop/views/components/post-form-window.vue10
-rw-r--r--src/client/app/desktop/views/components/post-form.vue16
-rw-r--r--src/client/app/desktop/views/components/sub-note-content.vue6
-rw-r--r--src/client/app/desktop/views/pages/deck/deck.list-tl.vue6
-rw-r--r--src/client/app/desktop/views/pages/deck/deck.note.vue16
-rw-r--r--src/client/app/desktop/views/pages/deck/deck.notes.vue2
-rw-r--r--src/client/app/desktop/views/pages/deck/deck.tl.vue6
-rw-r--r--src/client/app/desktop/views/pages/user/user.photos.vue6
-rw-r--r--src/client/app/desktop/views/pages/user/user.timeline.vue4
-rw-r--r--src/client/app/desktop/views/widgets/trends.vue2
-rw-r--r--src/client/app/mobile/views/components/note-detail.vue8
-rw-r--r--src/client/app/mobile/views/components/note.vue8
-rw-r--r--src/client/app/mobile/views/components/notes.vue2
-rw-r--r--src/client/app/mobile/views/components/post-form.vue8
-rw-r--r--src/client/app/mobile/views/components/sub-note-content.vue6
-rw-r--r--src/client/app/mobile/views/components/user-timeline.vue4
-rw-r--r--src/client/app/mobile/views/pages/user/home.photos.vue2
22 files changed, 64 insertions, 117 deletions
diff --git a/src/client/app/common/scripts/parse-search-query.ts b/src/client/app/common/scripts/parse-search-query.ts
deleted file mode 100644
index 5f6ae3320a..0000000000
--- a/src/client/app/common/scripts/parse-search-query.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-export default function(qs: string) {
- const q = {
- text: ''
- };
-
- qs.split(' ').forEach(x => {
- if (/^([a-z_]+?):(.+?)$/.test(x)) {
- const [key, value] = x.split(':');
- switch (key) {
- case 'user':
- q['includeUserUsernames'] = value.split(',');
- break;
- case 'exclude_user':
- q['excludeUserUsernames'] = value.split(',');
- break;
- case 'follow':
- q['following'] = value == 'null' ? null : value == 'true';
- break;
- case 'reply':
- q['reply'] = value == 'null' ? null : value == 'true';
- break;
- case 'renote':
- q['renote'] = value == 'null' ? null : value == 'true';
- break;
- case 'media':
- q['media'] = value == 'null' ? null : value == 'true';
- break;
- case 'poll':
- q['poll'] = value == 'null' ? null : value == 'true';
- break;
- case 'until':
- case 'since':
- // YYYY-MM-DD
- if (/^[0-9]+\-[0-9]+\-[0-9]+$/) {
- const [yyyy, mm, dd] = value.split('-');
- q[`${key}_date`] = (new Date(parseInt(yyyy, 10), parseInt(mm, 10) - 1, parseInt(dd, 10))).getTime();
- }
- break;
- default:
- q[key] = value;
- break;
- }
- } else {
- q.text += x + ' ';
- }
- });
-
- if (q.text) {
- q.text = q.text.trim();
- }
-
- return q;
-}
diff --git a/src/client/app/common/views/components/welcome-timeline.vue b/src/client/app/common/views/components/welcome-timeline.vue
index d4e7902c7b..b427721d37 100644
--- a/src/client/app/common/views/components/welcome-timeline.vue
+++ b/src/client/app/common/views/components/welcome-timeline.vue
@@ -63,7 +63,7 @@ export default Vue.extend({
local: true,
reply: false,
renote: false,
- media: false,
+ file: false,
poll: false
}).then(notes => {
this.notes = notes;
diff --git a/src/client/app/desktop/views/components/note-detail.vue b/src/client/app/desktop/views/components/note-detail.vue
index 1ba4a9a447..a61a004a85 100644
--- a/src/client/app/desktop/views/components/note-detail.vue
+++ b/src/client/app/desktop/views/components/note-detail.vue
@@ -42,8 +42,8 @@
<span v-if="p.deletedAt" style="opacity: 0.5">%i18n:@deleted%</span>
<misskey-flavored-markdown v-if="p.text" :text="p.text" :i="$store.state.i"/>
</div>
- <div class="media" v-if="p.media.length > 0">
- <mk-media-list :media-list="p.media" :raw="true"/>
+ <div class="files" v-if="p.files.length > 0">
+ <mk-media-list :media-list="p.files" :raw="true"/>
</div>
<mk-poll v-if="p.poll" :note="p"/>
<mk-url-preview v-for="url in urls" :url="url" :key="url" :detail="true"/>
@@ -114,7 +114,7 @@ export default Vue.extend({
isRenote(): boolean {
return (this.note.renote &&
this.note.text == null &&
- this.note.mediaIds.length == 0 &&
+ this.note.fileIds.length == 0 &&
this.note.poll == null);
},
p(): any {
diff --git a/src/client/app/desktop/views/components/notes.note.vue b/src/client/app/desktop/views/components/notes.note.vue
index 7592ae3905..1d6b2048ba 100644
--- a/src/client/app/desktop/views/components/notes.note.vue
+++ b/src/client/app/desktop/views/components/notes.note.vue
@@ -28,8 +28,8 @@
<misskey-flavored-markdown v-if="p.text" :text="p.text" :i="$store.state.i" :class="$style.text"/>
<a class="rp" v-if="p.renote">RP:</a>
</div>
- <div class="media" v-if="p.media.length > 0">
- <mk-media-list :media-list="p.media"/>
+ <div class="files" v-if="p.files.length > 0">
+ <mk-media-list :media-list="p.files"/>
</div>
<mk-poll v-if="p.poll" :note="p" ref="pollViewer"/>
<a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% 位置情報</a>
@@ -110,7 +110,7 @@ export default Vue.extend({
isRenote(): boolean {
return (this.note.renote &&
this.note.text == null &&
- this.note.mediaIds.length == 0 &&
+ this.note.fileIds.length == 0 &&
this.note.poll == null);
},
diff --git a/src/client/app/desktop/views/components/notes.vue b/src/client/app/desktop/views/components/notes.vue
index a1c1207a7b..f19ecf8f9a 100644
--- a/src/client/app/desktop/views/components/notes.vue
+++ b/src/client/app/desktop/views/components/notes.vue
@@ -122,7 +122,7 @@ export default Vue.extend({
prepend(note, silent = false) {
//#region 弾く
const isMyNote = note.userId == this.$store.state.i.id;
- const isPureRenote = note.renoteId != null && note.text == null && note.mediaIds.length == 0 && note.poll == null;
+ const isPureRenote = note.renoteId != null && note.text == null && note.fileIds.length == 0 && note.poll == null;
if (this.$store.state.settings.showMyRenotes === false) {
if (isMyNote && isPureRenote) {
diff --git a/src/client/app/desktop/views/components/post-form-window.vue b/src/client/app/desktop/views/components/post-form-window.vue
index 51a416e281..a88c96d1bf 100644
--- a/src/client/app/desktop/views/components/post-form-window.vue
+++ b/src/client/app/desktop/views/components/post-form-window.vue
@@ -4,7 +4,7 @@
<span class="icon" v-if="geo">%fa:map-marker-alt%</span>
<span v-if="!reply">%i18n:@note%</span>
<span v-if="reply">%i18n:@reply%</span>
- <span class="count" v-if="media.length != 0">{{ '%i18n:@attaches%'.replace('{}', media.length) }}</span>
+ <span class="count" v-if="files.length != 0">{{ '%i18n:@attaches%'.replace('{}', files.length) }}</span>
<span class="count" v-if="uploadings.length != 0">{{ '%i18n:@uploading-media%'.replace('{}', uploadings.length) }}<mk-ellipsis/></span>
</span>
@@ -14,7 +14,7 @@
:reply="reply"
@posted="onPosted"
@change-uploadings="onChangeUploadings"
- @change-attached-media="onChangeMedia"
+ @change-attached-files="onChangeFiles"
@geo-attached="onGeoAttached"
@geo-dettached="onGeoDettached"/>
</div>
@@ -29,7 +29,7 @@ export default Vue.extend({
data() {
return {
uploadings: [],
- media: [],
+ files: [],
geo: null
};
},
@@ -42,8 +42,8 @@ export default Vue.extend({
onChangeUploadings(files) {
this.uploadings = files;
},
- onChangeMedia(media) {
- this.media = media;
+ onChangeFiles(files) {
+ this.files = files;
},
onGeoAttached(geo) {
this.geo = geo;
diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue
index 2ca5484610..f6f52c8f1f 100644
--- a/src/client/app/desktop/views/components/post-form.vue
+++ b/src/client/app/desktop/views/components/post-form.vue
@@ -20,7 +20,7 @@
@keydown="onKeydown" @paste="onPaste" :placeholder="placeholder"
v-autocomplete="'text'"
></textarea>
- <div class="medias" :class="{ with: poll }" v-show="files.length != 0">
+ <div class="files" :class="{ with: poll }" v-show="files.length != 0">
<x-draggable :list="files" :options="{ animation: 150 }">
<div v-for="file in files" :key="file.id">
<div class="img" :style="{ backgroundImage: `url(${file.thumbnailUrl})` }" :title="file.name"></div>
@@ -188,7 +188,7 @@ export default Vue.extend({
(this.$refs.poll as any).set(draft.data.poll);
});
}
- this.$emit('change-attached-media', this.files);
+ this.$emit('change-attached-files', this.files);
}
}
@@ -225,12 +225,12 @@ export default Vue.extend({
attachMedia(driveFile) {
this.files.push(driveFile);
- this.$emit('change-attached-media', this.files);
+ this.$emit('change-attached-files', this.files);
},
detachMedia(id) {
this.files = this.files.filter(x => x.id != id);
- this.$emit('change-attached-media', this.files);
+ this.$emit('change-attached-files', this.files);
},
onChangeFile() {
@@ -249,7 +249,7 @@ export default Vue.extend({
this.text = '';
this.files = [];
this.poll = false;
- this.$emit('change-attached-media', this.files);
+ this.$emit('change-attached-files', this.files);
},
onKeydown(e) {
@@ -297,7 +297,7 @@ export default Vue.extend({
if (driveFile != null && driveFile != '') {
const file = JSON.parse(driveFile);
this.files.push(file);
- this.$emit('change-attached-media', this.files);
+ this.$emit('change-attached-files', this.files);
e.preventDefault();
}
//#endregion
@@ -354,7 +354,7 @@ export default Vue.extend({
(this as any).api('notes/create', {
text: this.text == '' ? undefined : this.text,
- mediaIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
+ fileIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
replyId: this.reply ? this.reply.id : undefined,
renoteId: this.renote ? this.renote.id : undefined,
poll: this.poll ? (this.$refs.poll as any).get() : undefined,
@@ -514,7 +514,7 @@ root(isDark)
margin-right 8px
white-space nowrap
- > .medias
+ > .files
margin 0
padding 0
background isDark ? #181b23 : lighten($theme-color, 98%)
diff --git a/src/client/app/desktop/views/components/sub-note-content.vue b/src/client/app/desktop/views/components/sub-note-content.vue
index cb0374b910..6889dc231e 100644
--- a/src/client/app/desktop/views/components/sub-note-content.vue
+++ b/src/client/app/desktop/views/components/sub-note-content.vue
@@ -7,9 +7,9 @@
<misskey-flavored-markdown v-if="note.text" :text="note.text" :i="$store.state.i"/>
<a class="rp" v-if="note.renoteId" :href="`/notes/${note.renoteId}`">RP: ...</a>
</div>
- <details v-if="note.media.length > 0">
- <summary>({{ '%i18n:@media-count%'.replace('{}', note.media.length) }})</summary>
- <mk-media-list :media-list="note.media"/>
+ <details v-if="note.files.length > 0">
+ <summary>({{ '%i18n:@media-count%'.replace('{}', note.files.length) }})</summary>
+ <mk-media-list :media-list="note.files"/>
</details>
<details v-if="note.poll">
<summary>%i18n:@poll%</summary>
diff --git a/src/client/app/desktop/views/pages/deck/deck.list-tl.vue b/src/client/app/desktop/views/pages/deck/deck.list-tl.vue
index 70048f99e3..e82e76e4d0 100644
--- a/src/client/app/desktop/views/pages/deck/deck.list-tl.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.list-tl.vue
@@ -68,7 +68,7 @@ export default Vue.extend({
(this as any).api('notes/user-list-timeline', {
listId: this.list.id,
limit: fetchLimit + 1,
- mediaOnly: this.mediaOnly,
+ withFiles: this.mediaOnly,
includeMyRenotes: this.$store.state.settings.showMyRenotes,
includeRenotedMyNotes: this.$store.state.settings.showRenotedMyNotes,
includeLocalRenotes: this.$store.state.settings.showLocalRenotes
@@ -90,7 +90,7 @@ export default Vue.extend({
listId: this.list.id,
limit: fetchLimit + 1,
untilId: (this.$refs.timeline as any).tail().id,
- mediaOnly: this.mediaOnly,
+ withFiles: this.mediaOnly,
includeMyRenotes: this.$store.state.settings.showMyRenotes,
includeRenotedMyNotes: this.$store.state.settings.showRenotedMyNotes,
includeLocalRenotes: this.$store.state.settings.showLocalRenotes
@@ -109,7 +109,7 @@ export default Vue.extend({
return promise;
},
onNote(note) {
- if (this.mediaOnly && note.media.length == 0) return;
+ if (this.mediaOnly && note.files.length == 0) return;
// Prepend a note
(this.$refs.timeline as any).prepend(note);
diff --git a/src/client/app/desktop/views/pages/deck/deck.note.vue b/src/client/app/desktop/views/pages/deck/deck.note.vue
index 2615c0d090..b42df1f347 100644
--- a/src/client/app/desktop/views/pages/deck/deck.note.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.note.vue
@@ -28,8 +28,8 @@
<misskey-flavored-markdown v-if="p.text" :text="p.text" :i="$store.state.i"/>
<a class="rp" v-if="p.renote != null">RP:</a>
</div>
- <div class="media" v-if="p.media.length > 0">
- <mk-media-list :media-list="p.media"/>
+ <div class="files" v-if="p.files.length > 0">
+ <mk-media-list :media-list="p.files"/>
</div>
<mk-poll v-if="p.poll" :note="p" ref="pollViewer"/>
<a class="location" v-if="p.geo" :href="`https://maps.google.com/maps?q=${p.geo.coordinates[1]},${p.geo.coordinates[0]}`" target="_blank">%fa:map-marker-alt% %i18n:@location%</a>
@@ -54,11 +54,11 @@
</article>
</div>
<div v-else class="srwrkujossgfuhrbnvqkybtzxpblgchi">
- <div v-if="note.media.length > 0">
- <mk-media-list :media-list="note.media"/>
+ <div v-if="note.files.length > 0">
+ <mk-media-list :media-list="note.files"/>
</div>
- <div v-if="note.renote && note.renote.media.length > 0">
- <mk-media-list :media-list="note.renote.media"/>
+ <div v-if="note.renote && note.renote.files.length > 0">
+ <mk-media-list :media-list="note.renote.files"/>
</div>
</div>
</template>
@@ -100,7 +100,7 @@ export default Vue.extend({
isRenote(): boolean {
return (this.note.renote &&
this.note.text == null &&
- this.note.mediaIds.length == 0 &&
+ this.note.fileIds.length == 0 &&
this.note.poll == null);
},
@@ -371,7 +371,7 @@ root(isDark)
.mk-url-preview
margin-top 8px
- > .media
+ > .files
> img
display block
max-width 100%
diff --git a/src/client/app/desktop/views/pages/deck/deck.notes.vue b/src/client/app/desktop/views/pages/deck/deck.notes.vue
index f7fca5de92..2e7e30f12a 100644
--- a/src/client/app/desktop/views/pages/deck/deck.notes.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.notes.vue
@@ -127,7 +127,7 @@ export default Vue.extend({
prepend(note, silent = false) {
//#region 弾く
const isMyNote = note.userId == this.$store.state.i.id;
- const isPureRenote = note.renoteId != null && note.text == null && note.mediaIds.length == 0 && note.poll == null;
+ const isPureRenote = note.renoteId != null && note.text == null && note.fileIds.length == 0 && note.poll == null;
if (this.$store.state.settings.showMyRenotes === false) {
if (isMyNote && isPureRenote) {
diff --git a/src/client/app/desktop/views/pages/deck/deck.tl.vue b/src/client/app/desktop/views/pages/deck/deck.tl.vue
index a9e4d489c3..120ceb7fc2 100644
--- a/src/client/app/desktop/views/pages/deck/deck.tl.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.tl.vue
@@ -96,7 +96,7 @@ export default Vue.extend({
(this.$refs.timeline as any).init(() => new Promise((res, rej) => {
(this as any).api(this.endpoint, {
limit: fetchLimit + 1,
- mediaOnly: this.mediaOnly,
+ withFiles: this.mediaOnly,
includeMyRenotes: this.$store.state.settings.showMyRenotes,
includeRenotedMyNotes: this.$store.state.settings.showRenotedMyNotes,
includeLocalRenotes: this.$store.state.settings.showLocalRenotes
@@ -117,7 +117,7 @@ export default Vue.extend({
const promise = (this as any).api(this.endpoint, {
limit: fetchLimit + 1,
- mediaOnly: this.mediaOnly,
+ withFiles: this.mediaOnly,
untilId: (this.$refs.timeline as any).tail().id,
includeMyRenotes: this.$store.state.settings.showMyRenotes,
includeRenotedMyNotes: this.$store.state.settings.showRenotedMyNotes,
@@ -138,7 +138,7 @@ export default Vue.extend({
},
onNote(note) {
- if (this.mediaOnly && note.media.length == 0) return;
+ if (this.mediaOnly && note.files.length == 0) return;
// Prepend a note
(this.$refs.timeline as any).prepend(note);
diff --git a/src/client/app/desktop/views/pages/user/user.photos.vue b/src/client/app/desktop/views/pages/user/user.photos.vue
index 64c537f1ed..c5cd9e24fe 100644
--- a/src/client/app/desktop/views/pages/user/user.photos.vue
+++ b/src/client/app/desktop/views/pages/user/user.photos.vue
@@ -24,12 +24,12 @@ export default Vue.extend({
mounted() {
(this as any).api('users/notes', {
userId: this.user.id,
- withMedia: true,
+ withFiles: true,
limit: 9
}).then(notes => {
notes.forEach(note => {
- note.media.forEach(media => {
- if (this.images.length < 9) this.images.push(media);
+ note.files.forEach(file => {
+ if (this.images.length < 9) this.images.push(file);
});
});
this.fetching = false;
diff --git a/src/client/app/desktop/views/pages/user/user.timeline.vue b/src/client/app/desktop/views/pages/user/user.timeline.vue
index 67987fcb94..54221380a7 100644
--- a/src/client/app/desktop/views/pages/user/user.timeline.vue
+++ b/src/client/app/desktop/views/pages/user/user.timeline.vue
@@ -66,7 +66,7 @@ export default Vue.extend({
limit: fetchLimit + 1,
untilDate: this.date ? this.date.getTime() : undefined,
includeReplies: this.mode == 'with-replies',
- withMedia: this.mode == 'with-media'
+ withFiles: this.mode == 'with-media'
}).then(notes => {
if (notes.length == fetchLimit + 1) {
notes.pop();
@@ -86,7 +86,7 @@ export default Vue.extend({
userId: this.user.id,
limit: fetchLimit + 1,
includeReplies: this.mode == 'with-replies',
- withMedia: this.mode == 'with-media',
+ withFiles: this.mode == 'with-media',
untilId: (this.$refs.timeline as any).tail().id
});
diff --git a/src/client/app/desktop/views/widgets/trends.vue b/src/client/app/desktop/views/widgets/trends.vue
index c33bf2f2f2..aeaab63ac4 100644
--- a/src/client/app/desktop/views/widgets/trends.vue
+++ b/src/client/app/desktop/views/widgets/trends.vue
@@ -49,7 +49,7 @@ export default define({
offset: this.offset,
renote: false,
reply: false,
- media: false,
+ file: false,
poll: false
}).then(notes => {
const note = notes ? notes[0] : null;
diff --git a/src/client/app/mobile/views/components/note-detail.vue b/src/client/app/mobile/views/components/note-detail.vue
index 786e57bb22..10ff3fcc09 100644
--- a/src/client/app/mobile/views/components/note-detail.vue
+++ b/src/client/app/mobile/views/components/note-detail.vue
@@ -40,8 +40,8 @@
<span v-if="p.deletedAt" style="opacity: 0.5">(%i18n:@deleted%)</span>
<misskey-flavored-markdown v-if="p.text" :text="p.text" :i="$store.state.i"/>
</div>
- <div class="media" v-if="p.media.length > 0">
- <mk-media-list :media-list="p.media" :raw="true"/>
+ <div class="files" v-if="p.files.length > 0">
+ <mk-media-list :media-list="p.files" :raw="true"/>
</div>
<mk-poll v-if="p.poll" :note="p"/>
<mk-url-preview v-for="url in urls" :url="url" :key="url" :detail="true"/>
@@ -113,7 +113,7 @@ export default Vue.extend({
isRenote(): boolean {
return (this.note.renote &&
this.note.text == null &&
- this.note.mediaIds.length == 0 &&
+ this.note.fileIds.length == 0 &&
this.note.poll == null);
},
@@ -369,7 +369,7 @@ root(isDark)
> .mk-url-preview
margin-top 8px
- > .media
+ > .files
> img
display block
max-width 100%
diff --git a/src/client/app/mobile/views/components/note.vue b/src/client/app/mobile/views/components/note.vue
index 258433cb3f..9bd4a83ecb 100644
--- a/src/client/app/mobile/views/components/note.vue
+++ b/src/client/app/mobile/views/components/note.vue
@@ -28,8 +28,8 @@
<misskey-flavored-markdown v-if="p.text" :text="p.text" :i="$store.state.i" :class="$style.text"/>
<a class="rp" v-if="p.renote != null">RP:</a>
</div>
- <div class="media" v-if="p.media.length > 0">
- <mk-media-list :media-list="p.media"/>
+ <div class="files" v-if="p.files.length > 0">
+ <mk-media-list :media-list="p.files"/>
</div>
<mk-poll v-if="p.poll" :note="p" ref="pollViewer"/>
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
@@ -90,7 +90,7 @@ export default Vue.extend({
isRenote(): boolean {
return (this.note.renote &&
this.note.text == null &&
- this.note.mediaIds.length == 0 &&
+ this.note.fileIds.length == 0 &&
this.note.poll == null);
},
@@ -414,7 +414,7 @@ root(isDark)
.mk-url-preview
margin-top 8px
- > .media
+ > .files
> img
display block
max-width 100%
diff --git a/src/client/app/mobile/views/components/notes.vue b/src/client/app/mobile/views/components/notes.vue
index 714e521c0f..ce2670dc52 100644
--- a/src/client/app/mobile/views/components/notes.vue
+++ b/src/client/app/mobile/views/components/notes.vue
@@ -125,7 +125,7 @@ export default Vue.extend({
prepend(note, silent = false) {
//#region 弾く
const isMyNote = note.userId == this.$store.state.i.id;
- const isPureRenote = note.renoteId != null && note.text == null && note.mediaIds.length == 0 && note.poll == null;
+ const isPureRenote = note.renoteId != null && note.text == null && note.fileIds.length == 0 && note.poll == null;
if (this.$store.state.settings.showMyRenotes === false) {
if (isMyNote && isPureRenote) {
diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue
index 8b1f7b08c8..644e27cce8 100644
--- a/src/client/app/mobile/views/components/post-form.vue
+++ b/src/client/app/mobile/views/components/post-form.vue
@@ -200,12 +200,12 @@ export default Vue.extend({
attachMedia(driveFile) {
this.files.push(driveFile);
- this.$emit('change-attached-media', this.files);
+ this.$emit('change-attached-files', this.files);
},
detachMedia(file) {
this.files = this.files.filter(x => x.id != file.id);
- this.$emit('change-attached-media', this.files);
+ this.$emit('change-attached-files', this.files);
},
onChangeFile() {
@@ -269,7 +269,7 @@ export default Vue.extend({
this.text = '';
this.files = [];
this.poll = false;
- this.$emit('change-attached-media');
+ this.$emit('change-attached-files');
},
post() {
@@ -277,7 +277,7 @@ export default Vue.extend({
const viaMobile = this.$store.state.settings.disableViaMobile !== true;
(this as any).api('notes/create', {
text: this.text == '' ? undefined : this.text,
- mediaIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
+ fileIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined,
replyId: this.reply ? this.reply.id : undefined,
renoteId: this.renote ? this.renote.id : undefined,
poll: this.poll ? (this.$refs.poll as any).get() : undefined,
diff --git a/src/client/app/mobile/views/components/sub-note-content.vue b/src/client/app/mobile/views/components/sub-note-content.vue
index a4ce49786e..4d0aa25f34 100644
--- a/src/client/app/mobile/views/components/sub-note-content.vue
+++ b/src/client/app/mobile/views/components/sub-note-content.vue
@@ -7,9 +7,9 @@
<misskey-flavored-markdown v-if="note.text" :text="note.text" :i="$store.state.i"/>
<a class="rp" v-if="note.renoteId">RP: ...</a>
</div>
- <details v-if="note.media.length > 0">
- <summary>({{ '%i18n:@media-count%'.replace('{}', note.media.length) }})</summary>
- <mk-media-list :media-list="note.media"/>
+ <details v-if="note.files.length > 0">
+ <summary>({{ '%i18n:@media-count%'.replace('{}', note.files.length) }})</summary>
+ <mk-media-list :media-list="note.files"/>
</details>
<details v-if="note.poll">
<summary>%i18n:@poll%</summary>
diff --git a/src/client/app/mobile/views/components/user-timeline.vue b/src/client/app/mobile/views/components/user-timeline.vue
index 6be675c0a7..7cd23d6655 100644
--- a/src/client/app/mobile/views/components/user-timeline.vue
+++ b/src/client/app/mobile/views/components/user-timeline.vue
@@ -41,7 +41,7 @@ export default Vue.extend({
(this.$refs.timeline as any).init(() => new Promise((res, rej) => {
(this as any).api('users/notes', {
userId: this.user.id,
- withMedia: this.withMedia,
+ withFiles: this.withMedia,
limit: fetchLimit + 1
}).then(notes => {
if (notes.length == fetchLimit + 1) {
@@ -62,7 +62,7 @@ export default Vue.extend({
const promise = (this as any).api('users/notes', {
userId: this.user.id,
- withMedia: this.withMedia,
+ withFiles: this.withMedia,
limit: fetchLimit + 1,
untilId: (this.$refs.timeline as any).tail().id
});
diff --git a/src/client/app/mobile/views/pages/user/home.photos.vue b/src/client/app/mobile/views/pages/user/home.photos.vue
index 73ff1d5173..e9025ec816 100644
--- a/src/client/app/mobile/views/pages/user/home.photos.vue
+++ b/src/client/app/mobile/views/pages/user/home.photos.vue
@@ -26,7 +26,7 @@ export default Vue.extend({
mounted() {
(this as any).api('users/notes', {
userId: this.user.id,
- withMedia: true,
+ withFiles: true,
limit: 6
}).then(notes => {
notes.forEach(note => {