use FormButton in verification request tile too and dedupe styles
This commit is contained in:
parent
0dfb0f5468
commit
309633181d
4 changed files with 8 additions and 24 deletions
|
@ -87,10 +87,6 @@ limitations under the License.
|
||||||
|
|
||||||
.mx_Toast_buttons {
|
.mx_Toast_buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
> :not(:last-child) {
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_Toast_description {
|
.mx_Toast_description {
|
||||||
|
|
|
@ -18,6 +18,11 @@ limitations under the License.
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
padding: 5px 15px;
|
padding: 5px 15px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
height: min-content;
|
||||||
|
|
||||||
|
&:not(:last-child) {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
&.mx_AccessibleButton_kind_primary {
|
&.mx_AccessibleButton_kind_primary {
|
||||||
color: $accent-color;
|
color: $accent-color;
|
||||||
|
|
|
@ -65,23 +65,6 @@ limitations under the License.
|
||||||
.mx_KeyVerification_buttons {
|
.mx_KeyVerification_buttons {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.mx_AccessibleButton_kind_decline {
|
|
||||||
color: $notice-primary-color;
|
|
||||||
background-color: $notice-primary-bg-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_AccessibleButton_kind_accept {
|
|
||||||
color: $accent-color;
|
|
||||||
background-color: $accent-bg-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
[role=button] {
|
|
||||||
margin: 10px;
|
|
||||||
padding: 7px 15px;
|
|
||||||
border-radius: 5px;
|
|
||||||
height: min-content;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_KeyVerification_state {
|
.mx_KeyVerification_state {
|
||||||
|
|
|
@ -111,10 +111,10 @@ export default class MKeyVerificationRequest extends React.Component {
|
||||||
userLabelForEventRoom(fromUserId, mxEvent)}</div>);
|
userLabelForEventRoom(fromUserId, mxEvent)}</div>);
|
||||||
const isResolved = !(this.state.accepted || this.state.cancelled || this.state.done);
|
const isResolved = !(this.state.accepted || this.state.cancelled || this.state.done);
|
||||||
if (isResolved) {
|
if (isResolved) {
|
||||||
const AccessibleButton = sdk.getComponent("elements.AccessibleButton");
|
const FormButton = sdk.getComponent("elements.FormButton");
|
||||||
stateNode = (<div className="mx_KeyVerification_buttons">
|
stateNode = (<div className="mx_KeyVerification_buttons">
|
||||||
<AccessibleButton kind="decline" onClick={this._onRejectClicked}>{_t("Decline")}</AccessibleButton>
|
<FormButton kind="danger" onClick={this._onRejectClicked} label={_t("Decline")} />
|
||||||
<AccessibleButton kind="accept" onClick={this._onAcceptClicked}>{_t("Accept")}</AccessibleButton>
|
<FormButton onClick={this._onAcceptClicked} label={_t("Accept")} />
|
||||||
</div>);
|
</div>);
|
||||||
}
|
}
|
||||||
} else if (isOwn) { // request sent by us
|
} else if (isOwn) { // request sent by us
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue