Fix bad condition on hiding email addresses and update user etag to include privacy settings (#3327)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a0cc913b85
Коммит
8f87e60231
@@ -4,8 +4,6 @@
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
import Client from 'utils/web_client.jsx';
|
||||
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
|
||||
import {Popover, OverlayTrigger} from 'react-bootstrap';
|
||||
|
||||
var id = 0;
|
||||
@@ -22,6 +20,7 @@ export default class UserProfile extends React.Component {
|
||||
super(props);
|
||||
this.uniqueId = nextId();
|
||||
}
|
||||
|
||||
shouldComponentUpdate(nextProps) {
|
||||
if (!Utils.areObjectsEqual(nextProps.user, this.props.user)) {
|
||||
return true;
|
||||
@@ -45,6 +44,7 @@ export default class UserProfile extends React.Component {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
render() {
|
||||
let name = '...';
|
||||
let email = '';
|
||||
@@ -78,19 +78,7 @@ export default class UserProfile extends React.Component {
|
||||
/>
|
||||
);
|
||||
|
||||
if (!global.window.mm_config.ShowEmailAddress === 'true') {
|
||||
dataContent.push(
|
||||
<div
|
||||
className='text-nowrap'
|
||||
key='user-popover-no-email'
|
||||
>
|
||||
<FormattedMessage
|
||||
id='user_profile.notShared'
|
||||
defaultMessage='Email not shared'
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
if (global.window.mm_config.ShowEmailAddress === 'true') {
|
||||
dataContent.push(
|
||||
<div
|
||||
data-toggle='tooltip'
|
||||
|
||||
@@ -1455,7 +1455,6 @@
|
||||
"user.settings.security.title": "Security Settings",
|
||||
"user.settings.security.viewHistory": "View Access History",
|
||||
"user_list.notFound": "No users found",
|
||||
"user_profile.notShared": "Email not shared",
|
||||
"view_image.loading": "Loading ",
|
||||
"view_image_popover.download": "Download",
|
||||
"view_image_popover.file": "File {count} of {total}",
|
||||
|
||||
@@ -1444,7 +1444,6 @@
|
||||
"user.settings.security.title": "Configuración de Seguridad",
|
||||
"user.settings.security.viewHistory": "Visualizar historial de acceso",
|
||||
"user_list.notFound": "No se encontraron usuarios",
|
||||
"user_profile.notShared": "Correo no compartido",
|
||||
"view_image.loading": "Cargando ",
|
||||
"view_image_popover.download": "Descargar",
|
||||
"view_image_popover.file": "Archivo {count} de {total}",
|
||||
|
||||
@@ -1442,7 +1442,6 @@
|
||||
"user.settings.security.title": "Paramètres de sécurité",
|
||||
"user.settings.security.viewHistory": "Voir l'historique des accès",
|
||||
"user_list.notFound": "Aucun utilisateur trouvé.",
|
||||
"user_profile.notShared": "L'adresse électronique n'est pas partagée",
|
||||
"view_image.loading": "Chargement ",
|
||||
"view_image_popover.download": "Télécharger",
|
||||
"view_image_popover.file": "Fichier {count} sur {total}",
|
||||
|
||||
@@ -1442,7 +1442,6 @@
|
||||
"user.settings.security.title": "セキュリティーの設定",
|
||||
"user.settings.security.viewHistory": "アクセス履歴を見る",
|
||||
"user_list.notFound": "ユーザーが見付かりません",
|
||||
"user_profile.notShared": "電子メールは共有されません",
|
||||
"view_image.loading": "読み込み中です ",
|
||||
"view_image_popover.download": "ダウンロードする",
|
||||
"view_image_popover.file": "ファイル {count} / {total}",
|
||||
|
||||
@@ -1442,7 +1442,6 @@
|
||||
"user.settings.security.title": "Configurações de Segurança",
|
||||
"user.settings.security.viewHistory": "Ver Histórico de Acesso",
|
||||
"user_list.notFound": "Nenhum usuário encontrado",
|
||||
"user_profile.notShared": "E-mail não compartilhado",
|
||||
"view_image.loading": "Carregando ",
|
||||
"view_image_popover.download": "Download",
|
||||
"view_image_popover.file": "Arquivo {count} de {total}",
|
||||
|
||||
Ссылка в новой задаче
Block a user