2016-11-30 13:27:19 -08:00
|
|
|
<template>
|
2019-07-10 17:59:10 -07:00
|
|
|
<div
|
|
|
|
class="user-card"
|
|
|
|
:class="classes"
|
|
|
|
>
|
2019-09-25 10:23:55 -07:00
|
|
|
<div
|
|
|
|
:class="{ 'hide-bio': hideBio }"
|
|
|
|
:style="style"
|
|
|
|
class="background-image"
|
|
|
|
/>
|
2022-04-04 09:41:09 -07:00
|
|
|
<div class="panel-heading -flexible-height">
|
2019-07-10 17:59:10 -07:00
|
|
|
<div class="user-info">
|
|
|
|
<div class="container">
|
2019-07-22 13:58:20 -07:00
|
|
|
<a
|
2019-07-25 12:14:44 -07:00
|
|
|
v-if="allowZoomingAvatar"
|
2019-07-22 13:58:20 -07:00
|
|
|
class="user-info-avatar-link"
|
2019-07-25 12:14:44 -07:00
|
|
|
@click="zoomAvatar"
|
2019-07-22 13:58:20 -07:00
|
|
|
>
|
|
|
|
<UserAvatar
|
|
|
|
:better-shadow="betterShadow"
|
|
|
|
:user="user"
|
|
|
|
/>
|
2019-07-25 12:49:02 -07:00
|
|
|
<div class="user-info-avatar-link-overlay">
|
2020-10-20 14:31:16 -07:00
|
|
|
<FAIcon
|
2020-10-28 12:31:16 -07:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-20 14:31:16 -07:00
|
|
|
icon="search-plus"
|
|
|
|
/>
|
2019-07-25 12:49:02 -07:00
|
|
|
</div>
|
2019-07-22 13:58:20 -07:00
|
|
|
</a>
|
|
|
|
<router-link
|
|
|
|
v-else
|
|
|
|
:to="userProfileLink(user)"
|
|
|
|
>
|
2019-07-10 17:59:10 -07:00
|
|
|
<UserAvatar
|
|
|
|
:better-shadow="betterShadow"
|
|
|
|
:user="user"
|
|
|
|
/>
|
|
|
|
</router-link>
|
|
|
|
<div class="user-summary">
|
|
|
|
<div class="top-line">
|
2021-08-13 03:06:42 -07:00
|
|
|
<RichContent
|
2019-07-10 17:59:10 -07:00
|
|
|
:title="user.name"
|
|
|
|
class="user-name"
|
2021-08-13 03:06:42 -07:00
|
|
|
:html="user.name"
|
|
|
|
:emoji="user.emoji"
|
2019-07-10 17:59:10 -07:00
|
|
|
/>
|
2021-04-07 12:42:34 -07:00
|
|
|
<button
|
2021-06-17 12:29:58 -07: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-15 15:41:52 -07:00
|
|
|
<a
|
2019-07-10 17:59:10 -07:00
|
|
|
v-if="isOtherUser && !user.is_local"
|
|
|
|
:href="user.statusnet_profile_url"
|
|
|
|
target="_blank"
|
2021-04-07 12:42:34 -07:00
|
|
|
class="button-unstyled external-link-button"
|
2019-07-10 17:59:10 -07:00
|
|
|
>
|
2020-10-20 14:31:16 -07:00
|
|
|
<FAIcon
|
|
|
|
class="icon"
|
|
|
|
icon="external-link-alt"
|
|
|
|
/>
|
2022-03-16 13:02:44 -07:00
|
|
|
</a>
|
2019-10-11 06:52:26 -07:00
|
|
|
<AccountActions
|
|
|
|
v-if="isOtherUser && loggedIn"
|
|
|
|
:user="user"
|
2020-04-21 13:27:51 -07:00
|
|
|
:relationship="relationship"
|
2019-10-11 06:52:26 -07:00
|
|
|
/>
|
2019-07-10 17:59:10 -07:00
|
|
|
</div>
|
|
|
|
<div class="bottom-line">
|
|
|
|
<router-link
|
|
|
|
class="user-screen-name"
|
2021-02-26 06:23:11 -08:00
|
|
|
:title="user.screen_name_ui"
|
2019-07-10 17:59:10 -07:00
|
|
|
:to="userProfileLink(user)"
|
|
|
|
>
|
2021-02-26 06:23:11 -08:00
|
|
|
@{{ user.screen_name_ui }}
|
2019-07-10 17:59:10 -07:00
|
|
|
</router-link>
|
2020-06-21 06:02:44 -07:00
|
|
|
<template v-if="!hideBio">
|
2022-01-19 05:09:48 -08:00
|
|
|
<span
|
|
|
|
v-if="user.deactivated"
|
|
|
|
class="alert user-role"
|
|
|
|
>
|
|
|
|
{{ $t('user_card.deactivated') }}
|
|
|
|
</span>
|
2020-06-21 06:02:44 -07:00
|
|
|
<span
|
|
|
|
v-if="!!visibleRole"
|
2020-06-21 06:36:20 -07:00
|
|
|
class="alert user-role"
|
2020-06-21 06:02:44 -07:00
|
|
|
>
|
2021-02-13 05:34:43 -08:00
|
|
|
{{ $t(`general.role.${visibleRole}`) }}
|
2020-06-21 06:02:44 -07:00
|
|
|
</span>
|
|
|
|
<span
|
|
|
|
v-if="user.bot"
|
2020-06-21 06:36:20 -07:00
|
|
|
class="alert user-role"
|
2020-06-21 06:02:44 -07:00
|
|
|
>
|
2021-02-12 01:01:16 -08:00
|
|
|
{{ $t('user_card.bot') }}
|
2020-06-21 06:02:44 -07:00
|
|
|
</span>
|
|
|
|
</template>
|
2020-10-19 12:35:46 -07:00
|
|
|
<span v-if="user.locked">
|
2020-10-20 14:31:16 -07:00
|
|
|
<FAIcon
|
|
|
|
class="lock-icon"
|
|
|
|
icon="lock"
|
|
|
|
size="sm"
|
|
|
|
/>
|
2020-10-19 12:35:46 -07:00
|
|
|
</span>
|
2019-07-10 17:59:10 -07:00
|
|
|
<span
|
2019-09-29 12:33:15 -07:00
|
|
|
v-if="!mergedConfig.hideUserStats && !hideBio"
|
2019-07-10 17:59:10 -07:00
|
|
|
class="dailyAvg"
|
|
|
|
>{{ dailyAvg }} {{ $t('user_card.per_day') }}</span>
|
|
|
|
</div>
|
2019-05-15 19:01:04 -07:00
|
|
|
</div>
|
2018-06-19 07:14:33 -07:00
|
|
|
</div>
|
2019-07-10 17:59:10 -07:00
|
|
|
<div class="user-meta">
|
|
|
|
<div
|
2020-04-21 13:27:51 -07:00
|
|
|
v-if="relationship.followed_by && loggedIn && isOtherUser"
|
2019-07-10 17:59:10 -07: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 07:15:05 -07:00
|
|
|
{{ ' ' }}
|
2021-03-11 06:11:44 -08:00
|
|
|
<Select
|
|
|
|
:id="'userHighlightSel'+user.id"
|
|
|
|
v-model="userHighlightType"
|
|
|
|
class="userHighlightSel"
|
2019-07-10 17:59:10 -07:00
|
|
|
>
|
2021-05-31 04:02:36 -07: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 06:11:44 -08:00
|
|
|
</Select>
|
2019-07-10 17:59:10 -07:00
|
|
|
</div>
|
2018-06-18 01:36:58 -07:00
|
|
|
</div>
|
2019-07-10 17:59:10 -07:00
|
|
|
<div
|
|
|
|
v-if="loggedIn && isOtherUser"
|
|
|
|
class="user-interactions"
|
|
|
|
>
|
2019-10-08 00:21:48 -07:00
|
|
|
<div class="btn-group">
|
2022-01-19 05:09:48 -08:00
|
|
|
<FollowButton
|
|
|
|
:relationship="relationship"
|
|
|
|
:user="user"
|
|
|
|
/>
|
2020-04-21 13:27:51 -07:00
|
|
|
<template v-if="relationship.following">
|
2019-10-08 00:21:48 -07:00
|
|
|
<ProgressButton
|
2020-04-21 13:27:51 -07:00
|
|
|
v-if="!relationship.subscribing"
|
2020-11-24 02:32:42 -08:00
|
|
|
class="btn button-default"
|
2019-10-08 00:21:48 -07:00
|
|
|
:click="subscribeUser"
|
|
|
|
:title="$t('user_card.subscribe')"
|
|
|
|
>
|
2020-10-19 12:35:46 -07:00
|
|
|
<FAIcon icon="bell" />
|
2019-10-08 00:21:48 -07:00
|
|
|
</ProgressButton>
|
|
|
|
<ProgressButton
|
|
|
|
v-else
|
2020-11-24 02:32:42 -08:00
|
|
|
class="btn button-default toggled"
|
2019-10-08 00:21:48 -07:00
|
|
|
:click="unsubscribeUser"
|
|
|
|
:title="$t('user_card.unsubscribe')"
|
|
|
|
>
|
2020-10-19 12:35:46 -07:00
|
|
|
<FALayers>
|
2020-10-20 14:31:16 -07: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 12:35:46 -07:00
|
|
|
<FAIcon icon="bell" />
|
|
|
|
</FALayers>
|
2019-10-08 00:21:48 -07:00
|
|
|
</ProgressButton>
|
|
|
|
</template>
|
2019-09-17 12:59:17 -07:00
|
|
|
</div>
|
2019-07-10 17:59:10 -07:00
|
|
|
<div>
|
|
|
|
<button
|
2020-04-21 13:27:51 -07:00
|
|
|
v-if="relationship.muting"
|
2020-11-24 02:32:42 -08:00
|
|
|
class="btn button-default btn-block toggled"
|
2022-01-19 05:09:48 -08:00
|
|
|
:disabled="user.deactivated"
|
2019-07-10 17:59:10 -07:00
|
|
|
@click="unmuteUser"
|
|
|
|
>
|
|
|
|
{{ $t('user_card.muted') }}
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
v-else
|
2020-11-24 02:32:42 -08:00
|
|
|
class="btn button-default btn-block"
|
2022-01-19 05:09:48 -08:00
|
|
|
:disabled="user.deactivated"
|
2019-07-10 17:59:10 -07:00
|
|
|
@click="muteUser"
|
|
|
|
>
|
|
|
|
{{ $t('user_card.mute') }}
|
|
|
|
</button>
|
|
|
|
</div>
|
2019-11-26 16:57:27 -08:00
|
|
|
<div>
|
|
|
|
<button
|
2020-11-24 02:32:42 -08:00
|
|
|
class="btn button-default btn-block"
|
2022-01-19 05:09:48 -08:00
|
|
|
:disabled="user.deactivated"
|
2019-11-26 16:57:27 -08:00
|
|
|
@click="mentionUser"
|
|
|
|
>
|
|
|
|
{{ $t('user_card.mention') }}
|
|
|
|
</button>
|
|
|
|
</div>
|
2019-07-10 17:59:10 -07: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 07:13:26 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-07-10 17:59:10 -07:00
|
|
|
<div
|
|
|
|
v-if="!hideBio"
|
|
|
|
class="panel-body"
|
|
|
|
>
|
|
|
|
<div
|
2019-09-29 12:33:15 -07:00
|
|
|
v-if="!mergedConfig.hideUserStats && switcher"
|
2019-07-10 17:59:10 -07: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 10:31:30 -08:00
|
|
|
<span>{{ hideFollowsCount ? $t('user_card.hidden') : user.friends_count }}</span>
|
2019-07-10 17:59:10 -07:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
class="user-count"
|
|
|
|
@click.prevent="setProfileView('followers')"
|
|
|
|
>
|
|
|
|
<h5>{{ $t('user_card.followers') }}</h5>
|
2019-11-12 10:31:30 -08:00
|
|
|
<span>{{ hideFollowersCount ? $t('user_card.hidden') : user.followers_count }}</span>
|
2019-07-10 17:59:10 -07:00
|
|
|
</div>
|
2018-11-25 06:24:58 -08:00
|
|
|
</div>
|
2021-08-13 03:06:42 -07:00
|
|
|
<RichContent
|
|
|
|
v-if="!hideBio"
|
2019-07-10 17:59:10 -07:00
|
|
|
class="user-card-bio"
|
2021-08-13 03:06:42 -07:00
|
|
|
:html="user.description_html"
|
|
|
|
:emoji="user.emoji"
|
2022-02-19 12:34:08 -08:00
|
|
|
:handle-links="true"
|
2019-07-10 17:59:10 -07:00
|
|
|
/>
|
2018-11-25 06:24:58 -08:00
|
|
|
</div>
|
|
|
|
</div>
|
2016-11-30 13:27:19 -08:00
|
|
|
</template>
|
|
|
|
|
2019-03-05 11:01:49 -08:00
|
|
|
<script src="./user_card.js"></script>
|
2017-02-22 13:08:14 -08:00
|
|
|
|
2022-04-20 09:44:31 -07:00
|
|
|
<style lang="scss" src="./user_card.scss" />
|