mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-18 06:35:35 +08:00
SERVICE_TYPES
This commit is contained in:
parent
fc706e1d47
commit
189dd4c7b1
@ -99,7 +99,7 @@ class ScalarAuthClient {
|
|||||||
if (e instanceof TermsNotSignedError) {
|
if (e instanceof TermsNotSignedError) {
|
||||||
console.log("Integrations manager requires new terms to be agreed to");
|
console.log("Integrations manager requires new terms to be agreed to");
|
||||||
return presentTermsForServices([new Service(
|
return presentTermsForServices([new Service(
|
||||||
Matrix.SERVICETYPES.IM,
|
Matrix.SERVICE_TYPES.IM,
|
||||||
SdkConfig.get().integrations_rest_url,
|
SdkConfig.get().integrations_rest_url,
|
||||||
token,
|
token,
|
||||||
)]).then(() => {
|
)]).then(() => {
|
||||||
|
@ -28,7 +28,7 @@ export class TermsNotSignedError extends Error {}
|
|||||||
*/
|
*/
|
||||||
export class Service {
|
export class Service {
|
||||||
/**
|
/**
|
||||||
* @param {MatrixClient.SERVICETYPES} serviceType The type of service
|
* @param {MatrixClient.SERVICE_TYPES} serviceType The type of service
|
||||||
* @param {string} baseUrl The Base URL of the service (ie. before '/_matrix')
|
* @param {string} baseUrl The Base URL of the service (ie. before '/_matrix')
|
||||||
* @param {string} accessToken The user's access token for the service
|
* @param {string} accessToken The user's access token for the service
|
||||||
*/
|
*/
|
||||||
|
@ -74,16 +74,16 @@ export default class TermsDialog extends React.Component {
|
|||||||
|
|
||||||
_nameForServiceType(serviceType, host) {
|
_nameForServiceType(serviceType, host) {
|
||||||
switch (serviceType) {
|
switch (serviceType) {
|
||||||
case Matrix.SERVICETYPES.IS:
|
case Matrix.SERVICE_TYPES.IS:
|
||||||
return <div>{_t("Identity Server")}<br />({host})</div>;
|
return <div>{_t("Identity Server")}<br />({host})</div>;
|
||||||
case Matrix.SERVICETYPES.IM:
|
case Matrix.SERVICE_TYPES.IM:
|
||||||
return <div>{_t("Integrations Manager")}<br />({host})</div>;
|
return <div>{_t("Integrations Manager")}<br />({host})</div>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_summaryForServiceType(serviceType, docName) {
|
_summaryForServiceType(serviceType, docName) {
|
||||||
switch (serviceType) {
|
switch (serviceType) {
|
||||||
case Matrix.SERVICETYPES.IS:
|
case Matrix.SERVICE_TYPES.IS:
|
||||||
return <div>
|
return <div>
|
||||||
{_t("Find others by phone or email")}
|
{_t("Find others by phone or email")}
|
||||||
<br />
|
<br />
|
||||||
@ -91,7 +91,7 @@ export default class TermsDialog extends React.Component {
|
|||||||
{docName !== null ? <br /> : ''}
|
{docName !== null ? <br /> : ''}
|
||||||
{docName !== null ? '('+docName+')' : ''}
|
{docName !== null ? '('+docName+')' : ''}
|
||||||
</div>;
|
</div>;
|
||||||
case Matrix.SERVICETYPES.IM:
|
case Matrix.SERVICE_TYPES.IM:
|
||||||
return <div>
|
return <div>
|
||||||
{_t("Use Bots, bridges, widgets and sticker packs")}
|
{_t("Use Bots, bridges, widgets and sticker packs")}
|
||||||
{docName !== null ? <br /> : ''}
|
{docName !== null ? <br /> : ''}
|
||||||
|
Loading…
Reference in New Issue
Block a user