Compare commits

..

2 Commits

Author SHA1 Message Date
Akash Nimare
c27db8744e Update data-tab-id on dragging server tabs. 2018-09-02 12:39:59 +05:30
Akash Nimare
d6239a3150 Add Sortablejs for reordering the org tab list. 2018-08-29 00:45:10 +05:30
30 changed files with 614 additions and 919 deletions

5
.gitattributes vendored
View File

@@ -1,4 +1 @@
* text=auto
package-lock.json binary
app/package-lock.json binary
* text=auto

View File

@@ -2,26 +2,31 @@
[![Build Status](https://travis-ci.org/zulip/zulip-electron.svg?branch=master)](https://travis-ci.org/zulip/zulip-electron)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/zulip/zulip-electron?branch=master&svg=true)](https://ci.appveyor.com/project/akashnimare/zulip-electron/branch/master)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![project chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://chat.zulip.org)
Desktop client for Zulip. Available for Mac, Linux, and Windows.
Desktop client for Zulip. Available for Mac, Linux and Windows.
<img src="http://i.imgur.com/ChzTq4F.png"/>
# Download
Please see the [installation guide](https://zulipchat.com/help/desktop-app-install-guide).
Please see [installation guide](https://zulipchat.com/help/desktop-app-install-guide).
# Features
* Sign in to multiple organizations
* Desktop notifications with inline reply
* Tray/dock integration
* Multi-language spell checker
* Automatic updates
* Sign in to multiple teams
* Desktop Notifications with inline reply support
* Multilanguage SpellChecker
* OSX/Win/Linux installers
* Automatic Updates (macOS/Windows/Linux)
* Keyboard shortcuts
# Development
Please see our [development guide](./development.md) to get started and run app locally.
# Contribute
First, join us on the [Zulip community server](https://zulip.readthedocs.io/en/latest/contributing/chat-zulip-org.html)!
Also see our [contribution guidelines](./CONTRIBUTING.md) and our [development guide](./development.md).
If you want to contribute please make sure to read [our documentation about contributing](./CONTRIBUTING.md) first.
* [Issue Tracker](https://github.com/zulip/zulip-electron/issues)
* [Source Code](https://github.com/zulip/zulip-electron/)
# License
Released under the [Apache-2.0](./LICENSE) license.

View File

@@ -1,7 +1,5 @@
'use strict';
const path = require('path');
const fs = require('fs');
const electron = require('electron');
const windowStateKeeper = require('electron-window-state');
const isDev = require('electron-is-dev');
@@ -158,13 +156,6 @@ app.on('ready', () => {
});
mainWindow = createMainWindow();
// Auto-hide menu bar on Windows + Linux
if (process.platform !== 'darwin') {
const shouldHideMenu = ConfigUtil.getConfigItem('autoHideMenubar') || false;
mainWindow.setAutoHideMenuBar(shouldHideMenu);
mainWindow.setMenuBarVisibility(!shouldHideMenu);
}
// Initialize sentry for main process
sentryInit();
@@ -205,32 +196,6 @@ app.on('ready', () => {
app.quit();
});
// Show pdf in a new BrowserWindow
ipcMain.on('pdf-view', (event, url) => {
// Paddings for pdfWindow so that it fits into the main browserWindow
const paddingWidth = 55;
const paddingHeight = 22;
// Get the config of main browserWindow
const mainWindowState = global.mainWindowState;
// Window to view the pdf file
const pdfWindow = new electron.BrowserWindow({
x: mainWindowState.x + paddingWidth,
y: mainWindowState.y + paddingHeight,
width: mainWindowState.width - paddingWidth,
height: mainWindowState.height - paddingHeight,
webPreferences: {
plugins: true,
partition: 'persist:webviewsession'
}
});
pdfWindow.loadURL(url);
// We don't want to have the menu bar in pdf window
pdfWindow.setMenu(null);
});
// Reload full app not just webview, useful in debugging
ipcMain.on('reload-full-app', () => {
mainWindow.reload();
@@ -244,10 +209,10 @@ app.on('ready', () => {
});
ipcMain.on('toggle-app', () => {
if (!mainWindow.isVisible() || mainWindow.isMinimized()) {
mainWindow.show();
} else {
if (mainWindow.isVisible()) {
mainWindow.hide();
} else {
mainWindow.show();
}
});
@@ -255,11 +220,6 @@ app.on('ready', () => {
BadgeSettings.updateBadge(badgeCount, mainWindow);
});
ipcMain.on('toggle-menubar', (event, showMenubar) => {
mainWindow.setAutoHideMenuBar(showMenubar);
mainWindow.setMenuBarVisibility(!showMenubar);
});
ipcMain.on('update-badge', (event, messageCount) => {
badgeCount = messageCount;
BadgeSettings.updateBadge(badgeCount, mainWindow);
@@ -286,29 +246,10 @@ app.on('ready', () => {
page.downloadURL(url);
page.session.once('will-download', (event, item) => {
const filePath = path.join(downloadPath, item.getFilename());
const getTimeStamp = () => {
const date = new Date();
return date.getTime();
};
const formatFile = filePath => {
const fileExtension = path.extname(filePath);
const baseName = path.basename(filePath, fileExtension);
return `${baseName}-${getTimeStamp()}${fileExtension}`;
};
// Update the name and path of the file if it already exists
const updatedFilePath = path.join(downloadPath, formatFile(filePath));
const setFilePath = fs.existsSync(filePath) ? updatedFilePath : filePath;
item.setSavePath(setFilePath);
item.setSavePath(filePath);
item.on('updated', (event, state) => {
switch (state) {
case 'interrupted': {
case 'interrupted' : {
// Can interrupted to due to network error, cancel download then
console.log('Download interrupted, cancelling and fallback to dialog download.');
item.cancel();
@@ -318,7 +259,7 @@ app.on('ready', () => {
if (item.isPaused()) {
item.cancel();
}
// This event can also be used to show progress in percentage in future.
// This event can also be used to show progres in percentage in future.
break;
}
default: {
@@ -327,9 +268,8 @@ app.on('ready', () => {
}
});
item.once('done', (event, state) => {
const getFileName = fs.existsSync(filePath) ? formatFile(filePath) : item.getFilename();
if (state === 'completed') {
page.send('downloadFileCompleted', item.getSavePath(), getFileName);
page.send('downloadFileCompleted', item.getSavePath(), item.getFilename());
} else {
console.log('Download failed state: ', state);
page.send('downloadFileFailed');
@@ -340,10 +280,6 @@ app.on('ready', () => {
});
});
ipcMain.on('realm-name-changed', (event, serverURL, realmName) => {
page.send('update-realm-name', serverURL, realmName);
});
ipcMain.on('realm-icon-changed', (event, serverURL, iconURL) => {
page.send('update-realm-icon', serverURL, iconURL);
});

View File

@@ -39,65 +39,6 @@ class AppMenu {
}];
}
getToolsSubmenu() {
return [{
label: `Check for Updates`,
click() {
AppMenu.checkForUpdate();
}
},
{
label: `Release Notes`,
click() {
shell.openExternal(`https://github.com/zulip/zulip-electron/releases/tag/v${app.getVersion()}`);
}
}, {
type: 'separator'
}, {
label: 'Factory Reset',
accelerator: process.platform === 'darwin' ? 'Command+Shift+D' : 'Ctrl+Shift+D',
click() {
AppMenu.resetAppSettings();
}
}, {
label: 'Download App Logs',
click() {
const zip = new AdmZip();
let date = new Date();
date = date.toLocaleDateString().replace(/\//g, '-');
// Create a zip file of all the logs and config data
zip.addLocalFolder(`${app.getPath('appData')}/${appName}/Logs`);
zip.addLocalFolder(`${app.getPath('appData')}/${appName}/config`);
// Put the log file in downloads folder
const logFilePath = `${app.getPath('downloads')}/Zulip-logs-${date}.zip`;
zip.writeZip(logFilePath);
// Open and select the log file
shell.showItemInFolder(logFilePath);
}
}, {
type: 'separator'
}, {
label: 'Toggle DevTools for Zulip App',
accelerator: process.platform === 'darwin' ? 'Alt+Command+I' : 'Ctrl+Shift+I',
click(item, focusedWindow) {
if (focusedWindow) {
focusedWindow.webContents.toggleDevTools();
}
}
}, {
label: 'Toggle DevTools for Active Tab',
accelerator: process.platform === 'darwin' ? 'Alt+Command+U' : 'Ctrl+Shift+U',
click(item, focusedWindow) {
if (focusedWindow) {
AppMenu.sendAction('tab-devtools');
}
}
}];
}
getViewSubmenu() {
return [{
label: 'Reload',
@@ -162,30 +103,62 @@ class AppMenu {
ConfigUtil.setConfigItem('showSidebar', newValue);
}
}
}, {
label: 'Toggle DevTools for Zulip App',
accelerator: process.platform === 'darwin' ? 'Alt+Command+I' : 'Ctrl+Shift+I',
click(item, focusedWindow) {
if (focusedWindow) {
focusedWindow.webContents.toggleDevTools();
}
}
}, {
label: 'Toggle DevTools for Active Tab',
accelerator: process.platform === 'darwin' ? 'Alt+Command+U' : 'Ctrl+Shift+U',
click(item, focusedWindow) {
if (focusedWindow) {
AppMenu.sendAction('tab-devtools');
}
}
}];
}
getHelpSubmenu() {
return [
{
label: `${appName + ' Desktop'} v${app.getVersion()}`,
label: `${appName + ' Desktop-'} v${app.getVersion()}`,
enabled: false
},
{
label: 'About Zulip',
click(item, focusedWindow) {
if (focusedWindow) {
AppMenu.sendAction('open-about');
}
label: `What's New...`,
click() {
shell.openExternal(`https://github.com/zulip/zulip-electron/releases/tag/v${app.getVersion()}`);
}
},
{
label: `Help Center`,
label: `${appName} Help`,
click() {
shell.openExternal('https://zulipchat.com/help/');
}
}, {
label: 'Report an Issue',
label: 'Show App Logs',
click() {
const zip = new AdmZip();
let date = new Date();
date = date.toLocaleDateString().replace(/\//g, '-');
// Create a zip file of all the logs and config data
zip.addLocalFolder(`${app.getPath('appData')}/${appName}/Logs`);
zip.addLocalFolder(`${app.getPath('appData')}/${appName}/config`);
// Put the log file in downloads folder
const logFilePath = `${app.getPath('downloads')}/Zulip-logs-${date}.zip`;
zip.writeZip(logFilePath);
// Open and select the log file
shell.showItemInFolder(logFilePath);
}
}, {
label: 'Report an Issue...',
click() {
// the goal is to notify the main.html BrowserWindow
// which may not be the focused window.
@@ -232,12 +205,26 @@ class AppMenu {
}
getDarwinTpl(props) {
const { tabs, activeTabIndex, enableMenu } = props;
const { tabs, activeTabIndex } = props;
return [{
label: `${app.getName()}`,
submenu: [{
label: 'Desktop Settings',
label: 'About Zulip',
click(item, focusedWindow) {
if (focusedWindow) {
AppMenu.sendAction('open-about');
}
}
}, {
label: `Check for Update`,
click() {
AppMenu.checkForUpdate();
}
}, {
type: 'separator'
}, {
label: 'Desktop App Settings',
accelerator: 'Cmd+,',
click(item, focusedWindow) {
if (focusedWindow) {
@@ -247,7 +234,6 @@ class AppMenu {
}, {
label: 'Keyboard Shortcuts',
accelerator: 'Cmd+Shift+K',
enabled: enableMenu,
click(item, focusedWindow) {
if (focusedWindow) {
AppMenu.sendAction('shortcut');
@@ -262,10 +248,15 @@ class AppMenu {
const dndUtil = DNDUtil.toggle();
AppMenu.sendAction('toggle-dnd', dndUtil.dnd, dndUtil.newSettings);
}
}, {
label: 'Reset App Settings',
accelerator: 'Command+Shift+D',
click() {
AppMenu.resetAppSettings();
}
}, {
label: 'Log Out',
accelerator: 'Cmd+L',
enabled: enableMenu,
click(item, focusedWindow) {
if (focusedWindow) {
AppMenu.sendAction('log-out');
@@ -305,6 +296,8 @@ class AppMenu {
role: 'paste'
}, {
role: 'pasteandmatchstyle'
}, {
role: 'delete'
}, {
role: 'selectall'
}]
@@ -317,9 +310,6 @@ class AppMenu {
}, {
label: 'Window',
submenu: this.getWindowSubmenu(tabs, activeTabIndex)
}, {
label: 'Tools',
submenu: this.getToolsSubmenu()
}, {
role: 'help',
submenu: this.getHelpSubmenu()
@@ -327,12 +317,26 @@ class AppMenu {
}
getOtherTpl(props) {
const { tabs, activeTabIndex, enableMenu } = props;
const { tabs, activeTabIndex } = props;
return [{
label: '&File',
label: 'File',
submenu: [{
label: 'Desktop Settings',
label: 'About Zulip',
click(item, focusedWindow) {
if (focusedWindow) {
AppMenu.sendAction('open-about');
}
}
}, {
label: `Check for Update`,
click() {
AppMenu.checkForUpdate();
}
}, {
type: 'separator'
}, {
label: 'Desktop App Settings',
accelerator: 'Ctrl+,',
click(item, focusedWindow) {
if (focusedWindow) {
@@ -344,7 +348,6 @@ class AppMenu {
}, {
label: 'Keyboard Shortcuts',
accelerator: 'Ctrl+Shift+K',
enabled: enableMenu,
click(item, focusedWindow) {
if (focusedWindow) {
AppMenu.sendAction('shortcut');
@@ -359,10 +362,15 @@ class AppMenu {
const dndUtil = DNDUtil.toggle();
AppMenu.sendAction('toggle-dnd', dndUtil.dnd, dndUtil.newSettings);
}
}, {
label: 'Reset App Settings',
accelerator: 'Ctrl+Shift+D',
click() {
AppMenu.resetAppSettings();
}
}, {
label: 'Log Out',
accelerator: 'Ctrl+L',
enabled: enableMenu,
click(item, focusedWindow) {
if (focusedWindow) {
AppMenu.sendAction('log-out');
@@ -375,7 +383,7 @@ class AppMenu {
accelerator: 'Ctrl+Q'
}]
}, {
label: '&Edit',
label: 'Edit',
submenu: [{
role: 'undo'
}, {
@@ -390,25 +398,23 @@ class AppMenu {
role: 'paste'
}, {
role: 'pasteandmatchstyle'
}, {
role: 'delete'
}, {
type: 'separator'
}, {
role: 'selectall'
}]
}, {
label: '&View',
label: 'View',
submenu: this.getViewSubmenu()
}, {
label: '&History',
label: 'History',
submenu: this.getHistorySubmenu()
}, {
label: '&Window',
label: 'Window',
submenu: this.getWindowSubmenu(tabs, activeTabIndex)
}, {
label: '&Tools',
submenu: this.getToolsSubmenu()
}, {
label: '&Help',
role: 'help',
submenu: this.getHelpSubmenu()
}];

178
app/package-lock.json generated
View File

@@ -1,13 +1,13 @@
{
"name": "zulip",
"version": "2.3.82",
"version": "2.3.6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@electron-elements/send-feedback": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/@electron-elements/send-feedback/-/send-feedback-1.0.8.tgz",
"integrity": "sha512-spIZIYSe0Bp028sbZ7bcGOaUYhMyFArk+Tv7kQ4XCRNuVWRkw3SfbR8zIljZAdUavJp0wX6prSWrqLL4Dpd3Fw==",
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@electron-elements/send-feedback/-/send-feedback-1.0.7.tgz",
"integrity": "sha1-HmTsFMvNkmZAngeu1BDoUi45deA=",
"requires": {
"@electron-elements/utils": "1.0.3"
}
@@ -37,69 +37,73 @@
}
},
"@sentry/browser": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-4.1.1.tgz",
"integrity": "sha512-rmkGlTh0AL3Jf0DvF3BluChIyzPkkYpNgIwEHjxTUiLp6BQdgwakZuzBqSPJrEs+jMsKMoesOuJ/fAAG0K7+Ew==",
"version": "4.0.0-beta.12",
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-4.0.0-beta.12.tgz",
"integrity": "sha512-At8qp2aM4q4KnuIQuC6wbbQ6gLykmzwZdHwWRN99GS5TNC7kXJNgO9WgiMLadA4ph12JtC1petrUIgY8t+aoSA==",
"requires": {
"@sentry/core": "4.1.1",
"@sentry/types": "4.1.0",
"@sentry/utils": "4.1.1"
"@sentry/core": "4.0.0-beta.12",
"@sentry/hub": "4.0.0-beta.12",
"@sentry/minimal": "4.0.0-beta.12",
"@sentry/types": "4.0.0-beta.12",
"@sentry/utils": "4.0.0-beta.12"
}
},
"@sentry/core": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-4.1.1.tgz",
"integrity": "sha512-QJExTxZ1ZA5P/To5gOwd3sowukXW0N/Q9nfu8biRDNa+YURn6ElLjO0fD6eIBqX1f3npo/kTiWZwFBc7LXEzSg==",
"version": "4.0.0-beta.12",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-4.0.0-beta.12.tgz",
"integrity": "sha512-DGZqBOHejHPYP2I0MdF7APEaews7gLrfxHDh9rbwDLJJiuwPE/ridH97amxy/j2g4X4EZEc3sO3Ptv4nMaHK+Q==",
"requires": {
"@sentry/hub": "4.1.1",
"@sentry/minimal": "4.1.1",
"@sentry/types": "4.1.0",
"@sentry/utils": "4.1.1"
"@sentry/hub": "4.0.0-beta.12",
"@sentry/minimal": "4.0.0-beta.12",
"@sentry/types": "4.0.0-beta.12",
"@sentry/utils": "4.0.0-beta.12"
}
},
"@sentry/electron": {
"version": "0.12.1",
"resolved": "https://registry.npmjs.org/@sentry/electron/-/electron-0.12.1.tgz",
"integrity": "sha512-hdPdE1qWFxgsht0usssBal34IAvMgVZN1bPd8m+jTcZQtzYBNzier8VOLF3btf1OLPnMD6+wrcl3ab3XIQCoxA==",
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/@sentry/electron/-/electron-0.8.1.tgz",
"integrity": "sha512-y3CJ7547Rhpg+6bnGP0mXLj9pgpjMLaRji704TdzTV0afr8KamBXySNhNHosHLaKm1OLg6p8U4pdVB7xQZ+X3g==",
"requires": {
"@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/browser": "4.0.0-beta.12",
"@sentry/core": "4.0.0-beta.12",
"@sentry/hub": "4.0.0-beta.12",
"@sentry/minimal": "4.0.0-beta.12",
"@sentry/node": "4.0.0-beta.12",
"@sentry/types": "4.0.0-beta.12",
"@sentry/utils": "4.0.0-beta.12",
"electron-fetch": "^1.1.0",
"form-data": "^2.3.2",
"util.promisify": "^1.0.0"
}
},
"@sentry/hub": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-4.1.1.tgz",
"integrity": "sha512-VmcZOgcbFjJzK1oQNwcFP/wgfoWQr24dFv1C0uwdXldNXx3mwyUVkomvklBHz90HwiahsI/gCc+ZmbC3ECQk2Q==",
"version": "4.0.0-beta.12",
"resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-4.0.0-beta.12.tgz",
"integrity": "sha512-fmLaPaD6F/ViWDTz3hRVnNvqgnAmX0foDsUGVVp0Dt2lT9apM5NECKV6761XFVMrbGGulCg9fguv2KV5IbQcIw==",
"requires": {
"@sentry/types": "4.1.0",
"@sentry/utils": "4.1.1"
"@sentry/types": "4.0.0-beta.12",
"@sentry/utils": "4.0.0-beta.12"
}
},
"@sentry/minimal": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-4.1.1.tgz",
"integrity": "sha512-xRKWA46OGnZinJyTljDUel53emPP9mb/XNi/kF6SBaVDOUXl7HAB8kP7Bn7eLBwOanxN8PbYoAzh/lIQXWTmDg==",
"version": "4.0.0-beta.12",
"resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-4.0.0-beta.12.tgz",
"integrity": "sha512-1V3Lrm7wIOOqG+l1uyVZ7iQysPGXszwfsd6DTVDPT19PSey7+KbvPNcQfh+GqMRMz8jzyg9XlwUxckg7qbSztQ==",
"requires": {
"@sentry/hub": "4.1.1",
"@sentry/types": "4.1.0"
"@sentry/hub": "4.0.0-beta.12",
"@sentry/types": "4.0.0-beta.12"
}
},
"@sentry/node": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/@sentry/node/-/node-4.1.1.tgz",
"integrity": "sha512-wbo8F2IqZW+exlOyQzQ7+bPNPXIYmG2g73ZgHFh0x3MHVOTSKgfiO3BzCqmFyUDhxqkEL23PQqLhM07GEtH3Bw==",
"version": "4.0.0-beta.12",
"resolved": "https://registry.npmjs.org/@sentry/node/-/node-4.0.0-beta.12.tgz",
"integrity": "sha512-oekXtdaaElt/lSfyKtAyTLcTofciMRuptsGOTMX4qQ7hoHESB6DUw55Or/RRMaJYm/nckM2VFzWDATd20NVV4w==",
"requires": {
"@sentry/core": "4.1.1",
"@sentry/hub": "4.1.1",
"@sentry/types": "4.1.0",
"@sentry/utils": "4.1.1",
"@sentry/core": "4.0.0-beta.12",
"@sentry/hub": "4.0.0-beta.12",
"@sentry/minimal": "4.0.0-beta.12",
"@sentry/types": "4.0.0-beta.12",
"@sentry/utils": "4.0.0-beta.12",
"cookie": "0.3.1",
"lsmod": "1.0.0",
"md5": "2.2.1",
@@ -107,16 +111,16 @@
}
},
"@sentry/types": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-4.1.0.tgz",
"integrity": "sha512-KY7B9wYs1NACHlYzG4OuP6k4uQJkyDPJppftjj3NJYShfwdDTO1I2Swkhhb5dJMEMMMpBJGxXmiqZ2mX5ErISQ=="
"version": "4.0.0-beta.12",
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-4.0.0-beta.12.tgz",
"integrity": "sha512-xRsTfRcb8OvMbLjl64bPNv3feHiXBprtRZqTlVUbDJmSNrm8wg+tKIPYsP90dxKc50CZBk59urIbgvpPg0mCLw=="
},
"@sentry/utils": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-4.1.1.tgz",
"integrity": "sha512-XMvGqAWATBrRkOF0lkt0Ij8of2mRmp4WeFTUAgiKzCekxfUBLBaTb4wTaFXz1cnnnjVTwcAq72qBRMhHwQ0IIg==",
"version": "4.0.0-beta.12",
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-4.0.0-beta.12.tgz",
"integrity": "sha512-lpTE2GlaztATlFfIWMN8RSQFP0z6PkPPoDz0KKRmK4ZxjPxVX2sAGbKJGCpf9fdUG23NVg3FNiqfpUbjhvd9YA==",
"requires": {
"@sentry/types": "4.1.0"
"@sentry/types": "4.0.0-beta.12"
}
},
"@sindresorhus/is": {
@@ -255,14 +259,14 @@
}
},
"buffer-from": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz",
"integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ=="
},
"builder-util-runtime": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-4.4.1.tgz",
"integrity": "sha512-8L2pbL6D3VdI1f8OMknlZJpw0c7KK15BRz3cY77AOUElc4XlCv2UhVV01jJM7+6Lx7henaQh80ALULp64eFYAQ==",
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-4.4.0.tgz",
"integrity": "sha512-tkTF1o7XAX79ZkMo8822ZdQMpEBGSgfJ9kEYgyTAja90BPu7HO8C02pb8iSlFXfmK0Q0UA6D8MmnSNNPi0JLeg==",
"requires": {
"bluebird-lst": "^1.0.5",
"debug": "^3.1.0",
@@ -423,11 +427,12 @@
"integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU="
},
"define-properties": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
"integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz",
"integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=",
"requires": {
"object-keys": "^1.0.12"
"foreach": "^2.0.5",
"object-keys": "^1.0.8"
}
},
"delayed-stream": {
@@ -467,9 +472,9 @@
}
},
"electron-fetch": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/electron-fetch/-/electron-fetch-1.1.0.tgz",
"integrity": "sha512-eBtqbB522c/RJwC5v1yF/Y0SMVLiwel98BWGx050GucWbKlejHtPkfpq/vfMxCjg0SGpHGUISYUaMfu65QH+xg==",
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/electron-fetch/-/electron-fetch-1.2.1.tgz",
"integrity": "sha512-pQy0el/vxu30sL9JjXss8yZL+ztRnmioffPQsLL4UYnfSUFTuGBlgCPCxxKYJV7y52WfaIEZQ9tlbac1YHrH0w==",
"requires": {
"encoding": "^0.1.12"
}
@@ -517,25 +522,25 @@
}
},
"electron-updater": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-3.1.2.tgz",
"integrity": "sha512-y3n37O01pdynMJHhJbOd2UVhVrmDW6zLvR2SOZ+gk3S6r16872+0nNbC48GXWwc26lTeus/Zja/XUpiqrvdw4A==",
"version": "2.23.3",
"resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-2.23.3.tgz",
"integrity": "sha512-ZoQZpiEbhT3xA5Oxn7a5o4Z9adRaYs901pnTKBVBxPWmc0Qw5sZXAHkRjftlRmEn3RiEVkJtBPQSfx8kIkRcUA==",
"requires": {
"bluebird-lst": "^1.0.5",
"builder-util-runtime": "~4.4.1",
"builder-util-runtime": "~4.4.0",
"electron-is-dev": "^0.3.0",
"fs-extra-p": "^4.6.1",
"js-yaml": "^3.12.0",
"lazy-val": "^1.0.3",
"lodash.isequal": "^4.5.0",
"semver": "^5.5.1",
"source-map-support": "^0.5.9"
"semver": "^5.5.0",
"source-map-support": "^0.5.6"
},
"dependencies": {
"semver": {
"version": "5.5.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz",
"integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw=="
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
"integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA=="
}
}
},
@@ -630,6 +635,11 @@
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
"foreach": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
"integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k="
},
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
@@ -803,9 +813,9 @@
}
},
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"version": "0.4.23",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz",
"integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
@@ -1114,9 +1124,9 @@
"integrity": "sha1-ltDNYQ69WNS03pzAxoKM2pnHVI8="
},
"node-json-db": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/node-json-db/-/node-json-db-0.9.1.tgz",
"integrity": "sha512-4BydUI7a10W8QBdHq/J3UBswU1i8WhCgTS4BZU0MjlUKrSU7cuUti71eojistgqe5hIrb4adj/wvAT5dw63NPg==",
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/node-json-db/-/node-json-db-0.7.3.tgz",
"integrity": "sha1-v2Mf9NTPQhHL3/5srmqq/m7lTN8=",
"requires": {
"mkdirp": "0.5.x"
}
@@ -1478,9 +1488,9 @@
"integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM="
},
"source-map-support": {
"version": "0.5.9",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz",
"integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==",
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz",
"integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==",
"requires": {
"buffer-from": "^1.0.0",
"source-map": "^0.6.0"

View File

@@ -1,7 +1,7 @@
{
"name": "zulip",
"productName": "Zulip",
"version": "2.3.82",
"version": "2.3.6",
"description": "Zulip Desktop App",
"license": "Apache-2.0",
"copyright": "Kandra Labs, Inc.",
@@ -26,21 +26,22 @@
"InstantMessaging"
],
"dependencies": {
"@electron-elements/send-feedback": "1.0.8",
"@sentry/electron": "0.12.1",
"@electron-elements/send-feedback": "1.0.7",
"@sentry/electron": "0.8.1",
"adm-zip": "0.4.11",
"auto-launch": "5.0.5",
"electron-is-dev": "0.3.0",
"electron-log": "2.2.14",
"electron-spellchecker": "1.1.2",
"electron-updater": "3.1.2",
"electron-updater": "2.23.3",
"electron-window-state": "4.1.1",
"escape-html": "1.0.3",
"is-online": "7.0.0",
"node-json-db": "0.9.1",
"node-json-db": "0.7.3",
"request": "2.85.0",
"semver": "5.4.1",
"wurl": "2.5.0"
"wurl": "2.5.0",
"sortablejs": "*"
},
"optionalDependencies": {
"node-mac-notifier": "0.1.0"

View File

@@ -19,6 +19,7 @@
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>
@@ -37,6 +38,9 @@
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,6 +57,22 @@ 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

@@ -151,7 +151,7 @@ body {
}
.tab:first-child {
margin-top: 9px;
margin-top: 8px;
}
.tab {
@@ -165,33 +165,25 @@ body {
}
.tab .server-icons {
width: 35px;
border-radius: 50%;
width: 30px;
padding: 3px;
height: 30px;
vertical-align: top;
border-radius: 4px;
}
.tab .server-tab {
width: 100%;
height: 35px;
position: relative;
margin-top: 5px;
margin: 5px 0 2px 0;
z-index: 11;
line-height: 31px;
color: #eee;
text-align: center;
overflow: hidden;
opacity: 0.6;
padding: 6px 0;
}
.server-tab .alt-icon {
font-family: Verdana;
font-weight: 600;
font-size: 22px;
border: 2px solid #222c31;
margin-left: 17%;
width: 35px;
border-radius: 4px;
padding: 2px 0;
}
.tab .server-tab:hover {
@@ -366,7 +358,7 @@ webview.focus {
left: 56px;
padding: 10px 20px;
position: fixed;
margin-top: 11px;
margin-top: 8px;
z-index: 5000 !important;
color: #fff;
border-radius: 4px;

View File

@@ -7,16 +7,14 @@ body {
font-family: menu, "Helvetica Neue", sans-serif;
-webkit-font-smoothing: antialiased;
font-size: 14px;
color: #333;
background: #efefef;
letter-spacing: -.08px;
line-height: 18px;
color: #8b8e8f;
}
kbd {
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
border-radius: 3px;
font-size: 15px;
font-family: Courier New, Courier, monospace;
font-weight: bold;
@@ -111,7 +109,7 @@ td:nth-child(odd) {
}
.nav {
padding: 7px 0;
padding: 5px 0;
color: #999;
cursor: pointer;
}
@@ -131,6 +129,7 @@ td:nth-child(odd) {
content: '';
}
/* We don't want to show this in nav item since we have the + button for adding an Organization */
#nav-AddServer {
@@ -188,7 +187,7 @@ td:nth-child(odd) {
img.server-info-icon {
width: 36px;
height: 36px;
padding: 4px 4px 4px 10px;
padding: 4px;
cursor: pointer;
vertical-align: middle;
}
@@ -247,7 +246,7 @@ img.server-info-icon {
.setting-input-value {
flex-grow: 1;
font-size: 14px;
border-radius: 4px;
border-radius: 3px;
padding: 13px;
border: #ededed 2px solid;
outline-width: 0;
@@ -307,7 +306,7 @@ img.server-info-icon {
padding: 12px 30px;
margin: 10px 0 20px 0;
background: #fff;
width: 80%;
width: 70%;
transition: all 0.2s;
}
@@ -324,38 +323,20 @@ img.server-info-icon {
color: #ef5350;
padding: 8px;
border: rgba(239, 83, 80, 0.5) solid 1px;
border-radius: 4px;
border-color: #fff;
}
.red:hover {
background-color: rgba(230, 52, 49, 0.5);
color: #fff;
color: #e63431;
border: rgba(239, 83, 80, 0.7) solid 1px;
;
}
.green {
color: #fff;
.blue {
color: #ffffff;
background: #4EBFAC;
border-radius: 4px;
display: inline-block;
border: none;
padding: 10px;
width: 100px;
cursor: pointer;
font-size: 1rem;
font-weight: bold;
transition: background-color 0.2s ease;
text-decoration: none;
text-align: center;
}
.green:hover {
background-color: #3c9f8d;
color: #fff;
}
.w-150 {
width: 150px;
padding: 3px;
padding-right: 10px;
padding-left: 10px;
}
.grey {
@@ -377,15 +358,33 @@ img.server-info-icon {
}
i.open-tab-button {
padding-left: 5px;
padding-left: 2px;
font-size: 19px;
cursor: pointer;
}
.reset-data-button,
.custom-css-button,
.download-folder-button {
display: inline-block;
border: none;
padding: 10px;
width: 120px;
cursor: pointer;
font-size: 13px;
transition: background-color 0.2s ease;
text-decoration: none;
}
.css-delete-action {
margin-bottom: 10px;
}
.reset-data-button:hover {
background-color: #3c9f8d;
color: #fff;
}
.selected-css-path,
.download-folder-path {
background: #eeeeee;
@@ -451,12 +450,9 @@ input.toggle-round+label:after {
}
input.toggle-round+label:before {
right: 2px;
background-color: #f1f1f1;
border-radius: 25px;
top: 0;
right: 0px;
left: 0px;
bottom: 0px;
}
input.toggle-round+label:after {
@@ -468,16 +464,13 @@ input.toggle-round+label:after {
input.toggle-round:checked+label:before {
background-color: #4EBFAC;
top: 0;
right: 0px;
left: 0px;
bottom: 0px;
}
input.toggle-round:checked+label:after {
margin-left: 25px;
}
/* Add new server modal */
.add-server-modal {
@@ -495,6 +488,7 @@ input.toggle-round:checked+label:after {
overflow: auto;
}
/* Modal Content */
.modal-container {
@@ -552,7 +546,7 @@ input.toggle-round:checked+label:after {
border: none;
width: 98%;
height: 46px;
border-radius: 4px;
border-radius: 3px;
cursor: pointer;
}
@@ -565,35 +559,34 @@ input.toggle-round:checked+label:after {
}
.certificates-card {
width: 80%
width:70%
}
.certificate-input {
width: 100%;
margin-top: 10px;
display: inline-flex;
width:100%;
margin-top: 10px;
display:inline-flex;
}
.certificate-input div {
align-self: center;
align-self:center;
}
.certificate-input .setting-input-value {
margin-left: 10px;
margin-left:10px;
max-width: 100%;
}
#add-certificate-button {
margin: 10px 10px 10px 37px;
width:20%;
margin-right:0px;
height: 35px;
}
.tip {
background: none;
padding: 0;
}
.tip:hover{
box-shadow: none;
background-color: hsl(46,63%,95%);
border: 1px solid hsl(46,63%,84%);
border-radius: 4px;
}
.md-14 {
@@ -611,7 +604,7 @@ input.toggle-round:checked+label:after {
@media (max-width: 650px) {
.selected-css-path,
.download-folder-path {
.download-folder-path {
margin-right: 15px;
}
#css-delete-action {
@@ -661,11 +654,13 @@ input.toggle-round:checked+label:after {
flex-direction: column;
align-items: center;
}
.server-info-right {
flex-direction: column;
align-items: center;
}
.action {
margin-top: 10px;
}
}
}

View File

@@ -21,19 +21,11 @@ function handleExternalLink(event) {
if (isWhiteListURL) {
event.preventDefault();
// Show pdf attachments in a new window
if (LinkUtil.isPDF(url) && isUploadsURL) {
ipcRenderer.send('pdf-view', url);
return;
}
// download txt, mp3, mp4 etc.. by using downloadURL in the
// download txt, pdf, mp3, mp4 etc.. by using downloadURL in the
// main process which allows the user to save the files to their desktop
// and not trigger webview reload while image in webview will
// do nothing and will not save it
if (!LinkUtil.isImage(url) && !LinkUtil.isPDF(url) && isUploadsURL) {
if (!LinkUtil.isImage(url) && isUploadsURL) {
ipcRenderer.send('downloadFile', url, downloadPath);
ipcRenderer.once('downloadFileCompleted', (event, filePath, fileName) => {
const downloadNotification = new Notification('Download Complete', {

View File

@@ -8,7 +8,7 @@ const {ipcRenderer} = require('electron');
class ServerTab extends Tab {
template() {
return `<div class="tab" data-tab-id="${this.props.tabIndex}">
<div class="server-tooltip" style="display:none">${this.props.name}</div>
<div class="server-tooltip" style="display:none"></div>
<div class="server-tab-badge"></div>
<div class="server-tab">
<img class="server-icons" src='${this.props.icon}'/>

View File

@@ -33,7 +33,6 @@ class WebView extends BaseComponent {
disablewebsecurity
${this.props.preload ? 'preload="js/preload.js"' : ''}
partition="persist:webviewsession"
name="${this.props.name}"
webpreferences="allowRunningInsecureContent, javascript=yes">
</webview>`;
}

View File

@@ -21,9 +21,8 @@ electron_bridge.on('total_unread_count', (...args) => {
ipcRenderer.send('unread-count', ...args);
});
electron_bridge.on('realm_name', realmName => {
const serverURL = location.origin;
ipcRenderer.send('realm-name-changed', serverURL, realmName);
electron_bridge.on('realm_name', (...args) => {
ipcRenderer.send('realm-name-changed', ...args);
});
electron_bridge.on('realm_icon_url', iconURL => {

View File

@@ -4,7 +4,6 @@ const { ipcRenderer, remote } = require('electron');
const isDev = require('electron-is-dev');
const { session, app } = remote;
const escape = require('escape-html');
require(__dirname + '/js/tray.js');
const DomainUtil = require(__dirname + '/js/utils/domain-util.js');
@@ -15,10 +14,10 @@ const ConfigUtil = require(__dirname + '/js/utils/config-util.js');
const DNDUtil = require(__dirname + '/js/utils/dnd-util.js');
const ReconnectUtil = require(__dirname + '/js/utils/reconnect-util.js');
const Logger = require(__dirname + '/js/utils/logger-util.js');
const CommonUtil = require(__dirname + '/js/utils/common-util.js');
const { feedbackHolder } = require(__dirname + '/js/feedback.js');
const Sortable = require('sortablejs');
const logger = new Logger({
file: 'errors.log',
timestamp: true
@@ -45,6 +44,8 @@ class ServerManagerView {
this.$sidebar = document.getElementById('sidebar');
this.$drag = document.querySelector('.simpleList');
this.$fullscreenPopup = document.getElementById('fullscreen-popup');
this.$fullscreenEscapeKey = process.platform === 'darwin' ? '^⌘F' : 'F11';
this.$fullscreenPopup.innerHTML = `Press ${this.$fullscreenEscapeKey} to exit full screen`;
@@ -111,7 +112,6 @@ class ServerManagerView {
showNotification: true,
autoUpdate: true,
betaUpdate: false,
customCSS: false,
silent: false,
lastActiveTab: 0,
dnd: false,
@@ -136,10 +136,6 @@ class ServerManagerView {
settingOptions.dockBouncing = true;
}
if (process.platform !== 'darwin') {
settingOptions.autoHideMenubar = false;
}
for (const i in settingOptions) {
if (ConfigUtil.getConfigItem(i) === null) {
ConfigUtil.setConfigItem(i, settingOptions[i]);
@@ -150,6 +146,27 @@ class ServerManagerView {
initSidebar() {
const showSidebar = ConfigUtil.getConfigItem('showSidebar', true);
this.toggleSidebar(showSidebar);
// Allow dragging of server tabs and update the data-tab-id
const _this = this;
this.$sortable = Sortable.create(this.$drag, {
dataIdAttr: 'data-sortable-id',
onEnd() {
const newTabs = [];
const tabElements = document.querySelectorAll('#tabs-container .tab');
tabElements.forEach((el, index) => {
const oldIndex = +el.getAttribute('data-tab-id');
newTabs.push(_this.tabs[oldIndex]);
el.setAttribute('data-tab-id', index.toString());
});
_this.tabs = newTabs;
ipcRenderer.send('update-menu', {
tabs: _this.tabs,
activeTabIndex: _this.activeTabIndex
});
}
});
}
initTabs() {
@@ -174,19 +191,18 @@ class ServerManagerView {
this.tabs.push(new ServerTab({
role: 'server',
icon: server.icon,
name: server.alias,
$root: this.$tabsContainer,
onClick: this.activateLastTab.bind(this, index),
index,
tabIndex,
onHover: this.onHover.bind(this, index),
onHover: this.onHover.bind(this, index, server.alias),
onHoverOut: this.onHoverOut.bind(this, index),
webview: new WebView({
$root: this.$webviewsContainer,
index,
tabIndex,
url: server.url,
name: CommonUtil.decodeString(server.alias),
name: server.alias,
isActive: () => {
return index === this.activeTabIndex;
},
@@ -219,12 +235,8 @@ class ServerManagerView {
const $serverImgs = document.querySelectorAll('.server-icons');
$serverImgs.forEach($serverImg => {
if ($serverImg.src.includes('img/icon.png')) {
this.displayInitalCharLogo($serverImg);
}
$serverImg.addEventListener('error', () => {
this.displayInitalCharLogo($serverImg);
$serverImg.src = 'img/icon.png';
});
});
@@ -246,27 +258,6 @@ class ServerManagerView {
return currentIndex;
}
displayInitalCharLogo($img) {
const $altIcon = document.createElement('div');
const $parent = $img.parentElement;
const $container = $parent.parentElement;
const webviewId = $container.dataset.tabId;
const $webview = document.querySelector(`webview[data-tab-id="${webviewId}"]`);
const realmName = $webview.getAttribute('name');
if (realmName === null) {
$img.src = '/img/icon.png';
return;
}
$altIcon.textContent = realmName.charAt(0) || 'Z';
$altIcon.classList.add('server-icon');
$altIcon.classList.add('alt-icon');
$parent.removeChild($img);
$parent.appendChild($altIcon);
}
sidebarHoverEvent(SidebarButton, SidebarTooltip, addServer = false) {
SidebarButton.addEventListener('mouseover', () => {
SidebarTooltip.removeAttribute('style');
@@ -284,9 +275,8 @@ class ServerManagerView {
});
}
onHover(index) {
// this.$serverIconTooltip[index].innerHTML already has realm name, so we are just
// removing the style.
onHover(index, serverName) {
this.$serverIconTooltip[index].innerHTML = serverName;
this.$serverIconTooltip[index].removeAttribute('style');
// To handle position of servers' tooltip due to scrolling of list of organizations
// This could not be handled using CSS, hence the top of the tooltip is made same
@@ -308,7 +298,6 @@ class ServerManagerView {
this.functionalTabs[tabProps.name] = this.tabs.length;
const tabIndex = this.getTabIndex();
this.tabs.push(new FunctionalTab({
role: 'function',
materialIcon: tabProps.materialIcon,
@@ -333,11 +322,9 @@ 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]);
}
@@ -401,9 +388,53 @@ class ServerManagerView {
ipcRenderer.send('update-menu', {
tabs: this.tabs,
activeTabIndex: this.activeTabIndex,
// Following flag controls whether a menu item should be enabled or not
enableMenu: this.tabs[index].props.role === 'server'
activeTabIndex: this.activeTabIndex
});
ipcRenderer.on('toggle-sidebar', (event, state) => {
const selector = 'webview:not([class*=disabled])';
const webview = document.querySelector(selector);
const webContents = webview.getWebContents();
webContents.send('toggle-sidebar', state);
});
ipcRenderer.on('toggle-silent', (event, state) => {
const webviews = document.querySelectorAll('webview');
webviews.forEach(webview => {
try {
webview.setAudioMuted(state);
} catch (err) {
// webview is not ready yet
webview.addEventListener('dom-ready', () => {
webview.isAudioMuted();
});
}
});
});
ipcRenderer.on('toggle-dnd', (event, state, newSettings) => {
this.toggleDNDButton(state);
ipcRenderer.send('forward-message', 'toggle-silent', newSettings.silent);
const selector = 'webview:not([class*=disabled])';
const webview = document.querySelector(selector);
const webContents = webview.getWebContents();
webContents.send('toggle-dnd', state, newSettings);
});
ipcRenderer.on('update-realm-icon', (event, serverURL, iconURL) => {
DomainUtil.getDomains().forEach((domain, index) => {
if (domain.url.includes(serverURL)) {
DomainUtil.saveServerIcon(iconURL).then(localIconUrl => {
const serverImgsSelector = `.tab .server-icons`;
const serverImgs = document.querySelectorAll(serverImgsSelector);
serverImgs[index].src = localIconUrl;
domain.icon = localIconUrl;
DomainUtil.db.push(`/domains[${index}]`, domain, true);
DomainUtil.reloadDB();
});
}
});
});
}
@@ -535,74 +566,7 @@ class ServerManagerView {
});
ipcRenderer.on('toggle-sidebar', (event, show) => {
// Toggle the left sidebar
this.toggleSidebar(show);
// Toggle sidebar switch in the general settings
const selector = 'webview:not([class*=disabled])';
const webview = document.querySelector(selector);
const webContents = webview.getWebContents();
webContents.send('toggle-sidebar-setting', show);
});
ipcRenderer.on('toggle-silent', (event, state) => {
const webviews = document.querySelectorAll('webview');
webviews.forEach(webview => {
try {
webview.setAudioMuted(state);
} catch (err) {
// webview is not ready yet
webview.addEventListener('dom-ready', () => {
webview.setAudioMuted(state);
});
}
});
});
ipcRenderer.on('toggle-dnd', (event, state, newSettings) => {
this.toggleDNDButton(state);
ipcRenderer.send('forward-message', 'toggle-silent', newSettings.silent);
const selector = 'webview:not([class*=disabled])';
const webview = document.querySelector(selector);
const webContents = webview.getWebContents();
webContents.send('toggle-dnd', state, newSettings);
});
ipcRenderer.on('update-realm-name', (event, serverURL, realmName) => {
DomainUtil.getDomains().forEach((domain, index) => {
if (domain.url.includes(serverURL)) {
const serverTooltipSelector = `.tab .server-tooltip`;
const serverTooltips = document.querySelectorAll(serverTooltipSelector);
serverTooltips[index].innerHTML = escape(realmName);
this.tabs[index].props.name = escape(realmName);
this.tabs[index].webview.props.name = realmName;
domain.alias = escape(realmName);
DomainUtil.db.push(`/domains[${index}]`, domain, true);
DomainUtil.reloadDB();
// Update the realm name also on the Window menu
ipcRenderer.send('update-menu', {
tabs: this.tabs,
activeTabIndex: this.activeTabIndex
});
}
});
});
ipcRenderer.on('update-realm-icon', (event, serverURL, iconURL) => {
DomainUtil.getDomains().forEach((domain, index) => {
if (domain.url.includes(serverURL)) {
DomainUtil.saveServerIcon(iconURL).then(localIconUrl => {
const serverImgsSelector = `.tab .server-icons`;
const serverImgs = document.querySelectorAll(serverImgsSelector);
serverImgs[index].src = localIconUrl;
domain.icon = localIconUrl;
DomainUtil.db.push(`/domains[${index}]`, domain, true);
DomainUtil.reloadDB();
});
}
});
});
ipcRenderer.on('enter-fullscreen', () => {

View File

@@ -14,15 +14,15 @@ class AddCertificate extends BaseComponent {
}
template() {
return `
<div class="settings-card certificates-card">
return `
<div class="settings-card server-center certificates-card">
<div class="certificate-input">
<div>Organization URL</div>
<div>Organization URL :</div>
<input class="setting-input-value" autofocus placeholder="your-organization.zulipchat.com or zulip.your-organization.com"/>
</div>
<div class="certificate-input">
<div>Certificate file</div>
<button class="green" id="add-certificate-button">Upload</button>
<div>Custom CA's certificate file :</div>
<button id="add-certificate-button">Add</button>
</div>
</div>
`;

View File

@@ -23,12 +23,8 @@ class GeneralSection extends BaseSection {
<div class="setting-description">Show app icon in system tray</div>
<div class="setting-control"></div>
</div>
<div class="setting-row" id="menubar-option" style= "display:${process.platform === 'darwin' ? 'none' : ''}">
<div class="setting-description">Auto hide Menubar (Press Alt key to display)</div>
<div class="setting-control"></div>
</div>
<div class="setting-row" id="sidebar-option">
<div class="setting-description">Show sidebar (<span class="code">Cmd/Ctrl+S</span>)</div>
<div class="setting-description">Show sidebar (<span class="code">Cmd Or Ctrl+S</span>)</div>
<div class="setting-control"></div>
</div>
<div class="setting-row" id="badge-option">
@@ -44,7 +40,7 @@ class GeneralSection extends BaseSection {
<div class="setting-control"></div>
</div>
</div>
<div class="title">Desktop Notifications</div>
<div class="title">Desktop Notification</div>
<div class="settings-card">
<div class="setting-row" id="show-notification-option">
<div class="setting-description">Show Desktop Notifications</div>
@@ -77,36 +73,39 @@ class GeneralSection extends BaseSection {
<div class="setting-control"></div>
</div>
<div class="setting-row" id="enable-spellchecker-option">
<div class="setting-description">Enable spellchecker (requires restart)</div>
<div class="setting-description">Enable Spellchecker (requires restart)</div>
<div class="setting-control"></div>
</div>
</div>
<div class="title">Add custom CSS</div>
<div class="settings-card">
<div class="setting-row" id="add-custom-css">
<div class="setting-description">
This will inject the selected css stylesheet in all the added accounts
</div>
<button class="custom-css-button blue">Add</button>
</div>
<div class="setting-row" id="remove-custom-css">
<div class="setting-description">
<div class="selected-css-path" id="custom-css-path">${ConfigUtil.getConfigItem('customCSS')}</div>
</div>
<div class="action red" id="css-delete-action">
<i class="material-icons">indeterminate_check_box</i>
<span>Delete</span>
</div>
</div>
</div>
<div class="title">Advanced</div>
<div class="settings-card">
<div class="setting-row" id="show-download-folder">
<div class="setting-description">Show downloaded files in file manager</div>
<div class="setting-description">Show downloaded file in the file manager</div>
<div class="setting-control"></div>
</div>
<div class="setting-row" id="add-custom-css">
<div class="setting-description">
Add custom CSS
</div>
<button class="custom-css-button green">Upload</button>
</div>
<div class="setting-row" id="remove-custom-css">
<div class="setting-description">
<div class="selected-css-path" id="custom-css-path">${ConfigUtil.getConfigItem('customCSS')}</div>
</div>
<div class="action red" id="css-delete-action">
<i class="material-icons">indeterminate_check_box</i>
<span>Delete</span>
</div>
</div>
<div class="setting-row" id="download-folder">
<div class="setting-description">
Default download location
</div>
<button class="download-folder-button green">Change</button>
<button class="download-folder-button blue">Choose</button>
</div>
<div class="setting-row">
<div class="setting-description">
@@ -120,7 +119,7 @@ class GeneralSection extends BaseSection {
<div class="setting-row" id="resetdata-option">
<div class="setting-description">This will delete all application data including all added accounts and preferences
</div>
<button class="reset-data-button green w-150">Reset App Data</button>
<button class="reset-data-button blue">Reset App Data</button>
</div>
</div>
</div>
@@ -156,11 +155,6 @@ class GeneralSection extends BaseSection {
if (process.platform === 'darwin') {
this.updateDockBouncing();
}
// Auto hide menubar on Windows and Linux
if (process.platform !== 'darwin') {
this.updateMenubarOption();
}
}
updateTrayOption() {
@@ -176,19 +170,6 @@ class GeneralSection extends BaseSection {
});
}
updateMenubarOption() {
this.generateSettingOption({
$element: document.querySelector('#menubar-option .setting-control'),
value: ConfigUtil.getConfigItem('autoHideMenubar', false),
clickHandler: () => {
const newValue = !ConfigUtil.getConfigItem('autoHideMenubar');
ConfigUtil.setConfigItem('autoHideMenubar', newValue);
ipcRenderer.send('toggle-menubar', newValue);
this.updateMenubarOption();
}
});
}
updateBadgeOption() {
this.generateSettingOption({
$element: document.querySelector('#badge-option .setting-control'),

View File

@@ -38,7 +38,8 @@ class NetworkSection extends BaseSection {
<input class="setting-input-value" placeholder="e.g. foobar.com"/>
</div>
<div class="setting-row">
<div class="action green" id="proxy-save-action">
<div class="action blue" id="proxy-save-action">
<i class="material-icons">check_box</i>
<span>Save</span>
</div>
</div>
@@ -99,7 +100,7 @@ class NetworkSection extends BaseSection {
if (newValue === false) {
// Remove proxy system proxy settings
ConfigUtil.setConfigItem('proxyRules', '');
ipcRenderer.send('forward-message', 'reload-proxy', false);
ipcRenderer.send('forward-message', 'reload-proxy', true);
}
ConfigUtil.setConfigItem('useSystemProxy', newValue);
this.updateProxyOption();

View File

@@ -90,7 +90,7 @@ class PreferenceView extends BaseComponent {
this.handleNavigation(navItem);
});
ipcRenderer.on('toggle-sidebar-setting', (event, state) => {
ipcRenderer.on('toggle-sidebar', (event, state) => {
this.handleToggle('sidebar-option', state);
});

View File

@@ -14,7 +14,6 @@ class ShortcutsSection extends BaseSection {
return `
<div class="settings-pane">
<div class="settings-card tip"><p><b><i class="material-icons md-14">settings</i>Tip: </b>These desktop app shortcuts extend the Zulip webapp's <span id="open-hotkeys-link"> keyboard shortcuts</span>.</p></div>
<div class="title">Application Shortcuts</div>
<div class="settings-card">
<table>
@@ -161,6 +160,7 @@ class ShortcutsSection extends BaseSection {
</table>
<div class="setting-control"></div>
</div>
<div class="settings-card tip"><b><i class="material-icons md-14">settings</i>Tip: </b>These desktop app shortcuts extend the Zulip webapp's <span id="open-hotkeys-link">keyboard shortcuts</span>.</div>
</div>
`;
}

View File

@@ -3,9 +3,9 @@ const path = require('path');
const electron = require('electron');
const { ipcRenderer, remote } = electron;
const {ipcRenderer, remote} = electron;
const { Tray, Menu, nativeImage, BrowserWindow } = remote;
const {Tray, Menu, nativeImage, BrowserWindow} = remote;
const APP_ICON = path.join(__dirname, '../../resources/tray', 'tray');
@@ -115,36 +115,50 @@ function sendAction(action) {
const createTray = function () {
window.tray = new Tray(iconPath());
const contextMenu = Menu.buildFromTemplate([
{
label: 'Zulip',
click() {
ipcRenderer.send('focus-app');
}
},
{
label: 'Settings',
click() {
ipcRenderer.send('focus-app');
sendAction('open-settings');
}
},
{
type: 'separator'
},
{
label: 'Quit',
click() {
ipcRenderer.send('quit-app');
}
const contextMenu = Menu.buildFromTemplate([{
label: 'About',
click() {
// We need to focus the main window first
ipcRenderer.send('focus-app');
sendAction('open-about');
}
},
{
type: 'separator'
},
{
label: 'Focus',
click() {
ipcRenderer.send('focus-app');
}
},
{
type: 'separator'
},
{
label: 'Settings',
click() {
ipcRenderer.send('focus-app');
sendAction('open-settings');
}
},
{
type: 'separator'
},
{
label: 'Quit',
click() {
ipcRenderer.send('quit-app');
}
}
]);
window.tray.setContextMenu(contextMenu);
if (process.platform === 'linux' || process.platform === 'win32') {
window.tray.on('click', () => {
window.tray.on('click', () => {
// Click event only works on Windows
if (process.platform === 'win32') {
ipcRenderer.send('toggle-app');
});
}
}
});
};
ipcRenderer.on('destroytray', event => {

View File

@@ -1,25 +0,0 @@
'use strict';
let instance = null;
class CommonUtil {
constructor() {
if (instance) {
return instance;
} else {
instance = this;
}
return instance;
}
// unescape already encoded/escaped strings
decodeString(string) {
const parser = new DOMParser();
const dom = parser.parseFromString(
'<!doctype html><body>' + string,
'text/html');
return dom.body.textContent;
}
}
module.exports = new CommonUtil();

View File

@@ -39,12 +39,7 @@ class ConfigUtil {
}
getConfigItem(key, defaultValue = null) {
try {
this.db.reload();
} catch (err) {
logger.error('Error while reloading settings.json: ');
logger.error(err);
}
this.reloadDB();
const value = this.db.getData('/')[key];
if (value === undefined) {
this.setConfigItem(key, defaultValue);
@@ -55,24 +50,19 @@ class ConfigUtil {
}
// This function returns whether a key exists in the configuration file (settings.json)
isConfigItemExists(key) {
try {
this.db.reload();
} catch (err) {
logger.error('Error while reloading settings.json: ');
logger.error(err);
}
this.reloadDB();
const value = this.db.getData('/')[key];
return (value !== undefined);
}
setConfigItem(key, value) {
this.db.push(`/${key}`, value, true);
this.db.save();
this.reloadDB();
}
removeConfigItem(key) {
this.db.delete(`/${key}`);
this.db.save();
this.reloadDB();
}
reloadDB() {

View File

@@ -34,12 +34,6 @@ class LinkUtil {
const isImageUrl = /\.(bmp|gif|jpg|jpeg|png|webp)\?*.*$/i;
return isImageUrl.test(url);
}
isPDF(url) {
// test for pdf extension
const isPDFUrl = /\.(pdf)\?*.*$/i;
return isPDFUrl.test(url);
}
}
module.exports = new LinkUtil();

View File

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

View File

@@ -5,10 +5,6 @@ const sentryInit = () => {
if (!isDev) {
init({
dsn: 'SENTRY_DSN',
// We should ignore this error since it's harmless and we know the reason behind this
// This error mainly comes from the console logs.
// This is a temp solution until Sentry supports disabling the console logs
ignoreErrors: ['does not appear to be a valid Zulip server'],
sendTimeout: 30 // wait 30 seconds before considering the sending capture to have failed, default is 1 second
});
}

View File

@@ -15,7 +15,7 @@
</div>
<div id="sidebar" class="toggle-sidebar">
<div id="view-controls-container">
<div id="tabs-container"></div>
<div id="tabs-container" class="simpleList"></div>
<div id="add-tab" class="tab functional-tab">
<div class="server-tab" id="add-action">
<i class="material-icons">add</i>

View File

@@ -4,51 +4,6 @@
All notable changes to the Zulip desktop app are documented in this file.
### v2.3.8 --2018-09-25
**New features**:
* Auto hide menubar on Windows/Linux. Add a setting option for the same.
* Improve design of setting page.
* Toggle app on clicking the tray icon (Linux).
* Update sidebar realm name when it's changed in webapp.
* left-sidebar: Add initial character of realm name instead of default icon.
**Fixes**:
* linux: Fix ALT+SHIFT opening menu items on Linux.
* sentry: Add ignore errors to sentry configuration.
* Linux: Add label for help menu item.
* file-attachments: Allow multiple downloads of same file name.
**Module Updates**
* electron: Update electron to v2.0.9.
<hr>
### v2.3.7-beta --2018-09-03
**New features**:
* Add a feature to show and view pdf file in the app.
**Fixes**:
* Use package reload instead of custom reload. This is an experimental fix for setting files getting corrupted issue.
* Unescape server name in window menu item.
<hr>
### v2.3.6 --2018-08-27
**New features**:
* Add proxy details while validating a server. This fixes the server validating issue for users who are using the proxy settings.
**Fixes**:
* Fix youtube video not playing in lightbox.
* Fix realm name not escaped properly.
<hr>
### v2.3.5 --2018-08-03

419
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "zulip",
"version": "2.3.82",
"version": "2.3.6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -11,9 +11,9 @@
"dev": true
},
"@types/node": {
"version": "8.10.29",
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.29.tgz",
"integrity": "sha512-zbteaWZ2mdduacm0byELwtRyhYE40aK+pAanQk415gr1eRuu67x7QGOLmn8jz5zI8LDK7d0WI/oT6r5Trz4rzQ==",
"version": "8.10.26",
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.26.tgz",
"integrity": "sha512-opk6bLLErLSwyVVJeSH5Ek7ZWOBSsN0JrvXTNVGLXLAXKB9xlTYajrplR44xVyMrmbut94H6uJ9jqzM/12jxkA==",
"dev": true
},
"abbrev": {
@@ -173,91 +173,11 @@
}
},
"app-builder-bin": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/app-builder-bin/-/app-builder-bin-2.1.2.tgz",
"integrity": "sha512-PZJspzAqB0+z60OalXChP9I05BzODd/ffDz6RvTmDG3qclr7YrnpqzvPF+T7vGVtk2nN7syuveTQROJfXcB8xA==",
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/app-builder-bin/-/app-builder-bin-1.11.1.tgz",
"integrity": "sha512-EYzPq59A3AMAD0/a6QSSBGzrXvKCm19t5utO5qeMTSAeWx0HDZxMyUBRUoOZIFd6+uJRF1HMTofIAushLu7PhQ==",
"dev": true
},
"app-builder-lib": {
"version": "20.28.3",
"resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-20.28.3.tgz",
"integrity": "sha512-oZqv3+oi5bfKbN5eFfEbNovSuMTXn3yu8yJbmqDCNXcI1caOF+hCNAUpgMFohNGO0uY80veAwQTysZ74/VFjCA==",
"dev": true,
"requires": {
"7zip-bin": "~4.0.2",
"app-builder-bin": "2.1.2",
"async-exit-hook": "^2.0.1",
"bluebird-lst": "^1.0.5",
"builder-util": "6.1.3",
"builder-util-runtime": "4.4.1",
"chromium-pickle-js": "^0.2.0",
"debug": "^3.1.0",
"ejs": "^2.6.1",
"electron-osx-sign": "0.4.10",
"electron-publish": "20.28.3",
"fs-extra-p": "^4.6.1",
"hosted-git-info": "^2.7.1",
"is-ci": "^1.2.0",
"isbinaryfile": "^3.0.3",
"js-yaml": "^3.12.0",
"lazy-val": "^1.0.3",
"minimatch": "^3.0.4",
"normalize-package-data": "^2.4.0",
"plist": "^3.0.1",
"read-config-file": "3.1.2",
"sanitize-filename": "^1.6.1",
"semver": "^5.5.1",
"temp-file": "^3.1.3"
},
"dependencies": {
"ci-info": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.4.0.tgz",
"integrity": "sha512-Oqmw2pVfCl8sCL+1QgMywPfdxPJPkC51y4usw0iiE2S9qnEOAqXy8bwl1CpMpnoU39g4iKJTz6QZj+28FvOnjQ==",
"dev": true
},
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
},
"hosted-git-info": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz",
"integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==",
"dev": true
},
"is-ci": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.0.tgz",
"integrity": "sha512-plgvKjQtalH2P3Gytb7L61Lmz95g2DlpzFiQyRSFew8WoJKxtKRzrZMeyRN2supblm3Psc8OQGy7Xjb6XG11jw==",
"dev": true,
"requires": {
"ci-info": "^1.3.0"
}
},
"js-yaml": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",
"integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
}
},
"semver": {
"version": "5.5.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz",
"integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==",
"dev": true
}
}
},
"append-buffer": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz",
@@ -996,39 +916,33 @@
"dev": true
},
"buffer-from": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz",
"integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==",
"dev": true
},
"builder-util": {
"version": "6.1.3",
"resolved": "https://registry.npmjs.org/builder-util/-/builder-util-6.1.3.tgz",
"integrity": "sha512-MXeARNff9KHlzJYGJcAhLI/tpE57PmUnleaYfL22IE+viRt192Yr3wQL444ztsA+LUHJ8d12moUoG00jh1hfLA==",
"version": "5.16.0",
"resolved": "https://registry.npmjs.org/builder-util/-/builder-util-5.16.0.tgz",
"integrity": "sha512-HN7EyZF+WPcncty4fy7AVZxfR8TMkX/ZxxQfsji4dWyzDZ8nAqMadXKZlqySfLr5ckEjwEsOrDqO2ZsqkVoCtg==",
"dev": true,
"requires": {
"7zip-bin": "~4.0.2",
"app-builder-bin": "2.1.2",
"app-builder-bin": "1.11.1",
"bluebird-lst": "^1.0.5",
"builder-util-runtime": "^4.4.1",
"builder-util-runtime": "^4.4.0",
"chalk": "^2.4.1",
"debug": "^3.1.0",
"fs-extra-p": "^4.6.1",
"is-ci": "^1.2.0",
"is-ci": "^1.1.0",
"js-yaml": "^3.12.0",
"lazy-val": "^1.0.3",
"semver": "^5.5.1",
"source-map-support": "^0.5.9",
"semver": "^5.5.0",
"source-map-support": "^0.5.6",
"stat-mode": "^0.2.2",
"temp-file": "^3.1.3"
},
"dependencies": {
"ci-info": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.4.0.tgz",
"integrity": "sha512-Oqmw2pVfCl8sCL+1QgMywPfdxPJPkC51y4usw0iiE2S9qnEOAqXy8bwl1CpMpnoU39g4iKJTz6QZj+28FvOnjQ==",
"dev": true
},
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
@@ -1038,15 +952,6 @@
"ms": "2.0.0"
}
},
"is-ci": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.0.tgz",
"integrity": "sha512-plgvKjQtalH2P3Gytb7L61Lmz95g2DlpzFiQyRSFew8WoJKxtKRzrZMeyRN2supblm3Psc8OQGy7Xjb6XG11jw==",
"dev": true,
"requires": {
"ci-info": "^1.3.0"
}
},
"js-yaml": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",
@@ -1056,19 +961,13 @@
"argparse": "^1.0.7",
"esprima": "^4.0.0"
}
},
"semver": {
"version": "5.5.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz",
"integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==",
"dev": true
}
}
},
"builder-util-runtime": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-4.4.1.tgz",
"integrity": "sha512-8L2pbL6D3VdI1f8OMknlZJpw0c7KK15BRz3cY77AOUElc4XlCv2UhVV01jJM7+6Lx7henaQh80ALULp64eFYAQ==",
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-4.4.0.tgz",
"integrity": "sha512-tkTF1o7XAX79ZkMo8822ZdQMpEBGSgfJ9kEYgyTAja90BPu7HO8C02pb8iSlFXfmK0Q0UA6D8MmnSNNPi0JLeg==",
"dev": true,
"requires": {
"bluebird-lst": "^1.0.5",
@@ -2035,30 +1934,21 @@
}
},
"dmg-builder": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-5.3.1.tgz",
"integrity": "sha512-/+vtqlgvTtha/4Gc76XIRKS2KzYO58sTWXhZ/kgfNr05ZXY6bIw26v7xDu8ZBpTYnfWI09JRZTMv1yIXT/vvfg==",
"version": "4.14.0",
"resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-4.14.0.tgz",
"integrity": "sha512-zTlb3VFkOGqCzsSSEVkfzCRl0Gd3LINMfplI6mCvTSU825OVG7W1IvZSp2gikLT5OJIgJzx2YuomKntWhXOJWA==",
"dev": true,
"requires": {
"app-builder-lib": "~20.28.3",
"bluebird-lst": "^1.0.5",
"builder-util": "~6.1.3",
"builder-util": "~5.16.0",
"electron-builder-lib": "~20.20.4",
"fs-extra-p": "^4.6.1",
"iconv-lite": "^0.4.24",
"iconv-lite": "^0.4.23",
"js-yaml": "^3.12.0",
"parse-color": "^1.0.0",
"sanitize-filename": "^1.6.1"
},
"dependencies": {
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"dev": true,
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"js-yaml": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",
@@ -2201,9 +2091,9 @@
"dev": true
},
"electron": {
"version": "2.0.9",
"resolved": "https://registry.npmjs.org/electron/-/electron-2.0.9.tgz",
"integrity": "sha512-xRefYuz6C65ahX8vDwIJxr1Y5ffFa106dugZEbl23yLKfrAG01lh5csBJ9hJwCBPLHp2zj/9PGoJ8dt5zlzOvQ==",
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/electron/-/electron-2.0.8.tgz",
"integrity": "sha512-pbeGFbwijb5V3Xy/KMcwIp59eA9igg2br+7EHbbwQoa3HRDF5JjTrciX7OiscCA52+ze2n4q38S4lXPqRitgIA==",
"dev": true,
"requires": {
"@types/node": "^8.0.24",
@@ -2212,39 +2102,103 @@
}
},
"electron-builder": {
"version": "20.28.3",
"resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-20.28.3.tgz",
"integrity": "sha512-Sbe7E18Fl88la642PpcMU4jxv/1/vI3PCT/+Szly3O97DtKwuuVmk5MhW+FDBKgNS2f0xJgA6vRRraDK6HYvrw==",
"version": "20.20.4",
"resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-20.20.4.tgz",
"integrity": "sha512-6X2T21/v35dvt9Rd+L9Dlb3EbIVGiqePh2sirngPa2wT6QnmVdVJsvnlxKsWWYrsQzowVSGxkho5FGiCwanDiw==",
"dev": true,
"requires": {
"app-builder-lib": "20.28.3",
"bluebird-lst": "^1.0.5",
"builder-util": "6.1.3",
"builder-util-runtime": "4.4.1",
"builder-util": "5.16.0",
"builder-util-runtime": "4.4.0",
"chalk": "^2.4.1",
"dmg-builder": "5.3.1",
"dmg-builder": "4.14.0",
"electron-builder-lib": "20.20.4",
"fs-extra-p": "^4.6.1",
"is-ci": "^1.2.0",
"is-ci": "^1.1.0",
"lazy-val": "^1.0.3",
"read-config-file": "3.1.2",
"read-config-file": "3.1.0",
"sanitize-filename": "^1.6.1",
"update-notifier": "^2.5.0",
"yargs": "^12.0.1"
}
},
"electron-builder-lib": {
"version": "20.20.4",
"resolved": "https://registry.npmjs.org/electron-builder-lib/-/electron-builder-lib-20.20.4.tgz",
"integrity": "sha512-84n1ELXP/leF1IuDIsx2pyUJuz889Um3sb2tjBxDbEhq0oaLnp1ifB3j5iO+OV7ZfGnXKyvds6nPcNt1AYQy7A==",
"dev": true,
"requires": {
"7zip-bin": "~4.0.2",
"app-builder-bin": "1.11.1",
"async-exit-hook": "^2.0.1",
"bluebird-lst": "^1.0.5",
"builder-util": "5.16.0",
"builder-util-runtime": "4.4.0",
"chromium-pickle-js": "^0.2.0",
"debug": "^3.1.0",
"ejs": "^2.6.1",
"electron-osx-sign": "0.4.10",
"electron-publish": "20.22.0",
"env-paths": "^1.0.0",
"fs-extra-p": "^4.6.1",
"hosted-git-info": "^2.7.1",
"is-ci": "^1.1.0",
"isbinaryfile": "^3.0.2",
"js-yaml": "^3.12.0",
"lazy-val": "^1.0.3",
"minimatch": "^3.0.4",
"normalize-package-data": "^2.4.0",
"plist": "^3.0.1",
"read-config-file": "3.1.0",
"sanitize-filename": "^1.6.1",
"semver": "^5.5.0",
"sumchecker": "^2.0.2",
"temp-file": "^3.1.3"
},
"dependencies": {
"ci-info": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.4.0.tgz",
"integrity": "sha512-Oqmw2pVfCl8sCL+1QgMywPfdxPJPkC51y4usw0iiE2S9qnEOAqXy8bwl1CpMpnoU39g4iKJTz6QZj+28FvOnjQ==",
"dev": true
},
"is-ci": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.0.tgz",
"integrity": "sha512-plgvKjQtalH2P3Gytb7L61Lmz95g2DlpzFiQyRSFew8WoJKxtKRzrZMeyRN2supblm3Psc8OQGy7Xjb6XG11jw==",
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ci-info": "^1.3.0"
"ms": "2.0.0"
}
},
"hosted-git-info": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz",
"integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==",
"dev": true
},
"js-yaml": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",
"integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
}
},
"sumchecker": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-2.0.2.tgz",
"integrity": "sha1-D0LBDl0F2l1C7qPlbDOZo31sWz4=",
"dev": true,
"requires": {
"debug": "^2.2.0"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
}
}
}
}
@@ -2394,14 +2348,14 @@
}
},
"electron-publish": {
"version": "20.28.3",
"resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-20.28.3.tgz",
"integrity": "sha512-/2t5zk9EKgH7p7rFZ+ynTKLmpKGF9bktMP2UR6u4bbPz9w4r3WEUbPOeZ1TLqUCAqdfZECcj4ThjrlcAJTghCA==",
"version": "20.22.0",
"resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-20.22.0.tgz",
"integrity": "sha512-ZF6GV1y5l1+auMBdISOk3yrltkGxOo1DQaGXVpABuenfgXgrHen6EgkgMy6wHhvBm1tOTZnANJSUV4zDBIFewQ==",
"dev": true,
"requires": {
"bluebird-lst": "^1.0.5",
"builder-util": "~6.1.3",
"builder-util-runtime": "^4.4.1",
"builder-util": "^5.14.0",
"builder-util-runtime": "^4.4.0",
"chalk": "^2.4.1",
"fs-extra-p": "^4.6.1",
"lazy-val": "^1.0.3",
@@ -2502,9 +2456,9 @@
}
},
"es6-promise": {
"version": "4.2.5",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz",
"integrity": "sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg==",
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz",
"integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==",
"dev": true
},
"es6-set": {
@@ -4432,6 +4386,16 @@
"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=",
"dev": true,
"requires": {
"configstore": "^2.0.0",
"got": "^6.3.0"
}
},
"uuid": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz",
@@ -4460,70 +4424,6 @@
}
}
},
"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": "http://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": {
"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"
}
}
}
},
"got": {
"version": "6.7.1",
"resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz",
@@ -5569,37 +5469,10 @@
"dev": true
},
"isbinaryfile": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz",
"integrity": "sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==",
"dev": true,
"requires": {
"buffer-alloc": "^1.2.0"
},
"dependencies": {
"buffer-alloc": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
"integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
"dev": true,
"requires": {
"buffer-alloc-unsafe": "^1.1.0",
"buffer-fill": "^1.0.0"
}
},
"buffer-alloc-unsafe": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
"integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==",
"dev": true
},
"buffer-fill": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
"integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=",
"dev": true
}
}
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.2.tgz",
"integrity": "sha1-Sj6XTsDLqQBNP8bN5yCeppNopiE=",
"dev": true
},
"isexe": {
"version": "2.0.0",
@@ -7256,9 +7129,9 @@
}
},
"read-config-file": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/read-config-file/-/read-config-file-3.1.2.tgz",
"integrity": "sha512-QCATYzlYHvmWps/W/eP7rcKuhYRYZg5XKeXFxSJRIXvn+KSw1+Ntz2et1aBz5TrEpawGrxWZ7zBipj+/v0xwWQ==",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/read-config-file/-/read-config-file-3.1.0.tgz",
"integrity": "sha512-z3VTrR9fgFu+Ll6MhTdtxbPFBKNGKgzYYnRjOcZvQeE/zwJTjPYVrps0ATgaSWU2/BnucUg3knP+Oz4zo9vEoA==",
"dev": true,
"requires": {
"ajv": "^6.5.2",
@@ -7273,15 +7146,15 @@
},
"dependencies": {
"ajv": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz",
"integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==",
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz",
"integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==",
"dev": true,
"requires": {
"fast-deep-equal": "^2.0.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
"uri-js": "^4.2.1"
}
},
"fast-deep-equal": {
@@ -8066,9 +7939,9 @@
}
},
"source-map-support": {
"version": "0.5.9",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz",
"integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==",
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz",
"integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==",
"dev": true,
"requires": {
"buffer-from": "^1.0.0",

View File

@@ -1,7 +1,7 @@
{
"name": "zulip",
"productName": "Zulip",
"version": "2.3.82",
"version": "2.3.6",
"main": "./app/main",
"description": "Zulip Desktop App",
"license": "Apache-2.0",
@@ -123,8 +123,8 @@
"assert": "1.4.1",
"cp-file": "^5.0.0",
"devtron": "1.4.0",
"electron": "2.0.9",
"electron-builder": "20.28.3",
"electron": "2.0.8",
"electron-builder": "20.20.4",
"electron-connect": "0.6.2",
"electron-debug": "1.4.0",
"google-translate-api": "2.3.0",
@@ -153,7 +153,7 @@
"max-lines": [
"warn",
{
"max": 600,
"max": 500,
"skipBlankLines": true,
"skipComments": true
}