Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85629879
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index 59cee73457..ee4384fa23 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -1,89 +1,92 @@
<template>
<div>
<div class="base00-background panel-heading text-center" v-bind:style="style">
<div class='user-info'>
<img :src="user.profile_image_url">
<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="user-interactions">
- <div v-if="user.follows_you" class="following base06">
+ <div v-if="user.follows_you && loggedIn" class="following base06">
Follows you!
</div>
- <div class="follow">
+ <div class="follow" v-if="loggedIn">
<span v-if="user.following">
<!--Following them!-->
- <button @click="unfollowUser" class="base06 base01-background base06-border">
+ <button @click="unfollowUser" class="base06 base01-background">
Unfollow
</button>
</span>
<span v-if="!user.following">
- <button @click="followUser" class="base01 base04-background base01-border">
+ <button @click="followUser" class="base01 base04-background">
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>
<div class="panel-body base00-background">
<div class="user-counts">
<div class="user-count">
<h5>Statuses</h5>
<span>{{user.statuses_count}}</span>
</div>
<div class="user-count">
<h5>Following</h5>
<span>{{user.friends_count}}</span>
</div>
<div class="user-count">
<h5>Followers</h5>
<span>{{user.followers_count}}</span>
</div>
</div>
<p>{{user.description}}</p>
</div>
</div>
</template>
<script>
export default {
props: [ 'user' ],
computed: {
style () {
return {
color: `#${this.user.profile_link_color}`,
'background-image': `url(${this.user.cover_photo})`
}
},
isOtherUser () {
return this.user !== this.$store.state.users.currentUser
+ },
+ loggedIn () {
+ return this.$store.state.users.currentUser
}
},
methods: {
followUser () {
const store = this.$store
store.state.api.backendInteractor.followUser(this.user.id)
.then((followedUser) => store.commit('addNewUsers', [followedUser]))
},
unfollowUser () {
const store = this.$store
store.state.api.backendInteractor.unfollowUser(this.user.id)
.then((unfollowedUser) => store.commit('addNewUsers', [unfollowedUser]))
},
toggleMute () {
const store = this.$store
store.commit('setMuted', {user: this.user, muted: !this.user.muted})
store.state.api.backendInteractor.setUserMute(this.user)
}
}
}
</script>
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Aug 9, 6:58 AM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1724306
Default Alt Text
(3 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline
Log In to Comment