aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_card/user_card.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/user_card/user_card.vue')
-rw-r--r--src/components/user_card/user_card.vue126
1 files changed, 29 insertions, 97 deletions
diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue
index 5b6f66e7..6f3c958e 100644
--- a/src/components/user_card/user_card.vue
+++ b/src/components/user_card/user_card.vue
@@ -66,8 +66,11 @@
>
<i class="icon-link-ext usersettings" />
</a>
+ <AccountActions
+ v-if="isOtherUser && loggedIn"
+ :user="user"
+ />
</div>
-
<div class="bottom-line">
<router-link
class="user-screen-name"
@@ -81,7 +84,7 @@
>{{ visibleRole }}</span>
<span v-if="user.locked"><i class="icon icon-lock" /></span>
<span
- v-if="!hideUserStatsLocal && !hideBio"
+ v-if="!mergedConfig.hideUserStats && !hideBio"
class="dailyAvg"
>{{ dailyAvg }} {{ $t('user_card.per_day') }}</span>
</div>
@@ -135,72 +138,27 @@
v-if="loggedIn && isOtherUser"
class="user-interactions"
>
- <div v-if="!user.following">
- <button
- class="btn btn-default btn-block"
- :disabled="followRequestInProgress"
- :title="user.requested ? $t('user_card.follow_again') : ''"
- @click="followUser"
- >
- <template v-if="followRequestInProgress">
- {{ $t('user_card.follow_progress') }}
- </template>
- <template v-else-if="user.requested">
- {{ $t('user_card.follow_sent') }}
- </template>
- <template v-else>
- {{ $t('user_card.follow') }}
- </template>
- </button>
- </div>
- <div v-else-if="followRequestInProgress">
- <button
- class="btn btn-default btn-block pressed"
- disabled
- :title="$t('user_card.follow_unfollow')"
- @click="unfollowUser"
- >
- {{ $t('user_card.follow_progress') }}
- </button>
- </div>
- <div
- v-else
- class="btn-group"
- >
- <button
- class="btn btn-default pressed"
- :title="$t('user_card.follow_unfollow')"
- @click="unfollowUser"
- >
- {{ $t('user_card.following') }}
- </button>
- <ProgressButton
- v-if="!user.subscribed"
- class="btn btn-default"
- :click="subscribeUser"
- :title="$t('user_card.subscribe')"
- >
- <i class="icon-bell-alt" />
- </ProgressButton>
- <ProgressButton
- v-else
- class="btn btn-default pressed"
- :click="unsubscribeUser"
- :title="$t('user_card.unsubscribe')"
- >
- <i class="icon-bell-ringing-o" />
- </ProgressButton>
- </div>
-
- <div>
- <button
- class="btn btn-default btn-block"
- @click="mentionUser"
- >
- {{ $t('user_card.mention') }}
- </button>
+ <div class="btn-group">
+ <FollowButton :user="user" />
+ <template v-if="user.following">
+ <ProgressButton
+ v-if="!user.subscribed"
+ class="btn btn-default"
+ :click="subscribeUser"
+ :title="$t('user_card.subscribe')"
+ >
+ <i class="icon-bell-alt" />
+ </ProgressButton>
+ <ProgressButton
+ v-else
+ class="btn btn-default pressed"
+ :click="unsubscribeUser"
+ :title="$t('user_card.unsubscribe')"
+ >
+ <i class="icon-bell-ringing-o" />
+ </ProgressButton>
+ </template>
</div>
-
<div>
<button
v-if="user.muted"
@@ -217,33 +175,6 @@
{{ $t('user_card.mute') }}
</button>
</div>
-
- <div>
- <button
- v-if="user.statusnet_blocking"
- class="btn btn-default btn-block pressed"
- @click="unblockUser"
- >
- {{ $t('user_card.blocked') }}
- </button>
- <button
- v-else
- class="btn btn-default btn-block"
- @click="blockUser"
- >
- {{ $t('user_card.block') }}
- </button>
- </div>
-
- <div>
- <button
- class="btn btn-default btn-block"
- @click="reportUser"
- >
- {{ $t('user_card.report') }}
- </button>
- </div>
-
<ModerationTools
v-if="loggedIn.role === &quot;admin&quot;"
:user="user"
@@ -262,7 +193,7 @@
class="panel-body"
>
<div
- v-if="!hideUserStatsLocal && switcher"
+ v-if="!mergedConfig.hideUserStats && switcher"
class="user-counts"
>
<div
@@ -345,6 +276,8 @@
mask-composite: exclude;
background-size: cover;
mask-size: 100% 60%;
+ border-top-left-radius: calc(var(--panelRadius) - 1px);
+ border-top-right-radius: calc(var(--panelRadius) - 1px);
&.hide-bio {
mask-size: 100% 40px;
@@ -587,13 +520,12 @@
position: relative;
display: flex;
flex-flow: row wrap;
- justify-content: space-between;
margin-right: -.75em;
> * {
- flex: 1 0 0;
margin: 0 .75em .6em 0;
white-space: nowrap;
+ min-width: 95px;
}
button {