enable connections to sandbox from localhost
This commit is contained in:
+9
-2
@@ -1425,10 +1425,17 @@
|
||||
"obsolete": false
|
||||
},
|
||||
"call_disconnected": {
|
||||
"translation": "",
|
||||
"translation": "getrennt",
|
||||
"defaultMessage": "disconnected",
|
||||
"description": "Label for disconnected call",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_use_secure_connection": {
|
||||
"translation": "Verwenden Sie eine sichere Verbindung",
|
||||
"defaultMessage": "Use secure connection",
|
||||
"description": "Label for WS/WSS connection type in SettingsView",
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1430,5 +1430,12 @@
|
||||
"description": "Label for disconnected call",
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_use_secure_connection": {
|
||||
"translation": "Use secure connection",
|
||||
"defaultMessage": "Use secure connection",
|
||||
"description": "Label for WS/WSS connection type in SettingsView",
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+9
-2
@@ -1425,10 +1425,17 @@
|
||||
"obsolete": false
|
||||
},
|
||||
"call_disconnected": {
|
||||
"translation": "",
|
||||
"translation": "desconectada",
|
||||
"defaultMessage": "disconnected",
|
||||
"description": "Label for disconnected call",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_use_secure_connection": {
|
||||
"translation": "Usar conexión segura",
|
||||
"defaultMessage": "Use secure connection",
|
||||
"description": "Label for WS/WSS connection type in SettingsView",
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,6 +396,10 @@
|
||||
"defaultMessage": "Archived:",
|
||||
"description": "Label for unarchiving the topic"
|
||||
},
|
||||
"label_use_secure_connection": {
|
||||
"defaultMessage": "Use secure connection",
|
||||
"description": "Label for WS/WSS connection type in SettingsView"
|
||||
},
|
||||
"label_user_contacts": {
|
||||
"defaultMessage": "Contacts:",
|
||||
"description": "Label for user contacts"
|
||||
|
||||
+25
-18
@@ -1369,66 +1369,73 @@
|
||||
"obsolete": false
|
||||
},
|
||||
"already_in_call": {
|
||||
"translation": "",
|
||||
"translation": "Vous êtes déjà dans un appel en cours!",
|
||||
"defaultMessage": "You already in an ongoing call!",
|
||||
"description": "Error message when the user tried to accept a new call without finishing pervious one",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"call_cancelled": {
|
||||
"translation": "",
|
||||
"translation": "annulé",
|
||||
"defaultMessage": "cancelled",
|
||||
"description": "Label for cancelled outgoing call",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"call_declined": {
|
||||
"translation": "",
|
||||
"translation": "refusé",
|
||||
"defaultMessage": "declined",
|
||||
"description": "Label for declined call",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"call_missed": {
|
||||
"translation": "",
|
||||
"translation": "manqué",
|
||||
"defaultMessage": "missed",
|
||||
"description": "Label for missed incoming call",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"calls_incoming": {
|
||||
"translation": "",
|
||||
"translation": "Appel entrant",
|
||||
"defaultMessage": "Incoming call",
|
||||
"description": "Incoming call label",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"calls_outgoing": {
|
||||
"translation": "",
|
||||
"translation": "Appel sortant",
|
||||
"defaultMessage": "Outgoing call",
|
||||
"description": "Outgoing call label",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"calls_you_label": {
|
||||
"translation": "",
|
||||
"translation": "Tu",
|
||||
"defaultMessage": "You",
|
||||
"description": "Shown over the local video screen",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"menu_item_video_call": {
|
||||
"translation": "",
|
||||
"translation": "Appel vidéo",
|
||||
"defaultMessage": "Video call",
|
||||
"description": "Start video call",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"call_disconnected": {
|
||||
"translation": "",
|
||||
"translation": "débranché",
|
||||
"defaultMessage": "disconnected",
|
||||
"description": "Label for disconnected call",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_use_secure_connection": {
|
||||
"translation": "Utiliser une connexion sécurisée",
|
||||
"defaultMessage": "Use secure connection",
|
||||
"description": "Label for WS/WSS connection type in SettingsView",
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+9
-2
@@ -1425,10 +1425,17 @@
|
||||
"obsolete": false
|
||||
},
|
||||
"call_disconnected": {
|
||||
"translation": "",
|
||||
"translation": "연결 끊김",
|
||||
"defaultMessage": "disconnected",
|
||||
"description": "Label for disconnected call",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_use_secure_connection": {
|
||||
"translation": "보안 연결 사용",
|
||||
"defaultMessage": "Use secure connection",
|
||||
"description": "Label for WS/WSS connection type in SettingsView",
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+9
-2
@@ -1425,10 +1425,17 @@
|
||||
"obsolete": false
|
||||
},
|
||||
"call_disconnected": {
|
||||
"translation": "",
|
||||
"translation": "deconectat",
|
||||
"defaultMessage": "disconnected",
|
||||
"description": "Label for disconnected call",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_use_secure_connection": {
|
||||
"translation": "Utilizați conexiune securizată",
|
||||
"defaultMessage": "Use secure connection",
|
||||
"description": "Label for WS/WSS connection type in SettingsView",
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+9
-2
@@ -1425,10 +1425,17 @@
|
||||
"obsolete": false
|
||||
},
|
||||
"call_disconnected": {
|
||||
"translation": "",
|
||||
"translation": "разъединен",
|
||||
"defaultMessage": "disconnected",
|
||||
"description": "Label for disconnected call",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_use_secure_connection": {
|
||||
"translation": "Безопасное соединение",
|
||||
"defaultMessage": "Use secure connection",
|
||||
"description": "Label for WS/WSS connection type in SettingsView",
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+9
-2
@@ -1425,10 +1425,17 @@
|
||||
"obsolete": false
|
||||
},
|
||||
"call_disconnected": {
|
||||
"translation": "",
|
||||
"translation": "斷開連接",
|
||||
"defaultMessage": "disconnected",
|
||||
"description": "Label for disconnected call",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_use_secure_connection": {
|
||||
"translation": "使用安全連接",
|
||||
"defaultMessage": "Use secure connection",
|
||||
"description": "Label for WS/WSS connection type in SettingsView",
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+9
-2
@@ -1425,10 +1425,17 @@
|
||||
"obsolete": false
|
||||
},
|
||||
"call_disconnected": {
|
||||
"translation": "",
|
||||
"translation": "断开连接",
|
||||
"defaultMessage": "disconnected",
|
||||
"description": "Label for disconnected call",
|
||||
"missing": true,
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
},
|
||||
"label_use_secure_connection": {
|
||||
"translation": "使用安全连接",
|
||||
"defaultMessage": "Use secure connection",
|
||||
"description": "Label for WS/WSS connection type in SettingsView",
|
||||
"missing": false,
|
||||
"obsolete": false
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -635,8 +635,6 @@ class MessagesView extends React.Component {
|
||||
if (status >= Tinode.MESSAGE_STATUS_SENT && msg.from != this.props.myUserId) {
|
||||
this.postReadNotification(msg.seq);
|
||||
}
|
||||
// This will send "received" notifications right away.
|
||||
this.props.onData(msg);
|
||||
}
|
||||
|
||||
handleAllMessagesReceived(count) {
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
import React from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import CheckBox from '../widgets/checkbox.jsx';
|
||||
|
||||
import HostSelector from '../widgets/host-selector.jsx';
|
||||
|
||||
export default class SettingsView extends React.PureComponent {
|
||||
@@ -11,18 +13,21 @@ export default class SettingsView extends React.PureComponent {
|
||||
this.state = {
|
||||
transport: props.transport || 'def',
|
||||
serverAddress: props.serverAddress,
|
||||
secureConnection: props.secureConnection,
|
||||
};
|
||||
|
||||
this.handleSubmit = this.handleSubmit.bind(this);
|
||||
this.handleTransportSelected = this.handleTransportSelected.bind(this);
|
||||
this.handleServerAddressChange = this.handleServerAddressChange.bind(this);
|
||||
this.handleToggleSecure = this.handleToggleSecure.bind(this);
|
||||
}
|
||||
|
||||
handleSubmit(e) {
|
||||
e.preventDefault();
|
||||
this.props.onUpdate({
|
||||
transport: this.state.transport,
|
||||
serverAddress: this.state.serverAddress
|
||||
serverAddress: this.state.serverAddress,
|
||||
secureConnection: this.state.secureConnection,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -34,6 +39,10 @@ export default class SettingsView extends React.PureComponent {
|
||||
this.setState({serverAddress: name});
|
||||
}
|
||||
|
||||
handleToggleSecure(e) {
|
||||
this.setState({secureConnection: !this.state.secureConnection});
|
||||
}
|
||||
|
||||
render() {
|
||||
const names = {def: "default", ws: "websocket", lp: "long polling"};
|
||||
const transportOptions = [];
|
||||
@@ -58,8 +67,14 @@ export default class SettingsView extends React.PureComponent {
|
||||
description="Label for server selector in SettingsView" />
|
||||
</label>
|
||||
</div>
|
||||
<HostSelector serverAddress={this.state.serverAddress}
|
||||
onServerAddressChange={this.handleServerAddressChange} />
|
||||
<HostSelector serverAddress={this.state.serverAddress} onServerAddressChange={this.handleServerAddressChange} />
|
||||
<div className="panel-form-row">
|
||||
<CheckBox id="secure-connection" name="secure-connection" checked={this.state.secureConnection}
|
||||
onChange={this.handleToggleSecure} /><label>
|
||||
<FormattedMessage id="label_use_secure_connection" defaultMessage="Use secure connection"
|
||||
description="Label for WS/WSS connection type in SettingsView" />
|
||||
</label>
|
||||
</div>
|
||||
<div className="panel-form-row">
|
||||
<label className="small">
|
||||
<FormattedMessage id="label_wire_transport" defaultMessage="Wire transport:"
|
||||
|
||||
@@ -165,6 +165,7 @@ class SidepanelView extends React.Component {
|
||||
<SettingsView
|
||||
transport={this.props.transport}
|
||||
serverAddress={this.props.serverAddress}
|
||||
secureConnection={this.props.secureConnection}
|
||||
onCancel={this.props.onCancel}
|
||||
onUpdate={this.props.onGlobalSettings} /> :
|
||||
|
||||
|
||||
@@ -102,7 +102,6 @@ class TinodeWeb extends React.Component {
|
||||
this.tnMeContactUpdate = this.tnMeContactUpdate.bind(this);
|
||||
this.tnMeSubsUpdated = this.tnMeSubsUpdated.bind(this);
|
||||
this.resetContactList = this.resetContactList.bind(this);
|
||||
this.tnData = this.tnData.bind(this);
|
||||
this.tnInitFind = this.tnInitFind.bind(this);
|
||||
this.tnFndSubsUpdated = this.tnFndSubsUpdated.bind(this);
|
||||
this.handleSearchContacts = this.handleSearchContacts.bind(this);
|
||||
@@ -282,7 +281,7 @@ class TinodeWeb extends React.Component {
|
||||
});
|
||||
|
||||
new Promise((resolve, reject) => {
|
||||
this.tinode = TinodeWeb.tnSetup(this.state.serverAddress, this.state.transport,
|
||||
this.tinode = TinodeWeb.tnSetup(this.state.serverAddress, isSecureConnection(), this.state.transport,
|
||||
this.props.intl.locale, this.state.persist, resolve);
|
||||
this.tinode.onConnect = this.handleConnected;
|
||||
this.tinode.onDisconnect = this.handleDisconnect;
|
||||
@@ -342,9 +341,9 @@ class TinodeWeb extends React.Component {
|
||||
}
|
||||
|
||||
// Setup transport (usually websocket) and server address. This will terminate connection with the server.
|
||||
static tnSetup(serverAddress, transport, locale, persistentCache, onSetupCompleted) {
|
||||
static tnSetup(serverAddress, secureConnection, transport, locale, persistentCache, onSetupCompleted) {
|
||||
const tinode = new Tinode({appName: APP_NAME, host: serverAddress, apiKey: API_KEY, transport: transport,
|
||||
secure: isSecureConnection(), persist: persistentCache}, onSetupCompleted);
|
||||
secure: secureConnection, persist: persistentCache}, onSetupCompleted);
|
||||
tinode.setHumanLanguage(locale);
|
||||
tinode.enableLogging(LOGGING_ENABLED, true);
|
||||
return tinode;
|
||||
@@ -887,9 +886,6 @@ class TinodeWeb extends React.Component {
|
||||
this.setState(newState);
|
||||
}
|
||||
|
||||
tnData(data) {
|
||||
}
|
||||
|
||||
/* Fnd topic: find contacts by tokens */
|
||||
tnInitFind() {
|
||||
const fnd = this.tinode.getFndTopic();
|
||||
@@ -1146,8 +1142,8 @@ class TinodeWeb extends React.Component {
|
||||
this.tinode.onDisconnect = undefined;
|
||||
this.tinode.disconnect();
|
||||
}
|
||||
this.tinode = TinodeWeb.tnSetup(serverAddress, transport, this.props.intl.locale,
|
||||
LocalStorageUtil.getObject('keep-logged-in'));
|
||||
this.tinode = TinodeWeb.tnSetup(serverAddress, settings.secureConnection, transport,
|
||||
this.props.intl.locale, LocalStorageUtil.getObject('keep-logged-in'));
|
||||
this.tinode.onConnect = this.handleConnected;
|
||||
this.tinode.onDisconnect = this.handleDisconnect;
|
||||
this.tinode.onAutoreconnectIteration = this.handleAutoreconnectIteration;
|
||||
@@ -1407,7 +1403,7 @@ class TinodeWeb extends React.Component {
|
||||
this.setState(this.getBlankState());
|
||||
|
||||
cleared.then(() => {
|
||||
this.tinode = TinodeWeb.tnSetup(this.state.serverAddress,
|
||||
this.tinode = TinodeWeb.tnSetup(this.state.serverAddress, isSecureConnection(),
|
||||
this.state.transport, this.props.intl.locale, LocalStorageUtil.getObject('keep-logged-in'), () => {
|
||||
this.tinode.onConnect = this.handleConnected;
|
||||
this.tinode.onDisconnect = this.handleDisconnect;
|
||||
@@ -1948,6 +1944,7 @@ class TinodeWeb extends React.Component {
|
||||
desktopAlertsEnabled={this.state.desktopAlertsEnabled}
|
||||
incognitoMode={this.state.incognitoMode}
|
||||
serverAddress={this.state.serverAddress}
|
||||
secureConnection={isSecureConnection()}
|
||||
serverVersion={this.state.serverVersion}
|
||||
|
||||
onGlobalSettings={this.handleGlobalSettings}
|
||||
@@ -2025,7 +2022,6 @@ class TinodeWeb extends React.Component {
|
||||
newTopicParams={this.state.newTopicParams}
|
||||
|
||||
onHideMessagesView={this.handleHideMessagesView}
|
||||
onData={this.tnData}
|
||||
onError={this.handleError}
|
||||
onNewTopicCreated={this.handleNewTopicCreated}
|
||||
showContextMenu={this.handleShowContextMenu}
|
||||
|
||||
Reference in New Issue
Block a user