Added legal and support settings to sys console and implemented support for options in app
Этот коммит содержится в:
@@ -82,12 +82,12 @@
|
|||||||
"ShowEmailAddress": true,
|
"ShowEmailAddress": true,
|
||||||
"ShowFullName": true
|
"ShowFullName": true
|
||||||
},
|
},
|
||||||
"LegalAndSupportSettings": {
|
"SupportSettings": {
|
||||||
"TermsOfServiceLink": "https://github.com/mattermost/platform/blob/master/README.md",
|
"TermsOfServiceLink": "/static/help/terms.html",
|
||||||
"PrivacyPolicyLink": "https://github.com/mattermost/platform/blob/master/README.md",
|
"PrivacyPolicyLink": "/static/help/privacy.html",
|
||||||
"AboutLink": "http://www.mattermost.org/features/",
|
"AboutLink": "/static/help/about.html",
|
||||||
"HelpLink": "https://github.com/mattermost/platform/blob/master/README.md",
|
"HelpLink": "/static/help/help.html",
|
||||||
"ReportAProblemLink": "https://forum.mattermost.org/c/general/trouble-shoot",
|
"ReportAProblemLink": "/static/help/report_problem.html",
|
||||||
"SupportEmail": "feedback@mattermost.com"
|
"SupportEmail": "feedback@mattermost.com"
|
||||||
},
|
},
|
||||||
"GitLabSettings": {
|
"GitLabSettings": {
|
||||||
|
|||||||
@@ -82,6 +82,14 @@
|
|||||||
"ShowEmailAddress": true,
|
"ShowEmailAddress": true,
|
||||||
"ShowFullName": true
|
"ShowFullName": true
|
||||||
},
|
},
|
||||||
|
"SupportSettings": {
|
||||||
|
"TermsOfServiceLink": "/static/help/terms.html",
|
||||||
|
"PrivacyPolicyLink": "/static/help/privacy.html",
|
||||||
|
"AboutLink": "/static/help/about.html",
|
||||||
|
"HelpLink": "/static/help/help.html",
|
||||||
|
"ReportAProblemLink": "/static/help/report_problem.html",
|
||||||
|
"SupportEmail": "feedback@mattermost.com"
|
||||||
|
},
|
||||||
"GitLabSettings": {
|
"GitLabSettings": {
|
||||||
"Enable": false,
|
"Enable": false,
|
||||||
"Secret": "",
|
"Secret": "",
|
||||||
|
|||||||
@@ -82,6 +82,14 @@
|
|||||||
"ShowEmailAddress": true,
|
"ShowEmailAddress": true,
|
||||||
"ShowFullName": true
|
"ShowFullName": true
|
||||||
},
|
},
|
||||||
|
"SupportSettings": {
|
||||||
|
"TermsOfServiceLink": "/static/help/terms.html",
|
||||||
|
"PrivacyPolicyLink": "/static/help/privacy.html",
|
||||||
|
"AboutLink": "/static/help/about.html",
|
||||||
|
"HelpLink": "/static/help/help.html",
|
||||||
|
"ReportAProblemLink": "/static/help/report_problem.html",
|
||||||
|
"SupportEmail": "feedback@mattermost.com"
|
||||||
|
},
|
||||||
"GitLabSettings": {
|
"GitLabSettings": {
|
||||||
"Enable": false,
|
"Enable": false,
|
||||||
"Secret": "",
|
"Secret": "",
|
||||||
|
|||||||
@@ -113,6 +113,15 @@ type PrivacySettings struct {
|
|||||||
ShowFullName bool
|
ShowFullName bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SupportSettings struct {
|
||||||
|
TermsOfServiceLink *string
|
||||||
|
PrivacyPolicyLink *string
|
||||||
|
AboutLink *string
|
||||||
|
HelpLink *string
|
||||||
|
ReportAProblemLink *string
|
||||||
|
SupportEmail *string
|
||||||
|
}
|
||||||
|
|
||||||
type TeamSettings struct {
|
type TeamSettings struct {
|
||||||
SiteName string
|
SiteName string
|
||||||
MaxUsersPerTeam int
|
MaxUsersPerTeam int
|
||||||
@@ -132,6 +141,7 @@ type Config struct {
|
|||||||
EmailSettings EmailSettings
|
EmailSettings EmailSettings
|
||||||
RateLimitSettings RateLimitSettings
|
RateLimitSettings RateLimitSettings
|
||||||
PrivacySettings PrivacySettings
|
PrivacySettings PrivacySettings
|
||||||
|
SupportSettings SupportSettings
|
||||||
GitLabSettings SSOSettings
|
GitLabSettings SSOSettings
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,6 +199,35 @@ func (o *Config) SetDefaults() {
|
|||||||
*o.EmailSettings.PushNotificationServer = "https://push.mattermost.com"
|
*o.EmailSettings.PushNotificationServer = "https://push.mattermost.com"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if o.SupportSettings.TermsOfServiceLink == nil {
|
||||||
|
o.SupportSettings.TermsOfServiceLink = new(string)
|
||||||
|
*o.SupportSettings.TermsOfServiceLink = "/static/help/terms.html"
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.SupportSettings.PrivacyPolicyLink == nil {
|
||||||
|
o.SupportSettings.PrivacyPolicyLink = new(string)
|
||||||
|
*o.SupportSettings.PrivacyPolicyLink = "/static/help/privacy.html"
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.SupportSettings.AboutLink == nil {
|
||||||
|
o.SupportSettings.AboutLink = new(string)
|
||||||
|
*o.SupportSettings.AboutLink = "/static/help/about.html"
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.SupportSettings.HelpLink == nil {
|
||||||
|
o.SupportSettings.HelpLink = new(string)
|
||||||
|
*o.SupportSettings.HelpLink = "/static/help/help.html"
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.SupportSettings.ReportAProblemLink == nil {
|
||||||
|
o.SupportSettings.ReportAProblemLink = new(string)
|
||||||
|
*o.SupportSettings.ReportAProblemLink = "/static/help/report_problem.html"
|
||||||
|
}
|
||||||
|
|
||||||
|
if o.SupportSettings.SupportEmail == nil {
|
||||||
|
o.SupportSettings.SupportEmail = new(string)
|
||||||
|
*o.SupportSettings.SupportEmail = "feedback@mattermost.com"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *Config) IsValid() *AppError {
|
func (o *Config) IsValid() *AppError {
|
||||||
|
|||||||
@@ -214,6 +214,13 @@ func getClientConfig(c *model.Config) map[string]string {
|
|||||||
|
|
||||||
props["ShowEmailAddress"] = strconv.FormatBool(c.PrivacySettings.ShowEmailAddress)
|
props["ShowEmailAddress"] = strconv.FormatBool(c.PrivacySettings.ShowEmailAddress)
|
||||||
|
|
||||||
|
props["TermsOfServiceLink"] = *c.SupportSettings.TermsOfServiceLink
|
||||||
|
props["PrivacyPolicyLink"] = *c.SupportSettings.PrivacyPolicyLink
|
||||||
|
props["AboutLink"] = *c.SupportSettings.AboutLink
|
||||||
|
props["HelpLink"] = *c.SupportSettings.HelpLink
|
||||||
|
props["ReportAProblemLink"] = *c.SupportSettings.ReportAProblemLink
|
||||||
|
props["SupportEmail"] = *c.SupportSettings.SupportEmail
|
||||||
|
|
||||||
props["EnablePublicLink"] = strconv.FormatBool(c.FileSettings.EnablePublicLink)
|
props["EnablePublicLink"] = strconv.FormatBool(c.FileSettings.EnablePublicLink)
|
||||||
props["ProfileHeight"] = fmt.Sprintf("%v", c.FileSettings.ProfileHeight)
|
props["ProfileHeight"] = fmt.Sprintf("%v", c.FileSettings.ProfileHeight)
|
||||||
props["ProfileWidth"] = fmt.Sprintf("%v", c.FileSettings.ProfileWidth)
|
props["ProfileWidth"] = fmt.Sprintf("%v", c.FileSettings.ProfileWidth)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import GitLabSettingsTab from './gitlab_settings.jsx';
|
|||||||
import SqlSettingsTab from './sql_settings.jsx';
|
import SqlSettingsTab from './sql_settings.jsx';
|
||||||
import TeamSettingsTab from './team_settings.jsx';
|
import TeamSettingsTab from './team_settings.jsx';
|
||||||
import ServiceSettingsTab from './service_settings.jsx';
|
import ServiceSettingsTab from './service_settings.jsx';
|
||||||
|
import LegalAndSupportSettingsTab from './legal_and_support_settings.jsx';
|
||||||
import TeamUsersTab from './team_users.jsx';
|
import TeamUsersTab from './team_users.jsx';
|
||||||
import TeamAnalyticsTab from './team_analytics.jsx';
|
import TeamAnalyticsTab from './team_analytics.jsx';
|
||||||
|
|
||||||
@@ -148,6 +149,8 @@ export default class AdminController extends React.Component {
|
|||||||
tab = <TeamSettingsTab config={this.state.config} />;
|
tab = <TeamSettingsTab config={this.state.config} />;
|
||||||
} else if (this.state.selected === 'service_settings') {
|
} else if (this.state.selected === 'service_settings') {
|
||||||
tab = <ServiceSettingsTab config={this.state.config} />;
|
tab = <ServiceSettingsTab config={this.state.config} />;
|
||||||
|
} else if (this.state.selected === 'legal_and_support_settings') {
|
||||||
|
tab = <LegalAndSupportSettingsTab config={this.state.config} />;
|
||||||
} else if (this.state.selected === 'team_users') {
|
} else if (this.state.selected === 'team_users') {
|
||||||
if (this.state.teams) {
|
if (this.state.teams) {
|
||||||
tab = <TeamUsersTab team={this.state.teams[this.state.selectedTeam]} />;
|
tab = <TeamUsersTab team={this.state.teams[this.state.selectedTeam]} />;
|
||||||
|
|||||||
@@ -238,6 +238,15 @@ export default class AdminSidebar extends React.Component {
|
|||||||
{'GitLab Settings'}
|
{'GitLab Settings'}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href='#'
|
||||||
|
className={this.isSelected('legal_and_support_settings')}
|
||||||
|
onClick={this.handleClick.bind(this, 'legal_and_support_settings', null)}
|
||||||
|
>
|
||||||
|
{'Legal and Support Settings'}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul className='nav nav__sub-menu'>
|
<ul className='nav nav__sub-menu'>
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
222
web/react/components/admin_console/legal_and_support_settings.jsx
Обычный файл
222
web/react/components/admin_console/legal_and_support_settings.jsx
Обычный файл
@@ -0,0 +1,222 @@
|
|||||||
|
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
|
||||||
|
// See License.txt for license information.
|
||||||
|
|
||||||
|
import * as Client from '../../utils/client.jsx';
|
||||||
|
import * as AsyncClient from '../../utils/async_client.jsx';
|
||||||
|
|
||||||
|
export default class LegalAndSupportSettings extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
|
||||||
|
this.handleChange = this.handleChange.bind(this);
|
||||||
|
this.handleSubmit = this.handleSubmit.bind(this);
|
||||||
|
|
||||||
|
this.state = {
|
||||||
|
saveNeeded: false,
|
||||||
|
serverError: null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
handleChange() {
|
||||||
|
var s = {saveNeeded: true, serverError: this.state.serverError};
|
||||||
|
this.setState(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
handleSubmit(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
$('#save-button').button('loading');
|
||||||
|
|
||||||
|
var config = this.props.config;
|
||||||
|
|
||||||
|
config.SupportSettings.TermsOfServiceLink = ReactDOM.findDOMNode(this.refs.TermsOfServiceLink).value.trim();
|
||||||
|
config.SupportSettings.PrivacyPolicyLink = ReactDOM.findDOMNode(this.refs.PrivacyPolicyLink).value.trim();
|
||||||
|
config.SupportSettings.AboutLink = ReactDOM.findDOMNode(this.refs.AboutLink).value.trim();
|
||||||
|
config.SupportSettings.HelpLink = ReactDOM.findDOMNode(this.refs.HelpLink).value.trim();
|
||||||
|
config.SupportSettings.ReportAProblemLink = ReactDOM.findDOMNode(this.refs.ReportAProblemLink).value.trim();
|
||||||
|
config.SupportSettings.SupportEmail = ReactDOM.findDOMNode(this.refs.SupportEmail).value.trim();
|
||||||
|
|
||||||
|
Client.saveConfig(
|
||||||
|
config,
|
||||||
|
() => {
|
||||||
|
AsyncClient.getConfig();
|
||||||
|
this.setState({
|
||||||
|
serverError: null,
|
||||||
|
saveNeeded: false
|
||||||
|
});
|
||||||
|
$('#save-button').button('reset');
|
||||||
|
},
|
||||||
|
(err) => {
|
||||||
|
this.setState({
|
||||||
|
serverError: err.message,
|
||||||
|
saveNeeded: true
|
||||||
|
});
|
||||||
|
$('#save-button').button('reset');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
var serverError = '';
|
||||||
|
if (this.state.serverError) {
|
||||||
|
serverError = <div className='form-group has-error'><label className='control-label'>{this.state.serverError}</label></div>;
|
||||||
|
}
|
||||||
|
|
||||||
|
var saveClass = 'btn';
|
||||||
|
if (this.state.saveNeeded) {
|
||||||
|
saveClass = 'btn btn-primary';
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className='wrapper--fixed'>
|
||||||
|
|
||||||
|
<h3>{'Legal and Support Settings'}</h3>
|
||||||
|
<form
|
||||||
|
className='form-horizontal'
|
||||||
|
role='form'
|
||||||
|
>
|
||||||
|
|
||||||
|
<div className='form-group'>
|
||||||
|
<label
|
||||||
|
className='control-label col-sm-4'
|
||||||
|
htmlFor='TermsOfServiceLink'
|
||||||
|
>
|
||||||
|
{'Terms of Service link:'}
|
||||||
|
</label>
|
||||||
|
<div className='col-sm-8'>
|
||||||
|
<input
|
||||||
|
type='text'
|
||||||
|
className='form-control'
|
||||||
|
id='TermsOfServiceLink'
|
||||||
|
ref='TermsOfServiceLink'
|
||||||
|
defaultValue={this.props.config.SupportSettings.TermsOfServiceLink}
|
||||||
|
onChange={this.handleChange}
|
||||||
|
/>
|
||||||
|
<p className='help-text'>{'Link to Terms of Service available to users on desktop and on mobile. Leaving this blank will hide the option to display a notice.'}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className='form-group'>
|
||||||
|
<label
|
||||||
|
className='control-label col-sm-4'
|
||||||
|
htmlFor='PrivacyPolicyLink'
|
||||||
|
>
|
||||||
|
{'Privacy Policy link:'}
|
||||||
|
</label>
|
||||||
|
<div className='col-sm-8'>
|
||||||
|
<input
|
||||||
|
type='text'
|
||||||
|
className='form-control'
|
||||||
|
id='PrivacyPolicyLink'
|
||||||
|
ref='PrivacyPolicyLink'
|
||||||
|
defaultValue={this.props.config.SupportSettings.PrivacyPolicyLink}
|
||||||
|
onChange={this.handleChange}
|
||||||
|
/>
|
||||||
|
<p className='help-text'>{'Link to Privacy Policy available to users on desktop and on mobile. Leaving this blank will hide the option to display a notice.'}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className='form-group'>
|
||||||
|
<label
|
||||||
|
className='control-label col-sm-4'
|
||||||
|
htmlFor='AboutLink'
|
||||||
|
>
|
||||||
|
{'About link:'}
|
||||||
|
</label>
|
||||||
|
<div className='col-sm-8'>
|
||||||
|
<input
|
||||||
|
type='text'
|
||||||
|
className='form-control'
|
||||||
|
id='AboutLink'
|
||||||
|
ref='AboutLink'
|
||||||
|
defaultValue={this.props.config.SupportSettings.AboutLink}
|
||||||
|
onChange={this.handleChange}
|
||||||
|
/>
|
||||||
|
<p className='help-text'>{'Link to About page for more information on your Mattermost deployment, for example its purpose and audience within your organization. Defaults to Mattermost information page.'}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className='form-group'>
|
||||||
|
<label
|
||||||
|
className='control-label col-sm-4'
|
||||||
|
htmlFor='HelpLink'
|
||||||
|
>
|
||||||
|
{'Help link:'}
|
||||||
|
</label>
|
||||||
|
<div className='col-sm-8'>
|
||||||
|
<input
|
||||||
|
type='text'
|
||||||
|
className='form-control'
|
||||||
|
id='HelpLink'
|
||||||
|
ref='HelpLink'
|
||||||
|
defaultValue={this.props.config.SupportSettings.HelpLink}
|
||||||
|
onChange={this.handleChange}
|
||||||
|
/>
|
||||||
|
<p className='help-text'>{'Link to help documentation from team site main menu. Typically not changed unless your organization chooses to create custom documentation.'}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className='form-group'>
|
||||||
|
<label
|
||||||
|
className='control-label col-sm-4'
|
||||||
|
htmlFor='ReportAProblemLink'
|
||||||
|
>
|
||||||
|
{'Report a Problem link:'}
|
||||||
|
</label>
|
||||||
|
<div className='col-sm-8'>
|
||||||
|
<input
|
||||||
|
type='text'
|
||||||
|
className='form-control'
|
||||||
|
id='ReportAProblemLink'
|
||||||
|
ref='ReportAProblemLink'
|
||||||
|
defaultValue={this.props.config.SupportSettings.ReportAProblemLink}
|
||||||
|
onChange={this.handleChange}
|
||||||
|
/>
|
||||||
|
<p className='help-text'>{'Link to help documentation from team site main menu. By default this points to the peer-to-peer troubleshooting forum where users can search for, find and request help with technical issues.'}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className='form-group'>
|
||||||
|
<label
|
||||||
|
className='control-label col-sm-4'
|
||||||
|
htmlFor='SupportEmail'
|
||||||
|
>
|
||||||
|
{'Support email:'}
|
||||||
|
</label>
|
||||||
|
<div className='col-sm-8'>
|
||||||
|
<input
|
||||||
|
type='text'
|
||||||
|
className='form-control'
|
||||||
|
id='SupportEmail'
|
||||||
|
ref='SupportEmail'
|
||||||
|
defaultValue={this.props.config.SupportSettings.SupportEmail}
|
||||||
|
onChange={this.handleChange}
|
||||||
|
/>
|
||||||
|
<p className='help-text'>{'Email shown during tutorial for end users to ask support questions.'}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className='form-group'>
|
||||||
|
<div className='col-sm-12'>
|
||||||
|
{serverError}
|
||||||
|
<button
|
||||||
|
disabled={!this.state.saveNeeded}
|
||||||
|
type='submit'
|
||||||
|
className={saveClass}
|
||||||
|
onClick={this.handleSubmit}
|
||||||
|
id='save-button'
|
||||||
|
data-loading-text={'<span class=\'glyphicon glyphicon-refresh glyphicon-refresh-animate\'></span> Saving Config...'}
|
||||||
|
>
|
||||||
|
{'Save'}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
LegalAndSupportSettings.propTypes = {
|
||||||
|
config: React.PropTypes.object
|
||||||
|
};
|
||||||
@@ -36,7 +36,7 @@ export default class ServiceSettings extends React.Component {
|
|||||||
config.ServiceSettings.SegmentDeveloperKey = ReactDOM.findDOMNode(this.refs.SegmentDeveloperKey).value.trim();
|
config.ServiceSettings.SegmentDeveloperKey = ReactDOM.findDOMNode(this.refs.SegmentDeveloperKey).value.trim();
|
||||||
config.ServiceSettings.GoogleDeveloperKey = ReactDOM.findDOMNode(this.refs.GoogleDeveloperKey).value.trim();
|
config.ServiceSettings.GoogleDeveloperKey = ReactDOM.findDOMNode(this.refs.GoogleDeveloperKey).value.trim();
|
||||||
config.ServiceSettings.EnableIncomingWebhooks = ReactDOM.findDOMNode(this.refs.EnableIncomingWebhooks).checked;
|
config.ServiceSettings.EnableIncomingWebhooks = ReactDOM.findDOMNode(this.refs.EnableIncomingWebhooks).checked;
|
||||||
config.ServiceSettings.EnableOutgoingWebhooks = React.findDOMNode(this.refs.EnableOutgoingWebhooks).checked;
|
config.ServiceSettings.EnableOutgoingWebhooks = ReactDOM.findDOMNode(this.refs.EnableOutgoingWebhooks).checked;
|
||||||
config.ServiceSettings.EnablePostUsernameOverride = ReactDOM.findDOMNode(this.refs.EnablePostUsernameOverride).checked;
|
config.ServiceSettings.EnablePostUsernameOverride = ReactDOM.findDOMNode(this.refs.EnablePostUsernameOverride).checked;
|
||||||
config.ServiceSettings.EnablePostIconOverride = ReactDOM.findDOMNode(this.refs.EnablePostIconOverride).checked;
|
config.ServiceSettings.EnablePostIconOverride = ReactDOM.findDOMNode(this.refs.EnablePostIconOverride).checked;
|
||||||
config.ServiceSettings.EnableTesting = ReactDOM.findDOMNode(this.refs.EnableTesting).checked;
|
config.ServiceSettings.EnableTesting = ReactDOM.findDOMNode(this.refs.EnableTesting).checked;
|
||||||
|
|||||||
@@ -184,6 +184,34 @@ export default class NavbarDropdown extends React.Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let helpLink = null;
|
||||||
|
if (global.window.mm_config.HelpLink) {
|
||||||
|
helpLink = (
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
target='_blank'
|
||||||
|
href={global.window.mm_config.HelpLink}
|
||||||
|
>
|
||||||
|
{'Help'}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
let reportLink = null;
|
||||||
|
if (global.window.mm_config.ReportAProblemLink) {
|
||||||
|
reportLink = (
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
target='_blank'
|
||||||
|
href={global.window.mm_config.ReportAProblemLink}
|
||||||
|
>
|
||||||
|
{'Report a Problem'}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ul className='nav navbar-nav navbar-right'>
|
<ul className='nav navbar-nav navbar-right'>
|
||||||
<li
|
<li
|
||||||
@@ -230,22 +258,8 @@ export default class NavbarDropdown extends React.Component {
|
|||||||
{sysAdminLink}
|
{sysAdminLink}
|
||||||
{teams}
|
{teams}
|
||||||
<li className='divider'></li>
|
<li className='divider'></li>
|
||||||
<li>
|
{helpLink}
|
||||||
<a
|
{reportLink}
|
||||||
target='_blank'
|
|
||||||
href='/static/help/help.html'
|
|
||||||
>
|
|
||||||
{'Help'}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a
|
|
||||||
target='_blank'
|
|
||||||
href='/static/help/report_problem.html'
|
|
||||||
>
|
|
||||||
{'Report a Problem'}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href='#'
|
href='#'
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export default class SidebarRightMenu extends React.Component {
|
|||||||
href='#'
|
href='#'
|
||||||
onClick={EventHelpers.showInviteMemberModal}
|
onClick={EventHelpers.showInviteMemberModal}
|
||||||
>
|
>
|
||||||
<i className='fa fa-user'></i>Invite New Member
|
<i className='fa fa-user'></i>{'Invite New Member'}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
@@ -75,7 +75,7 @@ export default class SidebarRightMenu extends React.Component {
|
|||||||
href='#'
|
href='#'
|
||||||
data-toggle='modal'
|
data-toggle='modal'
|
||||||
data-target='#team_settings'
|
data-target='#team_settings'
|
||||||
><i className='fa fa-globe'></i>Team Settings</a>
|
><i className='fa fa-globe'></i>{'Team Settings'}</a>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
manageLink = (
|
manageLink = (
|
||||||
@@ -93,7 +93,7 @@ export default class SidebarRightMenu extends React.Component {
|
|||||||
<a
|
<a
|
||||||
href={'/admin_console?' + utils.getSessionIndex()}
|
href={'/admin_console?' + utils.getSessionIndex()}
|
||||||
>
|
>
|
||||||
<i className='fa fa-wrench'></i>System Console</a>
|
<i className='fa fa-wrench'></i>{'System Console'}</a>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -107,6 +107,27 @@ export default class SidebarRightMenu extends React.Component {
|
|||||||
teamDisplayName = this.props.teamDisplayName;
|
teamDisplayName = this.props.teamDisplayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let helpLink = null;
|
||||||
|
if (global.window.mm_config.HelpLink) {
|
||||||
|
helpLink = (
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
target='_blank'
|
||||||
|
href={global.window.mm_config.HelpLink}
|
||||||
|
><i className='fa fa-question'></i>{'Help'}</a></li>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
let reportLink = null;
|
||||||
|
if (global.window.mm_config.ReportAProblemLink) {
|
||||||
|
reportLink = (
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
target='_blank'
|
||||||
|
href={global.window.mm_config.ReportAProblemLink}
|
||||||
|
><i className='fa fa-phone'></i>{'Report a Problem'}</a></li>
|
||||||
|
);
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className='team__header theme'>
|
<div className='team__header theme'>
|
||||||
@@ -123,7 +144,7 @@ export default class SidebarRightMenu extends React.Component {
|
|||||||
href='#'
|
href='#'
|
||||||
onClick={() => this.setState({showUserSettingsModal: true})}
|
onClick={() => this.setState({showUserSettingsModal: true})}
|
||||||
>
|
>
|
||||||
<i className='fa fa-cog'></i>Account Settings
|
<i className='fa fa-cog'></i>{'Account Settings'}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{teamSettingsLink}
|
{teamSettingsLink}
|
||||||
@@ -135,18 +156,10 @@ export default class SidebarRightMenu extends React.Component {
|
|||||||
<a
|
<a
|
||||||
href='#'
|
href='#'
|
||||||
onClick={this.handleLogoutClick}
|
onClick={this.handleLogoutClick}
|
||||||
><i className='fa fa-sign-out'></i>Logout</a></li>
|
><i className='fa fa-sign-out'></i>{'Logout'}</a></li>
|
||||||
<li className='divider'></li>
|
<li className='divider'></li>
|
||||||
<li>
|
{helpLink}
|
||||||
<a
|
{reportLink}
|
||||||
target='_blank'
|
|
||||||
href='/static/help/help.html'
|
|
||||||
><i className='fa fa-question'></i>Help</a></li>
|
|
||||||
<li>
|
|
||||||
<a
|
|
||||||
target='_blank'
|
|
||||||
href='/static/help/report_problem.html'
|
|
||||||
><i className='fa fa-phone'></i>Report a Problem</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<UserSettingsModal
|
<UserSettingsModal
|
||||||
|
|||||||
@@ -112,6 +112,22 @@ export default class TutorialIntroScreens extends React.Component {
|
|||||||
|
|
||||||
const circles = this.createCircles();
|
const circles = this.createCircles();
|
||||||
|
|
||||||
|
let supportInfo = null;
|
||||||
|
if (global.window.mm_config.SupportEmail) {
|
||||||
|
supportInfo = (
|
||||||
|
<p>
|
||||||
|
{'Need anything, just email us at '}
|
||||||
|
<a
|
||||||
|
href={'mailto:' + global.window.mm_config.SupportEmail}
|
||||||
|
target='_blank'
|
||||||
|
>
|
||||||
|
{global.window.mm_config.SupportEmail}
|
||||||
|
</a>
|
||||||
|
{'.'}
|
||||||
|
</p>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h3>{'You’re all set'}</h3>
|
<h3>{'You’re all set'}</h3>
|
||||||
@@ -119,16 +135,7 @@ export default class TutorialIntroScreens extends React.Component {
|
|||||||
{inviteModalLink}
|
{inviteModalLink}
|
||||||
{' when you’re ready.'}
|
{' when you’re ready.'}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
{supportInfo}
|
||||||
{'Need anything, just email us at '}
|
|
||||||
<a
|
|
||||||
href='mailto:feedback@mattermost.com'
|
|
||||||
target='_blank'
|
|
||||||
>
|
|
||||||
{'feedback@mattermost.com'}
|
|
||||||
</a>
|
|
||||||
{'.'}
|
|
||||||
</p>
|
|
||||||
{'Click “Next” to enter Town Square. This is the first channel teammates see when they sign up. Use it for posting updates everyone needs to know.'}
|
{'Click “Next” to enter Town Square. This is the first channel teammates see when they sign up. Use it for posting updates everyone needs to know.'}
|
||||||
{circles}
|
{circles}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,9 +12,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
document.getElementById("help_link").setAttribute("href", '/static/help/help.html');
|
if (window.mm_config.HelpLink) {
|
||||||
document.getElementById("terms_link").setAttribute("href", '/static/help/terms.html');
|
document.getElementById("help_link").setAttribute("href", window.mm_config.HelpLink);
|
||||||
document.getElementById("privacy_link").setAttribute("href", '/static/help/privacy.html');
|
} else {
|
||||||
document.getElementById("about_link").setAttribute("href", '/static/help/about.html');
|
$("#help_link").remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window.mm_config.TermsOfServiceLink) {
|
||||||
|
document.getElementById("terms_link").setAttribute("href", window.mm_config.TermsOfServiceLink);
|
||||||
|
} else {
|
||||||
|
$("#terms_link").remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window.mm_config.PrivacyPolicyLink) {
|
||||||
|
document.getElementById("privacy_link").setAttribute("href", window.mm_config.PrivacyPolicyLink);
|
||||||
|
} else {
|
||||||
|
$("#privacy_link").remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window.mm_config.AboutLink) {
|
||||||
|
document.getElementById("about_link").setAttribute("href", window.mm_config.AboutLink);
|
||||||
|
} else {
|
||||||
|
$("#about_link").remove();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user