2018-03-09 07:21:25 +01:00
|
|
|
<template>
|
2018-03-21 03:32:37 +01:00
|
|
|
<div class="follow" tabIndex="0">
|
2018-03-12 15:06:27 +01:00
|
|
|
<div class="action">
|
|
|
|
<div class="action-mark">
|
|
|
|
<icon name="user-plus" scale="0.7"></icon>
|
|
|
|
</div>
|
|
|
|
<div class="action-detail">
|
2018-03-30 10:47:45 +02:00
|
|
|
<span class="bold" @click="openUser(message.account)">{{ username(message.account) }}</span> is now following you
|
2018-03-12 15:06:27 +01:00
|
|
|
</div>
|
|
|
|
<div class="action-icon">
|
|
|
|
<img :src="message.account.avatar" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
<div class="fill-line"></div>
|
2018-03-09 07:21:25 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2018-03-12 14:35:31 +01:00
|
|
|
name: 'follow',
|
2018-03-26 12:49:35 +02:00
|
|
|
props: ['message'],
|
|
|
|
methods: {
|
|
|
|
username (account) {
|
|
|
|
if (account.display_name !== '') {
|
|
|
|
return account.display_name
|
|
|
|
} else {
|
|
|
|
return account.username
|
|
|
|
}
|
2018-03-30 10:47:45 +02:00
|
|
|
},
|
|
|
|
openUser (account) {
|
|
|
|
this.$store.dispatch('TimelineSpace/Contents/SideBar/openAccountComponent')
|
|
|
|
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/changeAccount', account)
|
|
|
|
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', true)
|
2018-03-26 12:49:35 +02:00
|
|
|
}
|
|
|
|
}
|
2018-03-09 07:21:25 +01:00
|
|
|
}
|
|
|
|
</script>
|
2018-03-12 15:06:27 +01:00
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.fill-line {
|
|
|
|
height: 1px;
|
|
|
|
background-color: #f2f6fc;
|
2018-03-21 03:32:37 +01:00
|
|
|
margin: 4px 0 0;
|
2018-03-12 15:06:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.bold {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
|
|
|
.follow {
|
2018-03-21 03:32:37 +01:00
|
|
|
padding: 8px 0 0 16px;
|
2018-03-23 05:34:52 +01:00
|
|
|
background-color: #ffffff;
|
2018-03-12 15:06:27 +01:00
|
|
|
|
|
|
|
.action {
|
|
|
|
margin-right: 8px;
|
|
|
|
|
|
|
|
.action-mark {
|
|
|
|
color: #409eff;
|
|
|
|
float: left;
|
|
|
|
width: 32px;
|
|
|
|
text-align: right;
|
|
|
|
}
|
|
|
|
|
|
|
|
.action-detail {
|
|
|
|
margin-left: 10px;
|
|
|
|
font-size: 14px;
|
|
|
|
float: left;
|
2018-03-30 10:47:45 +02:00
|
|
|
|
|
|
|
.bold {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2018-03-12 15:06:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.action-icon {
|
|
|
|
width: 100%;
|
|
|
|
text-align: right;
|
|
|
|
|
|
|
|
img {
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
border-radius: 2px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-03-21 03:32:37 +01:00
|
|
|
|
|
|
|
.follow:focus {
|
|
|
|
outline: 0;
|
|
|
|
background-color: #f2f6fc;
|
|
|
|
}
|
2018-03-12 15:06:27 +01:00
|
|
|
</style>
|