diff --git a/src/components/dialog_modal/dialog_modal.vue b/src/components/dialog_modal/dialog_modal.vue index 939655f65..2b9c7a5d8 100644 --- a/src/components/dialog_modal/dialog_modal.vue +++ b/src/components/dialog_modal/dialog_modal.vue @@ -45,10 +45,10 @@ inset: 0; justify-content: center; place-items: center center; + overflow: auto; } .dialog-modal.panel { - max-height: 80vh; max-width: 90vw; z-index: 2001; cursor: default; diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 26a2e2db0..303413b55 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -13,7 +13,7 @@ v-if="!$store.state.users.currentUser.locked && newStatus.visibility == 'private' && !disableLockWarning" keypath="post_status.account_not_locked_warning" tag="p" - class="alert neutral" + class="visibility-notice" scope="global" > +

{{ $t('post_status.scope_notice.unlisted') }} - +

{{ $t('post_status.scope_notice.private') }} - +

{{ $t('post_status.direct_warning_to_first_only') }} {{ $t('post_status.direct_warning_to_all') }} diff --git a/src/components/side_drawer/side_drawer.vue b/src/components/side_drawer/side_drawer.vue index 7dd6ff28f..eda60a96a 100644 --- a/src/components/side_drawer/side_drawer.vue +++ b/src/components/side_drawer/side_drawer.vue @@ -412,6 +412,10 @@ display: flex; padding: 0; margin: 0; + + .user-info { + margin: 1em; + } } .side-drawer ul { diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index 159d09e36..7daee4b76 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -186,14 +186,6 @@ export default { relationship () { return this.$store.getters.relationship(this.userId) }, - style () { - return { - backgroundImage: [ - 'linear-gradient(to bottom, var(--profileTint), var(--profileTint))', - `url(${this.bannerImgSrc})` - ].join(', ') - } - }, isOtherUser () { return this.user.id !== this.$store.state.users.currentUser.id }, @@ -290,12 +282,14 @@ export default { // Editable stuff avatarImgSrc () { const currentUrl = this.user.profile_image_url_original || this.defaultAvatar - const newUrl = this.newAvatar === '' ? this.defaultAvatar : this.newAvatar + if (!this.editable) return currentUrl + const newUrl = this.newAvatar === null ? this.defaultAvatar : this.newAvatar return (this.newAvatar === null) ? currentUrl : newUrl }, bannerImgSrc () { const currentUrl = this.user.cover_photo || this.defaultBanner - const newUrl = this.newBanner === '' ? this.defaultBanner : this.newBanner + if (!this.editable) return currentUrl + const newUrl = this.newBanner === null ? this.defaultBanner : this.newBanner return (this.newBanner === null) ? currentUrl : newUrl }, defaultAvatar () { @@ -419,11 +413,11 @@ export default { }, resetImage () { if (this.editImage === 'avatar') { - this.newAvatar = '' - this.newAvatarFile = '' + this.newAvatar = null + this.newAvatarFile = null } else { - this.newBanner = '' - this.newBannerFile = '' + this.newBanner = null + this.newBannerFile = null } this.editImage = false }, @@ -438,6 +432,9 @@ export default { propsToNative (props) { return propsToNative(props) }, + cancelImageText () { + return + }, resetState () { const user = this.$store.state.users.currentUser diff --git a/src/components/user_card/user_card.scss b/src/components/user_card/user_card.scss index ce26fdfe7..0d117182d 100644 --- a/src/components/user_card/user_card.scss +++ b/src/components/user_card/user_card.scss @@ -111,7 +111,8 @@ } } - .background-image { + .banner-overlay, + .banner-image { position: absolute; inset: 0; right: -1.2em; @@ -119,11 +120,24 @@ top: -1.4em; padding: 0; mask: linear-gradient(to top, transparent 0, white 5em) bottom no-repeat; - background-size: cover; - background-color: var(--profileBg); border-top-left-radius: calc(var(--roundness) - 1px); border-top-right-radius: calc(var(--roundness) - 1px); + } + + .banner-image { z-index: -2; + + img { + object-fit: cover; + height: 100%; + width: 100%; + } + } + + .banner-overlay { + background-color: var(--profileTint); + pointer-events: none; // let user copy bg url + z-index: -1; } .bottom-buttons { @@ -491,6 +505,8 @@ .edit-image { .panel-body { text-align: center; + display: flex; + flex-direction: column; } .current-avatar { @@ -499,9 +515,19 @@ .image-container { display: flex; - margin: 0 1em 0.5em; + align-self: center; + margin: 0 0 1em; + max-height: 30em; + max-width: 100%; + flex: 1 0 20em; + aspect-ratio: 1; gap: 0.5em; + &.-banner { + aspect-ratio: 3; + max-width: 100%; + } + .new-image { display: flex; flex-direction: column; @@ -509,6 +535,7 @@ .cropper { flex: 1; + overflow-x: auto; } > * { @@ -546,4 +573,16 @@ aspect-ratio: unset; } } + + #modal.-mobile & { + #pick-image { + height: 3em; + } + + .image-container { + &.-banner { + max-height: 10em; + } + } + } } diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index a993a87a5..af3c56186 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -3,10 +3,15 @@