misc
This commit is contained in:
parent
60363e66fb
commit
7d985bd475
4 changed files with 44 additions and 8 deletions
|
|
@ -91,12 +91,13 @@ export default {
|
||||||
|
|
||||||
// Editable stuff
|
// Editable stuff
|
||||||
newName: user.name_unescaped,
|
newName: user.name_unescaped,
|
||||||
editingName: true,
|
editingName: false,
|
||||||
newActorType: user.actor_type,
|
newActorType: user.actor_type,
|
||||||
newBio: unescape(user.description),
|
newBio: unescape(user.description),
|
||||||
editingBio: false,
|
editingBio: false,
|
||||||
newBirthday: user.birthday,
|
newBirthday: user.birthday,
|
||||||
newShowBirthday: user.show_birthday,
|
newShowBirthday: user.show_birthday,
|
||||||
|
newCoverPhoto: user.cover_photo,
|
||||||
newFields: user.fields.map(field => ({ name: field.name, value: field.value })),
|
newFields: user.fields.map(field => ({ name: field.name, value: field.value })),
|
||||||
editingFields: false,
|
editingFields: false,
|
||||||
newLocked: user.locked,
|
newLocked: user.locked,
|
||||||
|
|
@ -125,7 +126,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
backgroundImage: [
|
backgroundImage: [
|
||||||
'linear-gradient(to bottom, var(--profileTint), var(--profileTint))',
|
'linear-gradient(to bottom, var(--profileTint), var(--profileTint))',
|
||||||
`url(${this.user.cover_photo})`
|
`url(${this.newCoverPhoto})`
|
||||||
].join(', ')
|
].join(', ')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -200,7 +200,8 @@
|
||||||
padding: 0.6em;
|
padding: 0.6em;
|
||||||
margin: -0.6em;
|
margin: -0.6em;
|
||||||
|
|
||||||
&.save-profile-button {
|
&.save-profile-button,
|
||||||
|
&.edit-banner-button {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -224,7 +225,6 @@
|
||||||
inset: -0.6em;
|
inset: -0.6em;
|
||||||
left: -0.6em;
|
left: -0.6em;
|
||||||
right: -1.2em;
|
right: -1.2em;
|
||||||
background-color: rgb(0 0 0 / 30%);
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -234,11 +234,21 @@
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
margin: 0.5em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover &.-overlay {
|
&:hover &.-overlay {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
background-color: rgb(0 0 0 / 30%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-info-avatar.-editable {
|
||||||
|
.-overlay {
|
||||||
|
opacity: 1;
|
||||||
|
place-items: start end;
|
||||||
|
justify-content: end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -455,11 +465,15 @@
|
||||||
.user-profile-field-add,
|
.user-profile-field-add,
|
||||||
.user-profile-field {
|
.user-profile-field {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: baseline;
|
align-items: center;
|
||||||
margin: 0.25em;
|
margin: 0.25em;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: var(--roundness);
|
border-radius: var(--roundness);
|
||||||
line-height: 2em;
|
line-height: 2em;
|
||||||
|
|
||||||
|
.label {
|
||||||
|
margin-left: 0.5em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-profile-field-add {
|
.user-profile-field-add {
|
||||||
|
|
@ -468,10 +482,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-profile-field {
|
.user-profile-field {
|
||||||
|
|
||||||
|
/* stylelint-disable no-descending-specificity */
|
||||||
|
// input is a generic class
|
||||||
.input {
|
.input {
|
||||||
text-align: inherit;
|
text-align: inherit;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
/* stylelint-enable no-descending-specificity */
|
||||||
|
|
||||||
.delete-field {
|
.delete-field {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@
|
||||||
<button
|
<button
|
||||||
v-else-if="editable"
|
v-else-if="editable"
|
||||||
class="user-info-avatar button-unstyled -link"
|
class="user-info-avatar button-unstyled -link"
|
||||||
|
:class="{ '-editable': editable }"
|
||||||
@click="editAvatar"
|
@click="editAvatar"
|
||||||
>
|
>
|
||||||
<UserAvatar :user="user" />
|
<UserAvatar :user="user" />
|
||||||
|
|
@ -61,6 +62,20 @@
|
||||||
<button
|
<button
|
||||||
v-if="editable"
|
v-if="editable"
|
||||||
:disabled="newName && newName.length === 0"
|
:disabled="newName && newName.length === 0"
|
||||||
|
class="btn button-unstyled edit-banner-button"
|
||||||
|
@click="updateProfile"
|
||||||
|
>
|
||||||
|
{{ $t('settings.change_banner') }}
|
||||||
|
<FAIcon
|
||||||
|
fixed-width
|
||||||
|
class="icon"
|
||||||
|
icon="pencil"
|
||||||
|
:title="$t('user_card.change_banner')"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
v-if="editable"
|
||||||
|
:disabled="somethingToSave"
|
||||||
class="btn button-unstyled save-profile-button"
|
class="btn button-unstyled save-profile-button"
|
||||||
@click="updateProfile"
|
@click="updateProfile"
|
||||||
>
|
>
|
||||||
|
|
@ -487,9 +502,10 @@
|
||||||
class="user-profile-field-add add-field button-default -hover-highlight"
|
class="user-profile-field-add add-field button-default -hover-highlight"
|
||||||
@click="addField"
|
@click="addField"
|
||||||
>
|
>
|
||||||
<FAIcon icon="plus" />
|
<FAIcon icon="plus" class="icon" />
|
||||||
{{ ' ' }}
|
<span class="label">
|
||||||
{{ $t("settings.profile_fields.add_field") }}
|
{{ $t("settings.profile_fields.add_field") }}
|
||||||
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -395,6 +395,7 @@
|
||||||
"save": "Save changes",
|
"save": "Save changes",
|
||||||
"security": "Security",
|
"security": "Security",
|
||||||
"toggle_edit": "Toggle edit",
|
"toggle_edit": "Toggle edit",
|
||||||
|
"change_banner": "Change banner",
|
||||||
"setting_changed": "Setting is different from default",
|
"setting_changed": "Setting is different from default",
|
||||||
"setting_server_side": "This setting is tied to your profile and affects all sessions and clients",
|
"setting_server_side": "This setting is tied to your profile and affects all sessions and clients",
|
||||||
"enter_current_password_to_confirm": "Enter your current password to confirm your identity",
|
"enter_current_password_to_confirm": "Enter your current password to confirm your identity",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue