优化drawio不显示添加模板
This commit is contained in:
parent
7f2fcba542
commit
fc89d96635
@ -8,8 +8,9 @@
|
||||
|
||||
- 隐藏帮助菜单
|
||||
- 取消未保存关闭窗口提示
|
||||
- `EmbedFile.prototype.getTitle=...` 改为 `EmbedFile.prototype.getTitle=function(){return this.desc.title||(urlParams.title?decodeURIComponent(urlParams.title):"")}`
|
||||
- `390:270` 改为 `390:285`
|
||||
- `EmbedFile.prototype.getTitle=...` 改 `EmbedFile.prototype.getTitle=function(){return this.desc.title||(urlParams.title?decodeURIComponent(urlParams.title):"")}`
|
||||
- `c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(b,["insertTemplate"],d)` 改 `c.insertTemplateEnabled&&this.addMenuItems(b,["insertTemplate"],d)`
|
||||
- `390:270` 改 `390:285`
|
||||
|
||||
## index.html
|
||||
|
||||
|
2
docker/drawio/webapp/js/app.min.js
vendored
2
docker/drawio/webapp/js/app.min.js
vendored
@ -11971,7 +11971,7 @@ f||EditorUi.enablePlantUml&&!c.isOffline())&&b.addItem(e,null,mxUtils.bind(this,
|
||||
!0));k.geometry.x=b.x;k.geometry.y=b.y;g.getModel().beginUpdate();try{k=g.addCell(k),g.fireEvent(new mxEventObject("cellsInserted","cells",[k]))}finally{g.getModel().endUpdate()}g.scrollCellToVisible(k);g.setSelectionCell(k);g.container.focus();g.editAfterInsert&&g.startEditing(k);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(g.view.getState(k))},0);return k};c.actions.put("insertText",new Action(mxResources.get("text"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&
|
||||
g.startEditingAtCell(A("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=k;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&A("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=k;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),
|
||||
function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&A("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&A("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=k;c.addInsertMenuItems=mxUtils.bind(this,function(b,d,e){for(var f=0;f<e.length;f++)"-"==e[f]?b.addSeparator(d):c.addInsertItem(b,d,mxResources.get(e[f])+
|
||||
"...",e[f])});this.put("insert",new Menu(mxUtils.bind(this,function(b,d){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),d);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(b,["insertTemplate"],d);b.addSeparator(d);this.addSubmenu("insertLayout",b,d,mxResources.get("layout"));this.addSubmenu("insertAdvanced",b,d,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,
|
||||
"...",e[f])});this.put("insert",new Menu(mxUtils.bind(this,function(b,d){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),d);c.insertTemplateEnabled&&this.addMenuItems(b,["insertTemplate"],d);b.addSeparator(d);this.addSubmenu("insertLayout",b,d,mxResources.get("layout"));this.addSubmenu("insertAdvanced",b,d,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,
|
||||
function(b,d){c.addInsertMenuItems(b,d,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,d){c.addInsertMenuItems(b,d,["fromText","plantUml","mermaid","-","formatSql"]);b.addItem(mxResources.get("csv")+"...",null,function(){c.showImportCsvDialog()},d,null,k())})));this.put("openRecent",new Menu(function(b,d){var e=c.getRecent();if(null!=e){for(var f=0;f<e.length;f++)(function(e){var f=
|
||||
e.mode;f==App.MODE_GOOGLE?f="googleDrive":f==App.MODE_ONEDRIVE&&(f="oneDrive");b.addItem(e.title+" ("+mxResources.get(f)+")",null,function(){c.loadFile(e.id)},d)})(e[f]);b.addSeparator(d)}b.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},d)}));this.put("openFrom",new Menu(function(b,d){null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},d):n&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+
|
||||
mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},d):f&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "DooTask",
|
||||
"version": "0.9.36",
|
||||
"version": "0.9.38",
|
||||
"description": "DooTask is task management system.",
|
||||
"main": "electron.js",
|
||||
"license": "MIT",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "DooTask",
|
||||
"version": "0.9.36",
|
||||
"version": "0.9.38",
|
||||
"description": "DooTask is task management system.",
|
||||
"scripts": {
|
||||
"start": "./cmd dev",
|
||||
|
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/build/205.js
vendored
1
public/js/build/205.js
vendored
@ -1 +0,0 @@
|
||||
"use strict";(self.webpackChunkDooTask=self.webpackChunkDooTask||[]).push([[205],{17796:(t,e,n)=>{n.d(e,{Z:()=>r});var a=n(1519),o=n.n(a)()((function(t){return t[1]}));o.push([t.id,".drawio-content[data-v-012cc92c],.drawio-content .drawio-iframe[data-v-012cc92c]{height:100%;left:0;position:absolute;top:0;width:100%}.drawio-content .drawio-iframe[data-v-012cc92c]{background:0 0;border:0;float:none;margin:-1px 0 0;max-width:none;outline:0;padding:0}.drawio-content .drawio-loading[data-v-012cc92c]{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}",""]);const r=o},48205:(t,e,n)=>{n.r(e),n.d(e,{default:()=>u});var a=n(20629);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const i={name:"Drawio",props:{value:{type:Object,default:function(){return{}}},title:{type:String,default:""},readOnly:{type:Boolean,default:!1}},data:function(){return{loadIng:!0,url:null,bakData:""}},created:function(){var t="en";switch(this.getLanguage()){case"CN":case"TC":t="zh"}var e=this.readOnly?1:0,n=this.readOnly?0:1,a=this.themeIsDark?"dark":"kennedy",o=this.title?encodeURIComponent(this.title):"",r="?title=".concat(o,"&chrome=").concat(n,"&lightbox=").concat(e,"&ui=").concat(a,"&lang=").concat(t,"&offline=1&embed=1&noLangIcon=1&noExitBtn=1&noSaveBtn=1&saveAndExit=0&spin=1&proto=json");this.$Electron?this.url=$A.originUrl("drawio/webapp/index.html".concat(r)):this.url=$A.apiUrl("../drawio/webapp/".concat(r))},mounted:function(){window.addEventListener("message",this.handleMessage)},beforeDestroy:function(){window.removeEventListener("message",this.handleMessage)},watch:{value:{handler:function(t){this.bakData!=$A.jsonStringify(t)&&(this.bakData=$A.jsonStringify(t),this.updateContent())},deep:!0}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},(0,a.rn)(["themeIsDark"])),methods:{formatZoom:function(t){return t+"%"},updateContent:function(){this.$refs.myFlow.contentWindow.postMessage(JSON.stringify({action:"load",autosave:1,xml:this.value.xml}),"*")},handleMessage:function(t){var e=this.$refs.myFlow.contentWindow;if(t.source===e){var n=$A.jsonParse(t.data);switch(n.event){case"init":this.loadIng=!1,this.updateContent();break;case"load":void 0===this.value.xml&&e.postMessage(JSON.stringify({action:"template"}),"*");break;case"autosave":var a={xml:n.xml};this.bakData=$A.jsonStringify(a),this.$emit("input",a);break;case"save":this.$emit("saveData")}}}}};var s=n(93379),c=n.n(s),l=n(17796),d={insert:"head",singleton:!1};c()(l.Z,d);l.Z.locals;const u=(0,n(51900).Z)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"drawio-content"},[n("iframe",{ref:"myFlow",staticClass:"drawio-iframe",attrs:{src:t.url}}),t._v(" "),t.loadIng?n("div",{staticClass:"drawio-loading"},[n("Loading")],1):t._e()])}),[],!1,null,"012cc92c",null).exports}}]);
|
1
public/js/build/34.js
vendored
Normal file
1
public/js/build/34.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkDooTask=self.webpackChunkDooTask||[]).push([[34],{1557:(t,e,a)=>{a.d(e,{Z:()=>r});var n=a(1519),o=a.n(n)()((function(t){return t[1]}));o.push([t.id,".drawio-content[data-v-6aaeb891],.drawio-content .drawio-iframe[data-v-6aaeb891]{height:100%;left:0;position:absolute;top:0;width:100%}.drawio-content .drawio-iframe[data-v-6aaeb891]{background:0 0;border:0;float:none;margin:-1px 0 0;max-width:none;outline:0;padding:0}.drawio-content .drawio-loading[data-v-6aaeb891]{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}",""]);const r=o},67034:(t,e,a)=>{a.r(e),a.d(e,{default:()=>u});var n=a(20629);function o(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}const i={name:"Drawio",props:{value:{type:Object,default:function(){return{}}},title:{type:String,default:""},readOnly:{type:Boolean,default:!1}},data:function(){return{loadIng:!0,url:null,bakData:""}},created:function(){var t="en";switch(this.getLanguage()){case"CN":case"TC":t="zh"}var e=this.readOnly?1:0,a=this.readOnly?0:1,n=this.themeIsDark?"dark":"kennedy",o=this.title?encodeURIComponent(this.title):"",r="?title=".concat(o,"&chrome=").concat(a,"&lightbox=").concat(e,"&ui=").concat(n,"&lang=").concat(t,"&offline=1&pwa=0&embed=1&noLangIcon=1&noExitBtn=1&noSaveBtn=1&saveAndExit=0&spin=1&proto=json");this.$Electron?this.url=$A.originUrl("drawio/webapp/index.html".concat(r)):this.url=$A.apiUrl("../drawio/webapp/".concat(r))},mounted:function(){window.addEventListener("message",this.handleMessage)},beforeDestroy:function(){window.removeEventListener("message",this.handleMessage)},watch:{value:{handler:function(t){this.bakData!=$A.jsonStringify(t)&&(this.bakData=$A.jsonStringify(t),this.updateContent())},deep:!0}},computed:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?o(Object(a),!0).forEach((function(e){r(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):o(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},(0,n.rn)(["themeIsDark"])),methods:{formatZoom:function(t){return t+"%"},updateContent:function(){this.$refs.myFlow.contentWindow.postMessage(JSON.stringify({action:"load",autosave:1,xml:this.value.xml}),"*")},handleMessage:function(t){var e=this.$refs.myFlow.contentWindow;if(t.source===e){var a=$A.jsonParse(t.data);switch(a.event){case"init":this.loadIng=!1,this.updateContent();break;case"load":void 0===this.value.xml&&e.postMessage(JSON.stringify({action:"template"}),"*");break;case"autosave":var n={xml:a.xml};this.bakData=$A.jsonStringify(n),this.$emit("input",n);break;case"save":this.$emit("saveData")}}}}};var s=a(93379),c=a.n(s),l=a(1557),d={insert:"head",singleton:!1};c()(l.Z,d);l.Z.locals;const u=(0,a(51900).Z)(i,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"drawio-content"},[a("iframe",{ref:"myFlow",staticClass:"drawio-iframe",attrs:{src:t.url}}),t._v(" "),t.loadIng?a("div",{staticClass:"drawio-loading"},[a("Loading")],1):t._e()])}),[],!1,null,"6aaeb891",null).exports}}]);
|
2
public/js/build/61.js
vendored
2
public/js/build/61.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/952.js
vendored
2
public/js/build/952.js
vendored
File diff suppressed because one or more lines are too long
2
public/js/build/954.js
vendored
2
public/js/build/954.js
vendored
File diff suppressed because one or more lines are too long
@ -75,7 +75,7 @@ export default {
|
||||
let chrome = this.readOnly ? 0 : 1;
|
||||
let theme = this.themeIsDark ? 'dark' : 'kennedy';
|
||||
let title = this.title ? encodeURIComponent(this.title) : '';
|
||||
let query = `?title=${title}&chrome=${chrome}&lightbox=${lightbox}&ui=${theme}&lang=${language}&offline=1&embed=1&noLangIcon=1&noExitBtn=1&noSaveBtn=1&saveAndExit=0&spin=1&proto=json`;
|
||||
let query = `?title=${title}&chrome=${chrome}&lightbox=${lightbox}&ui=${theme}&lang=${language}&offline=1&pwa=0&embed=1&noLangIcon=1&noExitBtn=1&noSaveBtn=1&saveAndExit=0&spin=1&proto=json`;
|
||||
if (this.$Electron) {
|
||||
this.url = $A.originUrl(`drawio/webapp/index.html${query}`);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user