dependencies updated, breaking change in react-intl fixed
This commit is contained in:
+2
-1
@@ -95,13 +95,14 @@
|
||||
"sidepanel_title_reset": "Reset Password",
|
||||
"sidepanel_title_archive": "Archived Chats",
|
||||
"sidepanel_title_blocked": "Blocked Chats",
|
||||
"update_available": "Update available. <a href=\"\">Reload</a>.",
|
||||
"reconnect_countdown": "Disconnected. Reconnecting in {seconds}…",
|
||||
"reconnect_now": "Try now",
|
||||
"push_init_failed": "Failed to initialize push notifications",
|
||||
"invalid_security_token": "Invalid security token",
|
||||
"no_connection": "No connection",
|
||||
"code_doesnot_match": "Code does not match",
|
||||
"update_available": "Update available.",
|
||||
"reload_update": "Reload",
|
||||
"phone_dative": "phone",
|
||||
"email_dative": "email",
|
||||
"enter_confirmation_code_prompt": "Enter confirmation code sent to you by {method}:",
|
||||
|
||||
+2
-1
@@ -95,7 +95,8 @@
|
||||
"sidepanel_title_reset": "Restablecer contraseña",
|
||||
"sidepanel_title_archive": "Chats archivados",
|
||||
"sidepanel_title_blocked": "Chats bloqueados",
|
||||
"update_available": "Actualización disponible. <a href=\"\">Recargar</a>.",
|
||||
"update_available": "Actualización disponible.",
|
||||
"reload_update": "Recargar",
|
||||
"reconnect_countdown": "Desconectado. Reconectando en {seconds}…",
|
||||
"reconnect_now": "Reintentar",
|
||||
"push_init_failed": "Error al inicializar las notificaciones push",
|
||||
|
||||
+2
-1
@@ -95,7 +95,8 @@
|
||||
"sidepanel_title_reset": "비밀번호재설정",
|
||||
"sidepanel_title_archive": "보관된채팅",
|
||||
"sidepanel_title_blocked": "차단된채팅",
|
||||
"update_available": "업데이트가능.<a href=\"\">재로드</a>.",
|
||||
"update_available": "업데이트가능.",
|
||||
"reload_update": "재로드",
|
||||
"reconnect_countdown": "연결이끊어졌습니다.다시연결하는중{초}…",
|
||||
"reconnect_now": "지금시도",
|
||||
"push_init_failed": "푸시알림을초기화하지못했습니다",
|
||||
|
||||
+2
-1
@@ -118,7 +118,8 @@
|
||||
"button_create": "Создать",
|
||||
"badge_you": "вы",
|
||||
"badge_owner": "влад.",
|
||||
"update_available": "Есть новая версия приложения. <a href=\"\">Обновить</a>.",
|
||||
"update_available": "Есть новая версия приложения.",
|
||||
"reload_update": "Обновить",
|
||||
"user_not_found": "Не найден",
|
||||
"reconnect_countdown": "Нет связи. Подключение через {seconds}…",
|
||||
"reconnect_now": "Подключить сейчас.",
|
||||
|
||||
+2
-1
@@ -66,7 +66,8 @@
|
||||
"sidepanel_title_cred": "确认凭据",
|
||||
"sidepanel_title_reset": "重置密码",
|
||||
"sidepanel_title_archive": "已存档会话",
|
||||
"update_available": "更新可用。<a href=\"\">重新载入</a>.",
|
||||
"update_available": "更新可用。",
|
||||
"reload_update": "重新载入",
|
||||
"reconnect_countdown": "连接已断开。{seconds} 秒后重新连接…",
|
||||
"reconnect_now": "立即尝试",
|
||||
"phone_dative": "电话",
|
||||
|
||||
+10
-5
@@ -96,13 +96,14 @@
|
||||
"sidepanel_title_reset": "Reset Password",
|
||||
"sidepanel_title_archive": "Archived Chats",
|
||||
"sidepanel_title_blocked": "Blocked Chats",
|
||||
"update_available": "Update available. <a href=\"\">Reload</a>.",
|
||||
"reconnect_countdown": "Disconnected. Reconnecting in {seconds}…",
|
||||
"reconnect_now": "Try now",
|
||||
"push_init_failed": "Failed to initialize push notifications",
|
||||
"invalid_security_token": "Invalid security token",
|
||||
"no_connection": "No connection",
|
||||
"code_doesnot_match": "Code does not match",
|
||||
"update_available": "Update available.",
|
||||
"reload_update": "Reload",
|
||||
"phone_dative": "phone",
|
||||
"email_dative": "email",
|
||||
"enter_confirmation_code_prompt": "Enter confirmation code sent to you by {method}:",
|
||||
@@ -269,7 +270,8 @@
|
||||
"sidepanel_title_reset": "Restablecer contraseña",
|
||||
"sidepanel_title_archive": "Chats archivados",
|
||||
"sidepanel_title_blocked": "Chats bloqueados",
|
||||
"update_available": "Actualización disponible. <a href=\"\">Recargar</a>.",
|
||||
"update_available": "Actualización disponible.",
|
||||
"reload_update": "Recargar",
|
||||
"reconnect_countdown": "Desconectado. Reconectando en {seconds}…",
|
||||
"reconnect_now": "Reintentar",
|
||||
"push_init_failed": "Error al inicializar las notificaciones push",
|
||||
@@ -440,7 +442,8 @@
|
||||
"sidepanel_title_reset": "비밀번호재설정",
|
||||
"sidepanel_title_archive": "보관된채팅",
|
||||
"sidepanel_title_blocked": "차단된채팅",
|
||||
"update_available": "업데이트가능.<a href=\"\">재로드</a>.",
|
||||
"update_available": "업데이트가능.",
|
||||
"reload_update": "재로드",
|
||||
"reconnect_countdown": "연결이끊어졌습니다.다시연결하는중{초}…",
|
||||
"reconnect_now": "지금시도",
|
||||
"push_init_failed": "푸시알림을초기화하지못했습니다",
|
||||
@@ -635,7 +638,8 @@
|
||||
"button_create": "Создать",
|
||||
"badge_you": "вы",
|
||||
"badge_owner": "влад.",
|
||||
"update_available": "Есть новая версия приложения. <a href=\"\">Обновить</a>.",
|
||||
"update_available": "Есть новая версия приложения.",
|
||||
"reload_update": "Обновить",
|
||||
"user_not_found": "Не найден",
|
||||
"reconnect_countdown": "Нет связи. Подключение через {seconds}…",
|
||||
"reconnect_now": "Подключить сейчас.",
|
||||
@@ -756,7 +760,8 @@
|
||||
"sidepanel_title_cred": "确认凭据",
|
||||
"sidepanel_title_reset": "重置密码",
|
||||
"sidepanel_title_archive": "已存档会话",
|
||||
"update_available": "更新可用。<a href=\"\">重新载入</a>.",
|
||||
"update_available": "更新可用。",
|
||||
"reload_update": "重新载入",
|
||||
"reconnect_countdown": "连接已断开。{seconds} 秒后重新连接…",
|
||||
"reconnect_now": "立即尝试",
|
||||
"phone_dative": "电话",
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
// This is a generated file. Don't edit.
|
||||
|
||||
export const PACKAGE_VERSION = "0.16.5";
|
||||
export const PACKAGE_VERSION = "0.16.6-rc1";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* ContactsView holds all contacts-related stuff */
|
||||
import React from 'react';
|
||||
import { FormattedHTMLMessage, defineMessages } from 'react-intl';
|
||||
import { FormattedMessage, defineMessages } from 'react-intl';
|
||||
|
||||
import ContactList from '../widgets/contact-list.jsx';
|
||||
|
||||
@@ -85,7 +85,7 @@ export default class ContactsView extends React.Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<FormattedHTMLMessage id="contacts_not_found"
|
||||
<FormattedMessage id="contacts_not_found"
|
||||
defaultMessage="You have no chats<br />¯∖_(ツ)_/¯"
|
||||
description="HTML message shown in ContactList when no contacts are found">{
|
||||
(no_contacts) => <ContactList
|
||||
@@ -99,7 +99,7 @@ export default class ContactsView extends React.Component {
|
||||
onTopicSelected={this.props.onTopicSelected}
|
||||
showContextMenu={this.props.showContextMenu}
|
||||
onAction={this.handleAction} />
|
||||
}</FormattedHTMLMessage>
|
||||
}</FormattedMessage>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
+13
-11
@@ -1,7 +1,7 @@
|
||||
// The top-level class to hold all functionality together.
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { defineMessages, injectIntl } from 'react-intl';
|
||||
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
|
||||
|
||||
import * as firebase from 'firebase/app';
|
||||
import 'firebase/messaging';
|
||||
@@ -28,11 +28,6 @@ import { updateFavicon } from '../lib/utils.js';
|
||||
const POP_SOUND = new Audio('audio/msg.mp3');
|
||||
|
||||
const messages = defineMessages({
|
||||
update_available: {
|
||||
id: 'update_available',
|
||||
defaultMessage: 'Update available. <a href="">Reload</a>.',
|
||||
description: 'Message shown when an app update is available.'
|
||||
},
|
||||
reconnect_countdown: {
|
||||
id: 'reconnect_countdown',
|
||||
defaultMessage: 'Disconnected. Reconnecting in {seconds}…',
|
||||
@@ -306,12 +301,19 @@ class TinodeWeb extends React.Component {
|
||||
|
||||
// Check if a newer version of TinodeWeb app is available at the server.
|
||||
checkForAppUpdate(reg) {
|
||||
const {formatHTMLMessage} = this.props.intl;
|
||||
reg.onupdatefound = () => {
|
||||
const installingWorker = reg.installing;
|
||||
installingWorker.onstatechange = () => {
|
||||
if (installingWorker.state == 'installed' && navigator.serviceWorker.controller) {
|
||||
this.handleError(formatHTMLMessage(messages.update_available), 'info');
|
||||
const msg = <>
|
||||
<FormattedMessage id="update_available"
|
||||
defaultMessage="Update available."
|
||||
description="Message shown when an app update is available." /> <a href="">
|
||||
<FormattedMessage id="reload_update"
|
||||
defaultMessage="Reload"
|
||||
description="Call to action to reload application when update is available." />
|
||||
</a>.</>;
|
||||
this.handleError(msg, 'info');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -427,19 +429,19 @@ class TinodeWeb extends React.Component {
|
||||
return;
|
||||
}
|
||||
|
||||
const {formatHTMLMessage} = this.props.intl;
|
||||
const {formatMessage} = this.props.intl;
|
||||
let count = sec / 1000;
|
||||
count = count | count;
|
||||
this.reconnectCountdown = setInterval(() => {
|
||||
const timeLeft = (count > 99) ? secondsToTime(count) : count;
|
||||
this.handleError(
|
||||
formatHTMLMessage(messages.reconnect_countdown, {seconds: timeLeft}),
|
||||
formatMessage(messages.reconnect_countdown, {seconds: timeLeft}),
|
||||
'warn',
|
||||
() => {
|
||||
clearInterval(this.reconnectCountdown);
|
||||
this.tinode.reconnect();
|
||||
},
|
||||
formatHTMLMessage(messages.reconnect_now)
|
||||
formatMessage(messages.reconnect_now)
|
||||
);
|
||||
count -= 1;
|
||||
}, 1000);
|
||||
|
||||
@@ -36,7 +36,7 @@ export default class ErrorPanel extends React.PureComponent {
|
||||
<div className={className}>
|
||||
<div className="icon"><i className="material-icons">{level}</i></div>
|
||||
<span>
|
||||
<span dangerouslySetInnerHTML={{__html: this.props.text}} />
|
||||
{this.props.text}
|
||||
{this.props.action ?
|
||||
<>
|
||||
 <a href="#"
|
||||
|
||||
Reference in New Issue
Block a user