2016-11-30 22:27:19 +01:00
|
|
|
<template>
|
2019-07-10 20:59:10 -04:00
|
|
|
<div
|
|
|
|
|
class="user-card"
|
|
|
|
|
:class="classes"
|
|
|
|
|
>
|
2025-07-29 17:38:08 +03:00
|
|
|
<div :class="onClose ? '' : 'panel-heading -flexible-height'" class="user-card-inner">
|
2019-07-10 20:59:10 -04:00
|
|
|
<div class="user-info">
|
2025-07-29 17:38:08 +03:00
|
|
|
<div class="other-actions">
|
|
|
|
|
<button
|
|
|
|
|
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>
|
|
|
|
|
<a
|
|
|
|
|
v-if="isOtherUser && !user.is_local"
|
|
|
|
|
:href="user.statusnet_profile_url"
|
|
|
|
|
target="_blank"
|
|
|
|
|
class="button-unstyled external-link-button"
|
|
|
|
|
>
|
|
|
|
|
<FAIcon
|
|
|
|
|
class="icon"
|
|
|
|
|
icon="external-link-alt"
|
|
|
|
|
/>
|
|
|
|
|
</a>
|
|
|
|
|
<AccountActions
|
|
|
|
|
v-if="isOtherUser && loggedIn"
|
|
|
|
|
:user="user"
|
|
|
|
|
:relationship="relationship"
|
|
|
|
|
/>
|
|
|
|
|
<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>
|
|
|
|
|
</div>
|
2025-07-30 10:00:03 +03:00
|
|
|
<div
|
|
|
|
|
:class="{ 'hide-bio': hideBio }"
|
|
|
|
|
:style="style"
|
|
|
|
|
class="background-image"
|
|
|
|
|
/>
|
2025-07-29 17:38:08 +03:00
|
|
|
<div class="user-identity">
|
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
|
|
|
>
|
2025-01-07 18:37:16 +02:00
|
|
|
<UserAvatar :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"
|
|
|
|
|
: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
|
2025-07-29 19:00:45 +03:00
|
|
|
class="user-info-avatar"
|
2019-07-22 16:58:20 -04:00
|
|
|
:to="userProfileLink(user)"
|
|
|
|
|
>
|
2025-01-07 18:37:16 +02:00
|
|
|
<UserAvatar :user="user" />
|
2019-07-10 20:59:10 -04:00
|
|
|
</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>
|
2019-07-10 20:59:10 -04:00
|
|
|
</div>
|
|
|
|
|
<div class="bottom-line">
|
2025-07-30 10:22:37 +03:00
|
|
|
<div class="user-screen-name">
|
|
|
|
|
<user-link
|
|
|
|
|
:user="user"
|
|
|
|
|
/>
|
|
|
|
|
<span v-if="user.locked">
|
|
|
|
|
<FAIcon
|
|
|
|
|
class="lock-icon"
|
|
|
|
|
icon="lock"
|
|
|
|
|
size="sm"
|
|
|
|
|
/>
|
2023-12-27 22:40:07 -05:00
|
|
|
</span>
|
2025-07-30 10:00:03 +03:00
|
|
|
</div>
|
2025-07-30 10:22:37 +03:00
|
|
|
<span
|
|
|
|
|
v-if="user.deactivated"
|
|
|
|
|
class="alert neutral user-role"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('user_card.deactivated') }}
|
|
|
|
|
</span>
|
|
|
|
|
<span
|
|
|
|
|
v-if="!!visibleRole"
|
|
|
|
|
class="alert neutral user-role"
|
|
|
|
|
>
|
|
|
|
|
{{ $t(`general.role.${visibleRole}`) }}
|
|
|
|
|
</span>
|
|
|
|
|
<span
|
|
|
|
|
v-if="user.actor_type === 'Service'"
|
|
|
|
|
class="alert neutral user-role"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('user_card.bot') }}
|
|
|
|
|
</span>
|
|
|
|
|
<span
|
|
|
|
|
v-if="user.actor_type === 'Group'"
|
|
|
|
|
class="alert user-role"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('user_card.group') }}
|
2020-10-19 22:35:46 +03:00
|
|
|
</span>
|
2025-07-09 19:03:58 +03:00
|
|
|
<span
|
2025-07-17 14:53:56 +03:00
|
|
|
v-if="relationship.muting && muteExpiryAvailable"
|
2025-07-09 19:03:58 +03:00
|
|
|
class="alert neutral user-role"
|
|
|
|
|
>
|
|
|
|
|
{{ muteExpiry }}
|
|
|
|
|
</span>
|
|
|
|
|
<span
|
2025-07-17 14:53:56 +03:00
|
|
|
v-if="relationship.blocking && blockExpiryAvailable"
|
2025-07-09 19:03:58 +03:00
|
|
|
class="alert neutral user-role"
|
|
|
|
|
>
|
|
|
|
|
{{ blockExpiry }}
|
|
|
|
|
</span>
|
2025-07-30 10:22:37 +03:00
|
|
|
<span
|
2025-07-29 17:38:08 +03:00
|
|
|
v-if="relationship.followed_by && loggedIn && isOtherUser"
|
|
|
|
|
class="alert neutral user-role"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('user_card.follows_you') }}
|
2025-07-30 10:22:37 +03:00
|
|
|
</span>
|
2019-07-10 20:59:10 -04:00
|
|
|
</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
|
|
|
|
|
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
|
2024-08-13 19:26:43 +02:00
|
|
|
v-if="!relationship.notifying"
|
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>
|
2025-07-29 17:38:08 +03:00
|
|
|
<button
|
|
|
|
|
v-if="relationship.muting"
|
|
|
|
|
class="btn button-default btn-mute toggled"
|
|
|
|
|
:disabled="user.deactivated"
|
|
|
|
|
@click="unmuteUser"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('user_card.muted') }}
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
v-else
|
|
|
|
|
class="btn button-default btn-mute"
|
|
|
|
|
:disabled="user.deactivated"
|
|
|
|
|
@click="muteUser"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('user_card.mute') }}
|
|
|
|
|
</button>
|
|
|
|
|
<button
|
|
|
|
|
class="btn button-default btn-mention"
|
|
|
|
|
:disabled="user.deactivated"
|
|
|
|
|
@click="mentionUser"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('user_card.mention') }}
|
|
|
|
|
</button>
|
2019-07-10 20:59:10 -04:00
|
|
|
<ModerationTools
|
2022-08-06 22:33:38 +02:00
|
|
|
v-if="showModerationMenu"
|
2025-07-29 17:38:08 +03:00
|
|
|
class="moderation-menu"
|
2019-07-10 20:59:10 -04:00
|
|
|
:user="user"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
v-if="!loggedIn && user.is_local"
|
|
|
|
|
class="user-interactions"
|
|
|
|
|
>
|
|
|
|
|
<RemoteFollow :user="user" />
|
|
|
|
|
</div>
|
2025-07-29 17:38:08 +03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-07-30 01:13:24 +03:00
|
|
|
<div class="personal-marks" v-if="loggedIn && isOtherUser && (hasNote || !hideBio) && !mergedConfig.userCardHidePersonalMarks">
|
2025-07-29 17:38:08 +03:00
|
|
|
<UserNote
|
|
|
|
|
v-if="hasNote || (hasNoteEditor && supportsNote)"
|
|
|
|
|
:user="user"
|
|
|
|
|
:relationship="relationship"
|
|
|
|
|
:editable="hasNoteEditor"
|
|
|
|
|
/>
|
|
|
|
|
<div
|
|
|
|
|
v-if="!hideBio"
|
|
|
|
|
class="highlighter"
|
|
|
|
|
>
|
|
|
|
|
<h4>{{ $t('user_card.highlight_header') }}</h4>
|
|
|
|
|
<Select
|
|
|
|
|
:id="'userHighlightSel'+user.id"
|
|
|
|
|
v-model="userHighlightType"
|
|
|
|
|
class="userHighlightSel unstyled"
|
|
|
|
|
:class="{ '-none': userHighlightType === 'disabled' }"
|
|
|
|
|
>
|
|
|
|
|
<option value="disabled">
|
|
|
|
|
{{ $t('user_card.highlight_new.disabled') }}
|
|
|
|
|
</option>
|
|
|
|
|
<option value="solid">
|
|
|
|
|
{{ $t('user_card.highlight_new.solid') }}
|
|
|
|
|
</option>
|
|
|
|
|
<option value="striped">
|
|
|
|
|
{{ $t('user_card.highlight_new.striped') }}
|
|
|
|
|
</option>
|
|
|
|
|
<option value="side">
|
|
|
|
|
{{ $t('user_card.highlight_new.side') }}
|
|
|
|
|
</option>
|
|
|
|
|
</Select>
|
|
|
|
|
<!-- id's need to be unique, otherwise vue confuses which user-card checkbox belongs to -->
|
|
|
|
|
<ColorInput
|
|
|
|
|
v-if="userHighlightType !== 'disabled'"
|
|
|
|
|
class="highlighter-color"
|
|
|
|
|
v-model="userHighlightColor"
|
|
|
|
|
:show-optional-checkbox="false"
|
|
|
|
|
name="'userHighlightColorTx'+user.id"
|
|
|
|
|
:unstyled="true"
|
2022-08-20 13:02:27 -04:00
|
|
|
/>
|
2019-04-16 10:13:26 -04:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-07-29 17:38:08 +03:00
|
|
|
<RichContent
|
2025-02-10 21:20:56 +00:00
|
|
|
v-if="!hideBio"
|
2025-07-29 17:38:08 +03:00
|
|
|
class="user-card-bio"
|
2025-07-30 01:13:24 +03:00
|
|
|
:class="{ '-justify-left': mergedConfig.userCardLeftJustify }"
|
2025-07-29 17:38:08 +03:00
|
|
|
:html="user.description_html"
|
|
|
|
|
:emoji="user.emoji"
|
|
|
|
|
:handle-links="true"
|
|
|
|
|
/>
|
|
|
|
|
<div
|
|
|
|
|
v-if="!hideBio && user.fields_html && user.fields_html.length > 0"
|
|
|
|
|
class="user-profile-fields"
|
2025-02-10 21:20:56 +00:00
|
|
|
>
|
2025-07-29 17:38:08 +03:00
|
|
|
<dl
|
|
|
|
|
v-for="(field, index) in user.fields_html"
|
|
|
|
|
:key="index"
|
|
|
|
|
class="user-profile-field"
|
2019-07-10 20:59:10 -04:00
|
|
|
>
|
2025-07-29 17:38:08 +03:00
|
|
|
<dt
|
|
|
|
|
:title="user.fields_text[index].name"
|
|
|
|
|
class="user-profile-field-name"
|
2019-07-10 20:59:10 -04:00
|
|
|
>
|
2025-07-29 17:38:08 +03:00
|
|
|
<RichContent
|
|
|
|
|
:html="field.name"
|
|
|
|
|
:emoji="user.emoji"
|
|
|
|
|
/>
|
|
|
|
|
</dt>
|
|
|
|
|
<dd
|
|
|
|
|
:title="user.fields_text[index].value"
|
|
|
|
|
class="user-profile-field-value"
|
2019-07-10 20:59:10 -04:00
|
|
|
>
|
2025-07-29 17:38:08 +03:00
|
|
|
<RichContent
|
|
|
|
|
:html="field.value"
|
|
|
|
|
:emoji="user.emoji"
|
|
|
|
|
/>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
2025-07-29 19:00:45 +03:00
|
|
|
</div>
|
|
|
|
|
<div class="user-extras" v-if="!hideBio">
|
|
|
|
|
<span
|
|
|
|
|
v-if="!mergedConfig.hideUserStats"
|
|
|
|
|
class="user-stats"
|
|
|
|
|
>
|
|
|
|
|
<dl
|
|
|
|
|
class="user-count"
|
|
|
|
|
@click.prevent="setProfileView('statuses')"
|
|
|
|
|
v-if="!mergedConfig.hideUserStats && !hideBio"
|
2019-07-10 20:59:10 -04:00
|
|
|
>
|
2025-07-29 19:00:45 +03:00
|
|
|
<dd>{{ user.statuses_count }}</dd>
|
|
|
|
|
{{ ' ' }}
|
|
|
|
|
<dt>{{ $t('user_card.statuses') }}</dt>
|
|
|
|
|
</dl>
|
|
|
|
|
<dl
|
|
|
|
|
class="user-count"
|
|
|
|
|
@click.prevent="setProfileView('statuses')"
|
|
|
|
|
>
|
|
|
|
|
<dd>{{ dailyAvg }}</dd>
|
|
|
|
|
{{ ' ' }}
|
|
|
|
|
<dt>{{ $t('user_card.statuses_per_day') }}</dt>
|
|
|
|
|
</dl>
|
|
|
|
|
<dl
|
|
|
|
|
class="user-count"
|
|
|
|
|
@click.prevent="setProfileView('friends')"
|
|
|
|
|
>
|
|
|
|
|
<dd>{{ hideFollowsCount ? $t('user_card.hidden') : user.friends_count }}</dd>
|
|
|
|
|
{{ ' ' }}
|
|
|
|
|
<dt>{{ $t('user_card.followees') }}</dt>
|
|
|
|
|
</dl>
|
|
|
|
|
<dl
|
|
|
|
|
class="user-count"
|
|
|
|
|
@click.prevent="setProfileView('followers')"
|
|
|
|
|
>
|
|
|
|
|
<dd>{{ hideFollowersCount ? $t('user_card.hidden') : user.followers_count }}</dd>
|
|
|
|
|
{{ ' ' }}
|
|
|
|
|
<dt>{{ $t('user_card.followers') }}</dt>
|
|
|
|
|
</dl>
|
|
|
|
|
</span>
|
|
|
|
|
<div class="birthday" v-if="!hideBio && !!user.birthday">
|
|
|
|
|
<FAIcon
|
|
|
|
|
class="fa-old-padding"
|
|
|
|
|
icon="birthday-cake"
|
|
|
|
|
/>
|
|
|
|
|
{{ $t('user_card.birthday', { birthday: formattedBirthday }) }}
|
2018-11-25 17:24:58 +03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2022-04-06 14:54:58 -04:00
|
|
|
<teleport to="#modal">
|
2025-06-12 20:04:39 +03:00
|
|
|
<UserTimedFilterModal
|
2025-01-20 16:22:41 +02:00
|
|
|
:user="user"
|
2025-06-12 20:04:39 +03:00
|
|
|
:is-mute="true"
|
|
|
|
|
ref="timedMuteDialog"
|
2025-01-16 20:14:05 +02:00
|
|
|
/>
|
2022-04-06 14:54:58 -04:00
|
|
|
</teleport>
|
2018-11-25 17:24:58 +03:00
|
|
|
</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" />
|