mirror of https://github.com/vector-im/riot-web
Add SSO dialog copy for 3PID adding (email/phone)
parent
6112d92f80
commit
de79520150
|
@ -21,6 +21,7 @@ import * as sdk from './index';
|
|||
import Modal from './Modal';
|
||||
import { _t } from './languageHandler';
|
||||
import IdentityAuthClient from './IdentityAuthClient';
|
||||
import {SSOAuthEntry} from "./components/views/auth/InteractiveAuthEntryComponents";
|
||||
|
||||
function getIdServerDomain() {
|
||||
return MatrixClientPeg.get().idBaseUrl.split("://")[1];
|
||||
|
@ -188,11 +189,30 @@ export default class AddThreepid {
|
|||
// pop up an interactive auth dialog
|
||||
const InteractiveAuthDialog = sdk.getComponent("dialogs.InteractiveAuthDialog");
|
||||
|
||||
|
||||
const dialogAesthetics = {
|
||||
[SSOAuthEntry.PHASE_PREAUTH]: {
|
||||
title: _t("Use Single Sign On to continue"),
|
||||
body: _t("Confirm adding this email address by using Single Sign On to prove your identity."),
|
||||
continueText: _t("Single Sign On"),
|
||||
continueKind: "primary",
|
||||
},
|
||||
[SSOAuthEntry.PHASE_POSTAUTH]: {
|
||||
title: _t("Confirm adding email"),
|
||||
body: _t("Click the button below to confirm adding this email address."),
|
||||
continueText: _t("Confirm"),
|
||||
continueKind: "primary",
|
||||
},
|
||||
};
|
||||
const { finished } = Modal.createTrackedDialog('Add Email', '', InteractiveAuthDialog, {
|
||||
title: _t("Add Email Address"),
|
||||
matrixClient: MatrixClientPeg.get(),
|
||||
authData: e.data,
|
||||
makeRequest: this._makeAddThreepidOnlyRequest,
|
||||
aestheticsForStagePhases: {
|
||||
[SSOAuthEntry.LOGIN_TYPE]: dialogAesthetics,
|
||||
[SSOAuthEntry.UNSTABLE_LOGIN_TYPE]: dialogAesthetics,
|
||||
},
|
||||
});
|
||||
return finished;
|
||||
}
|
||||
|
@ -285,11 +305,29 @@ export default class AddThreepid {
|
|||
// pop up an interactive auth dialog
|
||||
const InteractiveAuthDialog = sdk.getComponent("dialogs.InteractiveAuthDialog");
|
||||
|
||||
const dialogAesthetics = {
|
||||
[SSOAuthEntry.PHASE_PREAUTH]: {
|
||||
title: _t("Use Single Sign On to continue"),
|
||||
body: _t("Confirm adding this phone number by using Single Sign On to prove your identity."),
|
||||
continueText: _t("Single Sign On"),
|
||||
continueKind: "primary",
|
||||
},
|
||||
[SSOAuthEntry.PHASE_POSTAUTH]: {
|
||||
title: _t("Confirm adding phone number"),
|
||||
body: _t("Click the button below to confirm adding this phone number."),
|
||||
continueText: _t("Confirm"),
|
||||
continueKind: "primary",
|
||||
},
|
||||
};
|
||||
const { finished } = Modal.createTrackedDialog('Add MSISDN', '', InteractiveAuthDialog, {
|
||||
title: _t("Add Phone Number"),
|
||||
matrixClient: MatrixClientPeg.get(),
|
||||
authData: e.data,
|
||||
makeRequest: this._makeAddThreepidOnlyRequest,
|
||||
aestheticsForStagePhases: {
|
||||
[SSOAuthEntry.LOGIN_TYPE]: dialogAesthetics,
|
||||
[SSOAuthEntry.UNSTABLE_LOGIN_TYPE]: dialogAesthetics,
|
||||
},
|
||||
});
|
||||
return finished;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
{
|
||||
"This email address is already in use": "This email address is already in use",
|
||||
"This phone number is already in use": "This phone number is already in use",
|
||||
"Use Single Sign On to continue": "Use Single Sign On to continue",
|
||||
"Confirm adding this email address by using Single Sign On to prove your identity.": "Confirm adding this email address by using Single Sign On to prove your identity.",
|
||||
"Single Sign On": "Single Sign On",
|
||||
"Confirm adding email": "Confirm adding email",
|
||||
"Click the button below to confirm adding this email address.": "Click the button below to confirm adding this email address.",
|
||||
"Confirm": "Confirm",
|
||||
"Add Email Address": "Add Email Address",
|
||||
"Failed to verify email address: make sure you clicked the link in the email": "Failed to verify email address: make sure you clicked the link in the email",
|
||||
"Confirm adding this phone number by using Single Sign On to prove your identity.": "Confirm adding this phone number by using Single Sign On to prove your identity.",
|
||||
"Confirm adding phone number": "Confirm adding phone number",
|
||||
"Click the button below to confirm adding this phone number.": "Click the button below to confirm adding this phone number.",
|
||||
"Add Phone Number": "Add Phone Number",
|
||||
"The platform you're on": "The platform you're on",
|
||||
"The version of Riot": "The version of Riot",
|
||||
|
@ -598,9 +607,7 @@
|
|||
"up to date": "up to date",
|
||||
"Your homeserver does not support session management.": "Your homeserver does not support session management.",
|
||||
"Unable to load session list": "Unable to load session list",
|
||||
"Use Single Sign On to continue": "Use Single Sign On to continue",
|
||||
"Confirm deleting these sessions by using Single Sign On to prove your identity.": "Confirm deleting these sessions by using Single Sign On to prove your identity.",
|
||||
"Single Sign On": "Single Sign On",
|
||||
"Confirm deleting these sessions": "Confirm deleting these sessions",
|
||||
"Click the button below to confirm deleting these sessions.": "Click the button below to confirm deleting these sessions.",
|
||||
"Delete sessions": "Delete sessions",
|
||||
|
@ -1837,7 +1844,6 @@
|
|||
"Please enter the code it contains:": "Please enter the code it contains:",
|
||||
"Code": "Code",
|
||||
"Submit": "Submit",
|
||||
"Confirm": "Confirm",
|
||||
"Start authentication": "Start authentication",
|
||||
"Unable to validate homeserver/identity server": "Unable to validate homeserver/identity server",
|
||||
"Your Modular server": "Your Modular server",
|
||||
|
|
Loading…
Reference in New Issue