Compare commits

..

8 Commits

Author SHA1 Message Date
Akash Nimare
c4ce25f66c menu: Document enableMenu flag. 2018-10-28 15:10:34 +05:30
Akash Nimare
c6e8d27722 menu: Update menu items on setting page.
This PR adds a functionality to update the menu items.
Some menu items like logout, shortcut etc are not needed
on setting page.

Fixes: #587.
2018-10-27 19:25:28 +05:30
Akash Nimare
ac6b206583 sentry: Update sentry to v0.12.1. 2018-10-24 19:27:38 +05:30
Akash Nimare
988405c665 dependency: Update node-json-db to v0.9.1. 2018-10-24 14:07:07 +05:30
Akash Nimare
a209804692 setting: Set custom css to false by default. 2018-10-23 15:09:28 +05:30
Akash Nimare
95c4df1898 network: Fix typo in network error message. 2018-10-23 14:56:56 +05:30
Rishi Gupta
1048c91d9e about: Remove Found bug button. 2018-10-21 05:05:44 +05:30
Akash Nimare
d723c5cd1c proxy: Do not reload app when turning off the SPS setting. 2018-10-17 16:58:26 +05:30
9 changed files with 128 additions and 85 deletions

View File

@@ -232,7 +232,7 @@ class AppMenu {
}
getDarwinTpl(props) {
const { tabs, activeTabIndex } = props;
const { tabs, activeTabIndex, enableMenu } = props;
return [{
label: `${app.getName()}`,
@@ -247,6 +247,7 @@ class AppMenu {
}, {
label: 'Keyboard Shortcuts',
accelerator: 'Cmd+Shift+K',
enabled: enableMenu,
click(item, focusedWindow) {
if (focusedWindow) {
AppMenu.sendAction('shortcut');
@@ -264,6 +265,7 @@ class AppMenu {
}, {
label: 'Log Out',
accelerator: 'Cmd+L',
enabled: enableMenu,
click(item, focusedWindow) {
if (focusedWindow) {
AppMenu.sendAction('log-out');
@@ -325,7 +327,7 @@ class AppMenu {
}
getOtherTpl(props) {
const { tabs, activeTabIndex } = props;
const { tabs, activeTabIndex, enableMenu } = props;
return [{
label: '&File',
@@ -342,6 +344,7 @@ class AppMenu {
}, {
label: 'Keyboard Shortcuts',
accelerator: 'Ctrl+Shift+K',
enabled: enableMenu,
click(item, focusedWindow) {
if (focusedWindow) {
AppMenu.sendAction('shortcut');
@@ -359,6 +362,7 @@ class AppMenu {
}, {
label: 'Log Out',
accelerator: 'Ctrl+L',
enabled: enableMenu,
click(item, focusedWindow) {
if (focusedWindow) {
AppMenu.sendAction('log-out');

99
app/package-lock.json generated
View File

@@ -37,70 +37,69 @@
}
},
"@sentry/browser": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-4.0.6.tgz",
"integrity": "sha512-tYXqJQOL+pYud8ICSLkxF7aMn3aLqqSq+H8tF4GPOtTEwmVZH1PEy8T+o2SOhHohJMvWEkEepElKGot71pu+NQ==",
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-4.1.1.tgz",
"integrity": "sha512-rmkGlTh0AL3Jf0DvF3BluChIyzPkkYpNgIwEHjxTUiLp6BQdgwakZuzBqSPJrEs+jMsKMoesOuJ/fAAG0K7+Ew==",
"requires": {
"@sentry/core": "4.0.6",
"@sentry/types": "4.0.6",
"@sentry/utils": "4.0.6",
"md5": "2.2.1"
"@sentry/core": "4.1.1",
"@sentry/types": "4.1.0",
"@sentry/utils": "4.1.1"
}
},
"@sentry/core": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-4.0.6.tgz",
"integrity": "sha512-xqUI59SSjA0f7ec6xy0RzZUJTxYP2smtHy3to+rvyyz5N4QBtL87yw9P0FngvBxNFEjfHYEO1V5gM9mA/5UByg==",
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-4.1.1.tgz",
"integrity": "sha512-QJExTxZ1ZA5P/To5gOwd3sowukXW0N/Q9nfu8biRDNa+YURn6ElLjO0fD6eIBqX1f3npo/kTiWZwFBc7LXEzSg==",
"requires": {
"@sentry/hub": "4.0.6",
"@sentry/minimal": "4.0.6",
"@sentry/types": "4.0.6",
"@sentry/utils": "4.0.6"
"@sentry/hub": "4.1.1",
"@sentry/minimal": "4.1.1",
"@sentry/types": "4.1.0",
"@sentry/utils": "4.1.1"
}
},
"@sentry/electron": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/@sentry/electron/-/electron-0.11.0.tgz",
"integrity": "sha512-yj1W7wWb/U0FBk7cOikwdRlKyAH7oXVJ1t9rFBPzdlBx3ZA2rF3Z/ge1Dk/bS4lJ7H1EQ1mQ8EQP8ldCKwVg9A==",
"version": "0.12.1",
"resolved": "https://registry.npmjs.org/@sentry/electron/-/electron-0.12.1.tgz",
"integrity": "sha512-hdPdE1qWFxgsht0usssBal34IAvMgVZN1bPd8m+jTcZQtzYBNzier8VOLF3btf1OLPnMD6+wrcl3ab3XIQCoxA==",
"requires": {
"@sentry/browser": "^4.0.5",
"@sentry/core": "^4.0.5",
"@sentry/minimal": "^4.0.5",
"@sentry/node": "^4.0.5",
"@sentry/types": "^4.0.0",
"@sentry/utils": "^4.0.5",
"@sentry/browser": "~4.1.1",
"@sentry/core": "~4.1.1",
"@sentry/minimal": "~4.1.1",
"@sentry/node": "~4.1.1",
"@sentry/types": "~4.1.0",
"@sentry/utils": "~4.1.1",
"electron-fetch": "1.1.0",
"form-data": "2.3.2",
"util.promisify": "1.0.0"
}
},
"@sentry/hub": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-4.0.6.tgz",
"integrity": "sha512-7oQKnunDPo8JHzCcOC0CRcPm4Zl3apF0fFYL/nLe7XhCBGoaA2XubwoTx02iOtoNiyPp7QqT75KSXd0eMNq5KA==",
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-4.1.1.tgz",
"integrity": "sha512-VmcZOgcbFjJzK1oQNwcFP/wgfoWQr24dFv1C0uwdXldNXx3mwyUVkomvklBHz90HwiahsI/gCc+ZmbC3ECQk2Q==",
"requires": {
"@sentry/types": "4.0.6",
"@sentry/utils": "4.0.6"
"@sentry/types": "4.1.0",
"@sentry/utils": "4.1.1"
}
},
"@sentry/minimal": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-4.0.6.tgz",
"integrity": "sha512-xnMRx/EkC5YGP2qSJSvAksg4KM8LhIt9GwcNX9ZkInKy2LmWSgtHUYnHyGl1sP+xMirvsYO5HMrLKujjDaYNvQ==",
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-4.1.1.tgz",
"integrity": "sha512-xRKWA46OGnZinJyTljDUel53emPP9mb/XNi/kF6SBaVDOUXl7HAB8kP7Bn7eLBwOanxN8PbYoAzh/lIQXWTmDg==",
"requires": {
"@sentry/hub": "4.0.6",
"@sentry/types": "4.0.6"
"@sentry/hub": "4.1.1",
"@sentry/types": "4.1.0"
}
},
"@sentry/node": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/@sentry/node/-/node-4.0.6.tgz",
"integrity": "sha512-WdKL/2rYHKa69zq2U1yogDuhknGKMpt3gaEqqytvht48stR/C6dVPbz5AMryVxjPmbrvJ/exUv3dhmEalrkOAw==",
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/@sentry/node/-/node-4.1.1.tgz",
"integrity": "sha512-wbo8F2IqZW+exlOyQzQ7+bPNPXIYmG2g73ZgHFh0x3MHVOTSKgfiO3BzCqmFyUDhxqkEL23PQqLhM07GEtH3Bw==",
"requires": {
"@sentry/core": "4.0.6",
"@sentry/hub": "4.0.6",
"@sentry/types": "4.0.6",
"@sentry/utils": "4.0.6",
"@sentry/core": "4.1.1",
"@sentry/hub": "4.1.1",
"@sentry/types": "4.1.0",
"@sentry/utils": "4.1.1",
"cookie": "0.3.1",
"lsmod": "1.0.0",
"md5": "2.2.1",
@@ -108,16 +107,16 @@
}
},
"@sentry/types": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-4.0.6.tgz",
"integrity": "sha512-8TYqM+cRkGIXWYQVSJO3eJnnxi/GUUZVFpvlwNQvnxNZLVg8xyn08WYTRMAbKKBq27yb02NpJJTj04KvrUTc9g=="
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-4.1.0.tgz",
"integrity": "sha512-KY7B9wYs1NACHlYzG4OuP6k4uQJkyDPJppftjj3NJYShfwdDTO1I2Swkhhb5dJMEMMMpBJGxXmiqZ2mX5ErISQ=="
},
"@sentry/utils": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-4.0.6.tgz",
"integrity": "sha512-m+6r+qMhOXBhw06bPpdha1Bg5KzK46/FMb9tyiA0KCGFR3/vNgKneXwoZJ5GDGTVaz3J189bXoXRHHlHXcH+4w==",
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-4.1.1.tgz",
"integrity": "sha512-XMvGqAWATBrRkOF0lkt0Ij8of2mRmp4WeFTUAgiKzCekxfUBLBaTb4wTaFXz1cnnnjVTwcAq72qBRMhHwQ0IIg==",
"requires": {
"@sentry/types": "4.0.6"
"@sentry/types": "4.1.0"
}
},
"@sindresorhus/is": {
@@ -1115,9 +1114,9 @@
"integrity": "sha1-ltDNYQ69WNS03pzAxoKM2pnHVI8="
},
"node-json-db": {
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/node-json-db/-/node-json-db-0.7.3.tgz",
"integrity": "sha1-v2Mf9NTPQhHL3/5srmqq/m7lTN8=",
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/node-json-db/-/node-json-db-0.9.1.tgz",
"integrity": "sha512-4BydUI7a10W8QBdHq/J3UBswU1i8WhCgTS4BZU0MjlUKrSU7cuUti71eojistgqe5hIrb4adj/wvAT5dw63NPg==",
"requires": {
"mkdirp": "0.5.x"
}

View File

@@ -27,7 +27,7 @@
],
"dependencies": {
"@electron-elements/send-feedback": "1.0.8",
"@sentry/electron": "0.11.0",
"@sentry/electron": "0.12.1",
"adm-zip": "0.4.11",
"auto-launch": "5.0.5",
"electron-is-dev": "0.3.0",
@@ -37,7 +37,7 @@
"electron-window-state": "4.1.1",
"escape-html": "1.0.3",
"is-online": "7.0.0",
"node-json-db": "0.7.3",
"node-json-db": "0.9.1",
"request": "2.85.0",
"semver": "5.4.1",
"wurl": "2.5.0"

View File

@@ -19,7 +19,6 @@
Available under the
<a onclick="linkInBrowser('license')">Apache 2.0 License</a>
</p>
<a class="bug" onclick="linkInBrowser('bug')" href="#">Found bug?</a>
</div>
</div>
<script>
@@ -38,9 +37,6 @@
case 'license':
url = "https://github.com/zulip/zulip-electron/blob/master/LICENSE";
break;
default:
url = 'https://github.com/zulip/zulip-electron/issues/new?body=' +
'%3C!--Please%20describe%20your%20issue%20and%20steps%20to%20reproduce%20it.--%3E';
}
shell.openExternal(url);
}

View File

@@ -57,22 +57,6 @@ body {
width: 100%;
}
.maintenance-info .bug {
display: inline-block;
padding: 8px 15px;
margin-top: 30px;
text-decoration: none;
background-color: #52c2af;
color: #fff;
border-radius: 4px;
transition: background-color 0.2s ease;
}
.maintenance-info .bug:hover {
background-color: #32a692;
}
p.detail a {
color: #355f4c;
}

View File

@@ -111,6 +111,7 @@ class ServerManagerView {
showNotification: true,
autoUpdate: true,
betaUpdate: false,
customCSS: false,
silent: false,
lastActiveTab: 0,
dnd: false,
@@ -307,6 +308,7 @@ class ServerManagerView {
this.functionalTabs[tabProps.name] = this.tabs.length;
const tabIndex = this.getTabIndex();
this.tabs.push(new FunctionalTab({
role: 'function',
materialIcon: tabProps.materialIcon,
@@ -331,9 +333,11 @@ class ServerManagerView {
preload: false
})
}));
// To show loading indicator the first time a functional tab is opened, indicator is
// closed when the functional tab DOM is ready, handled in webview.js
this.$webviewsContainer.classList.remove('loaded');
this.activateTab(this.functionalTabs[tabProps.name]);
}
@@ -397,7 +401,9 @@ class ServerManagerView {
ipcRenderer.send('update-menu', {
tabs: this.tabs,
activeTabIndex: this.activeTabIndex
activeTabIndex: this.activeTabIndex,
// Following flag controls whether a menu item should be enabled or not
enableMenu: this.tabs[index].props.role === 'server'
});
}

View File

@@ -99,7 +99,7 @@ class NetworkSection extends BaseSection {
if (newValue === false) {
// Remove proxy system proxy settings
ConfigUtil.setConfigItem('proxyRules', '');
ipcRenderer.send('forward-message', 'reload-proxy', true);
ipcRenderer.send('forward-message', 'reload-proxy', false);
}
ConfigUtil.setConfigItem('useSystemProxy', newValue);
this.updateProxyOption();

View File

@@ -45,8 +45,8 @@ class ReconnectUtil {
const errMsgHolder = document.querySelector('#description');
if (errMsgHolder) {
errMsgHolder.innerHTML = `
<div>You internet connection does't seem to work properly!</div>
</div>Verify that it works and then click try again.</div>`;
<div>Your internet connection doesn't seem to work properly!</div>
<div>Verify that it works and then click try again.</div>`;
}
return resolve(false);
});

68
package-lock.json generated
View File

@@ -4432,19 +4432,73 @@
"is-obj": "^1.0.0"
}
},
"google-translate-token": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/google-translate-token/-/google-translate-token-1.0.0.tgz",
"integrity": "sha1-vpQ0RXhvAMN2Xewx9JDawhIo0/g=",
"uuid": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz",
"integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=",
"dev": true
},
"write-file-atomic": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz",
"integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=",
"dev": true,
"requires": {
"configstore": "^2.0.0",
"got": "^6.3.0"
"graceful-fs": "^4.1.11",
"imurmurhash": "^0.1.4",
"slide": "^1.1.5"
}
},
"xdg-basedir": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-2.0.0.tgz",
"integrity": "sha1-7byQPMOF/ARSPZZqM1UEtVBNG9I=",
"dev": true,
"requires": {
"os-homedir": "^1.0.0"
}
}
}
},
"google-translate-token": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/google-translate-token/-/google-translate-token-1.0.0.tgz",
"integrity": "sha1-vpQ0RXhvAMN2Xewx9JDawhIo0/g=",
"dev": true,
"requires": {
"configstore": "^2.0.0",
"got": "^6.3.0"
},
"dependencies": {
"configstore": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/configstore/-/configstore-2.1.0.tgz",
"integrity": "sha1-c3o6cDbpiGECqmCZ5HuzOrGroaE=",
"dev": true,
"requires": {
"dot-prop": "^3.0.0",
"graceful-fs": "^4.1.2",
"mkdirp": "^0.5.0",
"object-assign": "^4.0.1",
"os-tmpdir": "^1.0.0",
"osenv": "^0.1.0",
"uuid": "^2.0.1",
"write-file-atomic": "^1.1.2",
"xdg-basedir": "^2.0.0"
}
},
"dot-prop": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz",
"integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=",
"dev": true,
"requires": {
"is-obj": "^1.0.0"
}
},
"uuid": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz",
"resolved": "http://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz",
"integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=",
"dev": true
},