mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 03:36:07 +03:00
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 {
|
||||
display: flex;
|
||||
|
||||
> :not(:last-child) {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_Toast_description {
|
||||
|
|
|
@ -18,6 +18,11 @@ limitations under the License.
|
|||
line-height: 16px;
|
||||
padding: 5px 15px;
|
||||
font-size: 12px;
|
||||
height: min-content;
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
&.mx_AccessibleButton_kind_primary {
|
||||
color: $accent-color;
|
||||
|
|
|
@ -65,23 +65,6 @@ limitations under the License.
|
|||
.mx_KeyVerification_buttons {
|
||||
align-items: center;
|
||||
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 {
|
||||
|
|
|
@ -111,10 +111,10 @@ export default class MKeyVerificationRequest extends React.Component {
|
|||
userLabelForEventRoom(fromUserId, mxEvent)}</div>);
|
||||
const isResolved = !(this.state.accepted || this.state.cancelled || this.state.done);
|
||||
if (isResolved) {
|
||||
const AccessibleButton = sdk.getComponent("elements.AccessibleButton");
|
||||
const FormButton = sdk.getComponent("elements.FormButton");
|
||||
stateNode = (<div className="mx_KeyVerification_buttons">
|
||||
<AccessibleButton kind="decline" onClick={this._onRejectClicked}>{_t("Decline")}</AccessibleButton>
|
||||
<AccessibleButton kind="accept" onClick={this._onAcceptClicked}>{_t("Accept")}</AccessibleButton>
|
||||
<FormButton kind="danger" onClick={this._onRejectClicked} label={_t("Decline")} />
|
||||
<FormButton onClick={this._onAcceptClicked} label={_t("Accept")} />
|
||||
</div>);
|
||||
}
|
||||
} else if (isOwn) { // request sent by us
|
||||
|
|
Loading…
Reference in a new issue