From a31bbfef786e9119cf4280f7f7ec48ac17ff257e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=AB=8B=E5=B8=AE?= <3294713004@qq.com> Date: Sun, 27 Apr 2025 15:52:13 +0800 Subject: [PATCH] =?UTF-8?q?deps(core):=20=E6=B7=BB=E5=8A=A0dialog-plus?= =?UTF-8?q?=E5=92=8Cjszip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dialog-plus (version: 7.0.01) jszip (version: 3.10.1) --- common/css/dialog-ext.css | 160 ++++++++++++++++++ common/css/main.css | 3 +- common/deps.json | 12 +- common/modules/web-modules/dialog-plus.min.js | 8 + common/modules/web-modules/jszip.min.js | 13 ++ 5 files changed, 191 insertions(+), 5 deletions(-) create mode 100644 common/css/dialog-ext.css create mode 100644 common/modules/web-modules/dialog-plus.min.js create mode 100644 common/modules/web-modules/jszip.min.js diff --git a/common/css/dialog-ext.css b/common/css/dialog-ext.css new file mode 100644 index 00000000..454ce8ca --- /dev/null +++ b/common/css/dialog-ext.css @@ -0,0 +1,160 @@ +.ui-dialog-title { + width: fit-content !important; + padding: 5px 10px !important; +} + +.ui-dialog-close { + top: 5px !important; + right: 7px !important; +} + +html[data-bs-theme=dark] .ui-dialog { + background-color: #2B2D30; + border: 1px solid #444444; + color: #eee; +} + +html[data-bs-theme=dark] .ui-popup-focus .ui-dialog { + box-shadow: 0 0 8px rgba(0, 0, 0, 0.1); +} + +html[data-bs-theme=dark] .ui-popup-modal .ui-dialog { + box-shadow: 0 0 8px rgba(0, 0, 0, 0.1), 0 0 256px rgba(255, 255, 255, .3); +} + +html[data-bs-theme=dark] .ui-dialog-header { + white-space: nowrap; + border-bottom: 1px solid #444444; +} + +html[data-bs-theme=dark] .ui-dialog-close { + color: #FFF; + text-shadow: 0 1px 0 #FFF; + opacity: 0.5; +} + +html[data-bs-theme=dark] .ui-dialog-close:hover, +html[data-bs-theme=dark] .ui-dialog-close:focus { + color: #AAA; +} + +html[data-bs-theme=dark] .ui-dialog-statusbar { + color: #888; +} + +html[data-bs-theme=dark] .ui-dialog-statusbar label:hover { + color: #333; +} + +html[data-bs-theme=dark] .ui-dialog-footer button:focus { + outline: thin dotted #333; +} + +html[data-bs-theme=dark] .ui-dialog-footer button:hover, +html[data-bs-theme=dark] .ui-dialog-footer button:focus { + color: #333333; +} + +html[data-bs-theme=dark] .ui-dialog-footer button:active { + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); +} + +html[data-bs-theme=dark] .ui-dialog-footer button { + color: #333333; + background-color: #ffffff; + border-color: #cccccc; +} + +html[data-bs-theme=dark] .ui-dialog-footer button:hover, +html[data-bs-theme=dark] .ui-dialog-footer button:focus, +html[data-bs-theme=dark] .ui-dialog-footer button:active { + color: #333333; + background-color: #ebebeb; + border-color: #adadad; +} + +html[data-bs-theme=dark] .ui-dialog-footer button[disabled], +html[data-bs-theme=dark] .ui-dialog-footer button[disabled]:hover, +html[data-bs-theme=dark] .ui-dialog-footer button[disabled]:focus, +html[data-bs-theme=dark] .ui-dialog-footer button[disabled]:active { + background-color: #ffffff; + border-color: #cccccc; +} + +html[data-bs-theme=dark] .ui-dialog-footer button.ui-dialog-autofocus { + color: #ffffff; + background-color: #428bca; + border-color: #357ebd; +} + +html[data-bs-theme=dark] .ui-dialog-footer button.ui-dialog-autofocus:hover, +html[data-bs-theme=dark] .ui-dialog-footer button.ui-dialog-autofocus:focus, +html[data-bs-theme=dark] .ui-dialog-footer button.ui-dialog-autofocus:active { + color: #ffffff; + background-color: #3276b1; + border-color: #285e8e; +} + +html[data-bs-theme=dark] .ui-dialog-arrow-a, +html[data-bs-theme=dark] .ui-dialog-arrow-b { + _color: #FF3FFF; + _filter: chroma(color=#FF3FFF); + border: 8px dashed transparent; +} + +html[data-bs-theme=dark] .ui-popup-top-left .ui-dialog-arrow-a, +html[data-bs-theme=dark] .ui-popup-top .ui-dialog-arrow-a, +html[data-bs-theme=dark] .ui-popup-top-right .ui-dialog-arrow-a { + border-top: 8px solid #7C7C7C; +} + +html[data-bs-theme=dark] .ui-popup-top-left .ui-dialog-arrow-b, +html[data-bs-theme=dark] .ui-popup-top .ui-dialog-arrow-b, +html[data-bs-theme=dark] .ui-popup-top-right .ui-dialog-arrow-b { + border-top: 8px solid #fff; +} + +html[data-bs-theme=dark] .ui-popup-bottom-left .ui-dialog-arrow-a, +html[data-bs-theme=dark] .ui-popup-bottom .ui-dialog-arrow-a, +html[data-bs-theme=dark] .ui-popup-bottom-right .ui-dialog-arrow-a { + border-bottom: 8px solid #7C7C7C; +} + +html[data-bs-theme=dark] .ui-popup-bottom-left .ui-dialog-arrow-b, +html[data-bs-theme=dark] .ui-popup-bottom .ui-dialog-arrow-b, +html[data-bs-theme=dark] .ui-popup-bottom-right .ui-dialog-arrow-b { + border-bottom: 8px solid #fff; +} + +html[data-bs-theme=dark] .ui-popup-left-top .ui-dialog-arrow-a, +html[data-bs-theme=dark] .ui-popup-left .ui-dialog-arrow-a, +html[data-bs-theme=dark] .ui-popup-left-bottom .ui-dialog-arrow-a { + border-left: 8px solid #7C7C7C; +} + +html[data-bs-theme=dark] .ui-popup-left-top .ui-dialog-arrow-b, +html[data-bs-theme=dark] .ui-popup-left .ui-dialog-arrow-b, +html[data-bs-theme=dark] .ui-popup-left-bottom .ui-dialog-arrow-b { + border-left: 8px solid #fff; +} + +html[data-bs-theme=dark] .ui-popup-right-top .ui-dialog-arrow-a, +html[data-bs-theme=dark] .ui-popup-right .ui-dialog-arrow-a, +html[data-bs-theme=dark] .ui-popup-right-bottom .ui-dialog-arrow-a { + border-right: 8px solid #7C7C7C; +} + +html[data-bs-theme=dark] .ui-popup-right-top .ui-dialog-arrow-b, +html[data-bs-theme=dark] .ui-popup-right .ui-dialog-arrow-b, +html[data-bs-theme=dark] .ui-popup-right-bottom .ui-dialog-arrow-b { + border-right: 8px solid #fff; +} + +html[data-bs-theme=dark] .ui-dialog-loading { + color: #666; +} + +html[data-bs-theme=dark] .ui-dialog-loading::after { + box-shadow: 0 -10px 0 1px #ccc, 10px 0px #ccc, 0 10px #ccc, -10px 0 #ccc, -7px -7px 0 0.5px #ccc, 7px -7px 0 1.5px #ccc, 7px 7px #ccc, -7px 7px #ccc; +} \ No newline at end of file diff --git a/common/css/main.css b/common/css/main.css index 6b6f3631..0e235e39 100644 --- a/common/css/main.css +++ b/common/css/main.css @@ -33,4 +33,5 @@ @import "./folders/folders.css"; @import "./mprogress.min.css"; @import "./skeleton.css"; -@import "./monaco-ext.css"; \ No newline at end of file +@import "./monaco-ext.css"; +@import "./dialog-ext.css"; \ No newline at end of file diff --git a/common/deps.json b/common/deps.json index e7cfe14f..04e387e8 100644 --- a/common/deps.json +++ b/common/deps.json @@ -3,10 +3,6 @@ "path": "ui/layui/layui.js", "provide": ["layui"], "require": [] - }, { - "path": "ui/layui/extend/loading/loading.js", - "provide": ["layui.loading"], - "require": ["layui", "path"] }, { "path": "ui/bootstrap/bootstrap.min.js", "provide": ["bootstrap"], @@ -95,6 +91,10 @@ "path": "modules/web-modules/lazyload.js", "provide": ["LazyLoad"], "require": [] + }, { + "path": "modules/web-modules/jszip.min.js", + "provide": ["JSZip"], + "require": [] }, { "path": "modules/web-modules/base64.min.js", "provide": ["Base64"], @@ -291,6 +291,10 @@ "path": "ui/fomantic-ui/semantic.min.js", "provide": ["$.fomanticUI"], "require": ["$"] + }, { + "path": "modules/web-modules/dialog-plus.min.js", + "provide": ["dialog"], + "require": ["$"] }, { "path": "modules/web-modules/marked/marked.min.js", "provide": ["marked"], diff --git a/common/modules/web-modules/dialog-plus.min.js b/common/modules/web-modules/dialog-plus.min.js new file mode 100644 index 00000000..97e15c0a --- /dev/null +++ b/common/modules/web-modules/dialog-plus.min.js @@ -0,0 +1,8 @@ +/*! art.dialog@7.0.0 | https://github.com/aui/artDialog */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("jQuery")):"function"==typeof define&&define.amd?define(["jQuery"],e):"object"==typeof exports?exports.dialog=e(require("jQuery")):t.dialog=e(t.jQuery)}(this,function(t){return function(t){function e(r){if(o[r])return o[r].exports;var i=o[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var o={};return e.m=t,e.c=o,e.i=function(t){return t},e.d=function(t,o,r){e.o(t,o)||Object.defineProperty(t,o,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=15)}([function(e,o){e.exports=t},function(t,e,o){var r=o(7);"string"==typeof r&&(r=[[t.i,r,""]]);o(5)(r,{});r.locals&&(t.exports=r.locals)},function(t,e){t.exports={backdropBackground:"#000",backdropOpacity:.7,content:'Loading..',title:"",statusbar:"",button:null,ok:null,cancel:null,okValue:"ok",cancelValue:"cancel",cancelDisplay:!0,width:"",height:"",padding:"",skin:"",quickClose:!1,innerHTML:'
'}},function(t,e,o){function r(){this.destroyed=!1,this.__popup=i("
").css({display:"none",position:"absolute",outline:0}).attr("tabindex","-1").html(this.innerHTML).appendTo("body"),this.__backdrop=this.__mask=i("
").css({opacity:.7,background:"#000"}),this.node=this.__popup[0],this.backdrop=this.__backdrop[0],n++}var i=o(0),n=0,a=!("minWidth"in i("html")[0].style),s=!a;i.extend(r.prototype,{node:null,backdrop:null,fixed:!1,destroyed:!0,open:!1,returnValue:"",autofocus:!0,align:"bottom left",innerHTML:"",className:"ui-popup",show:function(t){if(this.destroyed)return this;var e=this.__popup,o=this.__backdrop;if(this.__activeElement=this.__getActive(),this.open=!0,this.follow=t||this.follow,!this.__ready){if(e.addClass(this.className).attr("role",this.modal?"alertdialog":"dialog").css("position",this.fixed?"fixed":"absolute"),a||i(window).on("resize",i.proxy(this.reset,this)),this.modal){var n={position:"fixed",left:0,top:0,width:"100%",height:"100%",overflow:"hidden",userSelect:"none",zIndex:this.zIndex||r.zIndex};e.addClass(this.className+"-modal"),s||i.extend(n,{position:"absolute",width:i(window).width()+"px",height:i(document).height()+"px"}),o.css(n).attr({tabindex:"0"}).on("focus",i.proxy(this.focus,this)),this.__mask=o.clone(!0).attr("style","").insertAfter(e),o.addClass(this.className+"-backdrop").insertBefore(e),this.__ready=!0}e.html()||e.html(this.innerHTML)}return e.addClass(this.className+"-show").show(),o.show(),this.reset().focus(),this.__dispatchEvent("show"),this},showModal:function(){return this.modal=!0,this.show.apply(this,arguments)},close:function(t){return!this.destroyed&&this.open&&(void 0!==t&&(this.returnValue=t),this.__popup.hide().removeClass(this.className+"-show"),this.__backdrop.hide(),this.open=!1,this.blur(),this.__dispatchEvent("close")),this},remove:function(){if(this.destroyed)return this;this.__dispatchEvent("beforeremove"),r.current===this&&(r.current=null),this.__popup.remove(),this.__backdrop.remove(),this.__mask.remove(),a||i(window).off("resize",this.reset),this.__dispatchEvent("remove");for(var t in this)delete this[t];return this},reset:function(){var t=this.follow;return t?this.__follow(t):this.__center(),this.__dispatchEvent("reset"),this},focus:function(){var t=this.node,e=this.__popup,o=r.current,n=this.zIndex=r.zIndex++;if(o&&o!==this&&o.blur(!1),!i.contains(t,this.__getActive())){var a=e.find("[autofocus]")[0];!this._autofocus&&a?this._autofocus=!0:a=t,this.__focus(a)}return e.css("zIndex",n),r.current=this,e.addClass(this.className+"-focus"),this.__dispatchEvent("focus"),this},blur:function(){var t=this.__activeElement;return arguments[0]!==!1&&this.__focus(t),this._autofocus=!1,this.__popup.removeClass(this.className+"-focus"),this.__dispatchEvent("blur"),this},addEventListener:function(t,e){return this.__getEventListener(t).push(e),this},removeEventListener:function(t,e){for(var o=this.__getEventListener(t),r=0;rC[P[e]][1]&&(e=T[t]=U[e]),L[t][e]