mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-10-31 12:03:39 +00:00 
			
		
		
		
	Compare commits
	
		
			9 Commits
		
	
	
		
			v2.3.6
			...
			v2.3.7-bet
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 50647e330b | ||
|  | 73dc3db436 | ||
|  | 09cf21bf49 | ||
|  | c30d0cc77b | ||
|  | 872ad4d3e7 | ||
|  | 6fd9e1be8b | ||
|  | 76c7f24161 | ||
|  | f9c270492c | ||
|  | 371c580934 | 
							
								
								
									
										23
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								README.md
									
									
									
									
									
								
							| @@ -2,31 +2,26 @@ | ||||
| [](https://travis-ci.org/zulip/zulip-electron) | ||||
| [](https://ci.appveyor.com/project/akashnimare/zulip-electron/branch/master) | ||||
| [](https://github.com/sindresorhus/xo) | ||||
| [](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 [installation guide](https://zulipchat.com/help/desktop-app-install-guide). | ||||
| Please see the [installation guide](https://zulipchat.com/help/desktop-app-install-guide). | ||||
|  | ||||
| # Features | ||||
| * 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. | ||||
| * Desktop notifications with inline reply | ||||
| * Tray/dock integration | ||||
| * Multi-language spell checker | ||||
| * Automatic updates | ||||
|  | ||||
| # Contribute | ||||
|  | ||||
| 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/) | ||||
| 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). | ||||
|  | ||||
| # License | ||||
| Released under the [Apache-2.0](./LICENSE) license. | ||||
|   | ||||
| @@ -196,6 +196,32 @@ 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(); | ||||
| @@ -249,7 +275,7 @@ app.on('ready', () => { | ||||
| 			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(); | ||||
|   | ||||
| @@ -21,11 +21,19 @@ function handleExternalLink(event) { | ||||
| 	if (isWhiteListURL) { | ||||
| 		event.preventDefault(); | ||||
|  | ||||
| 		// download txt, pdf, mp3, mp4 etc.. by using downloadURL in the | ||||
| 		// 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 | ||||
| 		// 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) && isUploadsURL) { | ||||
|  | ||||
| 		if (!LinkUtil.isImage(url) && !LinkUtil.isPDF(url) && isUploadsURL) { | ||||
| 			ipcRenderer.send('downloadFile', url, downloadPath); | ||||
| 			ipcRenderer.once('downloadFileCompleted', (event, filePath, fileName) => { | ||||
| 				const downloadNotification = new Notification('Download Complete', { | ||||
|   | ||||
| @@ -14,6 +14,8 @@ 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 logger = new Logger({ | ||||
| @@ -177,7 +179,7 @@ class ServerManagerView { | ||||
| 				index, | ||||
| 				tabIndex, | ||||
| 				url: server.url, | ||||
| 				name: server.alias, | ||||
| 				name: CommonUtil.decodeString(server.alias), | ||||
| 				isActive: () => { | ||||
| 					return index === this.activeTabIndex; | ||||
| 				}, | ||||
|   | ||||
| @@ -24,7 +24,7 @@ class GeneralSection extends BaseSection { | ||||
| 						<div class="setting-control"></div> | ||||
| 					</div> | ||||
| 					<div class="setting-row" id="sidebar-option"> | ||||
| 						<div class="setting-description">Show sidebar (<span class="code">Cmd Or Ctrl+S</span>)</div> | ||||
| 						<div class="setting-description">Show sidebar (<span class="code">Cmd Or Ctrl+Shift+S</span>)</div> | ||||
| 						<div class="setting-control"></div> | ||||
| 					</div> | ||||
| 					<div class="setting-row" id="badge-option"> | ||||
|   | ||||
							
								
								
									
										25
									
								
								app/renderer/js/utils/common-util.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								app/renderer/js/utils/common-util.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| '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(); | ||||
| @@ -34,6 +34,12 @@ 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(); | ||||
|   | ||||
							
								
								
									
										12
									
								
								changelog.md
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								changelog.md
									
									
									
									
									
								
							| @@ -4,6 +4,18 @@ | ||||
|  | ||||
| All notable changes to the Zulip desktop app are documented in this file. | ||||
|  | ||||
| ### 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 | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user