Removed Legal & Support settings from UI if empty (#3662)
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
426b14d8a9
Коммит
c56b429e1d
@@ -489,7 +489,7 @@ func (o *Config) SetDefaults() {
|
|||||||
|
|
||||||
if o.SupportSettings.TermsOfServiceLink == nil {
|
if o.SupportSettings.TermsOfServiceLink == nil {
|
||||||
o.SupportSettings.TermsOfServiceLink = new(string)
|
o.SupportSettings.TermsOfServiceLink = new(string)
|
||||||
*o.SupportSettings.TermsOfServiceLink = "/static/help/terms.html"
|
*o.SupportSettings.TermsOfServiceLink = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
if !IsSafeLink(o.SupportSettings.PrivacyPolicyLink) {
|
if !IsSafeLink(o.SupportSettings.PrivacyPolicyLink) {
|
||||||
@@ -498,7 +498,7 @@ func (o *Config) SetDefaults() {
|
|||||||
|
|
||||||
if o.SupportSettings.PrivacyPolicyLink == nil {
|
if o.SupportSettings.PrivacyPolicyLink == nil {
|
||||||
o.SupportSettings.PrivacyPolicyLink = new(string)
|
o.SupportSettings.PrivacyPolicyLink = new(string)
|
||||||
*o.SupportSettings.PrivacyPolicyLink = "/static/help/privacy.html"
|
*o.SupportSettings.PrivacyPolicyLink = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
if !IsSafeLink(o.SupportSettings.AboutLink) {
|
if !IsSafeLink(o.SupportSettings.AboutLink) {
|
||||||
@@ -507,7 +507,7 @@ func (o *Config) SetDefaults() {
|
|||||||
|
|
||||||
if o.SupportSettings.AboutLink == nil {
|
if o.SupportSettings.AboutLink == nil {
|
||||||
o.SupportSettings.AboutLink = new(string)
|
o.SupportSettings.AboutLink = new(string)
|
||||||
*o.SupportSettings.AboutLink = "/static/help/about.html"
|
*o.SupportSettings.AboutLink = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
if !IsSafeLink(o.SupportSettings.HelpLink) {
|
if !IsSafeLink(o.SupportSettings.HelpLink) {
|
||||||
@@ -516,7 +516,7 @@ func (o *Config) SetDefaults() {
|
|||||||
|
|
||||||
if o.SupportSettings.HelpLink == nil {
|
if o.SupportSettings.HelpLink == nil {
|
||||||
o.SupportSettings.HelpLink = new(string)
|
o.SupportSettings.HelpLink = new(string)
|
||||||
*o.SupportSettings.HelpLink = "/static/help/help.html"
|
*o.SupportSettings.HelpLink = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
if !IsSafeLink(o.SupportSettings.ReportAProblemLink) {
|
if !IsSafeLink(o.SupportSettings.ReportAProblemLink) {
|
||||||
@@ -525,7 +525,7 @@ func (o *Config) SetDefaults() {
|
|||||||
|
|
||||||
if o.SupportSettings.ReportAProblemLink == nil {
|
if o.SupportSettings.ReportAProblemLink == nil {
|
||||||
o.SupportSettings.ReportAProblemLink = new(string)
|
o.SupportSettings.ReportAProblemLink = new(string)
|
||||||
*o.SupportSettings.ReportAProblemLink = "/static/help/report_problem.html"
|
*o.SupportSettings.ReportAProblemLink = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
if o.SupportSettings.SupportEmail == nil {
|
if o.SupportSettings.SupportEmail == nil {
|
||||||
|
|||||||
@@ -16,6 +16,64 @@ export default class NotLoggedIn extends React.Component {
|
|||||||
$('#root').removeClass('container-fluid');
|
$('#root').removeClass('container-fluid');
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
|
let content = [];
|
||||||
|
|
||||||
|
if (global.window.mm_config.HelpLink) {
|
||||||
|
content.push(
|
||||||
|
<a
|
||||||
|
id='help_link'
|
||||||
|
className='pull-right footer-link'
|
||||||
|
target='_blank'
|
||||||
|
rel='noopener noreferrer'
|
||||||
|
href={global.window.mm_config.HelpLink}
|
||||||
|
>
|
||||||
|
<FormattedMessage id='web.footer.help'/>
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (global.window.mm_config.TermsOfServiceLink) {
|
||||||
|
content.push(
|
||||||
|
<a
|
||||||
|
id='terms_link'
|
||||||
|
className='pull-right footer-link'
|
||||||
|
target='_blank'
|
||||||
|
rel='noopener noreferrer'
|
||||||
|
href={global.window.mm_config.TermsOfServiceLink}
|
||||||
|
>
|
||||||
|
<FormattedMessage id='web.footer.terms'/>
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (global.window.mm_config.PrivacyPolicyLink) {
|
||||||
|
content.push(
|
||||||
|
<a
|
||||||
|
id='privacy_link'
|
||||||
|
className='pull-right footer-link'
|
||||||
|
target='_blank'
|
||||||
|
rel='noopener noreferrer'
|
||||||
|
href={global.window.mm_config.PrivacyPolicyLink}
|
||||||
|
>
|
||||||
|
<FormattedMessage id='web.footer.privacy'/>
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (global.window.mm_config.AboutLink) {
|
||||||
|
content.push(
|
||||||
|
<a
|
||||||
|
id='about_link'
|
||||||
|
className='pull-right footer-link'
|
||||||
|
target='_blank'
|
||||||
|
rel='noopener noreferrer'
|
||||||
|
href={global.window.mm_config.AboutLink}
|
||||||
|
>
|
||||||
|
<FormattedMessage id='web.footer.about'/>
|
||||||
|
</a>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='inner-wrap'>
|
<div className='inner-wrap'>
|
||||||
<div className='row content'>
|
<div className='row content'>
|
||||||
@@ -29,42 +87,7 @@ export default class NotLoggedIn extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
<div className='col-xs-12'>
|
<div className='col-xs-12'>
|
||||||
<span className='pull-right footer-link copyright'>{'© 2015-2016 Mattermost, Inc.'}</span>
|
<span className='pull-right footer-link copyright'>{'© 2015-2016 Mattermost, Inc.'}</span>
|
||||||
<a
|
{content}
|
||||||
id='help_link'
|
|
||||||
className='pull-right footer-link'
|
|
||||||
target='_blank'
|
|
||||||
rel='noopener noreferrer'
|
|
||||||
href={global.window.mm_config.HelpLink}
|
|
||||||
>
|
|
||||||
<FormattedMessage id='web.footer.help'/>
|
|
||||||
</a>
|
|
||||||
<a
|
|
||||||
id='terms_link'
|
|
||||||
className='pull-right footer-link'
|
|
||||||
target='_blank'
|
|
||||||
rel='noopener noreferrer'
|
|
||||||
href={global.window.mm_config.TermsOfServiceLink}
|
|
||||||
>
|
|
||||||
<FormattedMessage id='web.footer.terms'/>
|
|
||||||
</a>
|
|
||||||
<a
|
|
||||||
id='privacy_link'
|
|
||||||
className='pull-right footer-link'
|
|
||||||
target='_blank'
|
|
||||||
rel='noopener noreferrer'
|
|
||||||
href={global.window.mm_config.PrivacyPolicyLink}
|
|
||||||
>
|
|
||||||
<FormattedMessage id='web.footer.privacy'/>
|
|
||||||
</a>
|
|
||||||
<a
|
|
||||||
id='about_link'
|
|
||||||
className='pull-right footer-link'
|
|
||||||
target='_blank'
|
|
||||||
rel='noopener noreferrer'
|
|
||||||
href={global.window.mm_config.AboutLink}
|
|
||||||
>
|
|
||||||
<FormattedMessage id='web.footer.about'/>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user