2020-05-03 17:36:12 +03:00
|
|
|
<template>
|
2020-05-25 03:43:55 +03:00
|
|
|
<div class="profile-tab">
|
2025-08-04 11:34:41 +03:00
|
|
|
<UserCard
|
|
|
|
|
:user-id="user.id"
|
|
|
|
|
:editable="true"
|
|
|
|
|
:switcher="false"
|
|
|
|
|
rounded="top"
|
|
|
|
|
>
|
|
|
|
|
<template v-if="role === 'admin' || role === 'moderator'">
|
|
|
|
|
<h4>{{ $t('settings.show_labels') }}</h4>
|
|
|
|
|
<p class="user-card-setting">
|
2020-05-25 03:43:55 +03:00
|
|
|
<Checkbox v-model="showRole">
|
|
|
|
|
<template v-if="role === 'admin'">
|
|
|
|
|
{{ $t('settings.show_admin_badge') }}
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="role === 'moderator'">
|
|
|
|
|
{{ $t('settings.show_moderator_badge') }}
|
|
|
|
|
</template>
|
|
|
|
|
</Checkbox>
|
|
|
|
|
</p>
|
2025-08-04 11:34:41 +03:00
|
|
|
</template>
|
|
|
|
|
<h4>{{ $t('settings.user_type') }}</h4>
|
|
|
|
|
<p class="user-card-setting">
|
2023-12-27 22:30:19 -05:00
|
|
|
<label>
|
|
|
|
|
{{ $t('settings.actor_type') }}
|
|
|
|
|
<Select v-model="actorType">
|
|
|
|
|
<option
|
|
|
|
|
v-for="option in availableActorTypes"
|
|
|
|
|
:key="option"
|
|
|
|
|
:value="option"
|
|
|
|
|
>
|
|
|
|
|
{{ $t('settings.actor_type_' + option) }}
|
|
|
|
|
</option>
|
|
|
|
|
</Select>
|
2025-08-04 11:34:41 +03:00
|
|
|
<div v-if="groupActorAvailable">
|
|
|
|
|
<small>
|
|
|
|
|
{{ $t('settings.actor_type_description') }}
|
|
|
|
|
</small>
|
|
|
|
|
</div>
|
2023-12-27 22:30:19 -05:00
|
|
|
</label>
|
2020-06-21 14:59:05 +02:00
|
|
|
</p>
|
2025-08-04 11:34:41 +03:00
|
|
|
</UserCard>
|
|
|
|
|
<div class="setting-item">
|
2022-05-22 16:40:59 +00:00
|
|
|
<p>
|
|
|
|
|
<interface-language-switcher
|
|
|
|
|
:prompt-text="$t('settings.email_language')"
|
|
|
|
|
:language="emailLanguage"
|
|
|
|
|
:set-language="val => emailLanguage = val"
|
|
|
|
|
/>
|
|
|
|
|
</p>
|
2020-05-25 03:43:55 +03:00
|
|
|
<button
|
|
|
|
|
:disabled="newName && newName.length === 0"
|
2020-11-24 12:32:42 +02:00
|
|
|
class="btn button-default"
|
2020-05-25 03:43:55 +03:00
|
|
|
@click="updateProfile"
|
2020-05-03 17:36:12 +03:00
|
|
|
>
|
2021-03-15 13:28:33 +03:00
|
|
|
{{ $t('settings.save') }}
|
2020-05-25 03:43:55 +03:00
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="setting-item">
|
|
|
|
|
<h2>{{ $t('settings.profile_background') }}</h2>
|
2020-07-08 10:11:17 +00:00
|
|
|
<div class="banner-background-preview">
|
|
|
|
|
<img :src="user.background_image">
|
2022-03-28 15:01:34 +03:00
|
|
|
<button
|
2020-07-08 10:11:17 +00:00
|
|
|
v-if="!isDefaultBackground"
|
2022-03-29 19:12:57 +03:00
|
|
|
class="button-unstyled reset-button"
|
2020-07-08 10:11:17 +00:00
|
|
|
:title="$t('settings.reset_profile_background')"
|
|
|
|
|
@click="resetBackground"
|
2022-03-28 15:01:34 +03:00
|
|
|
>
|
|
|
|
|
<FAIcon
|
|
|
|
|
icon="times"
|
|
|
|
|
type="button"
|
|
|
|
|
/>
|
|
|
|
|
</button>
|
2020-07-08 10:11:17 +00:00
|
|
|
</div>
|
2020-05-25 03:43:55 +03:00
|
|
|
<p>{{ $t('settings.set_new_profile_background') }}</p>
|
|
|
|
|
<img
|
|
|
|
|
v-if="backgroundPreview"
|
2020-07-08 10:11:17 +00:00
|
|
|
class="banner-background-preview"
|
2020-05-25 03:43:55 +03:00
|
|
|
:src="backgroundPreview"
|
2020-05-03 17:36:12 +03:00
|
|
|
>
|
2020-05-25 03:43:55 +03:00
|
|
|
<div>
|
|
|
|
|
<input
|
|
|
|
|
type="file"
|
2024-02-07 15:53:49 +02:00
|
|
|
class="input"
|
2024-02-22 18:39:52 +02:00
|
|
|
@change="uploadFile('background', $event)"
|
2020-05-03 17:36:12 +03:00
|
|
|
>
|
2020-05-25 03:43:55 +03:00
|
|
|
</div>
|
2020-10-21 00:01:28 +03:00
|
|
|
<FAIcon
|
2020-05-25 03:43:55 +03:00
|
|
|
v-if="backgroundUploading"
|
2020-10-21 00:01:28 +03:00
|
|
|
class="uploading"
|
|
|
|
|
spin
|
|
|
|
|
icon="circle-notch"
|
2020-05-03 17:36:12 +03:00
|
|
|
/>
|
2020-05-25 03:43:55 +03:00
|
|
|
<button
|
|
|
|
|
v-else-if="backgroundPreview"
|
2020-11-24 12:32:42 +02:00
|
|
|
class="btn button-default"
|
2020-07-08 10:11:17 +00:00
|
|
|
@click="submitBackground(background)"
|
2020-05-03 17:36:12 +03:00
|
|
|
>
|
2021-03-15 13:28:33 +03:00
|
|
|
{{ $t('settings.save') }}
|
2020-05-25 03:43:55 +03:00
|
|
|
</button>
|
2020-05-03 17:36:12 +03:00
|
|
|
</div>
|
2022-02-22 23:31:40 +02:00
|
|
|
<div class="setting-item">
|
|
|
|
|
<h2>{{ $t('settings.account_privacy') }}</h2>
|
|
|
|
|
<ul class="setting-list">
|
|
|
|
|
<li>
|
2023-03-12 17:28:14 +02:00
|
|
|
<BooleanSetting
|
|
|
|
|
source="profile"
|
|
|
|
|
path="locked"
|
|
|
|
|
>
|
2022-02-22 23:31:40 +02:00
|
|
|
{{ $t('settings.lock_account_description') }}
|
|
|
|
|
</BooleanSetting>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2023-03-12 17:28:14 +02:00
|
|
|
<BooleanSetting
|
|
|
|
|
source="profile"
|
|
|
|
|
path="discoverable"
|
|
|
|
|
>
|
2022-02-22 23:31:40 +02:00
|
|
|
{{ $t('settings.discoverable') }}
|
|
|
|
|
</BooleanSetting>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2023-03-12 17:28:14 +02:00
|
|
|
<BooleanSetting
|
|
|
|
|
source="profile"
|
|
|
|
|
path="allowFollowingMove"
|
|
|
|
|
>
|
2022-02-22 23:31:40 +02:00
|
|
|
{{ $t('settings.allow_following_move') }}
|
|
|
|
|
</BooleanSetting>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2023-03-12 17:28:14 +02:00
|
|
|
<BooleanSetting
|
|
|
|
|
source="profile"
|
|
|
|
|
path="hideFavorites"
|
|
|
|
|
>
|
2022-02-22 23:31:40 +02:00
|
|
|
{{ $t('settings.hide_favorites_description') }}
|
|
|
|
|
</BooleanSetting>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2023-03-12 17:28:14 +02:00
|
|
|
<BooleanSetting
|
|
|
|
|
source="profile"
|
|
|
|
|
path="hideFollowers"
|
|
|
|
|
>
|
2022-02-22 23:31:40 +02:00
|
|
|
{{ $t('settings.hide_followers_description') }}
|
|
|
|
|
</BooleanSetting>
|
2023-03-12 14:32:13 +02:00
|
|
|
<ul class="setting-list suboptions">
|
2022-02-22 23:31:40 +02:00
|
|
|
<li>
|
|
|
|
|
<BooleanSetting
|
2023-03-12 14:32:13 +02:00
|
|
|
source="profile"
|
|
|
|
|
path="hideFollowersCount"
|
2023-03-12 17:28:14 +02:00
|
|
|
parent-path="hideFollowers"
|
2022-02-28 18:23:32 +02:00
|
|
|
>
|
2022-02-22 23:31:40 +02:00
|
|
|
{{ $t('settings.hide_followers_count_description') }}
|
|
|
|
|
</BooleanSetting>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2023-03-12 17:28:14 +02:00
|
|
|
<BooleanSetting
|
|
|
|
|
source="profile"
|
|
|
|
|
path="hideFollows"
|
|
|
|
|
>
|
2022-02-22 23:31:40 +02:00
|
|
|
{{ $t('settings.hide_follows_description') }}
|
|
|
|
|
</BooleanSetting>
|
2023-03-12 14:32:13 +02:00
|
|
|
<ul class="setting-list suboptions">
|
2022-02-22 23:31:40 +02:00
|
|
|
<li>
|
|
|
|
|
<BooleanSetting
|
2023-03-12 14:32:13 +02:00
|
|
|
source="profile"
|
|
|
|
|
path="hideFollowsCount"
|
2023-03-12 17:28:14 +02:00
|
|
|
parent-path="hideFollows"
|
2022-02-28 18:23:32 +02:00
|
|
|
>
|
2022-02-22 23:31:40 +02:00
|
|
|
{{ $t('settings.hide_follows_count_description') }}
|
|
|
|
|
</BooleanSetting>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2020-05-03 17:36:12 +03:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
2020-05-10 06:46:06 +03:00
|
|
|
<script src="./profile_tab.js"></script>
|
|
|
|
|
<style lang="scss" src="./profile_tab.scss"></style>
|