element-web-Github/res/css/views/settings/_AvatarSetting.pcss

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

78 lines
2.0 KiB
Plaintext
Raw Normal View History

/*
Copyright 2019, 2020 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
.mx_AvatarSetting_avatar {
width: 90px;
min-width: 90px; /* so it doesn't get crushed by the flexbox in languages with longer words */
height: 90px;
margin-top: 8px;
position: relative;
&.mx_AvatarSetting_avatarDisplay:hover .mx_AvatarSetting_hover {
opacity: 1;
}
& > * {
box-sizing: border-box;
}
.mx_AccessibleButton.mx_AccessibleButton_kind_primary {
margin-top: 8px;
}
.mx_AccessibleButton.mx_AccessibleButton_kind_link_sm {
width: 100%;
}
& > img {
display: block;
height: 90px;
width: inherit;
border-radius: 90px;
cursor: pointer;
Fix display of no avatar in avatar setting controls (#12558) * New user profile UI in User Settings Using new Edit In Place component. * Show avatar upload error * Fix avatar upload error * Wire up errors & feedback for display name setting * Implement avatar upload / remove progress toast * Add 768px breakpoint * Fix display of no avatar in avatar setting controls There was supposed to be a person icon but it was invisible, and also would have been inappropriate for room avatars anyway. This makes it match the designs by being the same as whatever the default avatar is. * Fix room profile display * Update to released compund-web with required components / fixes * Require compound-web 4.4.0 because we do need it * Update snapshots Because of course all the auto-generated IDs of unrelated things have changed. * Fix duplicate import * Fix CSS comment * Update snapshot * Run all the tests so the ids stay the same * Start of a test for ProfileSettings * More tests * Test that a toast appears * Test ToastRack * Update snapshots * Add the usernamee control * Fix playwright tests * New compound version for editinplace fixes * Fix useId to not just generate a constant ID * Use the label in the username component * Fix widths of test boxes * Update screenshots * Put ^ back on compound-web version * Split CSS for room & user profile settings and name the components correspondingly * Fix playwright test * Update room settings screenshot * Use original screenshot instead * Add required props in test * Fix test * Also here * Update screenshots * Remove user icon ...which is unused now, as far as I can see. * Fix styling of unrelated buttons Needed to be added in other places otherwise the specificity changes. Also put the old screenshots back. * Add copyright year * Fix copyright year * Switch to useMatrixClientContext * Fix other test
2024-06-07 01:35:44 +08:00
object-fit: cover;
}
.mx_AvatarSetting_uploadButton {
Change avatarsetting componment to use a menu (#12585) * New user profile UI in User Settings Using new Edit In Place component. * Show avatar upload error * Fix avatar upload error * Wire up errors & feedback for display name setting * Implement avatar upload / remove progress toast * Add 768px breakpoint * Fix display of no avatar in avatar setting controls There was supposed to be a person icon but it was invisible, and also would have been inappropriate for room avatars anyway. This makes it match the designs by being the same as whatever the default avatar is. * Fix room profile display * Update edit icon on avatarsetting comnponent * Change avatarsetting componment to use a menu As per the designs, remove the 'remove' link and instead have a menu pop up to either upload a new file or remove the avatar. This also changes the room profile viw, since that uses the same view. * Update to released compund-web with required components / fixes * Require compound-web 4.4.0 because we do need it * Update snapshots Because of course all the auto-generated IDs of unrelated things have changed. * Fix duplicate import * Fix CSS comment * Update snapshot * Run all the tests so the ids stay the same * Start of a test for ProfileSettings * More tests * Test that a toast appears * Test ToastRack * Update snapshots * Add the usernamee control * Fix playwright tests * New compound version for editinplace fixes * Fix useId to not just generate a constant ID * Use the label in the username component * Fix widths of test boxes * Update screenshots * Put ^ back on compound-web version * Split CSS for room & user profile settings and name the components correspondingly * Fix playwright test * Update room settings screenshot * Use original screenshot instead * Add required props in test * Fix test * Also here * Update screenshots * Remove user icon ...which is unused now, as far as I can see. * Fix styling of unrelated buttons Needed to be added in other places otherwise the specificity changes. Also put the old screenshots back. * Add copyright year * Fix copyright year * Switch to useMatrixClientContext * Fix other test * Make clickable with no avatar again and fix tests and renmove a test for the remove button which is no longer there * Put back missing CSS to make the menu entry red * Fix type error * Fix tests * Supply open / onOpenChange props * Fix tests * There is no hover anymore * Use the computed name, not the name which may be null * Fix room avatar remove behaviour * Remove redundant else
2024-06-07 21:25:21 +08:00
width: 28px;
height: 28px;
border-radius: 32px;
Change avatarsetting componment to use a menu (#12585) * New user profile UI in User Settings Using new Edit In Place component. * Show avatar upload error * Fix avatar upload error * Wire up errors & feedback for display name setting * Implement avatar upload / remove progress toast * Add 768px breakpoint * Fix display of no avatar in avatar setting controls There was supposed to be a person icon but it was invisible, and also would have been inappropriate for room avatars anyway. This makes it match the designs by being the same as whatever the default avatar is. * Fix room profile display * Update edit icon on avatarsetting comnponent * Change avatarsetting componment to use a menu As per the designs, remove the 'remove' link and instead have a menu pop up to either upload a new file or remove the avatar. This also changes the room profile viw, since that uses the same view. * Update to released compund-web with required components / fixes * Require compound-web 4.4.0 because we do need it * Update snapshots Because of course all the auto-generated IDs of unrelated things have changed. * Fix duplicate import * Fix CSS comment * Update snapshot * Run all the tests so the ids stay the same * Start of a test for ProfileSettings * More tests * Test that a toast appears * Test ToastRack * Update snapshots * Add the usernamee control * Fix playwright tests * New compound version for editinplace fixes * Fix useId to not just generate a constant ID * Use the label in the username component * Fix widths of test boxes * Update screenshots * Put ^ back on compound-web version * Split CSS for room & user profile settings and name the components correspondingly * Fix playwright test * Update room settings screenshot * Use original screenshot instead * Add required props in test * Fix test * Also here * Update screenshots * Remove user icon ...which is unused now, as far as I can see. * Fix styling of unrelated buttons Needed to be added in other places otherwise the specificity changes. Also put the old screenshots back. * Add copyright year * Fix copyright year * Switch to useMatrixClientContext * Fix other test * Make clickable with no avatar again and fix tests and renmove a test for the remove button which is no longer there * Put back missing CSS to make the menu entry red * Fix type error * Fix tests * Supply open / onOpenChange props * Fix tests * There is no hover anymore * Use the computed name, not the name which may be null * Fix room avatar remove behaviour * Remove redundant else
2024-06-07 21:25:21 +08:00
border: 1px solid var(--cpd-color-bg-canvas-default);
background-color: var(--cpd-color-bg-canvas-default);
position: absolute;
bottom: 0;
right: 0;
Change avatarsetting componment to use a menu (#12585) * New user profile UI in User Settings Using new Edit In Place component. * Show avatar upload error * Fix avatar upload error * Wire up errors & feedback for display name setting * Implement avatar upload / remove progress toast * Add 768px breakpoint * Fix display of no avatar in avatar setting controls There was supposed to be a person icon but it was invisible, and also would have been inappropriate for room avatars anyway. This makes it match the designs by being the same as whatever the default avatar is. * Fix room profile display * Update edit icon on avatarsetting comnponent * Change avatarsetting componment to use a menu As per the designs, remove the 'remove' link and instead have a menu pop up to either upload a new file or remove the avatar. This also changes the room profile viw, since that uses the same view. * Update to released compund-web with required components / fixes * Require compound-web 4.4.0 because we do need it * Update snapshots Because of course all the auto-generated IDs of unrelated things have changed. * Fix duplicate import * Fix CSS comment * Update snapshot * Run all the tests so the ids stay the same * Start of a test for ProfileSettings * More tests * Test that a toast appears * Test ToastRack * Update snapshots * Add the usernamee control * Fix playwright tests * New compound version for editinplace fixes * Fix useId to not just generate a constant ID * Use the label in the username component * Fix widths of test boxes * Update screenshots * Put ^ back on compound-web version * Split CSS for room & user profile settings and name the components correspondingly * Fix playwright test * Update room settings screenshot * Use original screenshot instead * Add required props in test * Fix test * Also here * Update screenshots * Remove user icon ...which is unused now, as far as I can see. * Fix styling of unrelated buttons Needed to be added in other places otherwise the specificity changes. Also put the old screenshots back. * Add copyright year * Fix copyright year * Switch to useMatrixClientContext * Fix other test * Make clickable with no avatar again and fix tests and renmove a test for the remove button which is no longer there * Put back missing CSS to make the menu entry red * Fix type error * Fix tests * Supply open / onOpenChange props * Fix tests * There is no hover anymore * Use the computed name, not the name which may be null * Fix room avatar remove behaviour * Remove redundant else
2024-06-07 21:25:21 +08:00
text-align: center;
cursor: pointer;
Change avatarsetting componment to use a menu (#12585) * New user profile UI in User Settings Using new Edit In Place component. * Show avatar upload error * Fix avatar upload error * Wire up errors & feedback for display name setting * Implement avatar upload / remove progress toast * Add 768px breakpoint * Fix display of no avatar in avatar setting controls There was supposed to be a person icon but it was invisible, and also would have been inappropriate for room avatars anyway. This makes it match the designs by being the same as whatever the default avatar is. * Fix room profile display * Update edit icon on avatarsetting comnponent * Change avatarsetting componment to use a menu As per the designs, remove the 'remove' link and instead have a menu pop up to either upload a new file or remove the avatar. This also changes the room profile viw, since that uses the same view. * Update to released compund-web with required components / fixes * Require compound-web 4.4.0 because we do need it * Update snapshots Because of course all the auto-generated IDs of unrelated things have changed. * Fix duplicate import * Fix CSS comment * Update snapshot * Run all the tests so the ids stay the same * Start of a test for ProfileSettings * More tests * Test that a toast appears * Test ToastRack * Update snapshots * Add the usernamee control * Fix playwright tests * New compound version for editinplace fixes * Fix useId to not just generate a constant ID * Use the label in the username component * Fix widths of test boxes * Update screenshots * Put ^ back on compound-web version * Split CSS for room & user profile settings and name the components correspondingly * Fix playwright test * Update room settings screenshot * Use original screenshot instead * Add required props in test * Fix test * Also here * Update screenshots * Remove user icon ...which is unused now, as far as I can see. * Fix styling of unrelated buttons Needed to be added in other places otherwise the specificity changes. Also put the old screenshots back. * Add copyright year * Fix copyright year * Switch to useMatrixClientContext * Fix other test * Make clickable with no avatar again and fix tests and renmove a test for the remove button which is no longer there * Put back missing CSS to make the menu entry red * Fix type error * Fix tests * Supply open / onOpenChange props * Fix tests * There is no hover anymore * Use the computed name, not the name which may be null * Fix room avatar remove behaviour * Remove redundant else
2024-06-07 21:25:21 +08:00
svg {
position: relative;
top: 3px;
}
}
.mx_AvatarSetting_uploadButton:hover,
.mx_AvatarSetting_uploadButton_active {
background-color: var(--cpd-color-bg-subtle-primary);
}
}
Change avatarsetting componment to use a menu (#12585) * New user profile UI in User Settings Using new Edit In Place component. * Show avatar upload error * Fix avatar upload error * Wire up errors & feedback for display name setting * Implement avatar upload / remove progress toast * Add 768px breakpoint * Fix display of no avatar in avatar setting controls There was supposed to be a person icon but it was invisible, and also would have been inappropriate for room avatars anyway. This makes it match the designs by being the same as whatever the default avatar is. * Fix room profile display * Update edit icon on avatarsetting comnponent * Change avatarsetting componment to use a menu As per the designs, remove the 'remove' link and instead have a menu pop up to either upload a new file or remove the avatar. This also changes the room profile viw, since that uses the same view. * Update to released compund-web with required components / fixes * Require compound-web 4.4.0 because we do need it * Update snapshots Because of course all the auto-generated IDs of unrelated things have changed. * Fix duplicate import * Fix CSS comment * Update snapshot * Run all the tests so the ids stay the same * Start of a test for ProfileSettings * More tests * Test that a toast appears * Test ToastRack * Update snapshots * Add the usernamee control * Fix playwright tests * New compound version for editinplace fixes * Fix useId to not just generate a constant ID * Use the label in the username component * Fix widths of test boxes * Update screenshots * Put ^ back on compound-web version * Split CSS for room & user profile settings and name the components correspondingly * Fix playwright test * Update room settings screenshot * Use original screenshot instead * Add required props in test * Fix test * Also here * Update screenshots * Remove user icon ...which is unused now, as far as I can see. * Fix styling of unrelated buttons Needed to be added in other places otherwise the specificity changes. Also put the old screenshots back. * Add copyright year * Fix copyright year * Switch to useMatrixClientContext * Fix other test * Make clickable with no avatar again and fix tests and renmove a test for the remove button which is no longer there * Put back missing CSS to make the menu entry red * Fix type error * Fix tests * Supply open / onOpenChange props * Fix tests * There is no hover anymore * Use the computed name, not the name which may be null * Fix room avatar remove behaviour * Remove redundant else
2024-06-07 21:25:21 +08:00
.mx_AvatarSetting_removeMenuItem svg,
.mx_AvatarSetting_removeMenuItem span {
color: var(--cpd-color-text-critical-primary) !important;
}