Changed following-info to user-interactions and moved muting there, made everything in user-interactions look a bit neater

This commit is contained in:
shpuld 2017-02-18 15:48:27 +02:00
parent 4e366f27a1
commit e86b1d71ee
2 changed files with 39 additions and 17 deletions

View file

@ -3,30 +3,34 @@
<div class="base00-background panel-heading text-center" v-bind:style="style">
<div class='user-info'>
<img :src="user.profile_image_url">
<div v-if='user.muted' class='muteinfo'>Muted</div>
<div class='muteinfo' v-if='isOtherUser'>
<button @click="toggleMute">Mute/Unmute</button>
</div>
<span class="glyphicon glyphicon-user"></span>
<div class='user-name'>{{user.name}}</div>
<div class='user-screen-name'>@{{user.screen_name}}</div>
<div v-if="isOtherUser" class="following-info">
<div v-if="user.follows_you" class="following">
<div v-if="isOtherUser" class="user-interactions">
<div v-if="user.follows_you" class="following base06">
Follows you!
</div>
<div class="followed">
<div class="follow">
<span v-if="user.following">
Following them!
<button @click="unfollowUser">
Unfollow!
<!--Following them!-->
<button @click="unfollowUser" class="base06 base01-background base06-border">
Unfollow
</button>
</span>
<span v-if="!user.following" >
<button @click="followUser">
Follow!
<span v-if="!user.following">
<button @click="followUser" class="base01 base04-background base01-border">
Follow
</button>
</span>
</div>
<div class='mute' v-if='isOtherUser'>
<span v-if='user.muted'>
<button @click="toggleMute" class="base04 base01-background base06-border">Unmute</button>
</span>
<span v-if='!user.muted'>
<button @click="toggleMute" class="base01 base04-background base01-border">Mute</button>
</span>
</div>
</div>
</div>
</div>

View file

@ -13,20 +13,38 @@
}
.user-info {
.following-info {
.user-interactions {
display: flex;
flex-flow: row wrap;
div {
flex: 1;
}
margin-top: 1em;
margin-top: 0.5em;
margin-bottom: -1.2em;
.following {
font-size: 14px;
flex: 0 0 100%;
margin-bottom: 0.5em;
}
.muteinfo{
margin: 0.5em 0;
}
.mute {
margin-right: 4em;
}
.follow {
margin-left: 4em;
}
.user-screen-name {
margin-top: 0.4em;
}
button {
width: 80%;
height: 100%;
border: 1px solid;
}
}
</style>