diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-05-21 11:08:08 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-05-21 11:08:08 +0900 |
| commit | f8c414aafca8e91017cf01a65c21b57c88783076 (patch) | |
| tree | 1f1bd6e2ca22cdc37d2b5d253d5b6cdecc6bd41f /src/client | |
| parent | Update .eslintrc (diff) | |
| download | misskey-f8c414aafca8e91017cf01a65c21b57c88783076.tar.gz misskey-f8c414aafca8e91017cf01a65c21b57c88783076.tar.bz2 misskey-f8c414aafca8e91017cf01a65c21b57c88783076.zip | |
#1621
Diffstat (limited to 'src/client')
4 files changed, 25 insertions, 11 deletions
diff --git a/src/client/app/desktop/views/components/notes.note.vue b/src/client/app/desktop/views/components/notes.note.vue index f6eba49024..735fa39f4c 100644 --- a/src/client/app/desktop/views/components/notes.note.vue +++ b/src/client/app/desktop/views/components/notes.note.vue @@ -16,7 +16,8 @@ <div class="main"> <header> <router-link class="name" :to="p.user | userPage" v-user-preview="p.user.id">{{ p.user | userName }}</router-link> - <span class="is-bot" v-if="p.user.host === null && p.user.isBot">bot</span> + <span class="is-bot" v-if="p.user.isBot">bot</span> + <span class="is-cat" v-if="p.user.isCat">cat</span> <span class="username"><mk-acct :user="p.user"/></span> <div class="info"> <span class="app" v-if="p.app">via <b>{{ p.app.name }}</b></span> @@ -431,6 +432,7 @@ root(isDark) text-decoration underline > .is-bot + > .is-cat margin 0 .5em 0 0 padding 1px 6px font-size 12px diff --git a/src/client/app/desktop/views/components/settings.profile.vue b/src/client/app/desktop/views/components/settings.profile.vue index 84b09eb988..132ab12f1c 100644 --- a/src/client/app/desktop/views/components/settings.profile.vue +++ b/src/client/app/desktop/views/components/settings.profile.vue @@ -24,7 +24,8 @@ <button class="ui primary" @click="save">%i18n:@save%</button> <section> <h2>その他</h2> - <mk-switch v-model="os.i.isBot" @change="onChangeIsBot" text="このアカウントはbotです"/> + <mk-switch v-model="os.i.isBot" @change="onChangeIsBot" text="%i18n:@is-bot%"/> + <mk-switch v-model="os.i.isCat" @change="onChangeIsCat" text="%i18n:@is-cat%"/> </section> </div> </template> @@ -65,6 +66,11 @@ export default Vue.extend({ (this as any).api('i/update', { isBot: (this as any).os.i.isBot }); + }, + onChangeIsCat() { + (this as any).api('i/update', { + isCat: (this as any).os.i.isCat + }); } } }); diff --git a/src/client/app/mobile/views/components/note.vue b/src/client/app/mobile/views/components/note.vue index b940b6b20b..7a8457e56c 100644 --- a/src/client/app/mobile/views/components/note.vue +++ b/src/client/app/mobile/views/components/note.vue @@ -17,7 +17,8 @@ <header> <mk-avatar class="avatar" :user="p.user" v-if="$store.state.device.postStyle == 'smart'"/> <router-link class="name" :to="p.user | userPage">{{ p.user | userName }}</router-link> - <span class="is-bot" v-if="p.user.host === null && p.user.isBot">bot</span> + <span class="is-bot" v-if="p.user.isBot">bot</span> + <span class="is-cat" v-if="p.user.isCat">cat</span> <span class="username"><mk-acct :user="p.user"/></span> <div class="info"> <span class="mobile" v-if="p.viaMobile">%fa:mobile-alt%</span> @@ -386,6 +387,7 @@ root(isDark) text-decoration underline > .is-bot + > .is-cat margin 0 0.5em 0 0 padding 1px 6px font-size 12px diff --git a/src/client/app/mobile/views/pages/settings/settings.profile.vue b/src/client/app/mobile/views/pages/settings/settings.profile.vue index 260cccbae3..796beedf4f 100644 --- a/src/client/app/mobile/views/pages/settings/settings.profile.vue +++ b/src/client/app/mobile/views/pages/settings/settings.profile.vue @@ -50,7 +50,11 @@ md-content="%18n:!@uploading%"/> <div> - <md-switch v-model="os.i.isBot" @change="onChangeIsBot">%i18n:@is-bot%</md-switch> + <md-switch v-model="isBot">%i18n:@is-bot%</md-switch> + </div> + + <div> + <md-switch v-model="isCat">%i18n:@is-cat%</md-switch> </div> </md-card-content> @@ -75,6 +79,8 @@ export default Vue.extend({ birthday: null, avatarId: null, bannerId: null, + isBot: false, + isCat: false, saving: false, uploading: false }; @@ -88,15 +94,11 @@ export default Vue.extend({ this.birthday = (this as any).os.i.profile.birthday; this.avatarId = (this as any).os.i.avatarId; this.bannerId = (this as any).os.i.bannerId; + this.isBot = (this as any).os.i.isBot; + this.isCat = (this as any).os.i.isCat; }, methods: { - onChangeIsBot() { - (this as any).api('i/update', { - isBot: (this as any).os.i.isBot - }); - }, - onAvatarChange([file]) { this.uploading = true; @@ -150,7 +152,9 @@ export default Vue.extend({ description: this.description || null, birthday: this.birthday || null, avatarId: this.avatarId, - bannerId: this.bannerId + bannerId: this.bannerId, + isBot: this.isBot, + isCat: this.isCat }).then(i => { this.saving = false; (this as any).os.i.avatarId = i.avatarId; |