From 7d985bd4756836f445da9fe79596ecf6e37f7df3 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 4 Aug 2025 00:45:13 +0300 Subject: [PATCH] misc --- src/components/user_card/user_card.js | 5 +++-- src/components/user_card/user_card.scss | 24 +++++++++++++++++++++--- src/components/user_card/user_card.vue | 22 +++++++++++++++++++--- src/i18n/en.json | 1 + 4 files changed, 44 insertions(+), 8 deletions(-) diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index 148f93985..8c747d026 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -91,12 +91,13 @@ export default { // Editable stuff newName: user.name_unescaped, - editingName: true, + editingName: false, newActorType: user.actor_type, newBio: unescape(user.description), editingBio: false, newBirthday: user.birthday, newShowBirthday: user.show_birthday, + newCoverPhoto: user.cover_photo, newFields: user.fields.map(field => ({ name: field.name, value: field.value })), editingFields: false, newLocked: user.locked, @@ -125,7 +126,7 @@ export default { return { backgroundImage: [ 'linear-gradient(to bottom, var(--profileTint), var(--profileTint))', - `url(${this.user.cover_photo})` + `url(${this.newCoverPhoto})` ].join(', ') } }, diff --git a/src/components/user_card/user_card.scss b/src/components/user_card/user_card.scss index 7e26c005f..5c7367607 100644 --- a/src/components/user_card/user_card.scss +++ b/src/components/user_card/user_card.scss @@ -200,7 +200,8 @@ padding: 0.6em; margin: -0.6em; - &.save-profile-button { + &.save-profile-button, + &.edit-banner-button { width: auto; } @@ -224,7 +225,6 @@ inset: -0.6em; left: -0.6em; right: -1.2em; - background-color: rgb(0 0 0 / 30%); display: flex; justify-content: center; align-items: center; @@ -234,11 +234,21 @@ svg { color: #fff; + margin: 0.5em; } } &:hover &.-overlay { 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 { display: flex; - align-items: baseline; + align-items: center; margin: 0.25em; border: 1px solid var(--border); border-radius: var(--roundness); line-height: 2em; + + .label { + margin-left: 0.5em; + } } .user-profile-field-add { @@ -468,10 +482,14 @@ } .user-profile-field { + + /* stylelint-disable no-descending-specificity */ + // input is a generic class .input { text-align: inherit; flex: 1; } + /* stylelint-enable no-descending-specificity */ .delete-field { display: inline-block; diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index 37b5015f5..21f766e26 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -30,6 +30,7 @@ + diff --git a/src/i18n/en.json b/src/i18n/en.json index 46424bf7d..e15735345 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -395,6 +395,7 @@ "save": "Save changes", "security": "Security", "toggle_edit": "Toggle edit", + "change_banner": "Change banner", "setting_changed": "Setting is different from default", "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",