diff --git a/stylesheets/_index.scss b/stylesheets/_index.scss index 44ca0de80..b78bbd374 100644 --- a/stylesheets/_index.scss +++ b/stylesheets/_index.scss @@ -20,11 +20,6 @@ margin: 8px; } - .profile-name { - font-size: larger; - text-align: center; - } - .title-text { font-size: large; text-align: center; diff --git a/stylesheets/_modal.scss b/stylesheets/_modal.scss index b759ca720..254138017 100644 --- a/stylesheets/_modal.scss +++ b/stylesheets/_modal.scss @@ -146,92 +146,6 @@ } } -.edit-profile-dialog { - .session-modal__header__title { - font-size: var(--font-size-lg); - } - - .session-modal { - width: $session-modal-size-md; - - &__header { - height: 68.45px; - } - } - - .avatar-center-inner { - position: relative; - - .qr-view-button { - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; - position: absolute; - top: -8px; - right: -8px; - height: 34px; - width: 34px; - border-radius: 50%; - background-color: var(--white-color); - transition: var(--default-duration); - - &:hover { - filter: brightness(90%); - } - - .session-icon-button { - opacity: 1; - } - } - } - - .session-id-section { - display: flex; - align-items: center; - flex-direction: column; - .session-button { - width: 148px; - } - } - - .profile-name { - display: flex; - justify-content: center; - margin-top: var(--margins-lg); - - input { - height: 38px; - border-radius: 5px; - text-align: center; - font-size: $session-font-md; - } - - &-uneditable { - display: flex; - align-items: center; - justify-content: center; - - p { - font-size: $session-font-md; - padding: 0px var(--margins-sm); - } - - .session-icon-button { - padding: 0px; - } - } - } - - .edit-profile-default { - .session-modal { - .session-modal__body { - overflow: initial; - } - } - } -} - .reaction-list-modal { .session-confirm-wrapper { .session-modal__body { diff --git a/stylesheets/_session_constants.scss b/stylesheets/_session_constants.scss index 02b7323be..dc7e20ea5 100644 --- a/stylesheets/_session_constants.scss +++ b/stylesheets/_session_constants.scss @@ -105,7 +105,7 @@ $session-font-md: 15px; @mixin text-highlight($color) { background-color: $color; - padding: $session-margin-xs $session-margin-sm; + padding: var(--margins-xs) var(--margins-sm); border-radius: 3px; display: inline-block; } @@ -137,21 +137,6 @@ $session-subtle-factor: 0.6; @return rgba($color, $session-subtle-factor); } -// ////////////////////////////////////////////// -// ////////////////// Sizing //////////////////// -// ////////////////////////////////////////////// - -// Various Components -$session-modal-size-sm: 220px; -$session-modal-size-md: 400px; -$session-modal-size-lg: 650px; - -// Spacing -$session-margin-xs: 5px; -$session-margin-sm: 10px; -$session-margin-md: 15px; -$session-margin-lg: 20px; - // Animations @keyframes fadein { diff --git a/ts/components/basic/YourSessionIDPill.tsx b/ts/components/basic/YourSessionIDPill.tsx index 89ff334ef..18b31d2eb 100644 --- a/ts/components/basic/YourSessionIDPill.tsx +++ b/ts/components/basic/YourSessionIDPill.tsx @@ -12,7 +12,7 @@ const StyledPillDividerLine = styled.div` const StyledPillSpan = styled.span` padding: 6px 15px 5px; border-radius: 50px; - color: var(--text-primary-color); + color: var(--text-secondary-color); border: 1px solid var(--border-color); `; @@ -20,7 +20,7 @@ const StyledPillDivider = styled.div` width: 100%; text-align: center; display: flex; - margin: 35px 0; + margin: 0; `; export const YourSessionIDPill = () => { diff --git a/ts/components/dialog/EditProfileDialog.tsx b/ts/components/dialog/EditProfileDialog.tsx index 6b1c9df7d..6af6d16ad 100644 --- a/ts/components/dialog/EditProfileDialog.tsx +++ b/ts/components/dialog/EditProfileDialog.tsx @@ -1,5 +1,6 @@ import { ChangeEvent, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; +import styled from 'styled-components'; import { Avatar, AvatarSize } from '../avatar/Avatar'; import { SyncUtils, ToastUtils, UserUtils } from '../../session/utils'; @@ -16,10 +17,74 @@ import { getThemeValue } from '../../themes/globals'; import { setLastProfileUpdateTimestamp } from '../../util/storage'; import { SessionQRCode } from '../SessionQRCode'; import { SessionWrapperModal } from '../SessionWrapperModal'; -import { SessionButton, SessionButtonType } from '../basic/SessionButton'; +import { Flex } from '../basic/Flex'; +import { SessionButton } from '../basic/SessionButton'; +import { Spacer2XL, Spacer3XL, SpacerLG, SpacerSM, SpacerXL, SpacerXS } from '../basic/Text'; import { SessionIconButton } from '../icon'; import { SessionSpinner } from '../loading'; +const StyledEditProfileDialog = styled.div` + .session-modal { + width: 468px; + .session-modal__body { + overflow: initial; + } + } + + .avatar-center-inner { + position: relative; + + .qr-view-button { + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + position: absolute; + top: -8px; + right: -8px; + height: 34px; + width: 34px; + border-radius: 50%; + background-color: var(--white-color); + transition: var(--default-duration); + + &:hover { + filter: brightness(90%); + } + + .session-icon-button { + opacity: 1; + } + } + } +`; + +const StyledProfileName = styled(Flex)` + input { + height: 38px; + border-radius: 5px; + text-align: center; + font-size: var(--font-size-md); + } + + &.uneditable { + p { + margin: 0; + padding: 0px var(--margins-lg) 0 var(--margins-sm); + } + + .session-icon-button { + padding: 0px; + } + } +`; + +const StyledSessionIdSection = styled(Flex)` + .session-button { + width: 160px; + } +`; + const QRView = ({ sessionID }: { sessionID: string }) => { const theme = useSelector(getTheme); @@ -208,17 +273,28 @@ export const EditProfileDialog = () => { /* The
{updatedProfileName || profileName}
+{updatedProfileName || profileName}
+ +