Commit 407ba01864716713e51fb9a5375720f4d8b7488a
Merge branch 'sqy_dev' into 'main'
'fix:修改drawIO的一些初始化地方' See merge request huang/thingskit-drawio!1
Showing
6 changed files
with
90 additions
and
55 deletions
package.json
0 → 100644
| ... | ... | @@ -261,7 +261,12 @@ |
| 261 | 261 | // Forces includes for dev environment in node.js |
| 262 | 262 | mxForceIncludes = true; |
| 263 | 263 | } |
| 264 | - | |
| 264 | + if (location.hostname == 'localhost' || location.hostname == '127.0.0.1') { | |
| 265 | + drawDevUrl = `http://${location.host}/`; | |
| 266 | + geBasePath = `http://${location.host}/js/grapheditor`; | |
| 267 | + mxBasePath = `http://${location.host}/mxgraph`; | |
| 268 | + mxForceIncludes = true; | |
| 269 | + } | |
| 265 | 270 | mxForceIncludes = false; |
| 266 | 271 | |
| 267 | 272 | mxscript(drawDevUrl + 'js/PreConfig.js'); |
| ... | ... | @@ -428,18 +433,18 @@ |
| 428 | 433 | </head> |
| 429 | 434 | <body class="geEditor"> |
| 430 | 435 | <div id="geInfo"> |
| 431 | - <div class="geBlock"> | |
| 432 | - <h1>Flowchart Maker and Online Diagram Software</h1> | |
| 433 | - <p> | |
| 436 | + <div class="geBlock"> | |
| 437 | + <h1>云组态启动中 ...</h1> | |
| 438 | + <!-- <p> | |
| 434 | 439 | diagrams.net (formerly draw.io) is free online diagram software. You can use it as a flowchart maker, network diagram software, to create UML online, as an ER diagram tool, |
| 435 | 440 | to design database schema, to build BPMN online, as a circuit diagram maker, and more. draw.io can import .vsdx, Gliffy™ and Lucidchart™ files . |
| 436 | 441 | </p> |
| 437 | 442 | <h2 id="geStatus">Loading...</h2> |
| 438 | 443 | <p> |
| 439 | 444 | Please ensure JavaScript is enabled. |
| 440 | - </p> | |
| 445 | + </p> --> | |
| 441 | 446 | </div> |
| 442 | -</div> | |
| 447 | + </div> | |
| 443 | 448 | <script type="text/javascript"> |
| 444 | 449 | /** |
| 445 | 450 | * Main | ... | ... |
| ... | ... | @@ -3,11 +3,22 @@ |
| 3 | 3 | * Copyright (c) 2006-2020, draw.io AG |
| 4 | 4 | */ |
| 5 | 5 | // Overrides of global vars need to be pre-loaded |
| 6 | -window.EXPORT_URL = 'REPLACE_WITH_YOUR_IMAGE_SERVER'; | |
| 7 | -window.PLANT_URL = 'REPLACE_WITH_YOUR_PLANTUML_SERVER'; | |
| 8 | -window.DRAWIO_BASE_URL = null; // Replace with path to base of deployment, e.g. https://www.example.com/folder | |
| 9 | -window.DRAWIO_VIEWER_URL = null; // Replace your path to the viewer js, e.g. https://www.example.com/js/viewer.min.js | |
| 10 | -window.DRAWIO_LIGHTBOX_URL = null; // Replace with your lightbox URL, eg. https://www.example.com | |
| 11 | -window.DRAW_MATH_URL = 'math'; | |
| 6 | +window.DRAW_MATH_URL = "math"; | |
| 12 | 7 | window.DRAWIO_CONFIG = null; // Replace with your custom draw.io configurations. For more details, https://www.diagrams.net/doc/faq/configure-diagram-editor |
| 13 | -urlParams['sync'] = 'manual'; | |
| 8 | + | |
| 9 | +window.EXPORT_URL = "REPLACE_WITH_YOUR_IMAGE_SERVER"; | |
| 10 | +window.PLANT_URL = "REPLACE_WITH_YOUR_PLANTUML_SERVER"; | |
| 11 | +window.DRAWIO_BASE_URL = window.location.protocol + "//" + window.location.host; // Replace with path to base of deployment, e.g. https://www.example.com/folder | |
| 12 | +window.DRAWIO_VIEWER_URL = | |
| 13 | + window.location.protocol + "//" + window.location.host + "/js/viewer.min.js"; // Replace your path to the viewer js, e.g. https://www.example.com/js/viewer.min.js | |
| 14 | +window.DRAWIO_LIGHTBOX_URL =null; // Replace with your lightbox URL, eg. https://www.example.com | |
| 15 | +urlParams["sync"] = "manual"; | |
| 16 | +urlParams["lang"] = "zh"; | |
| 17 | +urlParams["browser"] = 0; | |
| 18 | +urlParams["gapi"] = 0; | |
| 19 | +urlParams["db"] = 0; | |
| 20 | +urlParams["od"] = 0; | |
| 21 | +urlParams["tr"] = 0; | |
| 22 | +urlParams["gh"] = 0; | |
| 23 | +urlParams["gl"] = 0; | |
| 24 | +urlParams["mode"] = "browser"; | ... | ... |
| ... | ... | @@ -13,6 +13,11 @@ |
| 13 | 13 | */ |
| 14 | 14 | App = function(editor, container, lightbox) |
| 15 | 15 | { |
| 16 | + if (urlParams["dev"] === "1") { | |
| 17 | + alert("欢迎~开发环境"); | |
| 18 | + } else { | |
| 19 | + alert("欢迎~生产环境"); | |
| 20 | + } | |
| 16 | 21 | EditorUi.call(this, editor, container, (lightbox != null) ? lightbox : |
| 17 | 22 | (urlParams['lightbox'] == '1' || (uiTheme == 'min' && |
| 18 | 23 | urlParams['chrome'] != '0'))); |
| ... | ... | @@ -1904,10 +1909,10 @@ App.prototype.showNameConfBanner = function() |
| 1904 | 1909 | */ |
| 1905 | 1910 | App.prototype.showDownloadDesktopBanner = function() |
| 1906 | 1911 | { |
| 1907 | - this.showBanner('DesktopFooter', mxResources.get('downloadDesktop'), mxUtils.bind(this, function() | |
| 1908 | - { | |
| 1909 | - this.openLink('https://get.diagrams.net/'); | |
| 1910 | - })); | |
| 1912 | + // this.showBanner('DesktopFooter', mxResources.get('downloadDesktop'), mxUtils.bind(this, function() | |
| 1913 | + // { | |
| 1914 | + // this.openLink('https://get.diagrams.net/'); | |
| 1915 | + // })); | |
| 1911 | 1916 | }; |
| 1912 | 1917 | |
| 1913 | 1918 | /** |
| ... | ... | @@ -6131,7 +6136,7 @@ App.prototype.showNotification = function(notifs, lsReadFlag) |
| 6131 | 6136 | App.prototype.save = function(name, done) |
| 6132 | 6137 | { |
| 6133 | 6138 | var file = this.getCurrentFile(); |
| 6134 | - | |
| 6139 | + console.log('file',file) | |
| 6135 | 6140 | if (file != null && this.spinner.spin(document.body, mxResources.get('saving'))) |
| 6136 | 6141 | { |
| 6137 | 6142 | this.editor.setStatus(''); | ... | ... |
| ... | ... | @@ -116,44 +116,44 @@ window.mxLanguage = window.mxLanguage || (function() |
| 116 | 116 | // in the menu defintion in Diagramly.js. |
| 117 | 117 | window.mxLanguageMap = window.mxLanguageMap || |
| 118 | 118 | { |
| 119 | - 'i18n': '', | |
| 120 | - 'id' : 'Bahasa Indonesia', | |
| 121 | - 'ms' : 'Bahasa Melayu', | |
| 122 | - 'bs' : 'Bosanski', | |
| 123 | - 'bg' : 'Bulgarian', | |
| 124 | - 'ca' : 'Català', | |
| 125 | - 'cs' : 'Čeština', | |
| 126 | - 'da' : 'Dansk', | |
| 127 | - 'de' : 'Deutsch', | |
| 128 | - 'et' : 'Eesti', | |
| 119 | + // 'i18n': '', | |
| 120 | + // 'id' : 'Bahasa Indonesia', | |
| 121 | + // 'ms' : 'Bahasa Melayu', | |
| 122 | + // 'bs' : 'Bosanski', | |
| 123 | + // 'bg' : 'Bulgarian', | |
| 124 | + // 'ca' : 'Català', | |
| 125 | + // 'cs' : 'Čeština', | |
| 126 | + // 'da' : 'Dansk', | |
| 127 | + // 'de' : 'Deutsch', | |
| 128 | + // 'et' : 'Eesti', | |
| 129 | 129 | 'en' : 'English', |
| 130 | - 'es' : 'Español', | |
| 131 | - 'eu' : 'Euskara', | |
| 132 | - 'fil' : 'Filipino', | |
| 133 | - 'fr' : 'Français', | |
| 134 | - 'gl' : 'Galego', | |
| 135 | - 'it' : 'Italiano', | |
| 136 | - 'hu' : 'Magyar', | |
| 137 | - 'nl' : 'Nederlands', | |
| 138 | - 'no' : 'Norsk', | |
| 139 | - 'pl' : 'Polski', | |
| 140 | - 'pt-br' : 'Português (Brasil)', | |
| 141 | - 'pt' : 'Português (Portugal)', | |
| 142 | - 'ro' : 'Română', | |
| 143 | - 'fi' : 'Suomi', | |
| 144 | - 'sv' : 'Svenska', | |
| 145 | - 'vi' : 'Tiếng Việt', | |
| 146 | - 'tr' : 'Türkçe', | |
| 147 | - 'el' : 'Ελληνικά', | |
| 148 | - 'ru' : 'Русский', | |
| 149 | - 'sr' : 'Српски', | |
| 150 | - 'uk' : 'Українська', | |
| 151 | - 'he' : 'עברית', | |
| 152 | - 'ar' : 'العربية', | |
| 153 | - 'fa' : 'فارسی', | |
| 154 | - 'th' : 'ไทย', | |
| 155 | - 'ko' : '한국어', | |
| 156 | - 'ja' : '日本語', | |
| 130 | + // 'es' : 'Español', | |
| 131 | + // 'eu' : 'Euskara', | |
| 132 | + // 'fil' : 'Filipino', | |
| 133 | + // 'fr' : 'Français', | |
| 134 | + // 'gl' : 'Galego', | |
| 135 | + // 'it' : 'Italiano', | |
| 136 | + // 'hu' : 'Magyar', | |
| 137 | + // 'nl' : 'Nederlands', | |
| 138 | + // 'no' : 'Norsk', | |
| 139 | + // 'pl' : 'Polski', | |
| 140 | + // 'pt-br' : 'Português (Brasil)', | |
| 141 | + // 'pt' : 'Português (Portugal)', | |
| 142 | + // 'ro' : 'Română', | |
| 143 | + // 'fi' : 'Suomi', | |
| 144 | + // 'sv' : 'Svenska', | |
| 145 | + // 'vi' : 'Tiếng Việt', | |
| 146 | + // 'tr' : 'Türkçe', | |
| 147 | + // 'el' : 'Ελληνικά', | |
| 148 | + // 'ru' : 'Русский', | |
| 149 | + // 'sr' : 'Српски', | |
| 150 | + // 'uk' : 'Українська', | |
| 151 | + // 'he' : 'עברית', | |
| 152 | + // 'ar' : 'العربية', | |
| 153 | + // 'fa' : 'فارسی', | |
| 154 | + // 'th' : 'ไทย', | |
| 155 | + // 'ko' : '한국어', | |
| 156 | + // 'ja' : '日本語', | |
| 157 | 157 | 'zh' : '简体中文', |
| 158 | 158 | 'zh-tw' : '繁體中文' |
| 159 | 159 | }; | ... | ... |