Drop stalk feature

Resolve #3935
Closes #2226
Closes #1946
This commit is contained in:
syuilo
2019-01-20 12:25:00 +09:00
parent d53d059480
commit 6909add1ec
12 changed files with 11 additions and 157 deletions

View File

@@ -3,10 +3,6 @@
<div class="friend-form" v-if="$store.state.i.id != user.id">
<mk-follow-button :user="user" block/>
<p class="followed" v-if="user.isFollowed">{{ $t('follows-you') }}</p>
<p class="stalk" v-if="user.isFollowing">
<span v-if="user.isStalking">{{ $t('stalking') }} <a @click="unstalk"><fa icon="meh"/> {{ $t('unstalk') }}</a></span>
<span v-if="!user.isStalking"><a @click="stalk"><fa icon="user-secret"/> {{ $t('stalk') }}</a></span>
</p>
</div>
<div class="action-form">
<ui-button @click="menu" ref="menu">{{ $t('menu') }}</ui-button>
@@ -24,26 +20,6 @@ export default Vue.extend({
props: ['user'],
methods: {
stalk() {
this.$root.api('following/stalk', {
userId: this.user.id
}).then(() => {
this.user.isStalking = true;
}, () => {
alert('error');
});
},
unstalk() {
this.$root.api('following/unstalk', {
userId: this.user.id
}).then(() => {
this.user.isStalking = false;
}, () => {
alert('error');
});
},
menu() {
this.$root.new(XUserMenu, {
source: this.$refs.menu.$el,
@@ -78,9 +54,6 @@ export default Vue.extend({
background #eefaff
border-radius 4px
> .stalk
margin 12px 0 0 0
> .action-form
padding 16px
text-align center