Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
549875ba0a
3 changed files with 48 additions and 2 deletions
|
@ -75,7 +75,7 @@ export default class BasePlatform {
|
||||||
* Returns a promise that resolves to a string representing
|
* Returns a promise that resolves to a string representing
|
||||||
* the current version of the application.
|
* the current version of the application.
|
||||||
*/
|
*/
|
||||||
getAppVersion() {
|
getAppVersion(): Promise<string> {
|
||||||
throw new Error("getAppVersion not implemented!");
|
throw new Error("getAppVersion not implemented!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,10 +84,12 @@ export default class BasePlatform {
|
||||||
* with getUserMedia, return a string explaining why not.
|
* with getUserMedia, return a string explaining why not.
|
||||||
* Otherwise, return null.
|
* Otherwise, return null.
|
||||||
*/
|
*/
|
||||||
screenCaptureErrorString() {
|
screenCaptureErrorString(): string {
|
||||||
return "Not implemented";
|
return "Not implemented";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isElectron(): boolean { return false; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Restarts the application, without neccessarily reloading
|
* Restarts the application, without neccessarily reloading
|
||||||
* any application code
|
* any application code
|
||||||
|
|
|
@ -217,6 +217,13 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
this._localSettings = UserSettingsStore.getLocalSettings();
|
this._localSettings = UserSettingsStore.getLocalSettings();
|
||||||
|
|
||||||
|
if (PlatformPeg.get().isElectron()) {
|
||||||
|
const {ipcRenderer} = require('electron');
|
||||||
|
|
||||||
|
ipcRenderer.on('settings', this._electronSettings);
|
||||||
|
ipcRenderer.send('settings_get');
|
||||||
|
}
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
language: languageHandler.getCurrentLanguage(),
|
language: languageHandler.getCurrentLanguage(),
|
||||||
});
|
});
|
||||||
|
@ -239,6 +246,15 @@ module.exports = React.createClass({
|
||||||
if (cli) {
|
if (cli) {
|
||||||
cli.removeListener("RoomMember.membership", this._onInviteStateChange);
|
cli.removeListener("RoomMember.membership", this._onInviteStateChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (PlatformPeg.get().isElectron()) {
|
||||||
|
const {ipcRenderer} = require('electron');
|
||||||
|
ipcRenderer.removeListener('settings', this._electronSettings);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_electronSettings: function(ev, settings) {
|
||||||
|
this.setState({ electron_settings: settings });
|
||||||
},
|
},
|
||||||
|
|
||||||
_refreshFromServer: function() {
|
_refreshFromServer: function() {
|
||||||
|
@ -843,6 +859,29 @@ module.exports = React.createClass({
|
||||||
</div>;
|
</div>;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_renderElectronSettings: function() {
|
||||||
|
const settings = this.state.electron_settings;
|
||||||
|
if (!settings) return;
|
||||||
|
|
||||||
|
const {ipcRenderer} = require('electron');
|
||||||
|
|
||||||
|
return <div>
|
||||||
|
<h3>{ _t('Desktop specific') }</h3>
|
||||||
|
<div className="mx_UserSettings_section">
|
||||||
|
<div className="mx_UserSettings_toggle">
|
||||||
|
<input type="checkbox"
|
||||||
|
name="auto-launch"
|
||||||
|
defaultChecked={settings['auto-launch']}
|
||||||
|
onChange={(e) => {
|
||||||
|
ipcRenderer.send('settings_set', 'auto-launch', e.target.checked);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<label htmlFor="auto-launch">{_t('Start automatically after system login')}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>;
|
||||||
|
},
|
||||||
|
|
||||||
_showSpoiler: function(event) {
|
_showSpoiler: function(event) {
|
||||||
const target = event.target;
|
const target = event.target;
|
||||||
target.innerHTML = target.getAttribute('data-spoiler');
|
target.innerHTML = target.getAttribute('data-spoiler');
|
||||||
|
@ -1045,6 +1084,8 @@ module.exports = React.createClass({
|
||||||
{this._renderBulkOptions()}
|
{this._renderBulkOptions()}
|
||||||
{this._renderBugReport()}
|
{this._renderBugReport()}
|
||||||
|
|
||||||
|
{PlatformPeg.get().isElectron() && this._renderElectronSettings()}
|
||||||
|
|
||||||
{this._renderAnalyticsControl()}
|
{this._renderAnalyticsControl()}
|
||||||
|
|
||||||
<h3>{ _t("Advanced") }</h3>
|
<h3>{ _t("Advanced") }</h3>
|
||||||
|
|
|
@ -674,6 +674,9 @@
|
||||||
"%(oneUser)schanged their avatar %(repeats)s times": "%(oneUser)schanged their avatar %(repeats)s times",
|
"%(oneUser)schanged their avatar %(repeats)s times": "%(oneUser)schanged their avatar %(repeats)s times",
|
||||||
"%(severalUsers)schanged their avatar": "%(severalUsers)schanged their avatar",
|
"%(severalUsers)schanged their avatar": "%(severalUsers)schanged their avatar",
|
||||||
"%(oneUser)schanged their avatar": "%(oneUser)schanged their avatar",
|
"%(oneUser)schanged their avatar": "%(oneUser)schanged their avatar",
|
||||||
|
"Please select the destination room for this message": "Please select the destination room for this message",
|
||||||
|
"Start automatically after system login": "Start automatically after system login",
|
||||||
|
"Desktop specific": "Desktop specific",
|
||||||
"Analytics": "Analytics",
|
"Analytics": "Analytics",
|
||||||
"Opt out of analytics": "Opt out of analytics",
|
"Opt out of analytics": "Opt out of analytics",
|
||||||
"Riot collects anonymous analytics to allow us to improve the application.": "Riot collects anonymous analytics to allow us to improve the application.",
|
"Riot collects anonymous analytics to allow us to improve the application.": "Riot collects anonymous analytics to allow us to improve the application.",
|
||||||
|
|
Loading…
Reference in a new issue