2016-11-30 22:27:19 +01:00
|
|
|
<template>
|
2019-07-10 20:59:10 -04:00
|
|
|
<div
|
|
|
|
|
class="user-card"
|
|
|
|
|
:class="classes"
|
|
|
|
|
>
|
2019-09-25 20:23:55 +03:00
|
|
|
<div
|
|
|
|
|
:class="{ 'hide-bio': hideBio }"
|
|
|
|
|
:style="style"
|
|
|
|
|
class="background-image"
|
|
|
|
|
/>
|
2022-06-16 17:06:16 +03:00
|
|
|
<div :class="onClose ? '' : panel-heading -flexible-height">
|
2019-07-10 20:59:10 -04:00
|
|
|
<div class="user-info">
|
|
|
|
|
<div class="container">
|
2019-07-22 16:58:20 -04:00
|
|
|
<a
|
2022-07-19 19:33:48 +03:00
|
|
|
v-if="avatarAction === 'zoom'"
|
|
|
|
|
class="user-info-avatar -link"
|
2019-07-25 15:14:44 -04:00
|
|
|
@click="zoomAvatar"
|
2019-07-22 16:58:20 -04:00
|
|
|
>
|
|
|
|
|
<UserAvatar
|
|
|
|
|
:better-shadow="betterShadow"
|
|
|
|
|
:user="user"
|
|
|
|
|
/>
|
2022-07-19 19:33:48 +03:00
|
|
|
<div class="user-info-avatar -link -overlay">
|
2020-10-21 00:31:16 +03:00
|
|
|
<FAIcon
|
2020-10-28 21:31:16 +02:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-21 00:31:16 +03:00
|
|
|
icon="search-plus"
|
|
|
|
|
/>
|
2019-07-25 15:49:02 -04:00
|
|
|
</div>
|
2019-07-22 16:58:20 -04:00
|
|
|
</a>
|
2022-07-19 19:33:48 +03:00
|
|
|
<UserAvatar
|
|
|
|
|
v-else-if="typeof avatarAction === 'function'"
|
|
|
|
|
class="user-info-avatar"
|
|
|
|
|
:better-shadow="betterShadow"
|
|
|
|
|
:user="user"
|
2022-07-31 12:35:48 +03:00
|
|
|
@click="avatarAction"
|
2022-07-19 19:33:48 +03:00
|
|
|
/>
|
2019-07-22 16:58:20 -04:00
|
|
|
<router-link
|
|
|
|
|
v-else
|
|
|
|
|
:to="userProfileLink(user)"
|
|
|
|
|
>
|
2019-07-10 20:59:10 -04:00
|
|
|
<UserAvatar
|
|
|
|
|
:better-shadow="betterShadow"
|
|
|
|
|
:user="user"
|
|
|
|
|
/>
|
|
|
|
|
</router-link>
|
|
|
|
|
<div class="user-summary">
|
|
|
|
|
<div class="top-line">
|
2022-06-16 17:06:16 +03:00
|
|
|
<router-link
|
|
|
|
|
:to="userProfileLink(user)"
|
2019-07-10 20:59:10 -04:00
|
|
|
class="user-name"
|
2022-06-16 17:06:16 +03:00
|
|
|
>
|
|
|
|
|
<RichContent
|
|
|
|
|
:title="user.name"
|
|
|
|
|
:html="user.name"
|
|
|
|
|
:emoji="user.emoji"
|
|
|
|
|
/>
|
|
|
|
|
</router-link>
|
2021-04-07 22:42:34 +03:00
|
|
|
<button
|
2021-06-17 19:29:58 +00:00
|
|
|
v-if="!isOtherUser && user.is_local"
|
|
|
|
|
class="button-unstyled edit-profile-button"
|
|
|
|
|
@click.stop="openProfileTab"
|
|
|
|
|
>
|
|
|
|
|
<FAIcon
|
|
|
|
|
fixed-width
|
|
|
|
|
class="icon"
|
|
|
|
|
icon="edit"
|
|
|
|
|
:title="$t('user_card.edit_profile')"
|
|
|
|
|
/>
|
|
|
|
|
</button>
|
2021-08-16 01:41:52 +03:00
|
|
|
<a
|
2019-07-10 20:59:10 -04:00
|
|
|
v-if="isOtherUser && !user.is_local"
|
|
|
|
|
:href="user.statusnet_profile_url"
|
|
|
|
|
target="_blank"
|
2021-04-07 22:42:34 +03:00
|
|
|
class="button-unstyled external-link-button"
|
2019-07-10 20:59:10 -04:00
|
|
|
>
|
2020-10-21 00:31:16 +03:00
|
|
|
<FAIcon
|
|
|
|
|
class="icon"
|
|
|
|
|
icon="external-link-alt"
|
|
|
|
|
/>
|
2022-03-16 22:02:44 +02:00
|
|
|
</a>
|
2019-10-11 16:52:26 +03:00
|
|
|
<AccountActions
|
|
|
|
|
v-if="isOtherUser && loggedIn"
|
|
|
|
|
:user="user"
|
2020-04-21 23:27:51 +03:00
|
|
|
:relationship="relationship"
|
2019-10-11 16:52:26 +03:00
|
|
|
/>
|
2022-06-16 17:06:16 +03:00
|
|
|
<router-link
|
|
|
|
|
v-if="onClose"
|
|
|
|
|
:to="userProfileLink(user)"
|
|
|
|
|
class="button-unstyled external-link-button"
|
|
|
|
|
@click="onClose"
|
|
|
|
|
>
|
|
|
|
|
<FAIcon
|
|
|
|
|
class="icon"
|
|
|
|
|
icon="expand-alt"
|
|
|
|
|
/>
|
|
|
|
|
</router-link>
|
|
|
|
|
<button
|
|
|
|
|
v-if="onClose"
|
|
|
|
|
class="button-unstyled external-link-button"
|
|
|
|
|
@click="onClose"
|
|
|
|
|
>
|
|
|
|
|
<FAIcon
|
|
|
|
|
class="icon"
|
|
|
|
|
icon="times"
|
|
|
|
|
/>
|
|
|
|
|
</button>
|
2019-07-10 20:59:10 -04:00
|
|
|
</div>
|
|
|
|
|
<div class="bottom-line">
|
2022-08-29 18:46:41 -04:00
|
|
|
<user-link
|
2019-07-10 20:59:10 -04:00
|
|
|
class="user-screen-name"
|
2022-08-29 18:46:41 -04:00
|
|
|
:user="user"
|
|
|
|
|
/>
|
2020-06-21 15:02:44 +02:00
|
|
|
<template v-if="!hideBio">
|
2022-01-19 13:09:48 +00:00
|
|
|
<span
|
|
|
|
|
v-if="user.deactivated"
|
|
|
|
|
class="alert user-role"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('user_card.deactivated') }}
|
|
|
|
|
</span>
|
2020-06-21 15:02:44 +02:00
|
|
|
<span
|
|
|
|
|
v-if="!!visibleRole"
|
2020-06-21 15:36:20 +02:00
|
|
|
class="alert user-role"
|
2020-06-21 15:02:44 +02:00
|
|
|
>
|
2021-02-13 16:34:43 +03:00
|
|
|
{{ $t(`general.role.${visibleRole}`) }}
|
2020-06-21 15:02:44 +02:00
|
|
|
</span>
|
|
|
|
|
<span
|
|
|
|
|
v-if="user.bot"
|
2020-06-21 15:36:20 +02:00
|
|
|
class="alert user-role"
|
2020-06-21 15:02:44 +02:00
|
|
|
>
|
2021-02-12 12:01:16 +03:00
|
|
|
{{ $t('user_card.bot') }}
|
2020-06-21 15:02:44 +02:00
|
|
|
</span>
|
|
|
|
|
</template>
|
2020-10-19 22:35:46 +03:00
|
|
|
<span v-if="user.locked">
|
2020-10-21 00:31:16 +03:00
|
|
|
<FAIcon
|
|
|
|
|
class="lock-icon"
|
|
|
|
|
icon="lock"
|
|
|
|
|
size="sm"
|
|
|
|
|
/>
|
2020-10-19 22:35:46 +03:00
|
|
|
</span>
|
2019-07-10 20:59:10 -04:00
|
|
|
<span
|
2019-09-29 22:33:15 +03:00
|
|
|
v-if="!mergedConfig.hideUserStats && !hideBio"
|
2019-07-10 20:59:10 -04:00
|
|
|
class="dailyAvg"
|
|
|
|
|
>{{ dailyAvg }} {{ $t('user_card.per_day') }}</span>
|
|
|
|
|
</div>
|
2019-05-15 22:01:04 -04:00
|
|
|
</div>
|
2018-06-19 17:14:33 +03:00
|
|
|
</div>
|
2019-07-10 20:59:10 -04:00
|
|
|
<div class="user-meta">
|
|
|
|
|
<div
|
2020-04-21 23:27:51 +03:00
|
|
|
v-if="relationship.followed_by && loggedIn && isOtherUser"
|
2019-07-10 20:59:10 -04:00
|
|
|
class="following"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('user_card.follows_you') }}
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
v-if="isOtherUser && (loggedIn || !switcher)"
|
|
|
|
|
class="highlighter"
|
|
|
|
|
>
|
|
|
|
|
<!-- id's need to be unique, otherwise vue confuses which user-card checkbox belongs to -->
|
|
|
|
|
<input
|
|
|
|
|
v-if="userHighlightType !== 'disabled'"
|
|
|
|
|
:id="'userHighlightColorTx'+user.id"
|
|
|
|
|
v-model="userHighlightColor"
|
|
|
|
|
class="userHighlightText"
|
|
|
|
|
type="text"
|
|
|
|
|
>
|
|
|
|
|
<input
|
|
|
|
|
v-if="userHighlightType !== 'disabled'"
|
|
|
|
|
:id="'userHighlightColor'+user.id"
|
|
|
|
|
v-model="userHighlightColor"
|
|
|
|
|
class="userHighlightCl"
|
|
|
|
|
type="color"
|
|
|
|
|
>
|
2022-03-23 16:15:05 +02:00
|
|
|
{{ ' ' }}
|
2021-03-11 16:11:44 +02:00
|
|
|
<Select
|
|
|
|
|
:id="'userHighlightSel'+user.id"
|
|
|
|
|
v-model="userHighlightType"
|
|
|
|
|
class="userHighlightSel"
|
2019-07-10 20:59:10 -04:00
|
|
|
>
|
2021-05-31 14:02:36 +03:00
|
|
|
<option value="disabled">
|
|
|
|
|
{{ $t('user_card.highlight.disabled') }}
|
|
|
|
|
</option>
|
|
|
|
|
<option value="solid">
|
|
|
|
|
{{ $t('user_card.highlight.solid') }}
|
|
|
|
|
</option>
|
|
|
|
|
<option value="striped">
|
|
|
|
|
{{ $t('user_card.highlight.striped') }}
|
|
|
|
|
</option>
|
|
|
|
|
<option value="side">
|
|
|
|
|
{{ $t('user_card.highlight.side') }}
|
|
|
|
|
</option>
|
2021-03-11 16:11:44 +02:00
|
|
|
</Select>
|
2019-07-10 20:59:10 -04:00
|
|
|
</div>
|
2018-06-18 11:36:58 +03:00
|
|
|
</div>
|
2019-07-10 20:59:10 -04:00
|
|
|
<div
|
|
|
|
|
v-if="loggedIn && isOtherUser"
|
|
|
|
|
class="user-interactions"
|
|
|
|
|
>
|
2019-10-08 10:21:48 +03:00
|
|
|
<div class="btn-group">
|
2022-01-19 13:09:48 +00:00
|
|
|
<FollowButton
|
|
|
|
|
:relationship="relationship"
|
|
|
|
|
:user="user"
|
|
|
|
|
/>
|
2020-04-21 23:27:51 +03:00
|
|
|
<template v-if="relationship.following">
|
2019-10-08 10:21:48 +03:00
|
|
|
<ProgressButton
|
2020-04-21 23:27:51 +03:00
|
|
|
v-if="!relationship.subscribing"
|
2020-11-24 12:32:42 +02:00
|
|
|
class="btn button-default"
|
2019-10-08 10:21:48 +03:00
|
|
|
:click="subscribeUser"
|
|
|
|
|
:title="$t('user_card.subscribe')"
|
|
|
|
|
>
|
2020-10-19 22:35:46 +03:00
|
|
|
<FAIcon icon="bell" />
|
2019-10-08 10:21:48 +03:00
|
|
|
</ProgressButton>
|
|
|
|
|
<ProgressButton
|
|
|
|
|
v-else
|
2020-11-24 12:32:42 +02:00
|
|
|
class="btn button-default toggled"
|
2019-10-08 10:21:48 +03:00
|
|
|
:click="unsubscribeUser"
|
|
|
|
|
:title="$t('user_card.unsubscribe')"
|
|
|
|
|
>
|
2020-10-19 22:35:46 +03:00
|
|
|
<FALayers>
|
2020-10-21 00:31:16 +03:00
|
|
|
<FAIcon
|
|
|
|
|
icon="rss"
|
|
|
|
|
transform="left-5 shrink-6 up-3 rotate-20"
|
|
|
|
|
flip="horizontal"
|
|
|
|
|
/>
|
|
|
|
|
<FAIcon
|
|
|
|
|
icon="rss"
|
|
|
|
|
transform="right-5 shrink-6 up-3 rotate-20"
|
|
|
|
|
/>
|
2020-10-19 22:35:46 +03:00
|
|
|
<FAIcon icon="bell" />
|
|
|
|
|
</FALayers>
|
2019-10-08 10:21:48 +03:00
|
|
|
</ProgressButton>
|
|
|
|
|
</template>
|
2019-09-17 15:59:17 -04:00
|
|
|
</div>
|
2019-07-10 20:59:10 -04:00
|
|
|
<div>
|
|
|
|
|
<button
|
2020-04-21 23:27:51 +03:00
|
|
|
v-if="relationship.muting"
|
2020-11-24 12:32:42 +02:00
|
|
|
class="btn button-default btn-block toggled"
|
2022-01-19 13:09:48 +00:00
|
|
|
:disabled="user.deactivated"
|
2019-07-10 20:59:10 -04:00
|
|
|
@click="unmuteUser"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('user_card.muted') }}
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
v-else
|
2020-11-24 12:32:42 +02:00
|
|
|
class="btn button-default btn-block"
|
2022-01-19 13:09:48 +00:00
|
|
|
:disabled="user.deactivated"
|
2019-07-10 20:59:10 -04:00
|
|
|
@click="muteUser"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('user_card.mute') }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
2019-11-26 19:57:27 -05:00
|
|
|
<div>
|
|
|
|
|
<button
|
2020-11-24 12:32:42 +02:00
|
|
|
class="btn button-default btn-block"
|
2022-01-19 13:09:48 +00:00
|
|
|
:disabled="user.deactivated"
|
2019-11-26 19:57:27 -05:00
|
|
|
@click="mentionUser"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('user_card.mention') }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
2019-07-10 20:59:10 -04:00
|
|
|
<ModerationTools
|
|
|
|
|
v-if="loggedIn.role === "admin""
|
|
|
|
|
:user="user"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
v-if="!loggedIn && user.is_local"
|
|
|
|
|
class="user-interactions"
|
|
|
|
|
>
|
|
|
|
|
<RemoteFollow :user="user" />
|
|
|
|
|
</div>
|
2019-04-16 10:13:26 -04:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-07-10 20:59:10 -04:00
|
|
|
<div
|
|
|
|
|
v-if="!hideBio"
|
|
|
|
|
class="panel-body"
|
|
|
|
|
>
|
|
|
|
|
<div
|
2019-09-29 22:33:15 +03:00
|
|
|
v-if="!mergedConfig.hideUserStats && switcher"
|
2019-07-10 20:59:10 -04:00
|
|
|
class="user-counts"
|
|
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
class="user-count"
|
|
|
|
|
@click.prevent="setProfileView('statuses')"
|
|
|
|
|
>
|
|
|
|
|
<h5>{{ $t('user_card.statuses') }}</h5>
|
|
|
|
|
<span>{{ user.statuses_count }} <br></span>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="user-count"
|
|
|
|
|
@click.prevent="setProfileView('friends')"
|
|
|
|
|
>
|
|
|
|
|
<h5>{{ $t('user_card.followees') }}</h5>
|
2019-11-12 13:31:30 -05:00
|
|
|
<span>{{ hideFollowsCount ? $t('user_card.hidden') : user.friends_count }}</span>
|
2019-07-10 20:59:10 -04:00
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="user-count"
|
|
|
|
|
@click.prevent="setProfileView('followers')"
|
|
|
|
|
>
|
|
|
|
|
<h5>{{ $t('user_card.followers') }}</h5>
|
2019-11-12 13:31:30 -05:00
|
|
|
<span>{{ hideFollowersCount ? $t('user_card.hidden') : user.followers_count }}</span>
|
2019-07-10 20:59:10 -04:00
|
|
|
</div>
|
2018-11-25 17:24:58 +03:00
|
|
|
</div>
|
2021-08-13 13:06:42 +03:00
|
|
|
<RichContent
|
|
|
|
|
v-if="!hideBio"
|
2019-07-10 20:59:10 -04:00
|
|
|
class="user-card-bio"
|
2021-08-13 13:06:42 +03:00
|
|
|
:html="user.description_html"
|
|
|
|
|
:emoji="user.emoji"
|
2022-02-19 22:34:08 +02:00
|
|
|
:handle-links="true"
|
2019-07-10 20:59:10 -04:00
|
|
|
/>
|
2018-11-25 17:24:58 +03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2016-11-30 22:27:19 +01:00
|
|
|
</template>
|
|
|
|
|
|
2019-03-05 14:01:49 -05:00
|
|
|
<script src="./user_card.js"></script>
|
2017-02-22 23:08:14 +02:00
|
|
|
|
2022-04-20 19:44:31 +03:00
|
|
|
<style lang="scss" src="./user_card.scss" />
|