Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Merge styles of _EmailAddresses.pcss and _PhoneNumbers.pcss #10679

Merged
merged 16 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion res/css/_components.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@
@import "./views/settings/_CrossSigningPanel.pcss";
@import "./views/settings/_CryptographyPanel.pcss";
@import "./views/settings/_DevicesPanel.pcss";
@import "./views/settings/_EmailAddresses.pcss";
@import "./views/settings/_FontScalingPanel.pcss";
@import "./views/settings/_ImageSizePanel.pcss";
@import "./views/settings/_IntegrationManager.pcss";
Expand Down
32 changes: 0 additions & 32 deletions res/css/views/settings/_EmailAddresses.pcss

This file was deleted.

18 changes: 1 addition & 17 deletions res/css/views/settings/_PhoneNumbers.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

.mx_ExistingPhoneNumber {
display: flex;
align-items: center;
margin-bottom: 5px;
}

.mx_ExistingPhoneNumber_address,
.mx_ExistingPhoneNumber_promptText {
flex: 1;
margin-right: 10px;
}

.mx_ExistingPhoneNumber_confirmBtn {
margin-left: 5px;
}

.mx_ExistingPhoneNumber_verification {
.mx_GeneralUserSettingsTab_discovery_existing_verification {
display: inline-flex;
align-items: center;

Expand Down
19 changes: 17 additions & 2 deletions res/css/views/settings/tabs/user/_GeneralUserSettingsTab.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,27 @@ limitations under the License.

.mx_GeneralUserSettingsTab_accountSection .mx_EmailAddresses,
.mx_GeneralUserSettingsTab_accountSection .mx_PhoneNumbers,
.mx_GeneralUserSettingsTab_discovery .mx_ExistingEmailAddress,
.mx_GeneralUserSettingsTab_discovery .mx_ExistingPhoneNumber,
.mx_GeneralUserSettingsTab_discovery .mx_GeneralUserSettingsTab_discovery_existing,
.mx_GeneralUserSettingsTab_languageInput {
margin-inline-end: var(--SettingsTab_fullWidthField-margin-inline-end);
}

.mx_GeneralUserSettingsTab_discovery_existing {
display: flex;
align-items: center;
margin-bottom: 5px;
}

.mx_GeneralUserSettingsTab_discovery_existing_address,
.mx_GeneralUserSettingsTab_discovery_existing_promptText {
flex: 1;
margin-right: 10px;
}

.mx_GeneralUserSettingsTab_discovery_existing_button {
margin-left: 5px;
}

.mx_GeneralUserSettingsTab_warningIcon {
vertical-align: middle;
}
Expand Down
12 changes: 6 additions & 6 deletions src/components/views/settings/account/EmailAddresses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,21 @@ export class ExistingEmailAddress extends React.Component<IExistingEmailAddressP
public render(): React.ReactNode {
if (this.state.verifyRemove) {
return (
<div className="mx_ExistingEmailAddress">
<span className="mx_ExistingEmailAddress_promptText">
<div className="mx_GeneralUserSettingsTab_discovery_existing">
<span className="mx_GeneralUserSettingsTab_discovery_existing_promptText">
{_t("Remove %(email)s?", { email: this.props.email.address })}
</span>
<AccessibleButton
onClick={this.onActuallyRemove}
kind="danger_sm"
className="mx_ExistingEmailAddress_confirmBtn"
className="mx_GeneralUserSettingsTab_discovery_existing_button"
>
{_t("Remove")}
</AccessibleButton>
<AccessibleButton
onClick={this.onDontRemove}
kind="link_sm"
className="mx_ExistingEmailAddress_confirmBtn"
className="mx_GeneralUserSettingsTab_discovery_existing_button"
>
{_t("Cancel")}
</AccessibleButton>
Expand All @@ -117,8 +117,8 @@ export class ExistingEmailAddress extends React.Component<IExistingEmailAddressP
}

return (
<div className="mx_ExistingEmailAddress">
<span className="mx_ExistingEmailAddress_email">{this.props.email.address}</span>
<div className="mx_GeneralUserSettingsTab_discovery_existing">
<span className="mx_GeneralUserSettingsTab_discovery_existing_address">{this.props.email.address}</span>
<AccessibleButton onClick={this.onRemove} kind="danger_sm">
{_t("Remove")}
</AccessibleButton>
Expand Down
14 changes: 8 additions & 6 deletions src/components/views/settings/account/PhoneNumbers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,21 +89,21 @@ export class ExistingPhoneNumber extends React.Component<IExistingPhoneNumberPro
public render(): React.ReactNode {
if (this.state.verifyRemove) {
return (
<div className="mx_ExistingPhoneNumber">
<span className="mx_ExistingPhoneNumber_promptText">
<div className="mx_GeneralUserSettingsTab_discovery_existing">
<span className="mx_GeneralUserSettingsTab_discovery_existing_promptText">
{_t("Remove %(phone)s?", { phone: this.props.msisdn.address })}
</span>
<AccessibleButton
onClick={this.onActuallyRemove}
kind="danger_sm"
className="mx_ExistingPhoneNumber_confirmBtn"
className="mx_GeneralUserSettingsTab_discovery_existing_button"
>
{_t("Remove")}
</AccessibleButton>
<AccessibleButton
onClick={this.onDontRemove}
kind="link_sm"
className="mx_ExistingPhoneNumber_confirmBtn"
className="mx_GeneralUserSettingsTab_discovery_existing_button"
>
{_t("Cancel")}
</AccessibleButton>
Expand All @@ -112,8 +112,10 @@ export class ExistingPhoneNumber extends React.Component<IExistingPhoneNumberPro
}

return (
<div className="mx_ExistingPhoneNumber">
<span className="mx_ExistingPhoneNumber_address">+{this.props.msisdn.address}</span>
<div className="mx_GeneralUserSettingsTab_discovery_existing">
<span className="mx_GeneralUserSettingsTab_discovery_existing_address">
+{this.props.msisdn.address}
</span>
<AccessibleButton onClick={this.onRemove} kind="danger_sm">
{_t("Remove")}
</AccessibleButton>
Expand Down
10 changes: 5 additions & 5 deletions src/components/views/settings/discovery/EmailAddresses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export class EmailAddress extends React.Component<IEmailAddressProps, IEmailAddr
<span>
{_t("Verify the link in your inbox")}
<AccessibleButton
className="mx_ExistingEmailAddress_confirmBtn"
className="mx_GeneralUserSettingsTab_discovery_existing_button"
kind="primary_sm"
onClick={this.onContinueClick}
disabled={this.state.continueDisabled}
Expand All @@ -229,7 +229,7 @@ export class EmailAddress extends React.Component<IEmailAddressProps, IEmailAddr
} else if (bound) {
status = (
<AccessibleButton
className="mx_ExistingEmailAddress_confirmBtn"
className="mx_GeneralUserSettingsTab_discovery_existing_button"
kind="danger_sm"
onClick={this.onRevokeClick}
>
Expand All @@ -239,7 +239,7 @@ export class EmailAddress extends React.Component<IEmailAddressProps, IEmailAddr
} else {
status = (
<AccessibleButton
className="mx_ExistingEmailAddress_confirmBtn"
className="mx_GeneralUserSettingsTab_discovery_existing_button"
kind="primary_sm"
onClick={this.onShareClick}
>
Expand All @@ -249,8 +249,8 @@ export class EmailAddress extends React.Component<IEmailAddressProps, IEmailAddr
}

return (
<div className="mx_ExistingEmailAddress">
<span className="mx_ExistingEmailAddress_email">{address}</span>
<div className="mx_GeneralUserSettingsTab_discovery_existing">
<span className="mx_GeneralUserSettingsTab_discovery_existing_address">{address}</span>
{status}
</div>
);
Expand Down
10 changes: 5 additions & 5 deletions src/components/views/settings/discovery/PhoneNumbers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export class PhoneNumber extends React.Component<IPhoneNumberProps, IPhoneNumber
let status;
if (verifying) {
status = (
<span className="mx_ExistingPhoneNumber_verification">
<span className="mx_GeneralUserSettingsTab_discovery_existing_verification">
<span>
{_t("Please enter verification code sent via text.")}
<br />
Expand All @@ -243,7 +243,7 @@ export class PhoneNumber extends React.Component<IPhoneNumberProps, IPhoneNumber
} else if (bound) {
status = (
<AccessibleButton
className="mx_ExistingPhoneNumber_confirmBtn"
className="mx_GeneralUserSettingsTab_discovery_existing_button"
kind="danger_sm"
onClick={this.onRevokeClick}
>
Expand All @@ -253,7 +253,7 @@ export class PhoneNumber extends React.Component<IPhoneNumberProps, IPhoneNumber
} else {
status = (
<AccessibleButton
className="mx_ExistingPhoneNumber_confirmBtn"
className="mx_GeneralUserSettingsTab_discovery_existing_button"
kind="primary_sm"
onClick={this.onShareClick}
>
Expand All @@ -263,8 +263,8 @@ export class PhoneNumber extends React.Component<IPhoneNumberProps, IPhoneNumber
}

return (
<div className="mx_ExistingPhoneNumber">
<span className="mx_ExistingPhoneNumber_address">+{address}</span>
<div className="mx_GeneralUserSettingsTab_discovery_existing">
<span className="mx_GeneralUserSettingsTab_discovery_existing_address">+{address}</span>
{status}
</div>
);
Expand Down