diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-04-08 02:30:37 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-04-08 02:30:37 +0900 |
| commit | a1b490afa756a71b9cef4afa424575bc223bc612 (patch) | |
| tree | 06de4d839e17b1e08e0891542af7360c701a154a /src/client/app/common/views/components | |
| parent | Merge pull request #1392 from syuilo/greenkeeper/element-ui-2.3.3 (diff) | |
| download | misskey-a1b490afa756a71b9cef4afa424575bc223bc612.tar.gz misskey-a1b490afa756a71b9cef4afa424575bc223bc612.tar.bz2 misskey-a1b490afa756a71b9cef4afa424575bc223bc612.zip | |
Post --> Note
Closes #1411
Diffstat (limited to 'src/client/app/common/views/components')
| -rw-r--r-- | src/client/app/common/views/components/index.ts | 4 | ||||
| -rw-r--r-- | src/client/app/common/views/components/messaging-room.message.vue | 2 | ||||
| -rw-r--r-- | src/client/app/common/views/components/note-html.ts (renamed from src/client/app/common/views/components/post-html.ts) | 2 | ||||
| -rw-r--r-- | src/client/app/common/views/components/note-menu.vue (renamed from src/client/app/common/views/components/post-menu.vue) | 10 | ||||
| -rw-r--r-- | src/client/app/common/views/components/poll.vue | 8 | ||||
| -rw-r--r-- | src/client/app/common/views/components/reaction-picker.vue | 6 | ||||
| -rw-r--r-- | src/client/app/common/views/components/reactions-viewer.vue | 4 | ||||
| -rw-r--r-- | src/client/app/common/views/components/welcome-timeline.vue | 26 |
8 files changed, 31 insertions, 31 deletions
diff --git a/src/client/app/common/views/components/index.ts b/src/client/app/common/views/components/index.ts index b58ba37ecb..6bfe43a800 100644 --- a/src/client/app/common/views/components/index.ts +++ b/src/client/app/common/views/components/index.ts @@ -4,7 +4,7 @@ import signin from './signin.vue'; import signup from './signup.vue'; import forkit from './forkit.vue'; import nav from './nav.vue'; -import postHtml from './post-html'; +import noteHtml from './note-html'; import poll from './poll.vue'; import pollEditor from './poll-editor.vue'; import reactionIcon from './reaction-icon.vue'; @@ -29,7 +29,7 @@ Vue.component('mk-signin', signin); Vue.component('mk-signup', signup); Vue.component('mk-forkit', forkit); Vue.component('mk-nav', nav); -Vue.component('mk-post-html', postHtml); +Vue.component('mk-note-html', noteHtml); Vue.component('mk-poll', poll); Vue.component('mk-poll-editor', pollEditor); Vue.component('mk-reaction-icon', reactionIcon); diff --git a/src/client/app/common/views/components/messaging-room.message.vue b/src/client/app/common/views/components/messaging-room.message.vue index 1518602c63..7200b59bb2 100644 --- a/src/client/app/common/views/components/messaging-room.message.vue +++ b/src/client/app/common/views/components/messaging-room.message.vue @@ -10,7 +10,7 @@ <img src="/assets/desktop/messaging/delete.png" alt="Delete"/> </button> <div class="content" v-if="!message.isDeleted"> - <mk-post-html class="text" v-if="message.text" ref="text" :text="message.text" :i="os.i"/> + <mk-note-html class="text" v-if="message.text" ref="text" :text="message.text" :i="os.i"/> <div class="file" v-if="message.file"> <a :href="message.file.url" target="_blank" :title="message.file.name"> <img v-if="message.file.type.split('/')[0] == 'image'" :src="message.file.url" :alt="message.file.name"/> diff --git a/src/client/app/common/views/components/post-html.ts b/src/client/app/common/views/components/note-html.ts index 8d85316523..24e750a671 100644 --- a/src/client/app/common/views/components/post-html.ts +++ b/src/client/app/common/views/components/note-html.ts @@ -9,7 +9,7 @@ const flatten = list => list.reduce( (a, b) => a.concat(Array.isArray(b) ? flatten(b) : b), [] ); -export default Vue.component('mk-post-html', { +export default Vue.component('mk-note-html', { props: { text: { type: String, diff --git a/src/client/app/common/views/components/post-menu.vue b/src/client/app/common/views/components/note-menu.vue index 35116db7e2..d053748728 100644 --- a/src/client/app/common/views/components/post-menu.vue +++ b/src/client/app/common/views/components/note-menu.vue @@ -1,8 +1,8 @@ <template> -<div class="mk-post-menu"> +<div class="mk-note-menu"> <div class="backdrop" ref="backdrop" @click="close"></div> <div class="popover" :class="{ compact }" ref="popover"> - <button v-if="post.userId == os.i.id" @click="pin">%i18n:common.tags.mk-post-menu.pin%</button> + <button v-if="note.userId == os.i.id" @click="pin">%i18n:common.tags.mk-note-menu.pin%</button> </div> </div> </template> @@ -12,7 +12,7 @@ import Vue from 'vue'; import * as anime from 'animejs'; export default Vue.extend({ - props: ['post', 'source', 'compact'], + props: ['note', 'source', 'compact'], mounted() { this.$nextTick(() => { const popover = this.$refs.popover as any; @@ -51,7 +51,7 @@ export default Vue.extend({ methods: { pin() { (this as any).api('i/pin', { - postId: this.post.id + noteId: this.note.id }).then(() => { this.$destroy(); }); @@ -83,7 +83,7 @@ export default Vue.extend({ <style lang="stylus" scoped> $border-color = rgba(27, 31, 35, 0.15) -.mk-post-menu +.mk-note-menu position initial > .backdrop diff --git a/src/client/app/common/views/components/poll.vue b/src/client/app/common/views/components/poll.vue index 711d89720e..eb29aa8837 100644 --- a/src/client/app/common/views/components/poll.vue +++ b/src/client/app/common/views/components/poll.vue @@ -22,7 +22,7 @@ <script lang="ts"> import Vue from 'vue'; export default Vue.extend({ - props: ['post'], + props: ['note'], data() { return { showResult: false @@ -30,7 +30,7 @@ export default Vue.extend({ }, computed: { poll(): any { - return this.post.poll; + return this.note.poll; }, total(): number { return this.poll.choices.reduce((a, b) => a + b.votes, 0); @@ -48,8 +48,8 @@ export default Vue.extend({ }, vote(id) { if (this.poll.choices.some(c => c.isVoted)) return; - (this as any).api('posts/polls/vote', { - postId: this.post.id, + (this as any).api('notes/polls/vote', { + noteId: this.note.id, choice: id }).then(() => { this.poll.choices.forEach(c => { diff --git a/src/client/app/common/views/components/reaction-picker.vue b/src/client/app/common/views/components/reaction-picker.vue index bcb6b2b965..fa1998dca9 100644 --- a/src/client/app/common/views/components/reaction-picker.vue +++ b/src/client/app/common/views/components/reaction-picker.vue @@ -25,7 +25,7 @@ import * as anime from 'animejs'; const placeholder = '%i18n:common.tags.mk-reaction-picker.choose-reaction%'; export default Vue.extend({ - props: ['post', 'source', 'compact', 'cb'], + props: ['note', 'source', 'compact', 'cb'], data() { return { title: placeholder @@ -68,8 +68,8 @@ export default Vue.extend({ }, methods: { react(reaction) { - (this as any).api('posts/reactions/create', { - postId: this.post.id, + (this as any).api('notes/reactions/create', { + noteId: this.note.id, reaction: reaction }).then(() => { if (this.cb) this.cb(); diff --git a/src/client/app/common/views/components/reactions-viewer.vue b/src/client/app/common/views/components/reactions-viewer.vue index 246451008f..1afcf525d2 100644 --- a/src/client/app/common/views/components/reactions-viewer.vue +++ b/src/client/app/common/views/components/reactions-viewer.vue @@ -17,10 +17,10 @@ <script lang="ts"> import Vue from 'vue'; export default Vue.extend({ - props: ['post'], + props: ['note'], computed: { reactions(): number { - return this.post.reactionCounts; + return this.note.reactionCounts; } } }); diff --git a/src/client/app/common/views/components/welcome-timeline.vue b/src/client/app/common/views/components/welcome-timeline.vue index bfb4b2bbe0..61616da14c 100644 --- a/src/client/app/common/views/components/welcome-timeline.vue +++ b/src/client/app/common/views/components/welcome-timeline.vue @@ -1,21 +1,21 @@ <template> <div class="mk-welcome-timeline"> - <div v-for="post in posts"> - <router-link class="avatar-anchor" :to="`/@${getAcct(post.user)}`" v-user-preview="post.user.id"> - <img class="avatar" :src="`${post.user.avatarUrl}?thumbnail&size=96`" alt="avatar"/> + <div v-for="note in notes"> + <router-link class="avatar-anchor" :to="`/@${getAcct(note.user)}`" v-user-preview="note.user.id"> + <img class="avatar" :src="`${note.user.avatarUrl}?thumbnail&size=96`" alt="avatar"/> </router-link> <div class="body"> <header> - <router-link class="name" :to="`/@${getAcct(post.user)}`" v-user-preview="post.user.id">{{ getUserName(post.user) }}</router-link> - <span class="username">@{{ getAcct(post.user) }}</span> + <router-link class="name" :to="`/@${getAcct(note.user)}`" v-user-preview="note.user.id">{{ getUserName(note.user) }}</router-link> + <span class="username">@{{ getAcct(note.user) }}</span> <div class="info"> - <router-link class="created-at" :to="`/@${getAcct(post.user)}/${post.id}`"> - <mk-time :time="post.createdAt"/> + <router-link class="created-at" :to="`/@${getAcct(note.user)}/${note.id}`"> + <mk-time :time="note.createdAt"/> </router-link> </div> </header> <div class="text"> - <mk-post-html :text="post.text"/> + <mk-note-html :text="note.text"/> </div> </div> </div> @@ -31,7 +31,7 @@ export default Vue.extend({ data() { return { fetching: true, - posts: [] + notes: [] }; }, mounted() { @@ -42,14 +42,14 @@ export default Vue.extend({ getUserName, fetch(cb?) { this.fetching = true; - (this as any).api('posts', { + (this as any).api('notes', { reply: false, - repost: false, + renote: false, media: false, poll: false, bot: false - }).then(posts => { - this.posts = posts; + }).then(notes => { + this.notes = notes; this.fetching = false; }); } |