Remove host signup config strings, make translatable instead
Also replace the icon in the UserMenu and change the text, requested from design.pull/21833/head
parent
dc549a9e4b
commit
23140a84ff
|
@ -273,7 +273,7 @@ limitations under the License.
|
|||
mask-image: url('$(res)/img/element-icons/roomlist/home.svg');
|
||||
}
|
||||
.mx_UserMenu_iconHosting::before {
|
||||
mask-image: url('$(res)/img/element-icons/roomlist/home.svg');
|
||||
mask-image: url('$(res)/img/element-icons/brands/element.svg');
|
||||
}
|
||||
|
||||
.mx_UserMenu_iconBell::before {
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.12012 1.02C6.12012 0.45667 6.57679 0 7.14012 0C10.8957 0 13.9401 3.04446 13.9401 6.8C13.9401 7.36333 13.4834 7.82 12.9201 7.82C12.3568 7.82 11.9001 7.36333 11.9001 6.8C11.9001 4.17112 9.76899 2.04 7.14012 2.04C6.57679 2.04 6.12012 1.58333 6.12012 1.02Z" fill="#1E1E1E"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.8799 15.98C10.8799 16.5433 10.4232 17 9.85988 17C6.10435 17 3.05989 13.9555 3.05989 10.2C3.05989 9.63667 3.51656 9.18 4.07989 9.18C4.64322 9.18 5.09989 9.63667 5.09989 10.2C5.09989 12.8289 7.23101 14.96 9.85988 14.96C10.4232 14.96 10.8799 15.4167 10.8799 15.98Z" fill="#1E1E1E"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.02 10.88C0.45667 10.88 -1.99617e-08 10.4233 -4.45856e-08 9.86C-2.08745e-07 6.10447 3.04446 3.06 6.8 3.06C7.36333 3.06 7.82 3.51667 7.82 4.08C7.82 4.64334 7.36333 5.1 6.8 5.1C4.17113 5.1 2.04 7.23113 2.04 9.86C2.04 10.4233 1.58333 10.88 1.02 10.88Z" fill="#1E1E1E"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.98 6.12C16.5433 6.12 17 6.57666 17 7.14C17 10.8955 13.9555 13.94 10.2 13.94C9.63667 13.94 9.18 13.4833 9.18 12.92C9.18 12.3567 9.63667 11.9 10.2 11.9C12.8289 11.9 14.96 9.76887 14.96 7.14C14.96 6.57666 15.4167 6.12 15.98 6.12Z" fill="#1E1E1E"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
|
@ -36,7 +36,7 @@ export default class HostSignupAction extends React.PureComponent<IProps, IState
|
|||
<IconizedContextMenuOptionList>
|
||||
<IconizedContextMenuOption
|
||||
iconClassName="mx_UserMenu_iconHosting"
|
||||
label={_t("Get your own %(brand)s!")}
|
||||
label={_t("Upgrade to pro")}
|
||||
onClick={this.openDialog}
|
||||
/>
|
||||
</IconizedContextMenuOptionList>
|
||||
|
|
|
@ -172,32 +172,44 @@ export default class HostSignupDialog extends React.PureComponent<IProps, IState
|
|||
}
|
||||
|
||||
private onAccountDetailsRequest = () => {
|
||||
const termsDialog = this.config.termsDialog;
|
||||
const textComponent = (
|
||||
<>
|
||||
<p>
|
||||
{termsDialog.text}
|
||||
{_t("Continuing temporarily allows the %(hostSignupBrand)s setup process to access your " +
|
||||
"account to fetch verified email addresses. This data is not stored.", {
|
||||
hostSignupBrand: this.config.brand,
|
||||
})}
|
||||
</p>
|
||||
<p>
|
||||
{_t("Learn more in our")}
|
||||
<a href={termsDialog.privacyPolicy.href} target="_blank" rel="noreferrer noopener">
|
||||
{termsDialog.privacyPolicy.text}
|
||||
</a>,
|
||||
<a href={termsDialog.termsOfService.href} target="_blank" rel="noreferrer noopener">
|
||||
{termsDialog.termsOfService.text}
|
||||
</a> {_t("and")}
|
||||
<a href={termsDialog.cookiePolicy.href} target="_blank" rel="noreferrer noopener">
|
||||
{termsDialog.cookiePolicy.text}
|
||||
</a>.
|
||||
{_t("Learn more in our <privacyPolicyLink />, <termsOfServiceLink /> and <cookiePolicyLink />.",
|
||||
{},
|
||||
{
|
||||
cookiePolicyLink: () => (
|
||||
<a href={this.config.cookiePolicyUrl} target="_blank" rel="noreferrer noopener">
|
||||
{_t("Cookie Policy")}
|
||||
</a>
|
||||
),
|
||||
privacyPolicyLink: () => (
|
||||
<a href={this.config.privacyPolicyUrl} target="_blank" rel="noreferrer noopener">
|
||||
{_t("Privacy Policy")}
|
||||
</a>
|
||||
),
|
||||
termsOfServiceLink: () => (
|
||||
<a href={this.config.termsOfServiceUrl} target="_blank" rel="noreferrer noopener">
|
||||
{_t("Terms of Service")}
|
||||
</a>
|
||||
),
|
||||
},
|
||||
)}
|
||||
</p>
|
||||
</>
|
||||
);
|
||||
Modal.createDialog(
|
||||
QuestionDialog,
|
||||
{
|
||||
title: termsDialog.title,
|
||||
title: _t("You should know"),
|
||||
description: textComponent,
|
||||
button: termsDialog.acceptText,
|
||||
button: _t("Continue"),
|
||||
onFinished: this.onAccountDetailsDialogFinished,
|
||||
},
|
||||
);
|
||||
|
@ -230,7 +242,9 @@ export default class HostSignupDialog extends React.PureComponent<IProps, IState
|
|||
{this.state.minimized &&
|
||||
<div className="mx_Dialog_header mx_Dialog_headerWithButton">
|
||||
<div className="mx_Dialog_title">
|
||||
{this.config.minimizedDialogTitle}
|
||||
{_t("%(hostSignupBrand)s Setup", {
|
||||
hostSignupBrand: this.config.brand,
|
||||
})}
|
||||
</div>
|
||||
<AccessibleButton
|
||||
className="mx_HostSignup_maximize_button"
|
||||
|
|
|
@ -46,23 +46,11 @@ export interface IPostmessage {
|
|||
origin: string;
|
||||
}
|
||||
|
||||
interface ILink {
|
||||
href: string;
|
||||
text: string;
|
||||
}
|
||||
|
||||
interface IHostSignupTermsDialogConfig {
|
||||
acceptText: string;
|
||||
cookiePolicy: ILink;
|
||||
privacyPolicy: ILink;
|
||||
termsOfService: ILink;
|
||||
text: string;
|
||||
title: string;
|
||||
}
|
||||
|
||||
export interface IHostSignupConfig {
|
||||
brand: string;
|
||||
cookiePolicyUrl: string;
|
||||
domains: Array<string>;
|
||||
minimizedDialogTitle: string;
|
||||
termsDialog: IHostSignupTermsDialogConfig;
|
||||
privacyPolicyUrl: string;
|
||||
termsOfServiceUrl: string;
|
||||
url: string;
|
||||
}
|
||||
|
|
|
@ -2088,12 +2088,17 @@
|
|||
"Please view <existingIssuesLink>existing bugs on Github</existingIssuesLink> first. No match? <newIssueLink>Start a new one</newIssueLink>.": "Please view <existingIssuesLink>existing bugs on Github</existingIssuesLink> first. No match? <newIssueLink>Start a new one</newIssueLink>.",
|
||||
"PRO TIP: If you start a bug, please submit <debugLogsLink>debug logs</debugLogsLink> to help us track down the problem.": "PRO TIP: If you start a bug, please submit <debugLogsLink>debug logs</debugLogsLink> to help us track down the problem.",
|
||||
"Send feedback": "Send feedback",
|
||||
"Confirm Abort Of Host Creation": "Confirm Abort Of Host Creation",
|
||||
"Confirm abort of host creation": "Confirm abort of host creation",
|
||||
"Are you sure you wish to abort creation of the host? The process cannot be continued.": "Are you sure you wish to abort creation of the host? The process cannot be continued.",
|
||||
"Abort": "Abort",
|
||||
"Failed to connect to your homeserver. Please close this dialog and try again.": "Failed to connect to your homeserver. Please close this dialog and try again.",
|
||||
"Learn more in our": "Learn more in our",
|
||||
"and": "and",
|
||||
"Continuing temporarily allows the %(hostSignupBrand)s setup process to access your account to fetch verified email addresses. This data is not stored.": "Continuing temporarily allows the %(hostSignupBrand)s setup process to access your account to fetch verified email addresses. This data is not stored.",
|
||||
"Learn more in our <privacyPolicyLink />, <termsOfServiceLink /> and <cookiePolicyLink />.": "Learn more in our <privacyPolicyLink />, <termsOfServiceLink /> and <cookiePolicyLink />.",
|
||||
"Cookie Policy": "Cookie Policy",
|
||||
"Privacy Policy": "Privacy Policy",
|
||||
"Terms of Service": "Terms of Service",
|
||||
"You should know": "You should know",
|
||||
"%(hostSignupBrand)s Setup": "%(hostSignupBrand)s Setup",
|
||||
"Maximize dialog": "Maximize dialog",
|
||||
"Minimize dialog": "Minimize dialog",
|
||||
"Verify this user to mark them as trusted. Trusting users gives you extra peace of mind when using end-to-end encrypted messages.": "Verify this user to mark them as trusted. Trusting users gives you extra peace of mind when using end-to-end encrypted messages.",
|
||||
|
@ -2246,7 +2251,6 @@
|
|||
"Find others by phone or email": "Find others by phone or email",
|
||||
"Be found by phone or email": "Be found by phone or email",
|
||||
"Use bots, bridges, widgets and sticker packs": "Use bots, bridges, widgets and sticker packs",
|
||||
"Terms of Service": "Terms of Service",
|
||||
"To continue you need to accept the terms of this service.": "To continue you need to accept the terms of this service.",
|
||||
"Service": "Service",
|
||||
"Summary": "Summary",
|
||||
|
@ -2446,7 +2450,7 @@
|
|||
"Send a Direct Message": "Send a Direct Message",
|
||||
"Explore Public Rooms": "Explore Public Rooms",
|
||||
"Create a Group Chat": "Create a Group Chat",
|
||||
"Get your own Element!": "Get your own Element!",
|
||||
"Upgrade to pro": "Upgrade to pro",
|
||||
"Explore rooms": "Explore rooms",
|
||||
"Failed to reject invitation": "Failed to reject invitation",
|
||||
"Cannot create rooms in this community": "Cannot create rooms in this community",
|
||||
|
|
Loading…
Reference in New Issue