瀏覽代碼

11.1.1 release

David Benson [draw.io] 6 年之前
父節點
當前提交
ef2ab71a99

+ 16 - 0
ChangeLog

@@ -1,3 +1,19 @@
+02-AUG-2019: 11.1.1
+
+- Forces in-place electron users to upgrade page
+
+02-AUG-2019: 11.1.0
+
+- Fixes for Electron 6
+- Uses dark theme on desktop by default in dark mode
+- Changes Conf Cloud to leave draft attachments empty
+
+01-AUG-2019: 11.0.9
+
+- Fixes window.app undefined check
+- Adds desktop command line vsdx export
+- Fixes Confluence Cloud custom content direct edit macro replacment
+
 30-JUL-2019: 11.0.8
 
 - Fixes for dialogs when no services available

+ 1 - 1
VERSION

@@ -1 +1 @@
-11.0.8
+11.1.1

文件差異過大導致無法顯示
+ 10 - 11
etc/mxgraph/mxClient.js


+ 1 - 1
src/main/webapp/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 07/30/2019 10:06 PM
+# 08/02/2019 03:00 PM
 
 app.html
 index.html?offline=1

+ 7 - 6
src/main/webapp/electron.js

@@ -16,6 +16,7 @@ const {autoUpdater} = require("electron-updater")
 const Store = require('electron-store');
 const store = new Store();
 const ProgressBar = require('electron-progressbar');
+const { systemPreferences } = require('electron')
 autoUpdater.logger = log
 autoUpdater.logger.transports.file.level = 'info'
 autoUpdater.autoDownload = false
@@ -104,7 +105,7 @@ function createWindow (opt = {})
 					
 					if (isModified)
 					{
-						var choice = dialog.showMessageBox(
+						var choice = dialog.showMessageBoxSync(
 							win,
 							{
 								type: 'question',
@@ -694,9 +695,9 @@ autoUpdater.on('update-available', (a, b) =>
 		title: 'Confirm Update',
 		message: 'Update available.\n\nWould you like to download and install new version?',
 		detail: 'Application will automatically restart to apply update after download',
-	}, response =>
+	}).then( result =>
 	{
-		if (response === 0)
+		if (result.response === 0)
 		{
 			autoUpdater.downloadUpdate()
 			
@@ -789,16 +790,16 @@ autoUpdater.on('update-available', (a, b) =>
 					defaultId: 0,
 					message: 'A new version of ' + app.getName() + ' has been downloaded',
 					detail: 'It will be installed the next time you restart the application',
-				}, response =>
+				}).then(result =>
 				{
-					if (response === 0)
+					if (result.response === 0)
 					{
 						setTimeout(() => autoUpdater.quitAndInstall(), 1)
 					}
 				})
 		    });
 		}
-		else if (response === 2)
+		else if (result.response === 2)
 		{
 			//save in settings don't check for updates
 			log.info('@dont check for updates!@')

+ 6 - 2
src/main/webapp/index.html

@@ -82,8 +82,7 @@
 			{
 				var proto = window.location.protocol;
 				
-				// Electron protocol is file:
-				if (proto != 'file:')
+				if (!mxIsElectron)
 				{
 					var host = window.location.host;
 		
@@ -103,6 +102,11 @@
 						window.location.href = href;
 					}
 				}
+				else if (!mxIsElectron5)
+				{
+					// It's electron, but v3 or lower
+					window.location.href = 'https://github.com/jgraph/drawio-desktop/releases';
+				}
 			})();
 		}
 		

文件差異過大導致無法顯示
+ 162 - 162
src/main/webapp/js/app.min.js


+ 1 - 1
src/main/webapp/js/diagramly/EditorUi.js

@@ -3688,7 +3688,7 @@
 				{
 					msg = mxUtils.htmlEntities(e.response.error);
 				}
-				else if (window.App !== 'undefined')
+				else if (typeof window.App !== 'undefined')
 				{
 					if (e.code == App.ERROR_TIMEOUT)
 					{

+ 5 - 5
src/main/webapp/js/diagramly/ElectronApp.js

@@ -216,7 +216,7 @@ mxStencilRegistry.allowEval = false;
 				var remote = electron.remote;
 				var dialog = remote.dialog;
 
-		        var paths = dialog.showOpenDialog({properties: ['openFile']});
+		        var paths = dialog.showOpenDialogSync({properties: ['openFile']});
 			           
 		        if (paths !== undefined && paths[0] != null)
 		        {
@@ -597,7 +597,7 @@ mxStencilRegistry.allowEval = false;
 		var remote = electron.remote;
 		var dialog = remote.dialog;
 
-        var paths = dialog.showOpenDialog({properties: ['openFile']});
+        var paths = dialog.showOpenDialogSync({properties: ['openFile']});
 	           
         if (paths !== undefined && paths[0] != null)
         {
@@ -985,7 +985,7 @@ mxStencilRegistry.allowEval = false;
 				var remote = electron.remote;
 				var dialog = remote.dialog;
 	
-				var path = dialog.showSaveDialog({defaultPath: this.title});
+				var path = dialog.showSaveDialogSync({defaultPath: this.title});
 	
 		        if (path != null)
 		        {
@@ -1021,7 +1021,7 @@ mxStencilRegistry.allowEval = false;
 			filename += '.drawio';
 		}
 		
-		var path = dialog.showSaveDialog({defaultPath: filename});
+		var path = dialog.showSaveDialogSync({defaultPath: filename});
         
         if (path != null)
         {
@@ -1397,7 +1397,7 @@ mxStencilRegistry.allowEval = false;
 			};
 			
 			dlgConfig['filters'] = filters;
-			var path = dialog.showSaveDialog(dlgConfig);
+			var path = dialog.showSaveDialogSync(dlgConfig);
 	
 	        if (path != null)
 	        {

+ 13 - 6
src/main/webapp/js/diagramly/Init.js

@@ -174,12 +174,19 @@ window.uiTheme = window.uiTheme || (function()
 	{
 		if (ui == null)
 		{
-	        var iw = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
-
-	        if (iw <= 414)
-	        {
-	        	ui = 'min';
-	        }
+			if (window.mxIsElectron5 && require('electron').remote.systemPreferences.isDarkMode())
+			{
+				ui = 'dark';
+			}
+			else
+			{
+		        var iw = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
+	
+		        if (iw <= 414)
+		        {
+		        	ui = 'min';
+		        }
+			}
 		}
 	}
 	catch (e)

+ 0 - 12
src/main/webapp/js/mxgraph/Format.js

@@ -2491,12 +2491,6 @@ TextFormatPanel.prototype.addFont = function(container)
 		var arrow = cssMenu.getElementsByTagName('div')[0];
 		arrow.style.cssFloat = 'right';
 		container.appendChild(cssPanel);
-		
-		// Workaround for offset in FF
-		if (mxClient.IS_FF)
-		{
-			cssMenu.getElementsByTagName('div')[0].style.marginTop = '-18px';
-		}
 	}
 	
 	container.appendChild(stylePanel);
@@ -2518,12 +2512,6 @@ TextFormatPanel.prototype.addFont = function(container)
 	fontMenu.style.width = '192px';
 	fontMenu.style.height = '15px';
 	
-	// Workaround for offset in FF
-	if (mxClient.IS_FF)
-	{
-		fontMenu.getElementsByTagName('div')[0].style.marginTop = '-18px';
-	}
-	
 	var stylePanel2 = stylePanel.cloneNode(false);
 	stylePanel2.style.marginLeft = '-3px';
 	var fontStyleItems = this.editorUi.toolbar.addItems(['bold', 'italic', 'underline'], stylePanel2, true);

文件差異過大導致無法顯示
+ 13 - 13
src/main/webapp/js/viewer.min.js


+ 4 - 4
src/main/webapp/package.json

@@ -23,15 +23,15 @@
   },
   "homepage": "https://github.com/jgraph/drawio",
   "dependencies": {
-    "commander": "^2.15.1",
-    "electron-log": "^2.2.14",
-    "electron-updater": "^4.0.6",
+    "commander": "^2.20.0",
+    "electron-log": "^3.0.7",
+    "electron-updater": "^4.1.2",
     "electron-progressbar": "^1.2.0",
     "electron-store": "^3.2.0",
     "compression": "^1.7.4",
     "crc": "^3.8.0"
   },
   "devDependencies": {
-    "electron": "^2.0.2"
+    "electron": "^6.0.0"
   }
 }