Этот коммит содержится в:
Christopher Speller
2016-05-11 11:53:04 -04:00
родитель 45b22f312d a574397a72
Коммит e1388877ad
12 изменённых файлов: 35 добавлений и 37 удалений

Просмотреть файл

@@ -542,8 +542,14 @@ export default class Client {
createUserWithInvite = (user, data, emailHash, inviteId, success, error) => {
var url = `${this.getUsersRoute()}/create`;
if (data || emailHash || inviteId) {
url += '?d=' + encodeURIComponent(data) + '&h=' + encodeURIComponent(emailHash) + '&iid=' + encodeURIComponent(inviteId);
url += '?d=' + encodeURIComponent(data);
if (emailHash) {
url += '&h=' + encodeURIComponent(emailHash);
}
if (inviteId) {
url += '&iid=' + encodeURIComponent(inviteId);
}
request.

Просмотреть файл

@@ -7,7 +7,7 @@ import * as Utils from '../../utils/utils.jsx';
import AdminStore from '../../stores/admin_store.jsx';
import UserStore from '../../stores/user_store.jsx';
import * as Client from '../../utils/web_client.jsx';
import Client from 'utils/web_client.jsx';
import * as AsyncClient from '../../utils/async_client.jsx';
import {FormattedMessage, FormattedDate, FormattedTime} from 'react-intl';

Просмотреть файл

@@ -2,7 +2,7 @@
// See License.txt for license information.
import $ from 'jquery';
import * as Client from '../../utils/web_client.jsx';
import Client from 'utils/web_client.jsx';
import * as AsyncClient from '../../utils/async_client.jsx';
import * as Utils from '../../utils/utils.jsx';
@@ -40,6 +40,7 @@ export default class ComplianceSettings extends React.Component {
$('#save-button').button('loading');
const config = this.props.config;
const oldEnable = config.ComplianceSettings.Enable;
config.ComplianceSettings.Enable = this.refs.Enable.checked;
config.ComplianceSettings.Directory = ReactDOM.findDOMNode(this.refs.Directory).value;
config.ComplianceSettings.EnableDaily = this.refs.EnableDaily.checked;
@@ -47,12 +48,15 @@ export default class ComplianceSettings extends React.Component {
Client.saveConfig(
config,
() => {
$('#save-button').button('reset');
AsyncClient.getConfig();
this.setState({
serverError: null,
saveNeeded: false
});
$('#save-button').button('reset');
if (oldEnable !== config.ComplianceSettings.Enable) {
window.location.reload();
}
},
(err) => {
this.setState({

Просмотреть файл

@@ -5,7 +5,7 @@ import React from 'react';
export default class Setting extends React.Component {
render() {
let marginClass;
let marginClass = '';
if (this.props.margin === 'small') {
marginClass = ' form-group--small';
}

Просмотреть файл

@@ -23,7 +23,7 @@ const holders = defineMessages({
},
usernameRestrictions: {
id: 'user.settings.general.usernameRestrictions',
defaultMessage: "Pick something easy for teammates to recognize and recall. Username must begin with a letter, and contain between {min} to {max} lowercase characters made up of numbers, letters, and the symbols '.', '-', and '_'"
defaultMessage: "Username must begin with a letter, and contain between {min} to {max} lowercase characters made up of numbers, letters, and the symbols '.', '-', and '_'."
},
validEmail: {
id: 'user.settings.general.validEmail',
@@ -108,7 +108,7 @@ class UserSettingsGeneralTab extends React.Component {
this.setState({clientError: formatMessage(holders.usernameReserved)});
return;
} else if (usernameError) {
this.setState({clientError: formatMessage(holders.usernameRestrictions, {min: Constants.MIN_USERNAME_LENGTH}, {max: Constants.MAX_USERNAME_LENGTH})});
this.setState({clientError: formatMessage(holders.usernameRestrictions, {min: Constants.MIN_USERNAME_LENGTH, max: Constants.MAX_USERNAME_LENGTH})});
return;
}
@@ -773,7 +773,7 @@ class UserSettingsGeneralTab extends React.Component {
<span>
<FormattedMessage
id='user.settings.general.usernameInfo'
defaultMessage="Pick something easy for teammates to recognize and recall. Username must begin with a letter, and contain between {Constants.MIN_USERNAME_LENGTH to {Constants.MAX_USERNAME_LENGTH} lowercase characters made up of numbers, letters, and the symbols '.', '-', and '_'"
defaultMessage='Pick something easy for teammates to recognize and recall.'
/>
</span>
);

Просмотреть файл

@@ -1341,9 +1341,9 @@
"user.settings.general.title": "General Settings",
"user.settings.general.uploadImage": "Click 'Edit' to upload an image.",
"user.settings.general.username": "Username",
"user.settings.general.usernameInfo": "Pick something easy for teammates to recognize and recall. Username must begin with a letter, and contain between {min) to {max} lowercase characters made up of numbers, letters, and the symbols '.', '-', and '_'.",
"user.settings.general.usernameInfo": "Pick something easy for teammates to recognize and recall.",
"user.settings.general.usernameReserved": "This username is reserved, please choose a new one.",
"user.settings.general.usernameRestrictions": "Pick something easy for teammates to recognize and recall. Username must begin with a letter, and contain between {min} to {max} lowercase characters made up of numbers, letters, and the symbols '.', '-', and '_'.",
"user.settings.general.usernameRestrictions": "Username must begin with a letter, and contain between {min} to {max} lowercase characters made up of numbers, letters, and the symbols '.', '-', and '_'.",
"user.settings.general.validEmail": "Please enter a valid email address",
"user.settings.general.validImage": "Only JPG or PNG images may be used for profile pictures",
"user.settings.import_theme.cancel": "Cancel",

Просмотреть файл

@@ -1341,9 +1341,7 @@
"user.settings.general.title": "Configuración General",
"user.settings.general.uploadImage": "Pinchar 'Editar' para subir una imagen.",
"user.settings.general.username": "Nombre de usuario",
"user.settings.general.usernameInfo": "Escoge algo que sea sencillo para que tus compañeros reconozcan y puedan asociar. El nombre de usuario debe comenzar con una letra, y tener entre {min) y {max} caracteres en minúscula y componerse en numeros, letras y los símboloes '.', '-', y '_'.",
"user.settings.general.usernameReserved": "Este nombre de usuario está reservado, por favor escoge otro",
"user.settings.general.usernameRestrictions": "Escoge algo que sea sencillo para que tus compañeros reconozcan y puedan asociar. El nombre de usuario debe comenzar con una letra, y tener entre {min) y {max} caracteres en minúscula y componerse en numeros, letras y los símboloes '.', '-', y '_'.",
"user.settings.general.validEmail": "Por favor ingresa una dirección de correo electrónico válida",
"user.settings.general.validImage": "Sólo pueden ser utilizadas imágenes JPG o PNG en el perfil",
"user.settings.import_theme.cancel": "Cancelar",

Просмотреть файл

@@ -132,6 +132,7 @@ function preNeedsTeam(nextState, replace, callback) {
// for the current url.
var teamName = Utils.getTeamNameFromUrl();
var team = TeamStore.getByName(teamName);
const oldTeamId = TeamStore.getCurrentId();
if (!team) {
browserHistory.push('/');
@@ -143,6 +144,12 @@ function preNeedsTeam(nextState, replace, callback) {
TeamStore.saveMyTeam(team);
TeamStore.emitChange();
// If the old team id is null then we will already have the direct
// profiles from initial load
if (oldTeamId != null) {
AsyncClient.getDirectProfiles();
}
var d1 = $.Deferred(); //eslint-disable-line new-cap
var d2 = $.Deferred(); //eslint-disable-line new-cap

Просмотреть файл

@@ -16,9 +16,10 @@
color: $white;
font-size: .9em;
height: 20px;
margin: 5px 0 6px;
line-height: 20px;
margin: 5px 0 6px;
position: relative;
z-index: 0;
&:before {
background: $light-gray;