mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-11-24 09:50:51 -06:00
fix: ELECTRON-1171 (Sets font-family dynamically based on locale) (#765)
* ELECTRON-1171 - Apply font-family dynamically based on locale * ELECTRON-1171 - Reset font family for network error
This commit is contained in:
parent
18be108425
commit
f24498699a
@ -3,6 +3,7 @@
|
|||||||
exports[`basic auth should render correctly 1`] = `
|
exports[`basic auth should render correctly 1`] = `
|
||||||
<div
|
<div
|
||||||
className="container"
|
className="container"
|
||||||
|
lang="en-US"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
Please provide your login credentials for:
|
Please provide your login credentials for:
|
||||||
|
@ -48,7 +48,7 @@ export default class BasicAuth extends React.Component<{}, IState> {
|
|||||||
const { hostname, isValidCredentials } = this.state;
|
const { hostname, isValidCredentials } = this.state;
|
||||||
const shouldShowError = classNames('credentials-error', { 'display-error': !isValidCredentials });
|
const shouldShowError = classNames('credentials-error', { 'display-error': !isValidCredentials });
|
||||||
return (
|
return (
|
||||||
<div className='container'>
|
<div className='container' lang={i18n.getLocale()}>
|
||||||
<span>{i18n.t('Please provide your login credentials for:', BASIC_AUTH_NAMESPACE)()}</span>
|
<span>{i18n.t('Please provide your login credentials for:', BASIC_AUTH_NAMESPACE)()}</span>
|
||||||
<span className='hostname'>{hostname}</span>
|
<span className='hostname'>{hostname}</span>
|
||||||
<span id='credentialsError' className={shouldShowError}>{i18n.t('Invalid user name/password', BASIC_AUTH_NAMESPACE)()}</span>
|
<span id='credentialsError' className={shouldShowError}>{i18n.t('Invalid user name/password', BASIC_AUTH_NAMESPACE)()}</span>
|
||||||
|
@ -57,7 +57,7 @@ export default class NetworkError extends React.Component<IProps, {}> {
|
|||||||
</defs>
|
</defs>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div className='main-message'>
|
<div className='main-message' lang={i18n.getLocale()}>
|
||||||
<p className='NetworkError-header'>
|
<p className='NetworkError-header'>
|
||||||
{i18n.t('Problem connecting to Symphony', NETWORK_ERROR_NAMESPACE)()}
|
{i18n.t('Problem connecting to Symphony', NETWORK_ERROR_NAMESPACE)()}
|
||||||
</p>
|
</p>
|
||||||
|
@ -5,24 +5,27 @@
|
|||||||
html {
|
html {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-family: @font-family;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-family: @font-family;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
font-family: @font-family;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container:lang(ja-JP) {
|
||||||
|
font-family: @font-family-ja;
|
||||||
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
text-align: start;
|
text-align: start;
|
||||||
|
@ -7,6 +7,14 @@ body {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.main-message {
|
||||||
|
font-family: @font-family;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-message:lang(ja-JP) {
|
||||||
|
font-family: @font-family-ja;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: rgb(17, 85, 204);
|
color: rgb(17, 85, 204);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@ -63,12 +71,12 @@ a {
|
|||||||
font-size: .8em;
|
font-size: .8em;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
font-family: @font-family;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-wrapper {
|
.content-wrapper {
|
||||||
-webkit-text-size-adjust: 100%;
|
-webkit-text-size-adjust: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-family: @font-family;
|
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
line-height: 1.6em;
|
line-height: 1.6em;
|
||||||
margin: 14vh auto 0;
|
margin: 14vh auto 0;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
@font-family: "Segoe UI", "Helvetica Neue", "Verdana", "Arial", sans-serif;
|
@font-family: "Segoe UI", "Helvetica Neue", "Verdana", "Arial", sans-serif;
|
||||||
|
@font-family-ja: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", Meiryo, "MS Pゴシック", "MS PGothic", sans-serif;
|
||||||
@text-color-primary: #FFFFFF;
|
@text-color-primary: #FFFFFF;
|
||||||
@text-color-primary-dark: #2F3237;
|
@text-color-primary-dark: #2F3237;
|
||||||
@text-color-secondary: #6A707C;
|
@text-color-secondary: #6A707C;
|
||||||
|
Loading…
Reference in New Issue
Block a user