diff --git a/src/main/java/run/halo/app/model/properties/ApiProperties.java b/src/main/java/run/halo/app/model/properties/ApiProperties.java new file mode 100644 index 000000000..17d67006c --- /dev/null +++ b/src/main/java/run/halo/app/model/properties/ApiProperties.java @@ -0,0 +1,41 @@ +package run.halo.app.model.properties; + +/** + * Api properties. + * + * @author ryanwang + * @date 2019-06-25 + */ +public enum ApiProperties implements PropertyEnum { + + API_ENABLED("api_enabled", Boolean.class, "false"), + + API_ACCESS_KEY("api_access_key", String.class, ""); + + private final String value; + + private final Class type; + + private final String defaultValue; + + ApiProperties(String value, Class type, String defaultValue) { + this.value = value; + this.type = type; + this.defaultValue = defaultValue; + } + + @Override + public Class getType() { + return type; + } + + @Override + public String defaultValue() { + return defaultValue; + } + + @Override + public String getValue() { + return value; + } +} diff --git a/src/main/java/run/halo/app/model/properties/OtherProperties.java b/src/main/java/run/halo/app/model/properties/OtherProperties.java index e3b370925..dc8c295b9 100644 --- a/src/main/java/run/halo/app/model/properties/OtherProperties.java +++ b/src/main/java/run/halo/app/model/properties/OtherProperties.java @@ -4,22 +4,14 @@ package run.halo.app.model.properties; * Other properties. * * @author johnniang + * @author ryanwang * @date 4/1/19 */ public enum OtherProperties implements PropertyEnum { - API_ENABLED("api_enabled", Boolean.class, "false"), - - API_ACCESS_KEY("api_access_key", String.class, ""), - CUSTOM_HEAD("blog_custom_head",String.class,""), - STATISTICS_CODE("blog_statistics_code", String.class, ""), - - /** - * 是否禁止爬虫 - */ - SPIDER_DISABLED("spider_disabled", Boolean.class, "false"); + STATISTICS_CODE("blog_statistics_code", String.class, ""); private final String value; diff --git a/src/main/java/run/halo/app/model/properties/PropertyEnum.java b/src/main/java/run/halo/app/model/properties/PropertyEnum.java index 7456d4749..7190c7a5a 100644 --- a/src/main/java/run/halo/app/model/properties/PropertyEnum.java +++ b/src/main/java/run/halo/app/model/properties/PropertyEnum.java @@ -154,6 +154,7 @@ public interface PropertyEnum extends ValueEnum { propertyEnumClasses.add(QnYunProperties.class); propertyEnumClasses.add(SeoProperties.class); propertyEnumClasses.add(UpYunProperties.class); + propertyEnumClasses.add(ApiProperties.class); Map result = new HashMap<>(); diff --git a/src/main/java/run/halo/app/model/properties/SeoProperties.java b/src/main/java/run/halo/app/model/properties/SeoProperties.java index 9b4cbd4e4..78e396cf1 100644 --- a/src/main/java/run/halo/app/model/properties/SeoProperties.java +++ b/src/main/java/run/halo/app/model/properties/SeoProperties.java @@ -4,6 +4,7 @@ package run.halo.app.model.properties; * SEO properties. * * @author johnniang + * @author ryanwang * @date 4/1/19 */ public enum SeoProperties implements PropertyEnum { @@ -14,13 +15,10 @@ public enum SeoProperties implements PropertyEnum { BAIDU_TOKEN("seo_baidu_token", String.class, ""), - VERIFICATION_BAIDU("seo_verification_baidu", String.class, ""), - - VERIFICATION_GOOGLE("seo_verification_google", String.class, ""), - - VERIFICATION_BING("seo_verification_bing", String.class, ""), - - VERIFICATION_QIHU("seo_verification_qihu", String.class, ""); + /** + * 是否禁止爬虫 + */ + SPIDER_DISABLED("seo_spider_disabled", Boolean.class, "false"); private final String value; diff --git a/src/main/java/run/halo/app/security/filter/ApiAuthenticationFilter.java b/src/main/java/run/halo/app/security/filter/ApiAuthenticationFilter.java index 8c83654c9..10ffa1daf 100644 --- a/src/main/java/run/halo/app/security/filter/ApiAuthenticationFilter.java +++ b/src/main/java/run/halo/app/security/filter/ApiAuthenticationFilter.java @@ -8,8 +8,8 @@ import org.springframework.util.Assert; import run.halo.app.config.properties.HaloProperties; import run.halo.app.exception.AuthenticationException; import run.halo.app.exception.ForbiddenException; +import run.halo.app.model.properties.ApiProperties; import run.halo.app.model.properties.CommentProperties; -import run.halo.app.model.properties.OtherProperties; import run.halo.app.service.OptionService; import javax.servlet.FilterChain; @@ -48,7 +48,7 @@ public class ApiAuthenticationFilter extends AbstractAuthenticationFilter { } // Get api_enable from option - Boolean apiEnabled = optionService.getByPropertyOrDefault(OtherProperties.API_ENABLED, Boolean.class, false); + Boolean apiEnabled = optionService.getByPropertyOrDefault(ApiProperties.API_ENABLED, Boolean.class, false); if (!apiEnabled) { getFailureHandler().onFailure(request, response, new ForbiddenException("API has been disabled by blogger currently")); @@ -65,7 +65,7 @@ public class ApiAuthenticationFilter extends AbstractAuthenticationFilter { } // Get access key from option - Optional optionalAccessKey = optionService.getByProperty(OtherProperties.API_ACCESS_KEY, String.class); + Optional optionalAccessKey = optionService.getByProperty(ApiProperties.API_ACCESS_KEY, String.class); if (!optionalAccessKey.isPresent()) { // If the access key is not set diff --git a/src/main/resources/admin/css/chunk-1079f749.94b473ad.css b/src/main/resources/admin/css/chunk-434a7762.ba0136c1.css similarity index 60% rename from src/main/resources/admin/css/chunk-1079f749.94b473ad.css rename to src/main/resources/admin/css/chunk-434a7762.ba0136c1.css index e59c8087e..afb490285 100644 --- a/src/main/resources/admin/css/chunk-1079f749.94b473ad.css +++ b/src/main/resources/admin/css/chunk-434a7762.ba0136c1.css @@ -1 +1 @@ -.attach-detail-img img{width:100%}.attach-item{width:50%;margin:0 auto;position:relative;padding-bottom:28%;overflow:hidden;float:left;cursor:pointer}.attach-item img{width:100%;height:100%;position:absolute;top:0;left:0}@-webkit-keyframes scaleDraw-data-v-0ce6900e{0%{-webkit-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(1.3);transform:scale(1.3)}50%{-webkit-transform:scale(1);transform:scale(1)}75%{-webkit-transform:scale(1.3);transform:scale(1.3)}}@keyframes scaleDraw-data-v-0ce6900e{0%{-webkit-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(1.3);transform:scale(1.3)}50%{-webkit-transform:scale(1);transform:scale(1)}75%{-webkit-transform:scale(1.3);transform:scale(1.3)}}.upload-button[data-v-0ce6900e]{-webkit-animation:scaleDraw-data-v-0ce6900e 4s ease-in-out infinite;position:fixed;bottom:30px;right:30px}.theme-thumb[data-v-0ce6900e]{width:100%;margin:0 auto;position:relative;padding-bottom:56%;overflow:hidden}.theme-thumb img[data-v-0ce6900e]{width:100%;height:100%;position:absolute;top:0;left:0} \ No newline at end of file +.attach-detail-img img{width:100%}.attach-item{width:50%;margin:0 auto;position:relative;padding-bottom:28%;overflow:hidden;float:left;cursor:pointer}.attach-item img{width:100%;height:100%;position:absolute;top:0;left:0}@-webkit-keyframes scaleDraw-data-v-d8dae54c{0%{-webkit-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(1.3);transform:scale(1.3)}50%{-webkit-transform:scale(1);transform:scale(1)}75%{-webkit-transform:scale(1.3);transform:scale(1.3)}}@keyframes scaleDraw-data-v-d8dae54c{0%{-webkit-transform:scale(1);transform:scale(1)}25%{-webkit-transform:scale(1.3);transform:scale(1.3)}50%{-webkit-transform:scale(1);transform:scale(1)}75%{-webkit-transform:scale(1.3);transform:scale(1.3)}}.upload-button[data-v-d8dae54c]{-webkit-animation:scaleDraw-data-v-d8dae54c 4s ease-in-out infinite;position:fixed;bottom:30px;right:30px}.theme-thumb[data-v-d8dae54c]{width:100%;margin:0 auto;position:relative;padding-bottom:56%;overflow:hidden}.theme-thumb img[data-v-d8dae54c]{width:100%;height:100%;position:absolute;top:0;left:0} \ No newline at end of file diff --git a/src/main/resources/admin/index.html b/src/main/resources/admin/index.html index 3692dc257..5a0c2d0f8 100644 --- a/src/main/resources/admin/index.html +++ b/src/main/resources/admin/index.html @@ -1 +1 @@ -Halo Dashboard
\ No newline at end of file +Halo Dashboard
\ No newline at end of file diff --git a/src/main/resources/admin/js/app.29b04043.js b/src/main/resources/admin/js/app.a9634e28.js similarity index 98% rename from src/main/resources/admin/js/app.29b04043.js rename to src/main/resources/admin/js/app.a9634e28.js index 9e9d79586..e0718eca8 100644 --- a/src/main/resources/admin/js/app.29b04043.js +++ b/src/main/resources/admin/js/app.a9634e28.js @@ -1 +1 @@ -(function(e){function t(t){for(var a,o,s=t[0],c=t[1],u=t[2],l=0,d=[];l1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD HH:mm";return je()(e).format(t)}),a["a"].filter("moment",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD HH:mm";return je()(e).format(t)}),a["a"].filter("timeAgo",De["b"]),a["a"].filter("fileSizeFormat",function(e){if(!e)return"0 Bytes";var t=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],n=0,a=parseFloat(e);n=Math.floor(Math.log(a)/Math.log(1024));var o=a/Math.pow(1024,n);return o=o.toFixed(2),o+" "+t[n]});var He,Me,$e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split("").reduce(function(e,t){var n=t.charCodeAt(0);return n>=0&&n<=128?e+1:e+2},0)},Ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=0;return e.split("").reduce(function(e,a){var o=a.charCodeAt(0);return n+=o>=0&&o<=128?1:2,n<=t?e+a:e},"")},Ie={name:"Ellipsis",components:{Tooltip:ce["a"]},props:{prefixCls:{type:String,default:"ant-pro-ellipsis"},tooltip:{type:Boolean},length:{type:Number,required:!0},lines:{type:Number,default:1},fullWidthRecognition:{type:Boolean,default:!1}},methods:{getStrDom:function(e,t){var n=this.$createElement;return n("span",[Ae(e,this.length)+(t>this.length?"...":"")])},getTooltip:function(e,t){var n=this.$createElement;return n(ce["a"],[n("template",{slot:"title"},[e]),this.getStrDom(e,t)])}},render:function(){var e=this.$props,t=e.tooltip,n=e.length,a=this.$slots.default.map(function(e){return e.text}).join(""),o=$e(a),r=t&&o>n?this.getTooltip(a,o):this.getStrDom(a,o);return r}},Ge=Ie,Re=Object(d["a"])(Ge,He,Me,!1,null,null,null),Pe=Re.exports,Fe=Pe,Be=n("5a70"),Ne=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.draggable?n("a-upload-dragger",{attrs:{name:e.name,multiple:e.multiple,accept:e.accept,customRequest:e.handleUpload,remove:e.handleRemove},on:{change:e.handleChange}},[e._t("default",null,{role:"button"})],2):n("a-upload",{attrs:{name:e.name,multiple:e.multiple,accept:e.accept,customRequest:e.handleUpload,remove:e.handleRemove},on:{change:e.handleChange}},[e._t("default")],2)],1)},Ue=[],Ke=n("f753"),qe=n.n(Ke),Ye={name:"Upload",props:{name:{type:String,required:!1,default:"file"},multiple:{type:Boolean,required:!1,default:!1},draggable:{type:Boolean,required:!1,default:!0},accept:{type:String,required:!1,default:""},uploadHandler:{type:Function,required:!0}},methods:{handleChange:function(e){this.$emit("change",e)},handleRemove:function(e){this.$log.debug("Removed file",e),this.$emit("remove",e)},handleUpload:function(e){var t=this;this.$log.debug("Uploading option",e);var n=qe.a.CancelToken,a=n.source(),o=new FormData;return o.append(this.name,e.file),this.uploadHandler(o,function(n){n.total>0&&(n.percent=n.loaded/n.total*100),t.$log.debug("Uploading percent: ",n.percent),e.onProgress(n)},a.token,e.file).then(function(n){t.$log.debug("Uploaded successfully",n),e.onSuccess(n,e.file),t.$emit("success",n,e.file)}).catch(function(n){t.$log.debug("Failed to upload file",n),e.onError(n,n.response),t.$emit("failure",n,e.file)}),{abort:function(){t.$log.debug("Upload operation aborted by the user"),a.cancel("Upload operation canceled by the user.")}}}}},ze=Ye,We=Object(d["a"])(ze,Ne,Ue,!1,null,null,null),Ve=We.exports,Xe={Ellipsis:Fe,FooterToolbar:Be["a"],Upload:Ve},Je={};Object.keys(Xe).forEach(function(e){Je[e]=a["a"].component(e,Xe[e])});var Ze=n("157a"),Qe=n.n(Ze),et=n("9224");a["a"].config.productionTip=!1,a["a"].prototype.VERSION=et["a"],a["a"].use(h["a"]),a["a"].use(Qe.a),new a["a"]({router:h["a"],store:p["a"],render:function(e){return e(m)}}).$mount("#app")},"5a70":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:e.prefixCls},[n("div",{staticStyle:{float:"left"}},[e._t("extra",[e._v(e._s(e.extra))])],2),n("div",{staticStyle:{float:"right"}},[e._t("default")],2)])},o=[],r={name:"FooterToolBar",props:{prefixCls:{type:String,default:"ant-pro-footer-toolbar"},extra:{type:[String,Object],default:""}}},i=r,s=n("17cc"),c=Object(s["a"])(i,a,o,!1,null,"4ea7eeef",null),u=c.exports;n("2432"),t["a"]=u},"62ef":function(e,t,n){"use strict";var a=n("3eb0"),o=n.n(a);o.a},6692:function(e,t,n){"use strict";var a=n("2682"),o=n.n(a);o.a},"680ad":function(e,t,n){"use strict";var a,o,r,i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("router-view")],1)},s=[],c={name:"BlankLayout"},u=c,l=n("17cc"),d=Object(l["a"])(u,i,s,!1,null,"7f25f9eb",null),f=(d.exports,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-layout",{class:["layout",e.device]},[e.isMobile()?n("a-drawer",{attrs:{placement:"left",wrapClassName:"drawer-sider "+e.navTheme,closable:!1,visible:e.collapsed},on:{close:e.drawerClose}},[n("side-menu",{attrs:{mode:"inline",menus:e.menus,theme:e.navTheme,collapsed:!1,collapsible:!0},on:{menuSelect:e.menuSelect}})],1):e.isSideMenu()?n("side-menu",{attrs:{mode:"inline",menus:e.menus,theme:e.navTheme,collapsed:e.collapsed,collapsible:!0}}):e._e(),n("a-layout",{class:[e.layoutMode,"content-width-"+e.contentWidth],style:{paddingLeft:e.contentPaddingLeft,minHeight:"100vh"}},[n("global-header",{attrs:{mode:e.layoutMode,menus:e.menus,theme:e.navTheme,collapsed:e.collapsed,device:e.device},on:{toggle:e.toggle}}),n("a-layout-content",{style:{height:"100%",margin:"24px 24px 0",paddingTop:e.fixedHeader?"64px":"0"}},[n("transition",{attrs:{name:"page-transition"}},[n("route-view")],1)],1),n("a-layout-footer",[n("global-footer")],1)],1)],1)}),m=[],h=(n("608b"),n("e20c")),p=n("ca00"),b=n("591a"),g=n("ac0d"),v=n("e819"),y=n("d73b"),E={name:"RouteView",props:{keepAlive:{type:Boolean,default:!0}},data:function(){return{}},render:function(){var e=arguments[0],t=this.$route.meta,n=e("keep-alive",[e("router-view")]),a=e("router-view");return!1===t.keepAlive?a:this.keepAlive||t.keepAlive?n:a}},k=E,_=Object(l["a"])(k,a,o,!1,null,null,null),C=_.exports,T=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-layout-sider",{class:["sider",e.isDesktop()?null:"shadow",e.theme,e.fixSiderbar?"ant-fixed-sidemenu":null],attrs:{width:"256px",collapsible:e.collapsible,trigger:null},model:{value:e.collapsed,callback:function(t){e.collapsed=t},expression:"collapsed"}},[n("logo"),n("s-menu",{staticStyle:{padding:"16px 0px"},attrs:{collapsed:e.collapsed,menu:e.menus,theme:e.theme,mode:e.mode},on:{select:e.onSelect}})],1)},O=[],S=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"logo"},[n("router-link",{attrs:{to:{name:"Dashboard"}}},[n("h1",{staticClass:"logo-title"},[e._v("Halo")]),n("h1",{staticClass:"logo-sub-title"},[e._v("Dashboard")])])],1)},x=[],w={name:"Logo"},L=w,j=(n("1953"),Object(l["a"])(L,S,x,!1,null,null,null)),D=j.exports,H=n("3d92"),M=n("23c4"),$=n.n(M),A=(n("7364"),n("f301"),n("df99"),n("f763"),n("25e7")),I=n("2558"),G=A["a"].Item,R=A["a"].SubMenu,P={name:"SMenu",props:{menu:{type:Array,required:!0},theme:{type:String,required:!1,default:"dark"},mode:{type:String,required:!1,default:"inline"},collapsed:{type:Boolean,required:!1,default:!1}},data:function(){return{openKeys:[],selectedKeys:[],cachedOpenKeys:[]}},computed:{rootSubmenuKeys:function(e){var t=[];return e.menu.forEach(function(e){return t.push(e.path)}),t}},created:function(){this.updateMenu()},watch:{collapsed:function(e){e?(this.cachedOpenKeys=this.openKeys.concat(),this.openKeys=[]):this.openKeys=this.cachedOpenKeys},$route:function(){this.updateMenu()}},methods:{onOpenChange:function(e){var t=this;if("horizontal"!==this.mode){var n=e.find(function(e){return!t.openKeys.includes(e)});this.rootSubmenuKeys.includes(n)?this.openKeys=n?[n]:[]:this.openKeys=e}else this.openKeys=e},updateMenu:function(){var e=this.$route.matched.concat();e.length>=4&&this.$route.meta.hidden?(e.pop(),this.selectedKeys=[e[2].path]):this.selectedKeys=[e.pop().path];var t=[];"inline"===this.mode&&e.forEach(function(e){t.push(e.path)}),this.collapsed?this.cachedOpenKeys=t:this.openKeys=t},renderItem:function(e){return e.hidden?null:e.children&&!e.hideChildrenInMenu?this.renderSubMenu(e):this.renderMenuItem(e)},renderMenuItem:function(e){var t=this.$createElement,n=e.meta.target||null,a=n?"a":"router-link",o={to:{name:e.name}},r={href:e.path,target:e.meta.target};return t(G,$()([{},{key:e.path}]),[t(a,{props:Object(h["a"])({},o),attrs:Object(h["a"])({},r)},[this.renderIcon(e.meta.icon),t("span",[e.meta.title])])])},renderSubMenu:function(e){var t=this,n=this.$createElement,a=[];return e.hideChildrenInMenu||e.children.forEach(function(e){return a.push(t.renderItem(e))}),n(R,$()([{},{key:e.path}]),[n("span",{slot:"title"},[this.renderIcon(e.meta.icon),n("span",[e.meta.title])]),a])},renderIcon:function(e){var t=this.$createElement;if("none"===e||void 0===e)return null;var n={};return"object"===Object(H["a"])(e)?n.component=e:n.type=e,t(I["a"],{props:Object(h["a"])({},n)})}},render:function(){var e=this,t=arguments[0],n=this.mode,a=this.theme,o=this.menu,r={mode:n,theme:a,openKeys:this.openKeys},i={select:function(t){e.selectedKeys=t.selectedKeys,e.$emit("select",t)},openChange:this.onOpenChange},s=o.map(function(t){return t.hidden?null:e.renderItem(t)});return t(A["a"],{props:Object(h["a"])({},r),on:Object(h["a"])({},i),model:{value:e.selectedKeys,callback:function(t){e.selectedKeys=t}}},[s])}},F=P,B={name:"SideMenu",components:{Logo:D,SMenu:F},mixins:[g["a"],g["b"]],props:{mode:{type:String,required:!1,default:"inline"},theme:{type:String,required:!1,default:"dark"},collapsible:{type:Boolean,required:!1,default:!1},collapsed:{type:Boolean,required:!1,default:!1},menus:{type:Array,required:!0}},methods:{onSelect:function(e){this.$emit("menuSelect",e)}}},N=B,U=Object(l["a"])(N,T,O,!1,null,null,null),K=U.exports,q=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"showHeader"}},[e.visible?n("div",{staticClass:"header-animat"},[e.visible?n("a-layout-header",{class:[e.fixedHeader&&"ant-header-fixedHeader",e.sidebarOpened?"ant-header-side-opened":"ant-header-side-closed"],style:{padding:"0"}},["sidemenu"===e.mode?n("div",{staticClass:"header"},["mobile"===e.device?n("a-icon",{staticClass:"trigger",attrs:{type:e.collapsed?"menu-fold":"menu-unfold"},on:{click:e.toggle}}):n("a-icon",{staticClass:"trigger",attrs:{type:e.collapsed?"menu-unfold":"menu-fold"},on:{click:e.toggle}}),n("user-menu")],1):n("div",{class:["top-nav-header-index",e.theme]},[n("div",{staticClass:"header-index-wide"},[n("div",{staticClass:"header-index-left"},["mobile"!==e.device?n("logo",{staticClass:"top-nav-header"}):e._e(),"mobile"!==e.device?n("s-menu",{attrs:{mode:"horizontal",menu:e.menus,theme:e.theme}}):n("a-icon",{staticClass:"trigger",attrs:{type:e.collapsed?"menu-fold":"menu-unfold"},on:{click:e.toggle}})],1),n("user-menu",{staticClass:"header-index-right"})],1)])]):e._e()],1):e._e()])},Y=[],z=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"user-wrapper"},[n("a",{attrs:{href:e.options.blog_url,target:"_blank"}},[n("span",{staticClass:"action"},[n("a-icon",{attrs:{type:"link"}})],1)]),n("a",{attrs:{href:"javascript:void(0)"},on:{click:e.showOptionModal}},[n("span",{staticClass:"action"},[n("a-icon",{attrs:{type:"setting"}})],1)]),n("header-comment",{staticClass:"action"}),n("a-dropdown",[e.user?n("span",{staticClass:"action ant-dropdown-link user-dropdown-menu"},[n("a-avatar",{staticClass:"avatar",attrs:{size:"small",src:e.user.avatar||"//cn.gravatar.com/avatar/?s=256&d=mm"}})],1):e._e(),n("a-menu",{staticClass:"user-dropdown-menu-wrapper",attrs:{slot:"overlay"},slot:"overlay"},[n("a-menu-item",{key:"0"},[n("router-link",{attrs:{to:{name:"Profile"}}},[n("a-icon",{attrs:{type:"user"}}),n("span",[e._v("个人资料")])],1)],1),n("a-menu-divider"),n("a-menu-item",{key:"1"},[n("a",{attrs:{href:"javascript:;"},on:{click:e.handleLogout}},[n("a-icon",{attrs:{type:"logout"}}),n("span",[e._v("退出登录")])],1)])],1)],1),n("setting-drawer",{ref:"drawer"})],1)},W=[],V=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-popover",{attrs:{trigger:"click",placement:"bottomRight",autoAdjustOverflow:!0,arrowPointAtCenter:!0,overlayStyle:{width:"300px",top:"50px"},title:"待审核评论"},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[n("template",{slot:"content"},[n("a-spin",{attrs:{spinning:e.loadding}},[n("div",{staticClass:"custom-tab-wrapper"},[n("a-tabs",[n("a-tab-pane",{key:"1",attrs:{tab:"文章"}},[n("a-list",{attrs:{dataSource:e.converttedPostComments},scopedSlots:e._u([{key:"renderItem",fn:function(t){return n("a-list-item",{},[n("a-list-item-meta",[n("a-avatar",{staticStyle:{"background-color":"white"},attrs:{slot:"avatar",src:"//cn.gravatar.com/avatar/"+t.gravatarMd5+"&d=mm",size:"large"},slot:"avatar"}),n("template",{slot:"title"},[n("a",{attrs:{href:t.authorUrl,target:"_blank"}},[e._v(e._s(t.author))]),e._v(":"),n("span",{domProps:{innerHTML:e._s(t.content)}})]),n("template",{slot:"description"},[e._v("\n "+e._s(e._f("timeAgo")(t.createTime))+"\n ")])],2)],1)}}])})],1),n("a-tab-pane",{key:"2",attrs:{tab:"页面"}},[n("a-list",{attrs:{dataSource:e.converttedSheetComments},scopedSlots:e._u([{key:"renderItem",fn:function(t){return n("a-list-item",{},[n("a-list-item-meta",[n("a-avatar",{staticStyle:{"background-color":"white"},attrs:{slot:"avatar",src:"//cn.gravatar.com/avatar/"+t.gravatarMd5+"&d=mm",size:"large"},slot:"avatar"}),n("template",{slot:"title"},[n("a",{attrs:{href:t.authorUrl,target:"_blank"}},[e._v(e._s(t.author))]),e._v(":"),n("span",{domProps:{innerHTML:e._s(t.content)}})]),n("template",{slot:"description"},[e._v("\n "+e._s(e._f("timeAgo")(t.createTime))+"\n ")])],2)],1)}}])})],1)],1)],1)])],1),n("span",{staticClass:"header-comment",on:{click:e.fetchComment}},[e.postComments.length>0||e.sheetComments.length>0?n("a-badge",{attrs:{dot:""}},[n("a-icon",{attrs:{type:"bell"}})],1):n("a-badge",[n("a-icon",{attrs:{type:"bell"}})],1)],1)],2)},X=[],J=n("063c"),Z=n("ae4d"),Q=n.n(Z),ee={name:"HeaderComment",data:function(){return{loadding:!1,visible:!1,postComments:[],sheetComments:[]}},created:function(){this.getComment()},computed:{converttedPostComments:function(){return this.postComments.map(function(e){return e.content=Q()(e.content,{sanitize:!0}),e})},converttedSheetComments:function(){return this.sheetComments.map(function(e){return e.content=Q()(e.content,{sanitize:!0}),e})}},methods:{fetchComment:function(){this.visible?this.loadding=!1:(this.loadding=!0,this.getComment()),this.visible=!this.visible},getComment:function(){var e=this;J["a"].latestComment("posts",5,"AUDITING").then(function(t){e.postComments=t.data.data,e.loadding=!1}),J["a"].latestComment("sheets",5,"AUDITING").then(function(t){e.sheetComments=t.data.data,e.loadding=!1})}}},te=ee,ne=(n("429a"),Object(l["a"])(te,V,X,!1,null,"9523097a",null)),ae=ne.exports,oe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"settingDrawer",staticClass:"setting-drawer"},[n("a-drawer",{attrs:{width:"300",closable:"",visible:e.visible,zIndex:9999},on:{close:e.onClose}},[n("div",{staticClass:"setting-drawer-index-content"},[n("div",{style:{marginBottom:"24px"}},[n("h3",{staticClass:"setting-drawer-index-title"},[e._v("整体风格设置")]),n("div",{staticClass:"setting-drawer-index-blockChecbox"},[n("a-tooltip",[n("template",{slot:"title"},[e._v("暗色菜单风格")]),n("div",{staticClass:"setting-drawer-index-item",on:{click:function(t){return e.handleMenuTheme("dark")}}},[n("img",{attrs:{src:"https://gw.alipayobjects.com/zos/rmsportal/LCkqqYNmvBEbokSDscrm.svg",alt:"dark"}}),"dark"===e.navTheme?n("div",{staticClass:"setting-drawer-index-selectIcon"},[n("a-icon",{attrs:{type:"check"}})],1):e._e()])],2),n("a-tooltip",[n("template",{slot:"title"},[e._v("亮色菜单风格")]),n("div",{staticClass:"setting-drawer-index-item",on:{click:function(t){return e.handleMenuTheme("light")}}},[n("img",{attrs:{src:"https://gw.alipayobjects.com/zos/rmsportal/jpRkZQMyYRryryPNtyIC.svg",alt:"light"}}),"dark"!==e.navTheme?n("div",{staticClass:"setting-drawer-index-selectIcon"},[n("a-icon",{attrs:{type:"check"}})],1):e._e()])],2)],1)]),n("a-divider"),n("div",{style:{marginBottom:"24px"}},[n("h3",{staticClass:"setting-drawer-index-title"},[e._v("主题色")]),n("div",{staticStyle:{height:"20px"}},e._l(e.colorList,function(t,a){return n("a-tooltip",{key:a,staticClass:"setting-drawer-theme-color-colorBlock"},[n("template",{slot:"title"},[e._v(e._s(t.key))]),n("a-tag",{attrs:{color:t.color},on:{click:function(n){return e.changeColor(t.color)}}},[t.color===e.primaryColor?n("a-icon",{attrs:{type:"check"}}):e._e()],1)],2)}),1)]),n("a-divider"),n("div",{style:{marginBottom:"24px"}},[n("h3",{staticClass:"setting-drawer-index-title"},[e._v("导航模式")]),n("div",{staticClass:"setting-drawer-index-blockChecbox"},[n("div",{staticClass:"setting-drawer-index-item",on:{click:function(t){return e.handleLayout("sidemenu")}}},[n("img",{attrs:{src:"https://gw.alipayobjects.com/zos/rmsportal/JopDzEhOqwOjeNTXkoje.svg",alt:"sidemenu"}}),"sidemenu"===e.layoutMode?n("div",{staticClass:"setting-drawer-index-selectIcon"},[n("a-icon",{attrs:{type:"check"}})],1):e._e()]),n("div",{staticClass:"setting-drawer-index-item",on:{click:function(t){return e.handleLayout("topmenu")}}},[n("img",{attrs:{src:"https://gw.alipayobjects.com/zos/rmsportal/KDNDBbriJhLwuqMoxcAr.svg",alt:"topmenu"}}),"sidemenu"!==e.layoutMode?n("div",{staticClass:"setting-drawer-index-selectIcon"},[n("a-icon",{attrs:{type:"check"}})],1):e._e()])])]),n("a-divider")],1)])],1)},re=[],ie=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"setting-drawer-index-item"},[n("h3",{staticClass:"setting-drawer-index-title"},[e._v(e._s(e.title))]),e._t("default"),e.divider?n("a-divider"):e._e()],2)},se=[],ce={name:"SettingItem",props:{title:{type:String,default:""},divider:{type:Boolean,default:!1}}},ue=ce,le=(n("d25d"),Object(l["a"])(ue,ie,se,!1,null,"e773bc98",null)),de=le.exports,fe=n("d3b0"),me=[{key:"红色",color:"#F5222D"},{key:"浅红色",color:"#FA541C"},{key:"日暮",color:"#FAAD14"},{key:"青色",color:"#13C2C2"},{key:"绿色",color:"#52C41A"},{key:"默认",color:"#1890FF"},{key:"蓝色",color:"#2F54EB"},{key:"紫色",color:"#722ED1"}],he=function(e){if(e){var t=fe["a"].loading("正在编译主题!",0);if(r)i();else{var n=document.createElement("link"),a=document.createElement("script"),o=document.createElement("script");n.setAttribute("rel","stylesheet/less"),n.setAttribute("href","/color.less"),a.innerHTML="\n window.less = {\n async: true,\n env: 'production',\n javascriptEnabled: true\n };\n ",o.src="https://cdnjs.loli.net/ajax/libs/less.js/3.8.1/less.min.js",o.async=!0,o.onload=function(){i(),o.onload=null},document.body.appendChild(n),document.body.appendChild(a),document.body.appendChild(o),r=!0}}function i(){window.less&&setTimeout(function(){window.less.modifyVars({"@primary-color":e}).then(function(){t()}).catch(function(){fe["a"].error("Failed to update theme"),t()})},200)}},pe={components:{SettingItem:de},mixins:[g["a"],g["b"]],data:function(){return{visible:!1,colorList:me,baseConfig:Object.assign({},v["a"])}},watch:{},mounted:function(){this.primaryColor!==v["a"].primaryColor&&he(this.primaryColor)},methods:{showDrawer:function(){this.visible=!0},onClose:function(){this.visible=!1},toggle:function(){this.visible=!this.visible},handleMenuTheme:function(e){this.baseConfig.navTheme=e,this.$store.dispatch("ToggleTheme",e)},handleLayout:function(e){this.baseConfig.layout=e,this.$store.dispatch("ToggleLayoutMode",e),this.handleFixSiderbar(!1)},handleContentWidthChange:function(e){this.baseConfig.contentWidth=e,this.$store.dispatch("ToggleContentWidth",e)},changeColor:function(e){this.baseConfig.primaryColor=e,this.primaryColor!==e&&(this.$store.dispatch("ToggleColor",e),he(e))},handleFixedHeader:function(e){this.baseConfig.fixedHeader=e,this.$store.dispatch("ToggleFixedHeader",e)},handleFixedHeaderHidden:function(e){this.baseConfig.autoHideHeader=e,this.$store.dispatch("ToggleFixedHeaderHidden",e)},handleFixSiderbar:function(e){if("topmenu"===this.layoutMode)return this.baseConfig.fixSiderbar=!1,void this.$store.dispatch("ToggleFixSiderbar",!1);this.baseConfig.fixSiderbar=e,this.$store.dispatch("ToggleFixSiderbar",e)}}},be=pe,ge=(n("ad48"),Object(l["a"])(be,oe,re,!1,null,"ef4d2b56",null)),ve=ge.exports,ye=n("482b"),Ee={name:"UserMenu",components:{HeaderComment:ae,SettingDrawer:ve},data:function(){return{optionVisible:!0,options:[],keys:["blog_url"]}},mounted:function(){this.optionVisible=this.$refs.drawer.visible},created:function(){this.loadOptions()},computed:Object(h["a"])({},Object(b["c"])(["user"])),methods:Object(h["a"])({},Object(b["b"])(["logout"]),{handleLogout:function(){var e=this;this.$confirm({title:"提示",content:"确定要注销登录吗 ?",onOk:function(){return e.logout({}).then(function(){window.location.reload()}).catch(function(t){e.$message.error({title:"错误",description:t.message})})},onCancel:function(){}})},showOptionModal:function(){this.optionVisible=this.$refs.drawer.visible,this.$refs.drawer.toggle()},loadOptions:function(){var e=this;ye["a"].listAll(this.keys).then(function(t){e.options=t.data.data})}})},ke=Ee,_e=(n("62ef"),Object(l["a"])(ke,z,W,!1,null,"c454f398",null)),Ce=_e.exports,Te={name:"GlobalHeader",components:{UserMenu:Ce,SMenu:F,Logo:D},mixins:[g["a"]],props:{mode:{type:String,default:"sidemenu"},menus:{type:Array,required:!0},theme:{type:String,required:!1,default:"dark"},collapsed:{type:Boolean,required:!1,default:!1},device:{type:String,required:!1,default:"desktop"}},data:function(){return{visible:!0,oldScrollTop:0}},mounted:function(){document.body.addEventListener("scroll",this.handleScroll,{passive:!0})},methods:{handleScroll:function(){var e=this;if(this.autoHideHeader){var t=document.body.scrollTop+document.documentElement.scrollTop;this.ticking||(this.ticking=!0,requestAnimationFrame(function(){e.oldScrollTop>t?e.visible=!0:t>300&&e.visible?e.visible=!1:t<300&&!e.visible&&(e.visible=!0),e.oldScrollTop=t,e.ticking=!1}))}},toggle:function(){this.$emit("toggle")}},beforeDestroy:function(){document.body.removeEventListener("scroll",this.handleScroll,!0)}},Oe=Te,Se=(n("05fe"),Object(l["a"])(Oe,q,Y,!1,null,null,null)),xe=Se.exports,we=xe,Le=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"footer"},[n("div",{staticClass:"copyright"},[e._v("\n Proudly power by\n "),n("router-link",{attrs:{to:{name:"About"}}},[n("a",{attrs:{href:"javascript:void(0);"}},[e._v("Halo")])])],1)])},je=[],De={name:"GlobalFooter",data:function(){return{}}},He=De,Me=(n("0645"),Object(l["a"])(He,Le,je,!1,null,"cd222e82",null)),$e=Me.exports,Ae=$e,Ie={name:"BasicLayout",mixins:[g["a"],g["b"]],components:{RouteView:C,SideMenu:K,GlobalHeader:we,GlobalFooter:Ae},data:function(){return{production:v["a"].production,collapsed:!1,menus:[]}},computed:Object(h["a"])({},Object(b["e"])({mainMenu:function(e){return e.permission.addRouters}}),{contentPaddingLeft:function(){return!this.fixSidebar||this.isMobile()?"0":this.sidebarOpened?"256px":"80px"}}),watch:{sidebarOpened:function(e){this.collapsed=!e}},created:function(){this.menus=y["a"].find(function(e){return"/"===e.path}).children,this.collapsed=!this.sidebarOpened},mounted:function(){var e=this,t=navigator.userAgent;t.indexOf("Edge")>-1&&this.$nextTick(function(){e.collapsed=!e.collapsed,setTimeout(function(){e.collapsed=!e.collapsed},16)})},methods:Object(h["a"])({},Object(b["b"])(["setSidebar"]),{toggle:function(){this.collapsed=!this.collapsed,this.setSidebar(!this.collapsed),Object(p["c"])()},paddingCalc:function(){var e="";return e=this.sidebarOpened?this.isDesktop()?"256px":"80px":(this.isMobile()?"0":this.fixSidebar&&"80px")||"0",e},menuSelect:function(){this.isDesktop()||(this.collapsed=!1)},drawerClose:function(){this.collapsed=!1}})},Ge=Ie,Re=(n("6692"),Object(l["a"])(Ge,f,m,!1,null,null,null)),Pe=Re.exports,Fe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:e.$route.meta.hiddenHeaderContent?null:"margin: -24px -24px 0px;"},[e.$route.meta.hiddenHeaderContent?e._e():n("page-header",{attrs:{title:e.pageTitle,logo:e.logo,avatar:e.avatar}},[e._t("action",null,{slot:"action"}),e._t("headerContent",null,{slot:"content"}),!this.$slots.headerContent&&e.description?n("div",{attrs:{slot:"content"},slot:"content"},[n("p",{staticStyle:{"font-size":"14px",color:"rgba(0,0,0,.65)"}},[e._v(e._s(e.description))]),n("div",{staticClass:"link"},[e._l(e.linkList,function(t,a){return[n("a",{key:a,attrs:{href:t.href}},[n("a-icon",{attrs:{type:t.icon}}),n("span",[e._v(e._s(t.title))])],1)]})],2)]):e._e()],2),n("div",{staticClass:"content"},[n("div",{staticClass:"page-header-index-wide"},[e._t("default",[n("router-view",{ref:"content"})])],2)])],1)},Be=[],Ne=(n("55a0"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"page-header"},[n("div",{staticClass:"page-header-index-wide"},[n("s-breadcrumb"),n("div",{staticClass:"detail"},[e.$route.meta.hiddenHeaderContent?e._e():n("div",{staticClass:"main"},[n("div",{staticClass:"row"},[e.logo?n("img",{staticClass:"logo",attrs:{src:e.logo}}):e._e(),n("div",{staticClass:"action"},[e._t("action")],2)]),n("div",{staticClass:"row"},[e.avatar?n("div",{staticClass:"avatar"},[n("a-avatar",{attrs:{src:e.avatar}})],1):e._e(),this.$slots.content?n("div",{staticClass:"headerContent"},[e._t("content")],2):e._e(),this.$slots.extra?n("div",{staticClass:"extra"},[e._t("extra")],2):e._e()]),n("div",[e._t("pageMenu")],2)])])],1)])}),Ue=[],Ke=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-breadcrumb",{staticClass:"breadcrumb"},e._l(e.breadList,function(t,a){return n("a-breadcrumb-item",{key:t.name},[t.name!=e.name&&1!=a?n("router-link",{attrs:{to:{path:""===t.path?"/":t.path}}},[e._v(e._s(t.meta.title))]):n("span",[e._v(e._s(t.meta.title))])],1)}),1)},qe=[],Ye={data:function(){return{name:"",breadList:[]}},created:function(){this.getBreadcrumb()},methods:{getBreadcrumb:function(){var e=this;this.breadList=[],this.name=this.$route.name,this.$route.matched.forEach(function(t){e.breadList.push(t)})}},watch:{$route:function(){this.getBreadcrumb()}}},ze=Ye,We=Object(l["a"])(ze,Ke,qe,!1,null,"86fe166e",null),Ve=We.exports,Xe={name:"PageHeader",components:{"s-breadcrumb":Ve},props:{title:{type:[String,Boolean],default:!0,required:!1},logo:{type:String,default:"",required:!1},avatar:{type:String,default:"",required:!1}},data:function(){return{}}},Je=Xe,Ze=(n("1d26"),Object(l["a"])(Je,Ne,Ue,!1,null,"4ebcc784",null)),Qe=Ze.exports,et=Qe,tt={name:"PageView",components:{PageHeader:et},props:{avatar:{type:String,default:null},title:{type:[String,Boolean],default:!0},logo:{type:String,default:null}},data:function(){return{pageTitle:null,description:null,linkList:[],extraImage:"",search:!1,tabs:{}}},mounted:function(){this.getPageMeta()},updated:function(){this.getPageMeta()},methods:{getPageMeta:function(){this.pageTitle="string"!==typeof this.title&&this.title?this.$route.meta.title:this.title;var e=this.$refs.content;e&&(e.pageMeta?Object.assign(this,e.pageMeta):(this.description=e.description,this.linkList=e.linkList,this.extraImage=e.extraImage,this.search=!0===e.search,this.tabs=e.tabs))}}},nt=tt,at=(n("2987"),Object(l["a"])(nt,Fe,Be,!1,null,"43152b59",null)),ot=at.exports;n.d(t,"a",function(){return Pe}),n.d(t,"b",function(){return ot})},"6e79":function(e,t,n){},9224:function(e){e.exports={a:"1.0.2"}},"9ae4":function(e,t,n){},"9e74":function(e,t,n){},"9efd":function(e,t,n){"use strict";n("4453"),n("f763"),n("fb37");var a=n("089b"),o=n("f753"),r=n.n(o),i=n("38bc"),s=n.n(i),c=(n("70e7"),n("6e6d")),u=n("d25d6"),l=n("d3b0"),d=n("4360"),f=n("a18c"),m=n("ca00"),h=r.a.create({baseURL:"",timeout:5e3,withCredentials:!0});function p(e){var t=d["a"].getters.token;c["a"].$log.debug("Got token from store",t),t&&t.access_token&&(e.headers["Admin-Authorization"]=t.access_token)}function b(e){return g.apply(this,arguments)}function g(){return g=Object(a["a"])(regeneratorRuntime.mark(function e(t){var n,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.response.config,p(n),e.next=4,r.a.request(n);case 4:return a=e.sent,e.abrupt("return",a);case 6:case"end":return e.stop()}},e)})),g.apply(this,arguments)}var v=null;function y(e){return E.apply(this,arguments)}function E(){return E=Object(a["a"])(regeneratorRuntime.mark(function e(t){var n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=d["a"].getters.token.refresh_token,e.prev=1,null===v&&(v=d["a"].dispatch("refreshToken",n)),e.next=5,v;case 5:e.next=11;break;case 7:e.prev=7,e.t0=e["catch"](1),e.t0.response&&e.t0.response.data&&e.t0.response.data.data===n&&f["a"].push({name:"Login"}),c["a"].$log.error("Failed to refresh token",e.t0);case 11:return e.prev=11,v=null,e.finish(11);case 14:return e.abrupt("return",b(t));case 15:case"end":return e.stop()}},e,null,[[1,7,11,14]])})),E.apply(this,arguments)}function k(e){if(!Object(m["a"])(e)||!Object(m["a"])(e.data))return null;var t=e.data;return Object.keys(t).map(function(e){return t[e]})}h.interceptors.request.use(function(e){return e.mute||s.a.start(),p(e),e},function(e){return s.a.remove(),Promise.reject(e)}),h.interceptors.response.use(function(e){return s.a.done(),e},function(e){if(s.a.done(),r.a.isCancel(e))return c["a"].$log.debug("Cancelled uploading by user."),Promise.reject(e);c["a"].$log.error("Response failed",e);var t=e.response,n=t?t.status:-1;c["a"].$log.error("Server response status",n);var a=t?t.data:null;if(a){var o=!1;if(c["a"].$log.error("Business response status",a.status),400===a.status){var i=k(a);i&&(o=!0,u["a"].error({message:a.message,description:function(e){var t=i.map(function(t){return e("a-alert",{props:{message:t,banner:!0,showIcon:!1,type:"error"}})});return e("div",t)},duration:10}))}else if(401===a.status)if(d["a"].getters.token&&d["a"].getters.token.access_token===a.data){var m=y(e);if(m!==e)return m}else f["a"].push({name:"Login"});else 403===a.status||404===a.status||a.status;o||l["a"].error(a.message)}else l["a"].error("服务异常");return Promise.reject(e)}),t["a"]=h},"9fb0":function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"i",function(){return o}),n.d(t,"h",function(){return r}),n.d(t,"g",function(){return i}),n.d(t,"b",function(){return s}),n.d(t,"d",function(){return c}),n.d(t,"f",function(){return u}),n.d(t,"e",function(){return l}),n.d(t,"c",function(){return d}),n.d(t,"j",function(){return f});var a="Access-Token",o="SIDEBAR_TYPE",r="DEFAULT_THEME",i="DEFAULT_LAYOUT_MODE",s="DEFAULT_COLOR",c="DEFAULT_FIXED_HEADER",u="DEFAULT_FIXED_SIDEMENU",l="DEFAULT_FIXED_HEADER_HIDDEN",d="DEFAULT_CONTENT_WIDTH_TYPE",f="USER"},a18c:function(e,t,n){"use strict";var a=n("6e6d"),o=n("1e6f"),r=n("d73b");a["a"].use(o["a"]),t["a"]=new o["a"]({mode:"hash",base:"/",scrollBehavior:function(){return{y:0}},routes:r["b"].concat(r["a"])})},ac0d:function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return s});var a=n("e20c"),o=n("51e6"),r=n("591a"),i={computed:Object(a["a"])({},Object(r["e"])({layoutMode:function(e){return e.app.layout},navTheme:function(e){return e.app.theme},primaryColor:function(e){return e.app.color},fixedHeader:function(e){return e.app.fixedHeader},fixSiderbar:function(e){return e.app.fixSiderbar},fixSidebar:function(e){return e.app.fixSiderbar},contentWidth:function(e){return e.app.contentWidth},autoHideHeader:function(e){return e.app.autoHideHeader},sidebarOpened:function(e){return e.app.sidebar}})),methods:{isTopMenu:function(){return"topmenu"===this.layoutMode},isSideMenu:function(){return!this.isTopMenu()}}},s={computed:Object(a["a"])({},Object(r["e"])({device:function(e){return e.app.device}})),methods:{isMobile:function(){return this.device===o["a"].MOBILE},isDesktop:function(){return this.device===o["a"].DESKTOP},isTablet:function(){return this.device===o["a"].TABLET}}}},ad48:function(e,t,n){"use strict";var a=n("3bc0"),o=n.n(a);o.a},bc6c:function(e,t,n){},c24f:function(e,t,n){"use strict";var a=n("9efd"),o="/api/admin/users",r={getProfile:function(){return Object(a["a"])({url:"".concat(o,"/profiles"),method:"get"})},updateProfile:function(e){return Object(a["a"])({url:"".concat(o,"/profiles"),method:"put",data:e})},updatePassword:function(e,t){return Object(a["a"])({url:"".concat(o,"/profiles/password"),method:"put",data:{oldPassword:e,newPassword:t}})}};t["a"]=r},c8df:function(e,t,n){},ca00:function(e,t,n){"use strict";n.d(t,"c",function(){return i}),n.d(t,"b",function(){return s}),n.d(t,"a",function(){return c});var a=n("3d92"),o=n("6bf2"),r=n.n(o);n("35d0");function i(){var e=document.createEvent("HTMLEvents");e.initEvent("resize",!0,!0),e.eventType="message",window.dispatchEvent(e)}function s(e){var t=(new Date).getTime(),n=t-e,a=Math.floor(n/864e5);if(0===a){var o=n%864e5,i=Math.floor(o/36e5);if(0===i){var s=o%36e5,c=Math.floor(s/6e4);if(0===c){var u=s%6e4,l=Math.round(u/1e3);return l+" 秒前"}return c+" 分钟前"}return i+" 小时前"}return a<0?"刚刚":a<5?a+" 天前":r()(e).format("YYYY-MM-DD HH:mm")}function c(e){return e&&"object"===Object(a["a"])(e)&&e.constructor===Object}},d25d:function(e,t,n){"use strict";var a=n("f942"),o=n.n(a);o.a},d630:function(e,t,n){},d73b:function(e,t,n){"use strict";n.d(t,"a",function(){return o}),n.d(t,"b",function(){return r});var a=n("680ad"),o=[{path:"/",name:"index",component:a["a"],meta:{title:"首页"},redirect:"/dashboard",children:[{path:"/dashboard",name:"Dashboard",component:function(){return n.e("chunk-81d936d8").then(n.bind(null,"5c3a"))},meta:{title:"仪表盘",icon:"dashboard",hiddenHeaderContent:!1}},{path:"/posts",name:"Posts",redirect:"/posts/list",component:a["b"],meta:{title:"文章",icon:"form"},children:[{path:"/posts/list",name:"PostList",component:function(){return n.e("chunk-87e2df70").then(n.bind(null,"dae2"))},meta:{title:"所有文章",hiddenHeaderContent:!1}},{path:"/posts/write",name:"PostEdit",component:function(){return Promise.all([n.e("chunk-c0a1d3c4"),n.e("chunk-bfd5bbcc")]).then(n.bind(null,"db44"))},meta:{title:"写文章",hiddenHeaderContent:!1}},{path:"/categories",name:"CategoryList",component:function(){return n.e("chunk-0337f7a6").then(n.bind(null,"7e89"))},meta:{title:"分类目录",hiddenHeaderContent:!1}},{path:"/tags",name:"TagList",component:function(){return n.e("chunk-0ba750a2").then(n.bind(null,"aa1e"))},meta:{title:"标签",hiddenHeaderContent:!1}}]},{path:"/sheets",name:"Sheets",component:a["b"],redirect:"/sheets/list",meta:{title:"页面",icon:"read"},children:[{path:"/sheets/list",name:"SheetList",component:function(){return n.e("chunk-142c8832").then(n.bind(null,"a8ed"))},meta:{title:"所有页面",hiddenHeaderContent:!1}},{path:"/sheets/write",name:"SheetEdit",component:function(){return Promise.all([n.e("chunk-c0a1d3c4"),n.e("chunk-31c8ea42")]).then(n.bind(null,"f585"))},meta:{title:"新建页面",hiddenHeaderContent:!1}},{path:"/sheets/links",name:"LinkList",hidden:!0,component:function(){return n.e("chunk-2d21a35c").then(n.bind(null,"bb17"))},meta:{title:"友情链接",hiddenHeaderContent:!1}},{path:"/sheets/photos",name:"PhotoList",hidden:!0,component:function(){return n.e("chunk-6d8b31f6").then(n.bind(null,"6d0d"))},meta:{title:"图库",hiddenHeaderContent:!1}},{path:"/sheets/journals",name:"JournalList",hidden:!0,component:function(){return n.e("chunk-5bf599cc").then(n.bind(null,"81a6"))},meta:{title:"日志",hiddenHeaderContent:!1}}]},{path:"/attachments",name:"Attachments",component:function(){return n.e("chunk-5000e55c").then(n.bind(null,"61d0"))},meta:{title:"附件",icon:"picture",hiddenHeaderContent:!1}},{path:"/comments",name:"Comments",component:function(){return n.e("chunk-2d0b64bf").then(n.bind(null,"1d0f"))},meta:{title:"评论",icon:"message",hiddenHeaderContent:!1}},{path:"/interface",name:"Interface",component:a["b"],redirect:"/interface/themes",meta:{title:"外观",icon:"skin"},children:[{path:"/interface/themes",name:"ThemeList",component:function(){return n.e("chunk-1079f749").then(n.bind(null,"79e7"))},meta:{title:"主题",hiddenHeaderContent:!1}},{path:"/interface/menus",name:"MenuList",component:function(){return n.e("chunk-2d0d65a2").then(n.bind(null,"71d6"))},meta:{title:"菜单",hiddenHeaderContent:!1}},{path:"/interface/themes/edit",name:"ThemeEdit",component:function(){return n.e("chunk-161dc990").then(n.bind(null,"33c9"))},meta:{title:"主题编辑",hiddenHeaderContent:!1}}]},{path:"/user",name:"User",component:a["b"],redirect:"/user/profile",meta:{title:"用户",icon:"user"},children:[{path:"/user/profile",name:"Profile",component:function(){return n.e("chunk-b2d0b040").then(n.bind(null,"7c54"))},meta:{title:"个人资料",hiddenHeaderContent:!1}}]},{path:"/system",name:"System",component:a["b"],redirect:"/system/options",meta:{title:"系统",icon:"setting"},children:[{path:"/system/options",name:"OptionForm",component:function(){return n.e("chunk-bb4f0d4a").then(n.bind(null,"26ea"))},meta:{title:"博客设置",hiddenHeaderContent:!1}},{path:"/system/tools",name:"ToolList",component:function(){return n.e("chunk-2d228d13").then(n.bind(null,"db98"))},meta:{title:"小工具",hiddenHeaderContent:!1}},{path:"/system/about",name:"About",component:function(){return n.e("chunk-1be69b35").then(n.bind(null,"2967"))},meta:{title:"关于",hiddenHeaderContent:!1}}]}]},{path:"*",redirect:"/404",hidden:!0}],r=[{path:"/login",name:"Login",meta:{title:"登录"},component:function(){return n.e("chunk-cec31564").then(n.bind(null,"ac2a"))}},{path:"/install",name:"Install",meta:{title:"安装向导"},component:function(){return n.e("chunk-14e0b302").then(n.bind(null,"306f"))}},{path:"/404",name:"NotFound",component:function(){return n.e("fail").then(n.bind(null,"cc89"))}}]},e819:function(e,t,n){"use strict";t["a"]={primaryColor:"#1890FF",navTheme:"dark",layout:"topmenu",contentWidth:"Fixed",fixedHeader:!1,fixSiderbar:!1,autoHideHeader:!1,storageOptions:{namespace:"halo__",name:"ls",storage:"local"}}},f607:function(e,t,n){},f942:function(e,t,n){}}); \ No newline at end of file +(function(e){function t(t){for(var a,o,s=t[0],c=t[1],u=t[2],l=0,d=[];l1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD HH:mm";return je()(e).format(t)}),a["a"].filter("moment",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD HH:mm";return je()(e).format(t)}),a["a"].filter("timeAgo",De["b"]),a["a"].filter("fileSizeFormat",function(e){if(!e)return"0 Bytes";var t=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],n=0,a=parseFloat(e);n=Math.floor(Math.log(a)/Math.log(1024));var o=a/Math.pow(1024,n);return o=o.toFixed(2),o+" "+t[n]});var He,Me,$e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split("").reduce(function(e,t){var n=t.charCodeAt(0);return n>=0&&n<=128?e+1:e+2},0)},Ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=0;return e.split("").reduce(function(e,a){var o=a.charCodeAt(0);return n+=o>=0&&o<=128?1:2,n<=t?e+a:e},"")},Ie={name:"Ellipsis",components:{Tooltip:ce["a"]},props:{prefixCls:{type:String,default:"ant-pro-ellipsis"},tooltip:{type:Boolean},length:{type:Number,required:!0},lines:{type:Number,default:1},fullWidthRecognition:{type:Boolean,default:!1}},methods:{getStrDom:function(e,t){var n=this.$createElement;return n("span",[Ae(e,this.length)+(t>this.length?"...":"")])},getTooltip:function(e,t){var n=this.$createElement;return n(ce["a"],[n("template",{slot:"title"},[e]),this.getStrDom(e,t)])}},render:function(){var e=this.$props,t=e.tooltip,n=e.length,a=this.$slots.default.map(function(e){return e.text}).join(""),o=$e(a),r=t&&o>n?this.getTooltip(a,o):this.getStrDom(a,o);return r}},Ge=Ie,Re=Object(d["a"])(Ge,He,Me,!1,null,null,null),Pe=Re.exports,Fe=Pe,Be=n("5a70"),Ne=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.draggable?n("a-upload-dragger",{attrs:{name:e.name,multiple:e.multiple,accept:e.accept,customRequest:e.handleUpload,remove:e.handleRemove},on:{change:e.handleChange}},[e._t("default",null,{role:"button"})],2):n("a-upload",{attrs:{name:e.name,multiple:e.multiple,accept:e.accept,customRequest:e.handleUpload,remove:e.handleRemove},on:{change:e.handleChange}},[e._t("default")],2)],1)},Ue=[],Ke=n("f753"),qe=n.n(Ke),Ye={name:"Upload",props:{name:{type:String,required:!1,default:"file"},multiple:{type:Boolean,required:!1,default:!1},draggable:{type:Boolean,required:!1,default:!0},accept:{type:String,required:!1,default:""},uploadHandler:{type:Function,required:!0}},methods:{handleChange:function(e){this.$emit("change",e)},handleRemove:function(e){this.$log.debug("Removed file",e),this.$emit("remove",e)},handleUpload:function(e){var t=this;this.$log.debug("Uploading option",e);var n=qe.a.CancelToken,a=n.source(),o=new FormData;return o.append(this.name,e.file),this.uploadHandler(o,function(n){n.total>0&&(n.percent=n.loaded/n.total*100),t.$log.debug("Uploading percent: ",n.percent),e.onProgress(n)},a.token,e.file).then(function(n){t.$log.debug("Uploaded successfully",n),e.onSuccess(n,e.file),t.$emit("success",n,e.file)}).catch(function(n){t.$log.debug("Failed to upload file",n),e.onError(n,n.response),t.$emit("failure",n,e.file)}),{abort:function(){t.$log.debug("Upload operation aborted by the user"),a.cancel("Upload operation canceled by the user.")}}}}},ze=Ye,We=Object(d["a"])(ze,Ne,Ue,!1,null,null,null),Ve=We.exports,Xe={Ellipsis:Fe,FooterToolbar:Be["a"],Upload:Ve},Je={};Object.keys(Xe).forEach(function(e){Je[e]=a["a"].component(e,Xe[e])});var Ze=n("157a"),Qe=n.n(Ze),et=n("9224");a["a"].config.productionTip=!1,a["a"].prototype.VERSION=et["a"],a["a"].use(h["a"]),a["a"].use(Qe.a),new a["a"]({router:h["a"],store:p["a"],render:function(e){return e(m)}}).$mount("#app")},"5a70":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:e.prefixCls},[n("div",{staticStyle:{float:"left"}},[e._t("extra",[e._v(e._s(e.extra))])],2),n("div",{staticStyle:{float:"right"}},[e._t("default")],2)])},o=[],r={name:"FooterToolBar",props:{prefixCls:{type:String,default:"ant-pro-footer-toolbar"},extra:{type:[String,Object],default:""}}},i=r,s=n("17cc"),c=Object(s["a"])(i,a,o,!1,null,"4ea7eeef",null),u=c.exports;n("2432"),t["a"]=u},"62ef":function(e,t,n){"use strict";var a=n("3eb0"),o=n.n(a);o.a},6692:function(e,t,n){"use strict";var a=n("2682"),o=n.n(a);o.a},"680ad":function(e,t,n){"use strict";var a,o,r,i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("router-view")],1)},s=[],c={name:"BlankLayout"},u=c,l=n("17cc"),d=Object(l["a"])(u,i,s,!1,null,"7f25f9eb",null),f=(d.exports,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-layout",{class:["layout",e.device]},[e.isMobile()?n("a-drawer",{attrs:{placement:"left",wrapClassName:"drawer-sider "+e.navTheme,closable:!1,visible:e.collapsed},on:{close:e.drawerClose}},[n("side-menu",{attrs:{mode:"inline",menus:e.menus,theme:e.navTheme,collapsed:!1,collapsible:!0},on:{menuSelect:e.menuSelect}})],1):e.isSideMenu()?n("side-menu",{attrs:{mode:"inline",menus:e.menus,theme:e.navTheme,collapsed:e.collapsed,collapsible:!0}}):e._e(),n("a-layout",{class:[e.layoutMode,"content-width-"+e.contentWidth],style:{paddingLeft:e.contentPaddingLeft,minHeight:"100vh"}},[n("global-header",{attrs:{mode:e.layoutMode,menus:e.menus,theme:e.navTheme,collapsed:e.collapsed,device:e.device},on:{toggle:e.toggle}}),n("a-layout-content",{style:{height:"100%",margin:"24px 24px 0",paddingTop:e.fixedHeader?"64px":"0"}},[n("transition",{attrs:{name:"page-transition"}},[n("route-view")],1)],1),n("a-layout-footer",[n("global-footer")],1)],1)],1)}),m=[],h=(n("608b"),n("e20c")),p=n("ca00"),b=n("591a"),g=n("ac0d"),v=n("e819"),y=n("d73b"),E={name:"RouteView",props:{keepAlive:{type:Boolean,default:!0}},data:function(){return{}},render:function(){var e=arguments[0],t=this.$route.meta,n=e("keep-alive",[e("router-view")]),a=e("router-view");return!1===t.keepAlive?a:this.keepAlive||t.keepAlive?n:a}},k=E,_=Object(l["a"])(k,a,o,!1,null,null,null),C=_.exports,T=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-layout-sider",{class:["sider",e.isDesktop()?null:"shadow",e.theme,e.fixSiderbar?"ant-fixed-sidemenu":null],attrs:{width:"256px",collapsible:e.collapsible,trigger:null},model:{value:e.collapsed,callback:function(t){e.collapsed=t},expression:"collapsed"}},[n("logo"),n("s-menu",{staticStyle:{padding:"16px 0px"},attrs:{collapsed:e.collapsed,menu:e.menus,theme:e.theme,mode:e.mode},on:{select:e.onSelect}})],1)},O=[],S=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"logo"},[n("router-link",{attrs:{to:{name:"Dashboard"}}},[n("h1",{staticClass:"logo-title"},[e._v("Halo")]),n("h1",{staticClass:"logo-sub-title"},[e._v("Dashboard")])])],1)},x=[],w={name:"Logo"},L=w,j=(n("1953"),Object(l["a"])(L,S,x,!1,null,null,null)),D=j.exports,H=n("3d92"),M=n("23c4"),$=n.n(M),A=(n("7364"),n("f301"),n("df99"),n("f763"),n("25e7")),I=n("2558"),G=A["a"].Item,R=A["a"].SubMenu,P={name:"SMenu",props:{menu:{type:Array,required:!0},theme:{type:String,required:!1,default:"dark"},mode:{type:String,required:!1,default:"inline"},collapsed:{type:Boolean,required:!1,default:!1}},data:function(){return{openKeys:[],selectedKeys:[],cachedOpenKeys:[]}},computed:{rootSubmenuKeys:function(e){var t=[];return e.menu.forEach(function(e){return t.push(e.path)}),t}},created:function(){this.updateMenu()},watch:{collapsed:function(e){e?(this.cachedOpenKeys=this.openKeys.concat(),this.openKeys=[]):this.openKeys=this.cachedOpenKeys},$route:function(){this.updateMenu()}},methods:{onOpenChange:function(e){var t=this;if("horizontal"!==this.mode){var n=e.find(function(e){return!t.openKeys.includes(e)});this.rootSubmenuKeys.includes(n)?this.openKeys=n?[n]:[]:this.openKeys=e}else this.openKeys=e},updateMenu:function(){var e=this.$route.matched.concat();e.length>=4&&this.$route.meta.hidden?(e.pop(),this.selectedKeys=[e[2].path]):this.selectedKeys=[e.pop().path];var t=[];"inline"===this.mode&&e.forEach(function(e){t.push(e.path)}),this.collapsed?this.cachedOpenKeys=t:this.openKeys=t},renderItem:function(e){return e.hidden?null:e.children&&!e.hideChildrenInMenu?this.renderSubMenu(e):this.renderMenuItem(e)},renderMenuItem:function(e){var t=this.$createElement,n=e.meta.target||null,a=n?"a":"router-link",o={to:{name:e.name}},r={href:e.path,target:e.meta.target};return t(G,$()([{},{key:e.path}]),[t(a,{props:Object(h["a"])({},o),attrs:Object(h["a"])({},r)},[this.renderIcon(e.meta.icon),t("span",[e.meta.title])])])},renderSubMenu:function(e){var t=this,n=this.$createElement,a=[];return e.hideChildrenInMenu||e.children.forEach(function(e){return a.push(t.renderItem(e))}),n(R,$()([{},{key:e.path}]),[n("span",{slot:"title"},[this.renderIcon(e.meta.icon),n("span",[e.meta.title])]),a])},renderIcon:function(e){var t=this.$createElement;if("none"===e||void 0===e)return null;var n={};return"object"===Object(H["a"])(e)?n.component=e:n.type=e,t(I["a"],{props:Object(h["a"])({},n)})}},render:function(){var e=this,t=arguments[0],n=this.mode,a=this.theme,o=this.menu,r={mode:n,theme:a,openKeys:this.openKeys},i={select:function(t){e.selectedKeys=t.selectedKeys,e.$emit("select",t)},openChange:this.onOpenChange},s=o.map(function(t){return t.hidden?null:e.renderItem(t)});return t(A["a"],{props:Object(h["a"])({},r),on:Object(h["a"])({},i),model:{value:e.selectedKeys,callback:function(t){e.selectedKeys=t}}},[s])}},F=P,B={name:"SideMenu",components:{Logo:D,SMenu:F},mixins:[g["a"],g["b"]],props:{mode:{type:String,required:!1,default:"inline"},theme:{type:String,required:!1,default:"dark"},collapsible:{type:Boolean,required:!1,default:!1},collapsed:{type:Boolean,required:!1,default:!1},menus:{type:Array,required:!0}},methods:{onSelect:function(e){this.$emit("menuSelect",e)}}},N=B,U=Object(l["a"])(N,T,O,!1,null,null,null),K=U.exports,q=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"showHeader"}},[e.visible?n("div",{staticClass:"header-animat"},[e.visible?n("a-layout-header",{class:[e.fixedHeader&&"ant-header-fixedHeader",e.sidebarOpened?"ant-header-side-opened":"ant-header-side-closed"],style:{padding:"0"}},["sidemenu"===e.mode?n("div",{staticClass:"header"},["mobile"===e.device?n("a-icon",{staticClass:"trigger",attrs:{type:e.collapsed?"menu-fold":"menu-unfold"},on:{click:e.toggle}}):n("a-icon",{staticClass:"trigger",attrs:{type:e.collapsed?"menu-unfold":"menu-fold"},on:{click:e.toggle}}),n("user-menu")],1):n("div",{class:["top-nav-header-index",e.theme]},[n("div",{staticClass:"header-index-wide"},[n("div",{staticClass:"header-index-left"},["mobile"!==e.device?n("logo",{staticClass:"top-nav-header"}):e._e(),"mobile"!==e.device?n("s-menu",{attrs:{mode:"horizontal",menu:e.menus,theme:e.theme}}):n("a-icon",{staticClass:"trigger",attrs:{type:e.collapsed?"menu-fold":"menu-unfold"},on:{click:e.toggle}})],1),n("user-menu",{staticClass:"header-index-right"})],1)])]):e._e()],1):e._e()])},Y=[],z=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"user-wrapper"},[n("a",{attrs:{href:e.options.blog_url,target:"_blank"}},[n("span",{staticClass:"action"},[n("a-icon",{attrs:{type:"link"}})],1)]),n("a",{attrs:{href:"javascript:void(0)"},on:{click:e.showOptionModal}},[n("span",{staticClass:"action"},[n("a-icon",{attrs:{type:"setting"}})],1)]),n("header-comment",{staticClass:"action"}),n("a-dropdown",[e.user?n("span",{staticClass:"action ant-dropdown-link user-dropdown-menu"},[n("a-avatar",{staticClass:"avatar",attrs:{size:"small",src:e.user.avatar||"//cn.gravatar.com/avatar/?s=256&d=mm"}})],1):e._e(),n("a-menu",{staticClass:"user-dropdown-menu-wrapper",attrs:{slot:"overlay"},slot:"overlay"},[n("a-menu-item",{key:"0"},[n("router-link",{attrs:{to:{name:"Profile"}}},[n("a-icon",{attrs:{type:"user"}}),n("span",[e._v("个人资料")])],1)],1),n("a-menu-divider"),n("a-menu-item",{key:"1"},[n("a",{attrs:{href:"javascript:;"},on:{click:e.handleLogout}},[n("a-icon",{attrs:{type:"logout"}}),n("span",[e._v("退出登录")])],1)])],1)],1),n("setting-drawer",{ref:"drawer"})],1)},W=[],V=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-popover",{attrs:{trigger:"click",placement:"bottomRight",autoAdjustOverflow:!0,arrowPointAtCenter:!0,overlayStyle:{width:"300px",top:"50px"},title:"待审核评论"},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[n("template",{slot:"content"},[n("a-spin",{attrs:{spinning:e.loadding}},[n("div",{staticClass:"custom-tab-wrapper"},[n("a-tabs",[n("a-tab-pane",{key:"1",attrs:{tab:"文章"}},[n("a-list",{attrs:{dataSource:e.converttedPostComments},scopedSlots:e._u([{key:"renderItem",fn:function(t){return n("a-list-item",{},[n("a-list-item-meta",[n("a-avatar",{staticStyle:{"background-color":"white"},attrs:{slot:"avatar",src:"//cn.gravatar.com/avatar/"+t.gravatarMd5+"&d=mm",size:"large"},slot:"avatar"}),n("template",{slot:"title"},[n("a",{attrs:{href:t.authorUrl,target:"_blank"}},[e._v(e._s(t.author))]),e._v(":"),n("span",{domProps:{innerHTML:e._s(t.content)}})]),n("template",{slot:"description"},[e._v("\n "+e._s(e._f("timeAgo")(t.createTime))+"\n ")])],2)],1)}}])})],1),n("a-tab-pane",{key:"2",attrs:{tab:"页面"}},[n("a-list",{attrs:{dataSource:e.converttedSheetComments},scopedSlots:e._u([{key:"renderItem",fn:function(t){return n("a-list-item",{},[n("a-list-item-meta",[n("a-avatar",{staticStyle:{"background-color":"white"},attrs:{slot:"avatar",src:"//cn.gravatar.com/avatar/"+t.gravatarMd5+"&d=mm",size:"large"},slot:"avatar"}),n("template",{slot:"title"},[n("a",{attrs:{href:t.authorUrl,target:"_blank"}},[e._v(e._s(t.author))]),e._v(":"),n("span",{domProps:{innerHTML:e._s(t.content)}})]),n("template",{slot:"description"},[e._v("\n "+e._s(e._f("timeAgo")(t.createTime))+"\n ")])],2)],1)}}])})],1)],1)],1)])],1),n("span",{staticClass:"header-comment",on:{click:e.fetchComment}},[e.postComments.length>0||e.sheetComments.length>0?n("a-badge",{attrs:{dot:""}},[n("a-icon",{attrs:{type:"bell"}})],1):n("a-badge",[n("a-icon",{attrs:{type:"bell"}})],1)],1)],2)},X=[],J=n("063c"),Z=n("ae4d"),Q=n.n(Z),ee={name:"HeaderComment",data:function(){return{loadding:!1,visible:!1,postComments:[],sheetComments:[]}},created:function(){this.getComment()},computed:{converttedPostComments:function(){return this.postComments.map(function(e){return e.content=Q()(e.content,{sanitize:!0}),e})},converttedSheetComments:function(){return this.sheetComments.map(function(e){return e.content=Q()(e.content,{sanitize:!0}),e})}},methods:{fetchComment:function(){this.visible?this.loadding=!1:(this.loadding=!0,this.getComment()),this.visible=!this.visible},getComment:function(){var e=this;J["a"].latestComment("posts",5,"AUDITING").then(function(t){e.postComments=t.data.data,e.loadding=!1}),J["a"].latestComment("sheets",5,"AUDITING").then(function(t){e.sheetComments=t.data.data,e.loadding=!1})}}},te=ee,ne=(n("429a"),Object(l["a"])(te,V,X,!1,null,"9523097a",null)),ae=ne.exports,oe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"settingDrawer",staticClass:"setting-drawer"},[n("a-drawer",{attrs:{width:"300",closable:"",visible:e.visible,zIndex:9999},on:{close:e.onClose}},[n("div",{staticClass:"setting-drawer-index-content"},[n("div",{style:{marginBottom:"24px"}},[n("h3",{staticClass:"setting-drawer-index-title"},[e._v("整体风格设置")]),n("div",{staticClass:"setting-drawer-index-blockChecbox"},[n("a-tooltip",[n("template",{slot:"title"},[e._v("暗色菜单风格")]),n("div",{staticClass:"setting-drawer-index-item",on:{click:function(t){return e.handleMenuTheme("dark")}}},[n("img",{attrs:{src:"https://gw.alipayobjects.com/zos/rmsportal/LCkqqYNmvBEbokSDscrm.svg",alt:"dark"}}),"dark"===e.navTheme?n("div",{staticClass:"setting-drawer-index-selectIcon"},[n("a-icon",{attrs:{type:"check"}})],1):e._e()])],2),n("a-tooltip",[n("template",{slot:"title"},[e._v("亮色菜单风格")]),n("div",{staticClass:"setting-drawer-index-item",on:{click:function(t){return e.handleMenuTheme("light")}}},[n("img",{attrs:{src:"https://gw.alipayobjects.com/zos/rmsportal/jpRkZQMyYRryryPNtyIC.svg",alt:"light"}}),"dark"!==e.navTheme?n("div",{staticClass:"setting-drawer-index-selectIcon"},[n("a-icon",{attrs:{type:"check"}})],1):e._e()])],2)],1)]),n("a-divider"),n("div",{style:{marginBottom:"24px"}},[n("h3",{staticClass:"setting-drawer-index-title"},[e._v("主题色")]),n("div",{staticStyle:{height:"20px"}},e._l(e.colorList,function(t,a){return n("a-tooltip",{key:a,staticClass:"setting-drawer-theme-color-colorBlock"},[n("template",{slot:"title"},[e._v(e._s(t.key))]),n("a-tag",{attrs:{color:t.color},on:{click:function(n){return e.changeColor(t.color)}}},[t.color===e.primaryColor?n("a-icon",{attrs:{type:"check"}}):e._e()],1)],2)}),1)]),n("a-divider"),n("div",{style:{marginBottom:"24px"}},[n("h3",{staticClass:"setting-drawer-index-title"},[e._v("导航模式")]),n("div",{staticClass:"setting-drawer-index-blockChecbox"},[n("div",{staticClass:"setting-drawer-index-item",on:{click:function(t){return e.handleLayout("sidemenu")}}},[n("img",{attrs:{src:"https://gw.alipayobjects.com/zos/rmsportal/JopDzEhOqwOjeNTXkoje.svg",alt:"sidemenu"}}),"sidemenu"===e.layoutMode?n("div",{staticClass:"setting-drawer-index-selectIcon"},[n("a-icon",{attrs:{type:"check"}})],1):e._e()]),n("div",{staticClass:"setting-drawer-index-item",on:{click:function(t){return e.handleLayout("topmenu")}}},[n("img",{attrs:{src:"https://gw.alipayobjects.com/zos/rmsportal/KDNDBbriJhLwuqMoxcAr.svg",alt:"topmenu"}}),"sidemenu"!==e.layoutMode?n("div",{staticClass:"setting-drawer-index-selectIcon"},[n("a-icon",{attrs:{type:"check"}})],1):e._e()])])]),n("a-divider")],1)])],1)},re=[],ie=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"setting-drawer-index-item"},[n("h3",{staticClass:"setting-drawer-index-title"},[e._v(e._s(e.title))]),e._t("default"),e.divider?n("a-divider"):e._e()],2)},se=[],ce={name:"SettingItem",props:{title:{type:String,default:""},divider:{type:Boolean,default:!1}}},ue=ce,le=(n("d25d"),Object(l["a"])(ue,ie,se,!1,null,"e773bc98",null)),de=le.exports,fe=n("d3b0"),me=[{key:"红色",color:"#F5222D"},{key:"浅红色",color:"#FA541C"},{key:"日暮",color:"#FAAD14"},{key:"青色",color:"#13C2C2"},{key:"绿色",color:"#52C41A"},{key:"默认",color:"#1890FF"},{key:"蓝色",color:"#2F54EB"},{key:"紫色",color:"#722ED1"}],he=function(e){if(e){var t=fe["a"].loading("正在编译主题!",0);if(r)i();else{var n=document.createElement("link"),a=document.createElement("script"),o=document.createElement("script");n.setAttribute("rel","stylesheet/less"),n.setAttribute("href","/color.less"),a.innerHTML="\n window.less = {\n async: true,\n env: 'production',\n javascriptEnabled: true\n };\n ",o.src="https://cdnjs.loli.net/ajax/libs/less.js/3.8.1/less.min.js",o.async=!0,o.onload=function(){i(),o.onload=null},document.body.appendChild(n),document.body.appendChild(a),document.body.appendChild(o),r=!0}}function i(){window.less&&setTimeout(function(){window.less.modifyVars({"@primary-color":e}).then(function(){t()}).catch(function(){fe["a"].error("Failed to update theme"),t()})},200)}},pe={components:{SettingItem:de},mixins:[g["a"],g["b"]],data:function(){return{visible:!1,colorList:me,baseConfig:Object.assign({},v["a"])}},watch:{},mounted:function(){this.primaryColor!==v["a"].primaryColor&&he(this.primaryColor)},methods:{showDrawer:function(){this.visible=!0},onClose:function(){this.visible=!1},toggle:function(){this.visible=!this.visible},handleMenuTheme:function(e){this.baseConfig.navTheme=e,this.$store.dispatch("ToggleTheme",e)},handleLayout:function(e){this.baseConfig.layout=e,this.$store.dispatch("ToggleLayoutMode",e),this.handleFixSiderbar(!1)},handleContentWidthChange:function(e){this.baseConfig.contentWidth=e,this.$store.dispatch("ToggleContentWidth",e)},changeColor:function(e){this.baseConfig.primaryColor=e,this.primaryColor!==e&&(this.$store.dispatch("ToggleColor",e),he(e))},handleFixedHeader:function(e){this.baseConfig.fixedHeader=e,this.$store.dispatch("ToggleFixedHeader",e)},handleFixedHeaderHidden:function(e){this.baseConfig.autoHideHeader=e,this.$store.dispatch("ToggleFixedHeaderHidden",e)},handleFixSiderbar:function(e){if("topmenu"===this.layoutMode)return this.baseConfig.fixSiderbar=!1,void this.$store.dispatch("ToggleFixSiderbar",!1);this.baseConfig.fixSiderbar=e,this.$store.dispatch("ToggleFixSiderbar",e)}}},be=pe,ge=(n("ad48"),Object(l["a"])(be,oe,re,!1,null,"ef4d2b56",null)),ve=ge.exports,ye=n("482b"),Ee={name:"UserMenu",components:{HeaderComment:ae,SettingDrawer:ve},data:function(){return{optionVisible:!0,options:[],keys:["blog_url"]}},mounted:function(){this.optionVisible=this.$refs.drawer.visible},created:function(){this.loadOptions()},computed:Object(h["a"])({},Object(b["c"])(["user"])),methods:Object(h["a"])({},Object(b["b"])(["logout"]),{handleLogout:function(){var e=this;this.$confirm({title:"提示",content:"确定要注销登录吗 ?",onOk:function(){return e.logout({}).then(function(){window.location.reload()}).catch(function(t){e.$message.error({title:"错误",description:t.message})})},onCancel:function(){}})},showOptionModal:function(){this.optionVisible=this.$refs.drawer.visible,this.$refs.drawer.toggle()},loadOptions:function(){var e=this;ye["a"].listAll(this.keys).then(function(t){e.options=t.data.data})}})},ke=Ee,_e=(n("62ef"),Object(l["a"])(ke,z,W,!1,null,"c454f398",null)),Ce=_e.exports,Te={name:"GlobalHeader",components:{UserMenu:Ce,SMenu:F,Logo:D},mixins:[g["a"]],props:{mode:{type:String,default:"sidemenu"},menus:{type:Array,required:!0},theme:{type:String,required:!1,default:"dark"},collapsed:{type:Boolean,required:!1,default:!1},device:{type:String,required:!1,default:"desktop"}},data:function(){return{visible:!0,oldScrollTop:0}},mounted:function(){document.body.addEventListener("scroll",this.handleScroll,{passive:!0})},methods:{handleScroll:function(){var e=this;if(this.autoHideHeader){var t=document.body.scrollTop+document.documentElement.scrollTop;this.ticking||(this.ticking=!0,requestAnimationFrame(function(){e.oldScrollTop>t?e.visible=!0:t>300&&e.visible?e.visible=!1:t<300&&!e.visible&&(e.visible=!0),e.oldScrollTop=t,e.ticking=!1}))}},toggle:function(){this.$emit("toggle")}},beforeDestroy:function(){document.body.removeEventListener("scroll",this.handleScroll,!0)}},Oe=Te,Se=(n("05fe"),Object(l["a"])(Oe,q,Y,!1,null,null,null)),xe=Se.exports,we=xe,Le=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"footer"},[n("div",{staticClass:"copyright"},[e._v("\n Proudly power by\n "),n("router-link",{attrs:{to:{name:"About"}}},[n("a",{attrs:{href:"javascript:void(0);"}},[e._v("Halo")])])],1)])},je=[],De={name:"GlobalFooter",data:function(){return{}}},He=De,Me=(n("0645"),Object(l["a"])(He,Le,je,!1,null,"cd222e82",null)),$e=Me.exports,Ae=$e,Ie={name:"BasicLayout",mixins:[g["a"],g["b"]],components:{RouteView:C,SideMenu:K,GlobalHeader:we,GlobalFooter:Ae},data:function(){return{production:v["a"].production,collapsed:!1,menus:[]}},computed:Object(h["a"])({},Object(b["e"])({mainMenu:function(e){return e.permission.addRouters}}),{contentPaddingLeft:function(){return!this.fixSidebar||this.isMobile()?"0":this.sidebarOpened?"256px":"80px"}}),watch:{sidebarOpened:function(e){this.collapsed=!e}},created:function(){this.menus=y["a"].find(function(e){return"/"===e.path}).children,this.collapsed=!this.sidebarOpened},mounted:function(){var e=this,t=navigator.userAgent;t.indexOf("Edge")>-1&&this.$nextTick(function(){e.collapsed=!e.collapsed,setTimeout(function(){e.collapsed=!e.collapsed},16)})},methods:Object(h["a"])({},Object(b["b"])(["setSidebar"]),{toggle:function(){this.collapsed=!this.collapsed,this.setSidebar(!this.collapsed),Object(p["c"])()},paddingCalc:function(){var e="";return e=this.sidebarOpened?this.isDesktop()?"256px":"80px":(this.isMobile()?"0":this.fixSidebar&&"80px")||"0",e},menuSelect:function(){this.isDesktop()||(this.collapsed=!1)},drawerClose:function(){this.collapsed=!1}})},Ge=Ie,Re=(n("6692"),Object(l["a"])(Ge,f,m,!1,null,null,null)),Pe=Re.exports,Fe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{style:e.$route.meta.hiddenHeaderContent?null:"margin: -24px -24px 0px;"},[e.$route.meta.hiddenHeaderContent?e._e():n("page-header",{attrs:{title:e.pageTitle,logo:e.logo,avatar:e.avatar}},[e._t("action",null,{slot:"action"}),e._t("headerContent",null,{slot:"content"}),!this.$slots.headerContent&&e.description?n("div",{attrs:{slot:"content"},slot:"content"},[n("p",{staticStyle:{"font-size":"14px",color:"rgba(0,0,0,.65)"}},[e._v(e._s(e.description))]),n("div",{staticClass:"link"},[e._l(e.linkList,function(t,a){return[n("a",{key:a,attrs:{href:t.href}},[n("a-icon",{attrs:{type:t.icon}}),n("span",[e._v(e._s(t.title))])],1)]})],2)]):e._e()],2),n("div",{staticClass:"content"},[n("div",{staticClass:"page-header-index-wide"},[e._t("default",[n("router-view",{ref:"content"})])],2)])],1)},Be=[],Ne=(n("55a0"),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"page-header"},[n("div",{staticClass:"page-header-index-wide"},[n("s-breadcrumb"),n("div",{staticClass:"detail"},[e.$route.meta.hiddenHeaderContent?e._e():n("div",{staticClass:"main"},[n("div",{staticClass:"row"},[e.logo?n("img",{staticClass:"logo",attrs:{src:e.logo}}):e._e(),n("div",{staticClass:"action"},[e._t("action")],2)]),n("div",{staticClass:"row"},[e.avatar?n("div",{staticClass:"avatar"},[n("a-avatar",{attrs:{src:e.avatar}})],1):e._e(),this.$slots.content?n("div",{staticClass:"headerContent"},[e._t("content")],2):e._e(),this.$slots.extra?n("div",{staticClass:"extra"},[e._t("extra")],2):e._e()]),n("div",[e._t("pageMenu")],2)])])],1)])}),Ue=[],Ke=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-breadcrumb",{staticClass:"breadcrumb"},e._l(e.breadList,function(t,a){return n("a-breadcrumb-item",{key:t.name},[t.name!=e.name&&1!=a?n("router-link",{attrs:{to:{path:""===t.path?"/":t.path}}},[e._v(e._s(t.meta.title))]):n("span",[e._v(e._s(t.meta.title))])],1)}),1)},qe=[],Ye={data:function(){return{name:"",breadList:[]}},created:function(){this.getBreadcrumb()},methods:{getBreadcrumb:function(){var e=this;this.breadList=[],this.name=this.$route.name,this.$route.matched.forEach(function(t){e.breadList.push(t)})}},watch:{$route:function(){this.getBreadcrumb()}}},ze=Ye,We=Object(l["a"])(ze,Ke,qe,!1,null,"86fe166e",null),Ve=We.exports,Xe={name:"PageHeader",components:{"s-breadcrumb":Ve},props:{title:{type:[String,Boolean],default:!0,required:!1},logo:{type:String,default:"",required:!1},avatar:{type:String,default:"",required:!1}},data:function(){return{}}},Je=Xe,Ze=(n("1d26"),Object(l["a"])(Je,Ne,Ue,!1,null,"4ebcc784",null)),Qe=Ze.exports,et=Qe,tt={name:"PageView",components:{PageHeader:et},props:{avatar:{type:String,default:null},title:{type:[String,Boolean],default:!0},logo:{type:String,default:null}},data:function(){return{pageTitle:null,description:null,linkList:[],extraImage:"",search:!1,tabs:{}}},mounted:function(){this.getPageMeta()},updated:function(){this.getPageMeta()},methods:{getPageMeta:function(){this.pageTitle="string"!==typeof this.title&&this.title?this.$route.meta.title:this.title;var e=this.$refs.content;e&&(e.pageMeta?Object.assign(this,e.pageMeta):(this.description=e.description,this.linkList=e.linkList,this.extraImage=e.extraImage,this.search=!0===e.search,this.tabs=e.tabs))}}},nt=tt,at=(n("2987"),Object(l["a"])(nt,Fe,Be,!1,null,"43152b59",null)),ot=at.exports;n.d(t,"a",function(){return Pe}),n.d(t,"b",function(){return ot})},"6e79":function(e,t,n){},9224:function(e){e.exports={a:"1.0.2"}},"9ae4":function(e,t,n){},"9e74":function(e,t,n){},"9efd":function(e,t,n){"use strict";n("4453"),n("f763"),n("fb37");var a=n("089b"),o=n("f753"),r=n.n(o),i=n("38bc"),s=n.n(i),c=(n("70e7"),n("6e6d")),u=n("d25d6"),l=n("d3b0"),d=n("4360"),f=n("a18c"),m=n("ca00"),h=r.a.create({baseURL:"",timeout:5e3,withCredentials:!0});function p(e){var t=d["a"].getters.token;c["a"].$log.debug("Got token from store",t),t&&t.access_token&&(e.headers["Admin-Authorization"]=t.access_token)}function b(e){return g.apply(this,arguments)}function g(){return g=Object(a["a"])(regeneratorRuntime.mark(function e(t){var n,a;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.response.config,p(n),e.next=4,r.a.request(n);case 4:return a=e.sent,e.abrupt("return",a);case 6:case"end":return e.stop()}},e)})),g.apply(this,arguments)}var v=null;function y(e){return E.apply(this,arguments)}function E(){return E=Object(a["a"])(regeneratorRuntime.mark(function e(t){var n;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=d["a"].getters.token.refresh_token,e.prev=1,null===v&&(v=d["a"].dispatch("refreshToken",n)),e.next=5,v;case 5:e.next=11;break;case 7:e.prev=7,e.t0=e["catch"](1),e.t0.response&&e.t0.response.data&&e.t0.response.data.data===n&&f["a"].push({name:"Login"}),c["a"].$log.error("Failed to refresh token",e.t0);case 11:return e.prev=11,v=null,e.finish(11);case 14:return e.abrupt("return",b(t));case 15:case"end":return e.stop()}},e,null,[[1,7,11,14]])})),E.apply(this,arguments)}function k(e){if(!Object(m["a"])(e)||!Object(m["a"])(e.data))return null;var t=e.data;return Object.keys(t).map(function(e){return t[e]})}h.interceptors.request.use(function(e){return e.mute||s.a.start(),p(e),e},function(e){return s.a.remove(),Promise.reject(e)}),h.interceptors.response.use(function(e){return s.a.done(),e},function(e){if(s.a.done(),r.a.isCancel(e))return c["a"].$log.debug("Cancelled uploading by user."),Promise.reject(e);c["a"].$log.error("Response failed",e);var t=e.response,n=t?t.status:-1;c["a"].$log.error("Server response status",n);var a=t?t.data:null;if(a){var o=!1;if(c["a"].$log.error("Business response status",a.status),400===a.status){var i=k(a);i&&(o=!0,u["a"].error({message:a.message,description:function(e){var t=i.map(function(t){return e("a-alert",{props:{message:t,banner:!0,showIcon:!1,type:"error"}})});return e("div",t)},duration:10}))}else if(401===a.status)if(d["a"].getters.token&&d["a"].getters.token.access_token===a.data){var m=y(e);if(m!==e)return m}else f["a"].push({name:"Login"});else 403===a.status||404===a.status||a.status;o||l["a"].error(a.message)}else l["a"].error("服务异常");return Promise.reject(e)}),t["a"]=h},"9fb0":function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"i",function(){return o}),n.d(t,"h",function(){return r}),n.d(t,"g",function(){return i}),n.d(t,"b",function(){return s}),n.d(t,"d",function(){return c}),n.d(t,"f",function(){return u}),n.d(t,"e",function(){return l}),n.d(t,"c",function(){return d}),n.d(t,"j",function(){return f});var a="Access-Token",o="SIDEBAR_TYPE",r="DEFAULT_THEME",i="DEFAULT_LAYOUT_MODE",s="DEFAULT_COLOR",c="DEFAULT_FIXED_HEADER",u="DEFAULT_FIXED_SIDEMENU",l="DEFAULT_FIXED_HEADER_HIDDEN",d="DEFAULT_CONTENT_WIDTH_TYPE",f="USER"},a18c:function(e,t,n){"use strict";var a=n("6e6d"),o=n("1e6f"),r=n("d73b");a["a"].use(o["a"]),t["a"]=new o["a"]({mode:"hash",base:"/",scrollBehavior:function(){return{y:0}},routes:r["b"].concat(r["a"])})},ac0d:function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"b",function(){return s});var a=n("e20c"),o=n("51e6"),r=n("591a"),i={computed:Object(a["a"])({},Object(r["e"])({layoutMode:function(e){return e.app.layout},navTheme:function(e){return e.app.theme},primaryColor:function(e){return e.app.color},fixedHeader:function(e){return e.app.fixedHeader},fixSiderbar:function(e){return e.app.fixSiderbar},fixSidebar:function(e){return e.app.fixSiderbar},contentWidth:function(e){return e.app.contentWidth},autoHideHeader:function(e){return e.app.autoHideHeader},sidebarOpened:function(e){return e.app.sidebar}})),methods:{isTopMenu:function(){return"topmenu"===this.layoutMode},isSideMenu:function(){return!this.isTopMenu()}}},s={computed:Object(a["a"])({},Object(r["e"])({device:function(e){return e.app.device}})),methods:{isMobile:function(){return this.device===o["a"].MOBILE},isDesktop:function(){return this.device===o["a"].DESKTOP},isTablet:function(){return this.device===o["a"].TABLET}}}},ad48:function(e,t,n){"use strict";var a=n("3bc0"),o=n.n(a);o.a},bc6c:function(e,t,n){},c24f:function(e,t,n){"use strict";var a=n("9efd"),o="/api/admin/users",r={getProfile:function(){return Object(a["a"])({url:"".concat(o,"/profiles"),method:"get"})},updateProfile:function(e){return Object(a["a"])({url:"".concat(o,"/profiles"),method:"put",data:e})},updatePassword:function(e,t){return Object(a["a"])({url:"".concat(o,"/profiles/password"),method:"put",data:{oldPassword:e,newPassword:t}})}};t["a"]=r},c8df:function(e,t,n){},ca00:function(e,t,n){"use strict";n.d(t,"c",function(){return i}),n.d(t,"b",function(){return s}),n.d(t,"a",function(){return c});var a=n("3d92"),o=n("6bf2"),r=n.n(o);n("35d0");function i(){var e=document.createEvent("HTMLEvents");e.initEvent("resize",!0,!0),e.eventType="message",window.dispatchEvent(e)}function s(e){var t=(new Date).getTime(),n=t-e,a=Math.floor(n/864e5);if(0===a){var o=n%864e5,i=Math.floor(o/36e5);if(0===i){var s=o%36e5,c=Math.floor(s/6e4);if(0===c){var u=s%6e4,l=Math.round(u/1e3);return l+" 秒前"}return c+" 分钟前"}return i+" 小时前"}return a<0?"刚刚":a<5?a+" 天前":r()(e).format("YYYY-MM-DD HH:mm")}function c(e){return e&&"object"===Object(a["a"])(e)&&e.constructor===Object}},d25d:function(e,t,n){"use strict";var a=n("f942"),o=n.n(a);o.a},d630:function(e,t,n){},d73b:function(e,t,n){"use strict";n.d(t,"a",function(){return o}),n.d(t,"b",function(){return r});var a=n("680ad"),o=[{path:"/",name:"index",component:a["a"],meta:{title:"首页"},redirect:"/dashboard",children:[{path:"/dashboard",name:"Dashboard",component:function(){return n.e("chunk-81d936d8").then(n.bind(null,"5c3a"))},meta:{title:"仪表盘",icon:"dashboard",hiddenHeaderContent:!1}},{path:"/posts",name:"Posts",redirect:"/posts/list",component:a["b"],meta:{title:"文章",icon:"form"},children:[{path:"/posts/list",name:"PostList",component:function(){return n.e("chunk-87e2df70").then(n.bind(null,"dae2"))},meta:{title:"所有文章",hiddenHeaderContent:!1}},{path:"/posts/write",name:"PostEdit",component:function(){return Promise.all([n.e("chunk-c0a1d3c4"),n.e("chunk-bfd5bbcc")]).then(n.bind(null,"db44"))},meta:{title:"写文章",hiddenHeaderContent:!1}},{path:"/categories",name:"CategoryList",component:function(){return n.e("chunk-0337f7a6").then(n.bind(null,"7e89"))},meta:{title:"分类目录",hiddenHeaderContent:!1}},{path:"/tags",name:"TagList",component:function(){return n.e("chunk-0ba750a2").then(n.bind(null,"aa1e"))},meta:{title:"标签",hiddenHeaderContent:!1}}]},{path:"/sheets",name:"Sheets",component:a["b"],redirect:"/sheets/list",meta:{title:"页面",icon:"read"},children:[{path:"/sheets/list",name:"SheetList",component:function(){return n.e("chunk-142c8832").then(n.bind(null,"a8ed"))},meta:{title:"所有页面",hiddenHeaderContent:!1}},{path:"/sheets/write",name:"SheetEdit",component:function(){return Promise.all([n.e("chunk-c0a1d3c4"),n.e("chunk-31c8ea42")]).then(n.bind(null,"f585"))},meta:{title:"新建页面",hiddenHeaderContent:!1}},{path:"/sheets/links",name:"LinkList",hidden:!0,component:function(){return n.e("chunk-2d21a35c").then(n.bind(null,"bb17"))},meta:{title:"友情链接",hiddenHeaderContent:!1}},{path:"/sheets/photos",name:"PhotoList",hidden:!0,component:function(){return n.e("chunk-6d8b31f6").then(n.bind(null,"6d0d"))},meta:{title:"图库",hiddenHeaderContent:!1}},{path:"/sheets/journals",name:"JournalList",hidden:!0,component:function(){return n.e("chunk-5bf599cc").then(n.bind(null,"81a6"))},meta:{title:"日志",hiddenHeaderContent:!1}}]},{path:"/attachments",name:"Attachments",component:function(){return n.e("chunk-5000e55c").then(n.bind(null,"61d0"))},meta:{title:"附件",icon:"picture",hiddenHeaderContent:!1}},{path:"/comments",name:"Comments",component:function(){return n.e("chunk-2d0b64bf").then(n.bind(null,"1d0f"))},meta:{title:"评论",icon:"message",hiddenHeaderContent:!1}},{path:"/interface",name:"Interface",component:a["b"],redirect:"/interface/themes",meta:{title:"外观",icon:"skin"},children:[{path:"/interface/themes",name:"ThemeList",component:function(){return n.e("chunk-434a7762").then(n.bind(null,"79e7"))},meta:{title:"主题",hiddenHeaderContent:!1}},{path:"/interface/menus",name:"MenuList",component:function(){return n.e("chunk-2d0d65a2").then(n.bind(null,"71d6"))},meta:{title:"菜单",hiddenHeaderContent:!1}},{path:"/interface/themes/edit",name:"ThemeEdit",component:function(){return n.e("chunk-161dc990").then(n.bind(null,"33c9"))},meta:{title:"主题编辑",hiddenHeaderContent:!1}}]},{path:"/user",name:"User",component:a["b"],redirect:"/user/profile",meta:{title:"用户",icon:"user"},children:[{path:"/user/profile",name:"Profile",component:function(){return n.e("chunk-b2d0b040").then(n.bind(null,"7c54"))},meta:{title:"个人资料",hiddenHeaderContent:!1}}]},{path:"/system",name:"System",component:a["b"],redirect:"/system/options",meta:{title:"系统",icon:"setting"},children:[{path:"/system/options",name:"OptionForm",component:function(){return n.e("chunk-bb4f0d4a").then(n.bind(null,"26ea"))},meta:{title:"博客设置",hiddenHeaderContent:!1}},{path:"/system/tools",name:"ToolList",component:function(){return n.e("chunk-2d228d13").then(n.bind(null,"db98"))},meta:{title:"小工具",hiddenHeaderContent:!1}},{path:"/system/about",name:"About",component:function(){return n.e("chunk-1be69b35").then(n.bind(null,"2967"))},meta:{title:"关于",hiddenHeaderContent:!1}}]}]},{path:"*",redirect:"/404",hidden:!0}],r=[{path:"/login",name:"Login",meta:{title:"登录"},component:function(){return n.e("chunk-cec31564").then(n.bind(null,"ac2a"))}},{path:"/install",name:"Install",meta:{title:"安装向导"},component:function(){return n.e("chunk-14e0b302").then(n.bind(null,"306f"))}},{path:"/404",name:"NotFound",component:function(){return n.e("fail").then(n.bind(null,"cc89"))}}]},e819:function(e,t,n){"use strict";t["a"]={primaryColor:"#1890FF",navTheme:"dark",layout:"topmenu",contentWidth:"Fixed",fixedHeader:!1,fixSiderbar:!1,autoHideHeader:!1,storageOptions:{namespace:"halo__",name:"ls",storage:"local"}}},f607:function(e,t,n){},f942:function(e,t,n){}}); \ No newline at end of file diff --git a/src/main/resources/admin/js/chunk-1079f749.ec67c7db.js b/src/main/resources/admin/js/chunk-1079f749.ec67c7db.js deleted file mode 100644 index 964a3e130..000000000 --- a/src/main/resources/admin/js/chunk-1079f749.ec67c7db.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1079f749"],{"12de":function(t,e,a){"use strict";var n=a("9efd"),i="/api/admin/themes",o={listAll:function(){return Object(n["a"])({url:"".concat(i),method:"get"})},listFiles:function(){return Object(n["a"])({url:"".concat(i,"/files"),method:"get"})},customTpls:function(){return Object(n["a"])({url:"".concat(i,"/files/custom"),method:"get"})},active:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t,"/activation"),method:"post"})},getActivatedTheme:function(){return Object(n["a"])({url:"".concat(i,"/activation"),method:"get"})},update:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t),timeout:6e4,method:"put"})},delete:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"delete"})},fetchConfiguration:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t,"/configurations"),method:"get"})},fetchSettings:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t,"/settings"),method:"get"})},saveSettings:function(t,e){return Object(n["a"])({url:"".concat(i,"/").concat(t,"/settings"),data:e,method:"post"})},getProperty:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"get"})},upload:function(t,e,a){return Object(n["a"])({url:"".concat(i,"/upload"),timeout:864e5,data:t,onUploadProgress:e,cancelToken:a,method:"post"})},fetching:function(t){return Object(n["a"])({url:"".concat(i,"/fetching"),timeout:6e4,params:{uri:t},method:"post"})},getContent:function(t){return Object(n["a"])({url:"".concat(i,"/files/content"),params:{path:t},method:"get"})},saveContent:function(t,e){return Object(n["a"])({url:"".concat(i,"/files/content"),params:{path:t},data:e,method:"put"})},reload:function(){return Object(n["a"])({url:"".concat(i,"/reload"),method:"post"})},exists:function(t){return Object(n["a"])({url:"".concat(i,"/activation/template/exists"),method:"get",params:{template:t}})}};e["a"]=o},"4cb6":function(t,e,a){},"5bcf":function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-drawer",{attrs:{title:"附件详情",width:t.isMobile()?"100%":"460",closable:"",visible:t.visiable,destroyOnClose:""},on:{close:t.onClose}},[a("a-row",{attrs:{type:"flex",align:"middle"}},[a("a-col",{attrs:{span:24}},[a("a-skeleton",{attrs:{active:"",loading:t.detailLoading,paragraph:{rows:8}}},[a("div",{staticClass:"attach-detail-img"},[a("img",{attrs:{src:t.attachment.path}})])])],1),a("a-divider"),a("a-col",{attrs:{span:24}},[a("a-skeleton",{attrs:{active:"",loading:t.detailLoading,paragraph:{rows:8}}},[a("a-list",{attrs:{itemLayout:"horizontal"}},[a("a-list-item",[a("a-list-item-meta",[t.editable?a("template",{slot:"description"},[a("a-input",{on:{blur:t.doUpdateAttachment},model:{value:t.attachment.name,callback:function(e){t.$set(t.attachment,"name",e)},expression:"attachment.name"}})],1):a("template",{slot:"description"},[t._v(t._s(t.attachment.name))]),a("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 附件名:\n "),a("a",{attrs:{href:"javascript:void(0);"}},[a("a-icon",{attrs:{type:"edit"},on:{click:t.handleEditName}})],1)])],2)],1),a("a-list-item",[a("a-list-item-meta",{attrs:{description:t.attachment.mediaType}},[a("span",{attrs:{slot:"title"},slot:"title"},[t._v("附件类型:")])])],1),a("a-list-item",[a("a-list-item-meta",{attrs:{description:t.attachment.typeProperty}},[a("span",{attrs:{slot:"title"},slot:"title"},[t._v("存储位置:")])])],1),a("a-list-item",[a("a-list-item-meta",[a("template",{slot:"description"},[t._v("\n "+t._s(t._f("fileSizeFormat")(t.attachment.size))+"\n ")]),a("span",{attrs:{slot:"title"},slot:"title"},[t._v("附件大小:")])],2)],1),a("a-list-item",[a("a-list-item-meta",{attrs:{description:t.attachment.height+"x"+t.attachment.width}},[a("span",{attrs:{slot:"title"},slot:"title"},[t._v("图片尺寸:")])])],1),a("a-list-item",[a("a-list-item-meta",[a("template",{slot:"description"},[t._v("\n "+t._s(t._f("moment")(t.attachment.createTime))+"\n ")]),a("span",{attrs:{slot:"title"},slot:"title"},[t._v("上传日期:")])],2)],1),a("a-list-item",[a("a-list-item-meta",{attrs:{description:t.attachment.path}},[a("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 普通链接:\n "),a("a",{attrs:{href:"javascript:void(0);"}},[a("a-icon",{attrs:{type:"copy"},on:{click:t.handleCopyNormalLink}})],1)])])],1),a("a-list-item",[a("a-list-item-meta",[a("span",{attrs:{slot:"description"},slot:"description"},[t._v("!["+t._s(t.attachment.name)+"]("+t._s(t.attachment.path)+")")]),a("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n Markdown 格式:\n "),a("a",{attrs:{href:"javascript:void(0);"}},[a("a-icon",{attrs:{type:"copy"},on:{click:t.handleCopyMarkdownLink}})],1)])])],1)],1)],1)],1)],1),a("a-divider",{staticClass:"divider-transparent"}),a("div",{staticClass:"bottom-control"},[t.addToPhoto?a("a-popconfirm",{attrs:{title:"你确定要添加到图库?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleAddToPhoto}},[a("a-button",{staticStyle:{marginRight:"8px"},attrs:{type:"dashed"}},[t._v("添加到图库")])],1):t._e(),a("a-popconfirm",{attrs:{title:"你确定要删除该附件?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleDeleteAttachment}},[a("a-button",{attrs:{type:"danger"}},[t._v("删除")])],1)],1)],1)},i=[],o=(a("7364"),a("ac0d")),s=a("a796"),l=a("975e"),r={name:"AttachmentDetailDrawer",mixins:[o["a"],o["b"]],data:function(){return{detailLoading:!0,editable:!1,photo:{}}},model:{prop:"visiable",event:"close"},props:{attachment:{type:Object,required:!0},addToPhoto:{type:Boolean,required:!1,default:!1},visiable:{type:Boolean,required:!1,default:!0}},created:function(){this.loadSkeleton()},watch:{visiable:function(t,e){this.$log.debug("old value",e),this.$log.debug("new value",t),t&&this.loadSkeleton()}},methods:{loadSkeleton:function(){var t=this;this.detailLoading=!0,setTimeout(function(){t.detailLoading=!1},500)},handleDeleteAttachment:function(){var t=this;s["a"].delete(this.attachment.id).then(function(e){t.$message.success("删除成功!"),t.$emit("delete",t.attachment),t.onClose()})},handleEditName:function(){this.editable=!this.editable},doUpdateAttachment:function(){var t=this;s["a"].update(this.attachment.id,this.attachment).then(function(e){t.$log.debug("Updated attachment",e.data.data),t.$message.success("附件修改成功!")}),this.editable=!1},handleCopyNormalLink:function(){var t=this,e="".concat(this.attachment.path);this.$copyText(e).then(function(e){console.log("copy",e),t.$message.success("复制成功!")}).catch(function(e){console.log("copy.err",e),t.$message.error("复制失败!")})},handleCopyMarkdownLink:function(){var t=this,e="![".concat(this.attachment.name,"](").concat(this.attachment.path,")");this.$copyText(e).then(function(e){console.log("copy",e),t.$message.success("复制成功!")}).catch(function(e){console.log("copy.err",e),t.$message.error("复制失败!")})},handleAddToPhoto:function(){var t=this;this.photo["name"]=this.attachment.name,this.photo["thumbnail"]=this.attachment.thumbPath,this.photo["url"]=this.attachment.path,this.photo["takeTime"]=(new Date).getTime(),l["a"].create(this.photo).then(function(e){t.$message.success("添加成功!")})},onClose:function(){this.$emit("close",!1)}}},c=r,d=(a("b3a7"),a("17cc")),u=Object(d["a"])(c,n,i,!1,null,null,null);e["a"]=u.exports},"5f9f":function(t,e,a){"use strict";var n=a("4cb6"),i=a.n(n);i.a},"79e7":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=this,a=e.$createElement,n=e._self._c||a;return n("div",{staticClass:"page-header-index-wide"},[n("a-row",{attrs:{gutter:12,type:"flex",align:"middle"}},[n("a-col",{attrs:{span:24}},[n("a-list",{attrs:{grid:{gutter:12,xs:1,sm:1,md:2,lg:4,xl:4,xxl:4},dataSource:e.themes,loading:e.themeLoading},scopedSlots:e._u([{key:"renderItem",fn:function(t,a){return n("a-list-item",{key:a},[n("a-card",{attrs:{hoverable:"",title:t.name,bodyStyle:{padding:0}}},[n("div",{staticClass:"theme-thumb"},[n("img",{attrs:{alt:t.name,src:t.screenshots}})]),n("template",{staticClass:"ant-card-actions",slot:"actions"},[t.activated?n("div",[n("a-icon",{attrs:{type:"unlock",theme:"twoTone"}}),e._v("已启用\n ")],1):n("div",{on:{click:function(a){return e.handleActivateClick(t)}}},[n("a-icon",{attrs:{type:"lock"}}),e._v("启用\n ")],1),n("div",{on:{click:function(a){return e.handleEditClick(t)}}},[n("a-icon",{attrs:{type:"setting"}}),e._v("设置\n ")],1),n("a-dropdown",{attrs:{placement:"topCenter",trigger:["click"]}},[n("a",{staticClass:"ant-dropdown-link",attrs:{href:"#"}},[n("a-icon",{attrs:{type:"ellipsis"}}),e._v("更多\n ")],1),n("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[n("a-menu-item",{key:1,attrs:{disabled:t.activated}},[t.activated?n("span",[n("a-icon",{attrs:{type:"delete"}}),e._v("删除\n ")],1):n("a-popconfirm",{attrs:{title:"确定删除【"+t.name+"】主题?",okText:"确定",cancelText:"取消"},on:{confirm:function(a){return e.handleDeleteTheme(t.id)}}},[n("a-icon",{attrs:{type:"delete"}}),e._v("删除\n ")],1)],1),n("a-menu-item",{key:2},[n("a-popconfirm",{attrs:{title:"确定更新【"+t.name+"】主题?",okText:"确定",cancelText:"取消"},on:{confirm:function(a){return e.handleUpdateTheme(t.id)}}},[n("a-icon",{attrs:{type:"download"}}),e._v("更新\n ")],1)],1)],1)],1)],1)],2)],1)}}])})],1)],1),e.themeProperty?n("a-drawer",{attrs:{title:e.themeProperty.name+" 主题设置",width:"100%",closable:"",visible:e.visible,destroyOnClose:""},on:{close:e.onClose}},[n("a-row",{attrs:{gutter:12,type:"flex"}},[n("a-col",{attrs:{xl:12,lg:12,md:12,sm:24,xs:24}},[n("a-skeleton",{attrs:{active:"",loading:e.optionLoading,paragraph:{rows:10}}},[n("a-card",{attrs:{bordered:!1}},[n("img",{attrs:{slot:"cover",alt:e.themeProperty.name,src:e.themeProperty.screenshots},slot:"cover"}),n("a-card-meta",{attrs:{description:e.themeProperty.description}},[n("template",{slot:"title"},[n("a",{attrs:{href:e.themeProperty.author.website,target:"_blank"}},[e._v(e._s(e.themeProperty.author.name))])]),e.themeProperty.logo?n("a-avatar",{attrs:{slot:"avatar",src:e.themeProperty.logo,size:"large"},slot:"avatar"}):n("a-avatar",{attrs:{slot:"avatar",size:"large"},slot:"avatar"},[e._v(e._s(e.themeProperty.author.name))])],2)],1)],1)],1),n("a-col",{staticStyle:{"padding-bottom":"50px"},attrs:{xl:12,lg:12,md:12,sm:24,xs:24}},[n("a-skeleton",{attrs:{active:"",loading:e.optionLoading,paragraph:{rows:20}}},[n("div",{staticClass:"card-container"},[e.themeConfiguration.length>0?n("a-tabs",{attrs:{type:"card",defaultActiveKey:"0"}},e._l(e.themeConfiguration,function(t,a){return n("a-tab-pane",{key:a.toString(),attrs:{tab:t.label}},[n("a-form",{attrs:{layout:"vertical"}},e._l(t.items,function(t,a){return n("a-form-item",{key:a,attrs:{label:t.label+":","wrapper-col":e.wrapperCol}},["TEXT"==t.type?n("a-input",{attrs:{defaultValue:t.defaultValue,placeholder:t.placeholder},model:{value:e.themeSettings[t.name],callback:function(a){e.$set(e.themeSettings,t.name,a)},expression:"themeSettings[item.name]"}}):"TEXTAREA"==t.type?n("a-input",{attrs:{type:"textarea",autosize:{minRows:5},placeholder:t.placeholder},model:{value:e.themeSettings[t.name],callback:function(a){e.$set(e.themeSettings,t.name,a)},expression:"themeSettings[item.name]"}}):"RADIO"==t.type?n("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["radio-group"],expression:"['radio-group']"}],attrs:{defaultValue:t.defaultValue},model:{value:e.themeSettings[t.name],callback:function(a){e.$set(e.themeSettings,t.name,a)},expression:"themeSettings[item.name]"}},e._l(t.options,function(t,a){return n("a-radio",{key:a,attrs:{value:t.value}},[e._v(e._s(t.label))])}),1):"SELECT"==t.type?n("a-select",{attrs:{defaultValue:t.defaultValue},model:{value:e.themeSettings[t.name],callback:function(a){e.$set(e.themeSettings,t.name,a)},expression:"themeSettings[item.name]"}},e._l(t.options,function(t){return n("a-select-option",{key:t.value,attrs:{value:t.value}},[e._v(e._s(t.label))])}),1):e._e()],1)}),1)],1)}),1):n("a-alert",{attrs:{message:"当前主题暂无设置选项",banner:""}})],1)])],1)],1),e.themeConfiguration.length>0?n("footer-tool-bar",{style:{width:e.isSideMenu()&&e.isDesktop()?"calc(100% - "+(e.sidebarOpened?256:80)+"px)":"100%"}},[n("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveSettings}},[e._v("保存")]),n("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"dashed"},on:{click:function(){return t.attachmentDrawerVisible=!0}}},[e._v("附件库")])],1):e._e(),n("AttachmentDrawer",{model:{value:e.attachmentDrawerVisible,callback:function(t){e.attachmentDrawerVisible=t},expression:"attachmentDrawerVisible"}})],1):e._e(),n("div",{staticClass:"upload-button"},[n("a-dropdown",{attrs:{placement:"topLeft",trigger:["click"]}},[n("a-button",{attrs:{type:"primary",shape:"circle",icon:"plus",size:"large"}}),n("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[n("a-menu-item",[n("a",{attrs:{rel:"noopener noreferrer",href:"javascript:void(0);"},on:{click:function(){return t.uploadVisible=!0}}},[e._v("安装主题")])]),n("a-menu-item",[n("a",{attrs:{rel:"noopener noreferrer",href:"javascript:void(0);"},on:{click:e.handleReload}},[e._v("刷新列表")])])],1)],1)],1),n("a-modal",{attrs:{title:"安装主题",footer:null,bodyStyle:{padding:"0 24px 24px"}},model:{value:e.uploadVisible,callback:function(t){e.uploadVisible=t},expression:"uploadVisible"}},[n("div",{staticClass:"custom-tab-wrapper"},[n("a-tabs",[n("a-tab-pane",{key:"1",attrs:{tab:"远程拉取"}},[n("a-form",{attrs:{layout:"vertical"}},[n("a-form-item",{attrs:{label:"远程地址:"}},[n("a-input",{model:{value:e.fetchingUrl,callback:function(t){e.fetchingUrl=t},expression:"fetchingUrl"}})],1),n("a-form-item",[n("a-button",{attrs:{type:"primary",loading:e.fetchButtonLoading},on:{click:e.handleFetching}},[e._v("下载")])],1)],1),n("a-alert",{attrs:{type:"info",closable:""}},[n("template",{slot:"message"},[e._v("\n 远程地址即主题仓库地址,如:https://github.com/halo-dev/halo-theme-quick-starter。\n "),n("br"),e._v("更多主题请访问:\n "),n("a",{attrs:{target:"_blank",href:"https://halo.run/theme"}},[e._v("https://halo.run/theme")])])],2)],1),n("a-tab-pane",{key:"2",attrs:{tab:"本地上传"}},[n("upload",{attrs:{name:"file",multiple:"",accept:"application/zip",uploadHandler:e.uploadHandler},on:{change:e.handleChange,success:e.handleUploadSuccess}},[n("p",{staticClass:"ant-upload-drag-icon"},[n("a-icon",{attrs:{type:"inbox"}})],1),n("p",{staticClass:"ant-upload-text"},[e._v("点击选择主题或将主题拖拽到此处")]),n("p",{staticClass:"ant-upload-hint"},[e._v("支持单个或批量上传,仅支持 ZIP 格式的文件")])])],1)],1)],1)])],1)},i=[],o=(a("7364"),a("608b"),a("ed4e")),s=a("5a70"),l=a("ac0d"),r=a("12de"),c={components:{AttachmentDrawer:o["a"],FooterToolBar:s["a"]},mixins:[l["a"],l["b"]],data:function(){return{themeLoading:!1,optionLoading:!0,uploadVisible:!1,fetchButtonLoading:!1,wrapperCol:{xl:{span:12},lg:{span:12},sm:{span:24},xs:{span:24}},attachmentDrawerVisible:!1,themes:[],visible:!1,themeConfiguration:null,themeSettings:[],themeProperty:null,fetchingUrl:null,uploadHandler:r["a"].upload}},computed:{activatedTheme:function(){return this.themes.find(function(t){return t.activated})}},created:function(){this.loadThemes()},destroyed:function(){this.visible&&(this.visible=!1)},beforeRouteLeave:function(t,e,a){this.visible&&(this.visible=!1),a()},methods:{loadThemes:function(){var t=this;this.themeLoading=!0,r["a"].listAll().then(function(e){t.themes=e.data.data,t.themeLoading=!1})},settingDrawer:function(t){var e=this;this.visible=!0,this.optionLoading=!0,this.themeProperty=t,r["a"].fetchConfiguration(t.id).then(function(a){e.themeConfiguration=a.data.data,r["a"].fetchSettings(t.id).then(function(t){e.themeSettings=t.data.data,setTimeout(function(){e.visible=!0,e.optionLoading=!1},300)})})},activeTheme:function(t){var e=this;r["a"].active(t).then(function(t){e.$message.success("设置成功!"),e.loadThemes()})},handleUpdateTheme:function(t){var e=this;r["a"].update(t).then(function(t){e.$message.success("更新成功!"),e.loadThemes()})},handleDeleteTheme:function(t){var e=this;r["a"].delete(t).then(function(t){e.$message.success("删除成功!"),e.loadThemes()})},handleSaveSettings:function(){var t=this;r["a"].saveSettings(this.themeProperty.id,this.themeSettings).then(function(e){t.$message.success("保存成功!")})},onClose:function(){this.visible=!1,this.optionLoading=!1,this.themeConfiguration=null,this.themeProperty=null},handleChange:function(t){var e=t.file.status;"done"===e?this.$message.success("".concat(t.file.name," 主题上传成功!")):"error"===e&&this.$message.error("".concat(t.file.name," 主题上传失败!"))},handleUploadSuccess:function(){this.uploadVisible=!1,this.loadThemes()},handleEllipsisClick:function(t){this.$log.debug("Ellipsis clicked",t)},handleEditClick:function(t){this.settingDrawer(t)},handleActivateClick:function(t){this.activeTheme(t.id)},handleFetching:function(){var t=this;this.fetchButtonLoading=!0,r["a"].fetching(this.fetchingUrl).then(function(e){t.$message.success("拉取成功!"),t.uploadVisible=!1,t.loadThemes()}).finally(function(){t.fetchButtonLoading=!1})},handleReload:function(){var t=this;r["a"].reload().then(function(e){t.loadThemes(),t.$message.success("刷新成功!")})}}},d=c,u=(a("a1a0"),a("17cc")),h=Object(u["a"])(d,n,i,!1,null,"0ce6900e",null);e["default"]=h.exports},9298:function(t,e,a){},"975e":function(t,e,a){"use strict";var n=a("9efd"),i="/api/admin/photos",o={query:function(t){return Object(n["a"])({url:i,params:t,method:"get"})},create:function(t){return Object(n["a"])({url:i,data:t,method:"post"})},update:function(t,e){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"put",data:e})},delete:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"delete"})}};e["a"]=o},a1a0:function(t,e,a){"use strict";var n=a("a7cf"),i=a.n(n);i.a},a796:function(t,e,a){"use strict";var n=a("f753"),i=a.n(n),o=a("9efd"),s="/api/admin/attachments",l={query:function(t){return Object(o["a"])({url:s,params:t,method:"get"})},get:function(t){return Object(o["a"])({url:"".concat(s,"/").concat(t),method:"get"})},delete:function(t){return Object(o["a"])({url:"".concat(s,"/").concat(t),method:"delete"})},update:function(t,e){return Object(o["a"])({url:"".concat(s,"/").concat(t),method:"put",data:e})},getMediaTypes:function(){return Object(o["a"])({url:"".concat(s,"/media_types"),method:"get"})}};l.CancelToken=i.a.CancelToken,l.isCancel=i.a.isCancel,l.upload=function(t,e,a){return Object(o["a"])({url:"".concat(s,"/upload"),timeout:864e4,data:t,onUploadProgress:e,cancelToken:a,method:"post"})},l.uploads=function(t,e,a){return Object(o["a"])({url:"".concat(s,"/uploads"),timeout:864e4,data:t,onUploadProgress:e,cancelToken:a,method:"post"})},l.type={LOCAL:{type:"local",text:"本地"},SMMS:{type:"smms",text:"SM.MS"},UPYUN:{type:"upyun",text:"又拍云"},QNYUN:{type:"qnyun",text:"七牛云"},ALIYUN:{type:"aliyun",text:"阿里云"}},e["a"]=l},a7cf:function(t,e,a){},b3a7:function(t,e,a){"use strict";var n=a("9298"),i=a.n(n);i.a},ed4e:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-drawer",{attrs:{title:"附件库",width:t.isMobile()?"100%":"460",closable:"",visible:t.visiable,destroyOnClose:""},on:{close:t.onClose}},[a("a-row",{attrs:{type:"flex",align:"middle"}},[a("a-input-search",{attrs:{placeholder:"搜索附件",enterButton:""},on:{search:function(e){return t.loadAttachments(!0)}},model:{value:t.queryParam.keyword,callback:function(e){t.$set(t.queryParam,"keyword",e)},expression:"queryParam.keyword"}})],1),a("a-divider"),a("a-row",{attrs:{type:"flex",align:"middle"}},[a("a-skeleton",{attrs:{active:"",loading:t.skeletonLoading,paragraph:{rows:18}}},[a("a-col",{attrs:{span:24}},t._l(t.formattedDatas,function(e,n){return a("div",{key:n,staticClass:"attach-item",on:{click:function(a){return t.handleShowDetailDrawer(e)}}},[a("img",{attrs:{src:e.thumbPath}})])}),0)],1)],1),a("a-divider"),a("div",{staticClass:"page-wrapper"},[a("a-pagination",{attrs:{defaultPageSize:t.pagination.size,total:t.pagination.total},on:{change:t.handlePaginationChange}})],1),t.selectedAttachment?a("AttachmentDetailDrawer",{attrs:{attachment:t.selectedAttachment},on:{delete:t.handleDelete},model:{value:t.detailVisiable,callback:function(e){t.detailVisiable=e},expression:"detailVisiable"}}):t._e(),a("a-divider",{staticClass:"divider-transparent"}),a("div",{staticClass:"bottom-control"},[a("a-button",{attrs:{type:"primary"},on:{click:t.handleShowUploadModal}},[t._v("上传附件")])],1)],1),a("a-modal",{attrs:{title:"上传附件",footer:null,afterClose:t.onUploadClose},model:{value:t.uploadVisible,callback:function(e){t.uploadVisible=e},expression:"uploadVisible"}},[a("upload",{attrs:{name:"file",multiple:"",uploadHandler:t.attachmentUploadHandler}},[a("p",{staticClass:"ant-upload-drag-icon"},[a("a-icon",{attrs:{type:"inbox"}})],1),a("p",{staticClass:"ant-upload-text"},[t._v("点击选择文件或将文件拖拽到此处")]),a("p",{staticClass:"ant-upload-hint"},[t._v("支持单个或批量上传")])])],1)],1)},i=[],o=(a("b745"),a("ac0d")),s=a("a796"),l=a("5bcf"),r={name:"AttachmentDrawer",mixins:[o["a"],o["b"]],components:{AttachmentDetailDrawer:l["a"]},model:{prop:"visiable",event:"close"},props:{visiable:{type:Boolean,required:!1,default:!1}},data:function(){return{attachmentType:s["a"].type,detailVisiable:!1,attachmentDrawerVisible:!1,uploadVisible:!1,skeletonLoading:!0,pagination:{page:1,size:12,sort:""},queryParam:{page:0,size:18,sort:null,keyword:null},attachments:[],selectedAttachment:{},attachmentUploadHandler:s["a"].upload}},computed:{formattedDatas:function(){var t=this;return this.attachments.map(function(e){return e.typeProperty=t.attachmentType[e.type],e})}},created:function(){this.loadSkeleton(),this.loadAttachments()},watch:{visiable:function(t,e){t&&this.loadSkeleton()}},methods:{loadSkeleton:function(){var t=this;this.skeletonLoading=!0,setTimeout(function(){t.skeletonLoading=!1},500)},handleShowUploadModal:function(){this.uploadVisible=!0},handleShowDetailDrawer:function(t){this.selectedAttachment=t,this.$log.debug("Show detail of",t),this.detailVisiable=!0},loadAttachments:function(t){var e=this;this.queryParam.page=this.pagination.page-1,this.queryParam.size=this.pagination.size,this.queryParam.sort=this.pagination.sort,t&&(this.queryParam.page=0),s["a"].query(this.queryParam).then(function(t){e.attachments=t.data.data.content,e.pagination.total=t.data.data.total})},handlePaginationChange:function(t,e){this.pagination.page=t,this.pagination.size=e,this.loadAttachments()},onUploadClose:function(){this.loadSkeleton(),this.loadAttachments()},handleDelete:function(){this.loadAttachments()},onClose:function(){this.$emit("close",!1)}}},c=r,d=(a("5f9f"),a("17cc")),u=Object(d["a"])(c,n,i,!1,null,null,null);e["a"]=u.exports}}]); \ No newline at end of file diff --git a/src/main/resources/admin/js/chunk-1be69b35.09ed87f0.js b/src/main/resources/admin/js/chunk-1be69b35.09ed87f0.js new file mode 100644 index 000000000..b2e94e720 --- /dev/null +++ b/src/main/resources/admin/js/chunk-1be69b35.09ed87f0.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1be69b35"],{"031c":function(t,a,n){},2967:function(t,a,n){"use strict";n.r(a);var e=function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("div",{staticClass:"page-header-index-wide"},[n("a-row",[n("a-col",{attrs:{span:24}},[n("a-card",{attrs:{bordered:!1}},[n("a-card",{staticClass:"environment-info",attrs:{bordered:!1}},[n("template",{slot:"title"},[t._v("\n 环境信息\n "),n("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handleCopyEnvironments}},[n("a-icon",{attrs:{type:"copy"}})],1)]),n("a-popconfirm",{attrs:{slot:"extra",placement:"left",okText:"确定",cancelText:"取消"},on:{confirm:t.confirmUpdate},slot:"extra"},[n("template",{slot:"title"},[n("p",[t._v("确定更新 "),n("b",[t._v("Halo admin")]),t._v(" 吗?")])]),n("a-icon",{attrs:{slot:"icon",type:"cloud-download"},slot:"icon"}),n("a-button",{attrs:{loading:t.updating,type:"dashed",shape:"circle",icon:"cloud-download"}})],2),n("ul",[n("li",[t._v("Server 版本:"+t._s(t.environments.version))]),n("li",[t._v("Admin 版本:"+t._s(t.adminVersion))]),n("li",[t._v("数据库:"+t._s(t.environments.database))]),n("li",[t._v("运行模式:"+t._s(t.environments.mode))]),n("li",[t._v("启动时间:"+t._s(t._f("moment")(t.environments.startTime)))])]),n("a",{attrs:{href:"https://github.com/halo-dev",target:"_blank"}},[t._v("开源地址\n "),n("a-icon",{attrs:{type:"link"}})],1),n("a",{attrs:{href:"https://halo.run/guide",target:"_blank"}},[t._v("用户文档\n "),n("a-icon",{attrs:{type:"link"}})],1),n("a",{attrs:{href:"https://bbs.halo.run",target:"_blank"}},[t._v("在线社区\n "),n("a-icon",{attrs:{type:"link"}})],1)],2),n("a-card",{attrs:{title:"开发者",bordered:!1}},t._l(t.developers,function(t,a){return n("a",{key:a,attrs:{href:t.github,target:"_blank"}},[n("a-tooltip",{attrs:{placement:"top",title:t.name}},[n("a-avatar",{style:{marginRight:"10px"},attrs:{size:"large",src:t.avatar}})],1)],1)}),0),n("a-card",{attrs:{title:"时间轴",bordered:!1}},[n("a-timeline",[n("a-timeline-item",[t._v("...")]),t._l(t.steps,function(a,e){return n("a-timeline-item",{key:e},[t._v(t._s(a.date)+" "+t._s(a.content))])})],2)],1)],1)],1)],1)],1)},i=[],o=n("50fc"),s={data:function(){return{adminVersion:this.VERSION,environments:{},developers:[{name:"Ryan Wang",avatar:"//cn.gravatar.com/avatar/7cc7f29278071bd4dce995612d428834?s=256&d=mm",website:"https://ryanc.cc",github:"https://github.com/ruibaby"},{name:"John Niang",avatar:"//cn.gravatar.com/avatar/1dcf60ef27363dae539385d5bae9b2bd?s=256&d=mm",website:"https://johnniang.me",github:"https://github.com/johnniang"},{name:"Aquan",avatar:"//cn.gravatar.com/avatar/3958035fa354403fa9ca3fca36b08068?s=256&d=mm",website:"https://blog.eunji.cn",github:"https://github.com/aquanlerou"},{name:"appdev",avatar:"//cn.gravatar.com/avatar/08cf681fb7c6ad1b4fe70a8269c2103c?s=256&d=mm",website:"https://www.apkdv.com",github:"https://github.com/appdev"}],steps:[{date:"2019-06-01",content:"1.0 正式版发布"},{date:"2019-05-03",content:"Star 数达到 3300"},{date:"2019-01-30",content:"John Niang 加入开发"},{date:"2018-10-18",content:"构建镜像到 Docker hub"},{date:"2018-09-22",content:"Star 数达到 800"},{date:"2018-05-02",content:"第一条 Issue"},{date:"2018-05-01",content:"Star 数达到 100"},{date:"2018-04-29",content:"第一个 Pull request"},{date:"2018-04-28",content:"正式开源"},{date:"2018-03-21",content:"确定命名为 Halo,并上传到 Github"}],updating:!1}},created:function(){this.getEnvironments()},computed:{updateText:function(){return this.updating?"更新中...":"更新"}},methods:{getEnvironments:function(){var t=this;o["a"].environments().then(function(a){t.environments=a.data.data})},confirmUpdate:function(){var t=this;this.updating=!0,o["a"].updateAdminAssets().then(function(a){t.$notification.success({message:"更新成功",description:"请刷新后体验最新版本!"})}).finally(function(){t.updating=!1})},handleCopyEnvironments:function(){var t=this,a="Server 版本:".concat(this.environments.version,"\nAdmin 版本:").concat(this.adminVersion,"\n数据库:").concat(this.environments.database,"\n运行模式:").concat(this.environments.mode);this.$copyText(a).then(function(a){console.log("copy",a),t.$message.success("复制成功!")}).catch(function(a){console.log("copy.err",a),t.$message.error("复制失败!")})}}},r=s,c=(n("5ea2"),n("17cc")),d=Object(c["a"])(r,e,i,!1,null,null,null);a["default"]=d.exports},"5ea2":function(t,a,n){"use strict";var e=n("031c"),i=n.n(e);i.a}}]); \ No newline at end of file diff --git a/src/main/resources/admin/js/chunk-1be69b35.81559bfc.js b/src/main/resources/admin/js/chunk-1be69b35.81559bfc.js deleted file mode 100644 index 14ded2f93..000000000 --- a/src/main/resources/admin/js/chunk-1be69b35.81559bfc.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1be69b35"],{"031c":function(t,a,e){},2967:function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"page-header-index-wide"},[e("a-row",[e("a-col",{attrs:{span:24}},[e("a-card",{attrs:{bordered:!1}},[e("a-card",{staticClass:"environment-info",attrs:{title:"环境信息",bordered:!1}},[e("a-popconfirm",{attrs:{slot:"extra",placement:"left",okText:"确定",cancelText:"取消"},on:{confirm:t.confirmUpdate},slot:"extra"},[e("template",{slot:"title"},[e("p",[t._v("确定更新 "),e("b",[t._v("Halo admin")]),t._v(" 吗?")])]),e("a-icon",{attrs:{slot:"icon",type:"cloud-download"},slot:"icon"}),e("a-button",{attrs:{loading:t.updating,type:"dashed",shape:"circle",icon:"cloud-download"}})],2),e("ul",[e("li",[t._v("Server 版本:"+t._s(t.environments.version))]),e("li",[t._v("Admin 版本:"+t._s(t.adminVersion))]),e("li",[t._v("数据库:"+t._s(t.environments.database))]),e("li",[t._v("运行模式:"+t._s(t.environments.mode))]),e("li",[t._v("启动时间:"+t._s(t._f("moment")(t.environments.startTime)))])]),e("a",{attrs:{href:"https://github.com/halo-dev",target:"_blank"}},[t._v("开源地址\n "),e("a-icon",{attrs:{type:"link"}})],1),e("a",{attrs:{href:"https://halo.run/docs",target:"_blank"}},[t._v("用户文档\n "),e("a-icon",{attrs:{type:"link"}})],1),e("a",{attrs:{href:"https://bbs.halo.run",target:"_blank"}},[t._v("在线社区\n "),e("a-icon",{attrs:{type:"link"}})],1)],1),e("a-card",{attrs:{title:"开发者",bordered:!1}},t._l(t.developers,function(t,a){return e("a",{key:a,attrs:{href:t.github,target:"_blank"}},[e("a-tooltip",{attrs:{placement:"top",title:t.name}},[e("a-avatar",{style:{marginRight:"10px"},attrs:{size:"large",src:t.avatar}})],1)],1)}),0),e("a-card",{attrs:{title:"时间轴",bordered:!1}},[e("a-timeline",[e("a-timeline-item",[t._v("...")]),t._l(t.steps,function(a,n){return e("a-timeline-item",{key:n},[t._v(t._s(a.date)+" "+t._s(a.content))])})],2)],1)],1)],1)],1)],1)},i=[],r=e("50fc"),o={data:function(){return{adminVersion:this.VERSION,environments:{},developers:[{name:"Ryan Wang",avatar:"//cn.gravatar.com/avatar/7cc7f29278071bd4dce995612d428834?s=256&d=mm",website:"https://ryanc.cc",github:"https://github.com/ruibaby"},{name:"John Niang",avatar:"//cn.gravatar.com/avatar/1dcf60ef27363dae539385d5bae9b2bd?s=256&d=mm",website:"https://johnniang.me",github:"https://github.com/johnniang"},{name:"Aquan",avatar:"//cn.gravatar.com/avatar/3958035fa354403fa9ca3fca36b08068?s=256&d=mm",website:"https://blog.eunji.cn",github:"https://github.com/aquanlerou"},{name:"appdev",avatar:"//cn.gravatar.com/avatar/08cf681fb7c6ad1b4fe70a8269c2103c?s=256&d=mm",website:"https://www.apkdv.com",github:"https://github.com/appdev"}],steps:[{date:"2019-06-01",content:"1.0 正式版发布"},{date:"2019-05-03",content:"Star 数达到 3300"},{date:"2019-01-30",content:"John Niang 加入开发"},{date:"2018-10-18",content:"构建镜像到 Docker hub"},{date:"2018-09-22",content:"Star 数达到 800"},{date:"2018-05-02",content:"第一条 Issue"},{date:"2018-05-01",content:"Star 数达到 100"},{date:"2018-04-29",content:"第一个 Pull request"},{date:"2018-04-28",content:"正式开源"},{date:"2018-03-21",content:"确定命名为 Halo,并上传到 Github"}],updating:!1}},created:function(){this.getEnvironments()},computed:{updateText:function(){return this.updating?"更新中...":"更新"}},methods:{getEnvironments:function(){var t=this;r["a"].environments().then(function(a){t.environments=a.data.data})},confirmUpdate:function(){var t=this;this.updating=!0,r["a"].updateAdminAssets().then(function(a){t.$notification.success({message:"更新成功",description:"请刷新后体验最新版本!"})}).finally(function(){t.updating=!1})}}},s=o,c=(e("5ea2"),e("17cc")),d=Object(c["a"])(s,n,i,!1,null,null,null);a["default"]=d.exports},"5ea2":function(t,a,e){"use strict";var n=e("031c"),i=e.n(n);i.a}}]); \ No newline at end of file diff --git a/src/main/resources/admin/js/chunk-434a7762.7b32a373.js b/src/main/resources/admin/js/chunk-434a7762.7b32a373.js new file mode 100644 index 000000000..915d66c0d --- /dev/null +++ b/src/main/resources/admin/js/chunk-434a7762.7b32a373.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-434a7762"],{"0672":function(t,e,a){"use strict";var n=a("8776"),i=a.n(n);i.a},"12de":function(t,e,a){"use strict";var n=a("9efd"),i="/api/admin/themes",o={listAll:function(){return Object(n["a"])({url:"".concat(i),method:"get"})},listFiles:function(){return Object(n["a"])({url:"".concat(i,"/files"),method:"get"})},customTpls:function(){return Object(n["a"])({url:"".concat(i,"/files/custom"),method:"get"})},active:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t,"/activation"),method:"post"})},getActivatedTheme:function(){return Object(n["a"])({url:"".concat(i,"/activation"),method:"get"})},update:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t),timeout:6e4,method:"put"})},delete:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"delete"})},fetchConfiguration:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t,"/configurations"),method:"get"})},fetchSettings:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t,"/settings"),method:"get"})},saveSettings:function(t,e){return Object(n["a"])({url:"".concat(i,"/").concat(t,"/settings"),data:e,method:"post"})},getProperty:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"get"})},upload:function(t,e,a){return Object(n["a"])({url:"".concat(i,"/upload"),timeout:864e5,data:t,onUploadProgress:e,cancelToken:a,method:"post"})},fetching:function(t){return Object(n["a"])({url:"".concat(i,"/fetching"),timeout:6e4,params:{uri:t},method:"post"})},getContent:function(t){return Object(n["a"])({url:"".concat(i,"/files/content"),params:{path:t},method:"get"})},saveContent:function(t,e){return Object(n["a"])({url:"".concat(i,"/files/content"),params:{path:t},data:e,method:"put"})},reload:function(){return Object(n["a"])({url:"".concat(i,"/reload"),method:"post"})},exists:function(t){return Object(n["a"])({url:"".concat(i,"/activation/template/exists"),method:"get",params:{template:t}})}};e["a"]=o},"4cb6":function(t,e,a){},"5bcf":function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-drawer",{attrs:{title:"附件详情",width:t.isMobile()?"100%":"460",closable:"",visible:t.visiable,destroyOnClose:""},on:{close:t.onClose}},[a("a-row",{attrs:{type:"flex",align:"middle"}},[a("a-col",{attrs:{span:24}},[a("a-skeleton",{attrs:{active:"",loading:t.detailLoading,paragraph:{rows:8}}},[a("div",{staticClass:"attach-detail-img"},[a("img",{attrs:{src:t.attachment.path}})])])],1),a("a-divider"),a("a-col",{attrs:{span:24}},[a("a-skeleton",{attrs:{active:"",loading:t.detailLoading,paragraph:{rows:8}}},[a("a-list",{attrs:{itemLayout:"horizontal"}},[a("a-list-item",[a("a-list-item-meta",[t.editable?a("template",{slot:"description"},[a("a-input",{on:{blur:t.doUpdateAttachment},model:{value:t.attachment.name,callback:function(e){t.$set(t.attachment,"name",e)},expression:"attachment.name"}})],1):a("template",{slot:"description"},[t._v(t._s(t.attachment.name))]),a("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 附件名:\n "),a("a",{attrs:{href:"javascript:void(0);"}},[a("a-icon",{attrs:{type:"edit"},on:{click:t.handleEditName}})],1)])],2)],1),a("a-list-item",[a("a-list-item-meta",{attrs:{description:t.attachment.mediaType}},[a("span",{attrs:{slot:"title"},slot:"title"},[t._v("附件类型:")])])],1),a("a-list-item",[a("a-list-item-meta",{attrs:{description:t.attachment.typeProperty}},[a("span",{attrs:{slot:"title"},slot:"title"},[t._v("存储位置:")])])],1),a("a-list-item",[a("a-list-item-meta",[a("template",{slot:"description"},[t._v("\n "+t._s(t._f("fileSizeFormat")(t.attachment.size))+"\n ")]),a("span",{attrs:{slot:"title"},slot:"title"},[t._v("附件大小:")])],2)],1),a("a-list-item",[a("a-list-item-meta",{attrs:{description:t.attachment.height+"x"+t.attachment.width}},[a("span",{attrs:{slot:"title"},slot:"title"},[t._v("图片尺寸:")])])],1),a("a-list-item",[a("a-list-item-meta",[a("template",{slot:"description"},[t._v("\n "+t._s(t._f("moment")(t.attachment.createTime))+"\n ")]),a("span",{attrs:{slot:"title"},slot:"title"},[t._v("上传日期:")])],2)],1),a("a-list-item",[a("a-list-item-meta",{attrs:{description:t.attachment.path}},[a("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 普通链接:\n "),a("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handleCopyNormalLink}},[a("a-icon",{attrs:{type:"copy"}})],1)])])],1),a("a-list-item",[a("a-list-item-meta",[a("span",{attrs:{slot:"description"},slot:"description"},[t._v("!["+t._s(t.attachment.name)+"]("+t._s(t.attachment.path)+")")]),a("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n Markdown 格式:\n "),a("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handleCopyMarkdownLink}},[a("a-icon",{attrs:{type:"copy"}})],1)])])],1)],1)],1)],1)],1),a("a-divider",{staticClass:"divider-transparent"}),a("div",{staticClass:"bottom-control"},[t.addToPhoto?a("a-popconfirm",{attrs:{title:"你确定要添加到图库?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleAddToPhoto}},[a("a-button",{staticStyle:{marginRight:"8px"},attrs:{type:"dashed"}},[t._v("添加到图库")])],1):t._e(),a("a-popconfirm",{attrs:{title:"你确定要删除该附件?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleDeleteAttachment}},[a("a-button",{attrs:{type:"danger"}},[t._v("删除")])],1)],1)],1)},i=[],o=(a("7364"),a("ac0d")),s=a("a796"),l=a("975e"),r={name:"AttachmentDetailDrawer",mixins:[o["a"],o["b"]],data:function(){return{detailLoading:!0,editable:!1,photo:{}}},model:{prop:"visiable",event:"close"},props:{attachment:{type:Object,required:!0},addToPhoto:{type:Boolean,required:!1,default:!1},visiable:{type:Boolean,required:!1,default:!0}},created:function(){this.loadSkeleton()},watch:{visiable:function(t,e){this.$log.debug("old value",e),this.$log.debug("new value",t),t&&this.loadSkeleton()}},methods:{loadSkeleton:function(){var t=this;this.detailLoading=!0,setTimeout(function(){t.detailLoading=!1},500)},handleDeleteAttachment:function(){var t=this;s["a"].delete(this.attachment.id).then(function(e){t.$message.success("删除成功!"),t.$emit("delete",t.attachment),t.onClose()})},handleEditName:function(){this.editable=!this.editable},doUpdateAttachment:function(){var t=this;s["a"].update(this.attachment.id,this.attachment).then(function(e){t.$log.debug("Updated attachment",e.data.data),t.$message.success("附件修改成功!")}),this.editable=!1},handleCopyNormalLink:function(){var t=this,e="".concat(this.attachment.path);this.$copyText(e).then(function(e){console.log("copy",e),t.$message.success("复制成功!")}).catch(function(e){console.log("copy.err",e),t.$message.error("复制失败!")})},handleCopyMarkdownLink:function(){var t=this,e="![".concat(this.attachment.name,"](").concat(this.attachment.path,")");this.$copyText(e).then(function(e){console.log("copy",e),t.$message.success("复制成功!")}).catch(function(e){console.log("copy.err",e),t.$message.error("复制失败!")})},handleAddToPhoto:function(){var t=this;this.photo["name"]=this.attachment.name,this.photo["thumbnail"]=this.attachment.thumbPath,this.photo["url"]=this.attachment.path,this.photo["takeTime"]=(new Date).getTime(),l["a"].create(this.photo).then(function(e){t.$message.success("添加成功!")})},onClose:function(){this.$emit("close",!1)}}},c=r,d=(a("b3a7"),a("17cc")),u=Object(d["a"])(c,n,i,!1,null,null,null);e["a"]=u.exports},"5f9f":function(t,e,a){"use strict";var n=a("4cb6"),i=a.n(n);i.a},"79e7":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=this,a=e.$createElement,n=e._self._c||a;return n("div",{staticClass:"page-header-index-wide"},[n("a-row",{attrs:{gutter:12,type:"flex",align:"middle"}},[n("a-col",{attrs:{span:24}},[n("a-list",{attrs:{grid:{gutter:12,xs:1,sm:1,md:2,lg:4,xl:4,xxl:4},dataSource:e.sortedThemes,loading:e.themeLoading},scopedSlots:e._u([{key:"renderItem",fn:function(t,a){return n("a-list-item",{key:a},[n("a-card",{attrs:{hoverable:"",title:t.name,bodyStyle:{padding:0}}},[n("div",{staticClass:"theme-thumb"},[n("img",{attrs:{alt:t.name,src:t.screenshots}})]),n("template",{staticClass:"ant-card-actions",slot:"actions"},[t.activated?n("div",[n("a-icon",{staticStyle:{"margin-right":"3px"},attrs:{type:"unlock",theme:"twoTone"}}),e._v("已启用\n ")],1):n("div",{on:{click:function(a){return e.handleActivateClick(t)}}},[n("a-icon",{staticStyle:{"margin-right":"3px"},attrs:{type:"lock"}}),e._v("启用\n ")],1),n("div",{on:{click:function(a){return e.handleEditClick(t)}}},[n("a-icon",{staticStyle:{"margin-right":"3px"},attrs:{type:"setting"}}),e._v("设置\n ")],1),n("a-dropdown",{attrs:{placement:"topCenter",trigger:["click"]}},[n("a",{staticClass:"ant-dropdown-link",attrs:{href:"#"}},[n("a-icon",{staticStyle:{"margin-right":"3px"},attrs:{type:"ellipsis"}}),e._v("更多\n ")],1),n("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[n("a-menu-item",{key:1,attrs:{disabled:t.activated}},[t.activated?n("span",[n("a-icon",{staticStyle:{"margin-right":"3px"},attrs:{type:"delete"}}),e._v("删除\n ")],1):n("a-popconfirm",{attrs:{title:"确定删除【"+t.name+"】主题?",okText:"确定",cancelText:"取消"},on:{confirm:function(a){return e.handleDeleteTheme(t.id)}}},[n("a-icon",{staticStyle:{"margin-right":"3px"},attrs:{type:"delete"}}),e._v("删除\n ")],1)],1),n("a-menu-item",{key:2},[n("a-popconfirm",{attrs:{title:"确定更新【"+t.name+"】主题?",okText:"确定",cancelText:"取消"},on:{confirm:function(a){return e.handleUpdateTheme(t.id)}}},[n("a-icon",{staticStyle:{"margin-right":"3px"},attrs:{type:"download"}}),e._v("更新\n ")],1)],1)],1)],1)],1)],2)],1)}}])})],1)],1),e.themeProperty?n("a-drawer",{attrs:{title:e.themeProperty.name+" 主题设置",width:"100%",closable:"",visible:e.visible,destroyOnClose:""},on:{close:e.onClose}},[n("a-row",{attrs:{gutter:12,type:"flex"}},[n("a-col",{attrs:{xl:12,lg:12,md:12,sm:24,xs:24}},[n("a-skeleton",{attrs:{active:"",loading:e.optionLoading,paragraph:{rows:10}}},[n("a-card",{attrs:{bordered:!1}},[n("img",{attrs:{slot:"cover",alt:e.themeProperty.name,src:e.themeProperty.screenshots},slot:"cover"}),n("a-card-meta",{attrs:{description:e.themeProperty.description}},[n("template",{slot:"title"},[n("a",{attrs:{href:e.themeProperty.author.website,target:"_blank"}},[e._v(e._s(e.themeProperty.author.name))])]),e.themeProperty.logo?n("a-avatar",{attrs:{slot:"avatar",src:e.themeProperty.logo,size:"large"},slot:"avatar"}):n("a-avatar",{attrs:{slot:"avatar",size:"large"},slot:"avatar"},[e._v(e._s(e.themeProperty.author.name))])],2)],1)],1)],1),n("a-col",{staticStyle:{"padding-bottom":"50px"},attrs:{xl:12,lg:12,md:12,sm:24,xs:24}},[n("a-skeleton",{attrs:{active:"",loading:e.optionLoading,paragraph:{rows:20}}},[n("div",{staticClass:"card-container"},[e.themeConfiguration.length>0?n("a-tabs",{attrs:{type:"card",defaultActiveKey:"0"}},e._l(e.themeConfiguration,function(t,a){return n("a-tab-pane",{key:a.toString(),attrs:{tab:t.label}},[n("a-form",{attrs:{layout:"vertical"}},e._l(t.items,function(t,a){return n("a-form-item",{key:a,attrs:{label:t.label+":","wrapper-col":e.wrapperCol}},["TEXT"==t.type?n("a-input",{attrs:{defaultValue:t.defaultValue,placeholder:t.placeholder},model:{value:e.themeSettings[t.name],callback:function(a){e.$set(e.themeSettings,t.name,a)},expression:"themeSettings[item.name]"}}):"TEXTAREA"==t.type?n("a-input",{attrs:{type:"textarea",autosize:{minRows:5},placeholder:t.placeholder},model:{value:e.themeSettings[t.name],callback:function(a){e.$set(e.themeSettings,t.name,a)},expression:"themeSettings[item.name]"}}):"RADIO"==t.type?n("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["radio-group"],expression:"['radio-group']"}],attrs:{defaultValue:t.defaultValue},model:{value:e.themeSettings[t.name],callback:function(a){e.$set(e.themeSettings,t.name,a)},expression:"themeSettings[item.name]"}},e._l(t.options,function(t,a){return n("a-radio",{key:a,attrs:{value:t.value}},[e._v(e._s(t.label))])}),1):"SELECT"==t.type?n("a-select",{attrs:{defaultValue:t.defaultValue},model:{value:e.themeSettings[t.name],callback:function(a){e.$set(e.themeSettings,t.name,a)},expression:"themeSettings[item.name]"}},e._l(t.options,function(t){return n("a-select-option",{key:t.value,attrs:{value:t.value}},[e._v(e._s(t.label))])}),1):e._e()],1)}),1)],1)}),1):n("a-alert",{attrs:{message:"当前主题暂无设置选项",banner:""}})],1)])],1)],1),e.themeConfiguration.length>0?n("footer-tool-bar",{style:{width:e.isSideMenu()&&e.isDesktop()?"calc(100% - "+(e.sidebarOpened?256:80)+"px)":"100%"}},[n("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveSettings}},[e._v("保存")]),n("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"dashed"},on:{click:function(){return t.attachmentDrawerVisible=!0}}},[e._v("附件库")])],1):e._e(),n("AttachmentDrawer",{model:{value:e.attachmentDrawerVisible,callback:function(t){e.attachmentDrawerVisible=t},expression:"attachmentDrawerVisible"}})],1):e._e(),n("div",{staticClass:"upload-button"},[n("a-dropdown",{attrs:{placement:"topLeft",trigger:["click"]}},[n("a-button",{attrs:{type:"primary",shape:"circle",icon:"plus",size:"large"}}),n("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[n("a-menu-item",[n("a",{attrs:{rel:"noopener noreferrer",href:"javascript:void(0);"},on:{click:function(){return t.uploadVisible=!0}}},[e._v("安装主题")])]),n("a-menu-item",[n("a",{attrs:{rel:"noopener noreferrer",href:"javascript:void(0);"},on:{click:e.handleReload}},[e._v("刷新列表")])])],1)],1)],1),n("a-modal",{attrs:{title:"安装主题",footer:null,bodyStyle:{padding:"0 24px 24px"}},model:{value:e.uploadVisible,callback:function(t){e.uploadVisible=t},expression:"uploadVisible"}},[n("div",{staticClass:"custom-tab-wrapper"},[n("a-tabs",[n("a-tab-pane",{key:"1",attrs:{tab:"远程拉取"}},[n("a-form",{attrs:{layout:"vertical"}},[n("a-form-item",{attrs:{label:"远程地址:"}},[n("a-input",{model:{value:e.fetchingUrl,callback:function(t){e.fetchingUrl=t},expression:"fetchingUrl"}})],1),n("a-form-item",[n("a-button",{attrs:{type:"primary",loading:e.fetchButtonLoading},on:{click:e.handleFetching}},[e._v("下载")])],1)],1),n("a-alert",{attrs:{type:"info",closable:""}},[n("template",{slot:"message"},[e._v("\n 远程地址即主题仓库地址,如:https://github.com/halo-dev/halo-theme-quick-starter。\n "),n("br"),e._v("更多主题请访问:\n "),n("a",{attrs:{target:"_blank",href:"https://halo.run/theme"}},[e._v("https://halo.run/theme")])])],2)],1),n("a-tab-pane",{key:"2",attrs:{tab:"本地上传"}},[n("upload",{attrs:{name:"file",multiple:"",accept:"application/zip",uploadHandler:e.uploadHandler},on:{change:e.handleChange,success:e.handleUploadSuccess}},[n("p",{staticClass:"ant-upload-drag-icon"},[n("a-icon",{attrs:{type:"inbox"}})],1),n("p",{staticClass:"ant-upload-text"},[e._v("点击选择主题或将主题拖拽到此处")]),n("p",{staticClass:"ant-upload-hint"},[e._v("支持单个或批量上传,仅支持 ZIP 格式的文件")])])],1)],1)],1)])],1)},i=[],o=(a("7364"),a("b745"),a("ed4e")),s=a("5a70"),l=a("ac0d"),r=a("12de"),c={components:{AttachmentDrawer:o["a"],FooterToolBar:s["a"]},mixins:[l["a"],l["b"]],data:function(){return{themeLoading:!1,optionLoading:!0,uploadVisible:!1,fetchButtonLoading:!1,wrapperCol:{xl:{span:12},lg:{span:12},sm:{span:24},xs:{span:24}},attachmentDrawerVisible:!1,themes:[],visible:!1,themeConfiguration:[],themeSettings:[],themeProperty:null,fetchingUrl:null,uploadHandler:r["a"].upload}},computed:{sortedThemes:function(){var t=this.themes.slice(0);return t.sort(function(t,e){return e.activated-t.activated})}},created:function(){this.loadThemes()},destroyed:function(){this.visible&&(this.visible=!1)},beforeRouteLeave:function(t,e,a){this.visible&&(this.visible=!1),a()},methods:{loadThemes:function(){var t=this;this.themeLoading=!0,r["a"].listAll().then(function(e){t.themes=e.data.data,t.themeLoading=!1})},settingDrawer:function(t){var e=this;this.visible=!0,this.optionLoading=!0,this.themeProperty=t,r["a"].fetchConfiguration(t.id).then(function(a){e.themeConfiguration=a.data.data,r["a"].fetchSettings(t.id).then(function(t){e.themeSettings=t.data.data,setTimeout(function(){e.visible=!0,e.optionLoading=!1},300)})})},activeTheme:function(t){var e=this;r["a"].active(t).then(function(t){e.$message.success("设置成功!"),e.loadThemes()})},handleUpdateTheme:function(t){var e=this;r["a"].update(t).then(function(t){e.$message.success("更新成功!"),e.loadThemes()})},handleDeleteTheme:function(t){var e=this;r["a"].delete(t).then(function(t){e.$message.success("删除成功!"),e.loadThemes()})},handleSaveSettings:function(){var t=this;r["a"].saveSettings(this.themeProperty.id,this.themeSettings).then(function(e){t.$message.success("保存成功!")})},onClose:function(){this.visible=!1,this.optionLoading=!1,this.themeConfiguration=[],this.themeProperty=null},handleChange:function(t){var e=t.file.status;"done"===e?this.$message.success("".concat(t.file.name," 主题上传成功!")):"error"===e&&this.$message.error("".concat(t.file.name," 主题上传失败!"))},handleUploadSuccess:function(){this.uploadVisible=!1,this.loadThemes()},handleEllipsisClick:function(t){this.$log.debug("Ellipsis clicked",t)},handleEditClick:function(t){this.settingDrawer(t)},handleActivateClick:function(t){this.activeTheme(t.id)},handleFetching:function(){var t=this;this.fetchButtonLoading=!0,r["a"].fetching(this.fetchingUrl).then(function(e){t.$message.success("拉取成功!"),t.uploadVisible=!1,t.loadThemes()}).finally(function(){t.fetchButtonLoading=!1})},handleReload:function(){var t=this;r["a"].reload().then(function(e){t.loadThemes(),t.$message.success("刷新成功!")})}}},d=c,u=(a("0672"),a("17cc")),h=Object(u["a"])(d,n,i,!1,null,"d8dae54c",null);e["default"]=h.exports},8776:function(t,e,a){},9298:function(t,e,a){},"975e":function(t,e,a){"use strict";var n=a("9efd"),i="/api/admin/photos",o={query:function(t){return Object(n["a"])({url:i,params:t,method:"get"})},create:function(t){return Object(n["a"])({url:i,data:t,method:"post"})},update:function(t,e){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"put",data:e})},delete:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"delete"})}};e["a"]=o},a796:function(t,e,a){"use strict";var n=a("f753"),i=a.n(n),o=a("9efd"),s="/api/admin/attachments",l={query:function(t){return Object(o["a"])({url:s,params:t,method:"get"})},get:function(t){return Object(o["a"])({url:"".concat(s,"/").concat(t),method:"get"})},delete:function(t){return Object(o["a"])({url:"".concat(s,"/").concat(t),method:"delete"})},update:function(t,e){return Object(o["a"])({url:"".concat(s,"/").concat(t),method:"put",data:e})},getMediaTypes:function(){return Object(o["a"])({url:"".concat(s,"/media_types"),method:"get"})}};l.CancelToken=i.a.CancelToken,l.isCancel=i.a.isCancel,l.upload=function(t,e,a){return Object(o["a"])({url:"".concat(s,"/upload"),timeout:864e4,data:t,onUploadProgress:e,cancelToken:a,method:"post"})},l.uploads=function(t,e,a){return Object(o["a"])({url:"".concat(s,"/uploads"),timeout:864e4,data:t,onUploadProgress:e,cancelToken:a,method:"post"})},l.type={LOCAL:{type:"local",text:"本地"},SMMS:{type:"smms",text:"SM.MS"},UPYUN:{type:"upyun",text:"又拍云"},QNYUN:{type:"qnyun",text:"七牛云"},ALIYUN:{type:"aliyun",text:"阿里云"}},e["a"]=l},b3a7:function(t,e,a){"use strict";var n=a("9298"),i=a.n(n);i.a},ed4e:function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-drawer",{attrs:{title:"附件库",width:t.isMobile()?"100%":"460",closable:"",visible:t.visiable,destroyOnClose:""},on:{close:t.onClose}},[a("a-row",{attrs:{type:"flex",align:"middle"}},[a("a-input-search",{attrs:{placeholder:"搜索附件",enterButton:""},on:{search:function(e){return t.loadAttachments(!0)}},model:{value:t.queryParam.keyword,callback:function(e){t.$set(t.queryParam,"keyword",e)},expression:"queryParam.keyword"}})],1),a("a-divider"),a("a-row",{attrs:{type:"flex",align:"middle"}},[a("a-skeleton",{attrs:{active:"",loading:t.skeletonLoading,paragraph:{rows:18}}},[a("a-col",{attrs:{span:24}},t._l(t.formattedDatas,function(e,n){return a("div",{key:n,staticClass:"attach-item",on:{click:function(a){return t.handleShowDetailDrawer(e)}}},[a("img",{attrs:{src:e.thumbPath}})])}),0)],1)],1),a("a-divider"),a("div",{staticClass:"page-wrapper"},[a("a-pagination",{attrs:{defaultPageSize:t.pagination.size,total:t.pagination.total},on:{change:t.handlePaginationChange}})],1),t.selectedAttachment?a("AttachmentDetailDrawer",{attrs:{attachment:t.selectedAttachment},on:{delete:t.handleDelete},model:{value:t.detailVisiable,callback:function(e){t.detailVisiable=e},expression:"detailVisiable"}}):t._e(),a("a-divider",{staticClass:"divider-transparent"}),a("div",{staticClass:"bottom-control"},[a("a-button",{attrs:{type:"primary"},on:{click:t.handleShowUploadModal}},[t._v("上传附件")])],1)],1),a("a-modal",{attrs:{title:"上传附件",footer:null,afterClose:t.onUploadClose},model:{value:t.uploadVisible,callback:function(e){t.uploadVisible=e},expression:"uploadVisible"}},[a("upload",{attrs:{name:"file",multiple:"",uploadHandler:t.attachmentUploadHandler}},[a("p",{staticClass:"ant-upload-drag-icon"},[a("a-icon",{attrs:{type:"inbox"}})],1),a("p",{staticClass:"ant-upload-text"},[t._v("点击选择文件或将文件拖拽到此处")]),a("p",{staticClass:"ant-upload-hint"},[t._v("支持单个或批量上传")])])],1)],1)},i=[],o=(a("b745"),a("ac0d")),s=a("a796"),l=a("5bcf"),r={name:"AttachmentDrawer",mixins:[o["a"],o["b"]],components:{AttachmentDetailDrawer:l["a"]},model:{prop:"visiable",event:"close"},props:{visiable:{type:Boolean,required:!1,default:!1}},data:function(){return{attachmentType:s["a"].type,detailVisiable:!1,attachmentDrawerVisible:!1,uploadVisible:!1,skeletonLoading:!0,pagination:{page:1,size:12,sort:""},queryParam:{page:0,size:18,sort:null,keyword:null},attachments:[],selectedAttachment:{},attachmentUploadHandler:s["a"].upload}},computed:{formattedDatas:function(){var t=this;return this.attachments.map(function(e){return e.typeProperty=t.attachmentType[e.type],e})}},created:function(){this.loadSkeleton(),this.loadAttachments()},watch:{visiable:function(t,e){t&&this.loadSkeleton()}},methods:{loadSkeleton:function(){var t=this;this.skeletonLoading=!0,setTimeout(function(){t.skeletonLoading=!1},500)},handleShowUploadModal:function(){this.uploadVisible=!0},handleShowDetailDrawer:function(t){this.selectedAttachment=t,this.$log.debug("Show detail of",t),this.detailVisiable=!0},loadAttachments:function(t){var e=this;this.queryParam.page=this.pagination.page-1,this.queryParam.size=this.pagination.size,this.queryParam.sort=this.pagination.sort,t&&(this.queryParam.page=0),s["a"].query(this.queryParam).then(function(t){e.attachments=t.data.data.content,e.pagination.total=t.data.data.total})},handlePaginationChange:function(t,e){this.pagination.page=t,this.pagination.size=e,this.loadAttachments()},onUploadClose:function(){this.loadSkeleton(),this.loadAttachments()},handleDelete:function(){this.loadAttachments()},onClose:function(){this.$emit("close",!1)}}},c=r,d=(a("5f9f"),a("17cc")),u=Object(d["a"])(c,n,i,!1,null,null,null);e["a"]=u.exports}}]); \ No newline at end of file diff --git a/src/main/resources/admin/js/chunk-5000e55c.3bd9ce3a.js b/src/main/resources/admin/js/chunk-5000e55c.47b4c73b.js similarity index 97% rename from src/main/resources/admin/js/chunk-5000e55c.3bd9ce3a.js rename to src/main/resources/admin/js/chunk-5000e55c.47b4c73b.js index 1f9d39ec8..3ee92127e 100644 --- a/src/main/resources/admin/js/chunk-5000e55c.3bd9ce3a.js +++ b/src/main/resources/admin/js/chunk-5000e55c.47b4c73b.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5000e55c"],{"3e5b":function(t,a,e){},"5bcf":function(t,a,e){"use strict";var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("a-drawer",{attrs:{title:"附件详情",width:t.isMobile()?"100%":"460",closable:"",visible:t.visiable,destroyOnClose:""},on:{close:t.onClose}},[e("a-row",{attrs:{type:"flex",align:"middle"}},[e("a-col",{attrs:{span:24}},[e("a-skeleton",{attrs:{active:"",loading:t.detailLoading,paragraph:{rows:8}}},[e("div",{staticClass:"attach-detail-img"},[e("img",{attrs:{src:t.attachment.path}})])])],1),e("a-divider"),e("a-col",{attrs:{span:24}},[e("a-skeleton",{attrs:{active:"",loading:t.detailLoading,paragraph:{rows:8}}},[e("a-list",{attrs:{itemLayout:"horizontal"}},[e("a-list-item",[e("a-list-item-meta",[t.editable?e("template",{slot:"description"},[e("a-input",{on:{blur:t.doUpdateAttachment},model:{value:t.attachment.name,callback:function(a){t.$set(t.attachment,"name",a)},expression:"attachment.name"}})],1):e("template",{slot:"description"},[t._v(t._s(t.attachment.name))]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 附件名:\n "),e("a",{attrs:{href:"javascript:void(0);"}},[e("a-icon",{attrs:{type:"edit"},on:{click:t.handleEditName}})],1)])],2)],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.mediaType}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("附件类型:")])])],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.typeProperty}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("存储位置:")])])],1),e("a-list-item",[e("a-list-item-meta",[e("template",{slot:"description"},[t._v("\n "+t._s(t._f("fileSizeFormat")(t.attachment.size))+"\n ")]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("附件大小:")])],2)],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.height+"x"+t.attachment.width}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("图片尺寸:")])])],1),e("a-list-item",[e("a-list-item-meta",[e("template",{slot:"description"},[t._v("\n "+t._s(t._f("moment")(t.attachment.createTime))+"\n ")]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("上传日期:")])],2)],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.path}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 普通链接:\n "),e("a",{attrs:{href:"javascript:void(0);"}},[e("a-icon",{attrs:{type:"copy"},on:{click:t.handleCopyNormalLink}})],1)])])],1),e("a-list-item",[e("a-list-item-meta",[e("span",{attrs:{slot:"description"},slot:"description"},[t._v("!["+t._s(t.attachment.name)+"]("+t._s(t.attachment.path)+")")]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n Markdown 格式:\n "),e("a",{attrs:{href:"javascript:void(0);"}},[e("a-icon",{attrs:{type:"copy"},on:{click:t.handleCopyMarkdownLink}})],1)])])],1)],1)],1)],1)],1),e("a-divider",{staticClass:"divider-transparent"}),e("div",{staticClass:"bottom-control"},[t.addToPhoto?e("a-popconfirm",{attrs:{title:"你确定要添加到图库?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleAddToPhoto}},[e("a-button",{staticStyle:{marginRight:"8px"},attrs:{type:"dashed"}},[t._v("添加到图库")])],1):t._e(),e("a-popconfirm",{attrs:{title:"你确定要删除该附件?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleDeleteAttachment}},[e("a-button",{attrs:{type:"danger"}},[t._v("删除")])],1)],1)],1)},i=[],s=(e("7364"),e("ac0d")),o=e("a796"),l=e("975e"),r={name:"AttachmentDetailDrawer",mixins:[s["a"],s["b"]],data:function(){return{detailLoading:!0,editable:!1,photo:{}}},model:{prop:"visiable",event:"close"},props:{attachment:{type:Object,required:!0},addToPhoto:{type:Boolean,required:!1,default:!1},visiable:{type:Boolean,required:!1,default:!0}},created:function(){this.loadSkeleton()},watch:{visiable:function(t,a){this.$log.debug("old value",a),this.$log.debug("new value",t),t&&this.loadSkeleton()}},methods:{loadSkeleton:function(){var t=this;this.detailLoading=!0,setTimeout(function(){t.detailLoading=!1},500)},handleDeleteAttachment:function(){var t=this;o["a"].delete(this.attachment.id).then(function(a){t.$message.success("删除成功!"),t.$emit("delete",t.attachment),t.onClose()})},handleEditName:function(){this.editable=!this.editable},doUpdateAttachment:function(){var t=this;o["a"].update(this.attachment.id,this.attachment).then(function(a){t.$log.debug("Updated attachment",a.data.data),t.$message.success("附件修改成功!")}),this.editable=!1},handleCopyNormalLink:function(){var t=this,a="".concat(this.attachment.path);this.$copyText(a).then(function(a){console.log("copy",a),t.$message.success("复制成功!")}).catch(function(a){console.log("copy.err",a),t.$message.error("复制失败!")})},handleCopyMarkdownLink:function(){var t=this,a="![".concat(this.attachment.name,"](").concat(this.attachment.path,")");this.$copyText(a).then(function(a){console.log("copy",a),t.$message.success("复制成功!")}).catch(function(a){console.log("copy.err",a),t.$message.error("复制失败!")})},handleAddToPhoto:function(){var t=this;this.photo["name"]=this.attachment.name,this.photo["thumbnail"]=this.attachment.thumbPath,this.photo["url"]=this.attachment.path,this.photo["takeTime"]=(new Date).getTime(),l["a"].create(this.photo).then(function(a){t.$message.success("添加成功!")})},onClose:function(){this.$emit("close",!1)}}},c=r,d=(e("b3a7"),e("17cc")),u=Object(d["a"])(c,n,i,!1,null,null,null);a["a"]=u.exports},"61d0":function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=this,e=a.$createElement,n=a._self._c||e;return n("page-view",[n("a-row",{attrs:{gutter:12,type:"flex",align:"middle"}},[n("a-col",{staticClass:"search-box",attrs:{span:24}},[n("a-card",{attrs:{bordered:!1}},[n("div",{staticClass:"table-page-search-wrapper"},[n("a-form",{attrs:{layout:"inline"}},[n("a-row",{attrs:{gutter:48}},[n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"关键词"}},[n("a-input",{model:{value:a.queryParam.keyword,callback:function(t){a.$set(a.queryParam,"keyword",t)},expression:"queryParam.keyword"}})],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"存储位置"}},[n("a-select",{on:{change:a.handleQuery},model:{value:a.queryParam.attachmentType,callback:function(t){a.$set(a.queryParam,"attachmentType",t)},expression:"queryParam.attachmentType"}},a._l(Object.keys(a.attachmentType),function(t){return n("a-select-option",{key:t,attrs:{value:t}},[a._v(a._s(a.attachmentType[t].text))])}),1)],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"文件类型"}},[n("a-select",{on:{change:a.handleQuery},model:{value:a.queryParam.mediaType,callback:function(t){a.$set(a.queryParam,"mediaType",t)},expression:"queryParam.mediaType"}},a._l(a.mediaTypes,function(t,e){return n("a-select-option",{key:e,attrs:{value:t}},[a._v(a._s(t))])}),1)],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("span",{staticClass:"table-page-search-submitButtons"},[n("a-button",{attrs:{type:"primary"},on:{click:a.handleQuery}},[a._v("查询")]),n("a-button",{staticStyle:{"margin-left":"8px"},on:{click:a.handleResetParam}},[a._v("重置")])],1)])],1)],1)],1),n("div",{staticClass:"table-operator"},[n("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:function(){return t.uploadVisible=!0}}},[a._v("上传")])],1)])],1),n("a-col",{attrs:{span:24}},[n("a-list",{attrs:{grid:{gutter:12,xs:1,sm:2,md:4,lg:6,xl:6,xxl:6},dataSource:a.formattedDatas,loading:a.listLoading},scopedSlots:a._u([{key:"renderItem",fn:function(t,e){return n("a-list-item",{key:e},[n("a-card",{attrs:{bodyStyle:{padding:0},hoverable:""},on:{click:function(e){return a.handleShowDetailDrawer(t)}}},[n("div",{staticClass:"attach-thumb"},[n("img",{attrs:{src:t.thumbPath}})]),n("a-card-meta",[n("ellipsis",{attrs:{slot:"description",length:a.isMobile()?36:16,tooltip:""},slot:"description"},[a._v(a._s(t.name))])],1)],1)],1)}}])})],1)],1),n("div",{staticClass:"page-wrapper"},[n("a-pagination",{staticClass:"pagination",attrs:{total:a.pagination.total,defaultPageSize:a.pagination.size,pageSizeOptions:["18","36","54","72","90","108"],showSizeChanger:""},on:{change:a.handlePaginationChange,showSizeChange:a.handlePaginationChange}})],1),n("a-modal",{attrs:{title:"上传附件",footer:null,afterClose:a.onUploadClose},model:{value:a.uploadVisible,callback:function(t){a.uploadVisible=t},expression:"uploadVisible"}},[n("upload",{attrs:{name:"file",multiple:"",uploadHandler:a.uploadHandler}},[n("p",{staticClass:"ant-upload-drag-icon"},[n("a-icon",{attrs:{type:"inbox"}})],1),n("p",{staticClass:"ant-upload-text"},[a._v("点击选择文件或将文件拖拽到此处")]),n("p",{staticClass:"ant-upload-hint"},[a._v("支持单个或批量上传")])])],1),a.selectAttachment?n("AttachmentDetailDrawer",{attrs:{attachment:a.selectAttachment,addToPhoto:!0},on:{delete:function(){return t.loadAttachments()}},model:{value:a.drawerVisiable,callback:function(t){a.drawerVisiable=t},expression:"drawerVisiable"}}):a._e()],1)},i=[],s=(e("b745"),e("680ad")),o=e("ac0d"),l=e("5bcf"),r=e("a796"),c={components:{PageView:s["b"],AttachmentDetailDrawer:l["a"]},mixins:[o["a"],o["b"]],data:function(){return{attachmentType:r["a"].type,listLoading:!0,uploadVisible:!1,selectAttachment:{},attachments:[],mediaTypes:[],editable:!1,pagination:{page:1,size:18,sort:null},queryParam:{page:0,size:18,sort:null,keyword:null,mediaType:null,attachmentType:null},uploadHandler:r["a"].upload,drawerVisiable:!1}},computed:{formattedDatas:function(){var t=this;return this.attachments.map(function(a){return a.typeProperty=t.attachmentType[a.type],a})}},created:function(){this.loadAttachments(),this.loadMediaTypes()},methods:{loadAttachments:function(){var t=this;this.queryParam.page=this.pagination.page-1,this.queryParam.size=this.pagination.size,this.queryParam.sort=this.pagination.sort,this.listLoading=!0,r["a"].query(this.queryParam).then(function(a){t.attachments=a.data.data.content,t.pagination.total=a.data.data.total,t.listLoading=!1})},loadMediaTypes:function(){var t=this;r["a"].getMediaTypes().then(function(a){t.mediaTypes=a.data.data})},handleShowDetailDrawer:function(t){this.selectAttachment=t,this.drawerVisiable=!0},handlePaginationChange:function(t,a){this.$log.debug("Current: ".concat(t,", PageSize: ").concat(a)),this.pagination.page=t,this.pagination.size=a,this.loadAttachments()},handleResetParam:function(){this.queryParam.keyword=null,this.queryParam.mediaType=null,this.queryParam.attachmentType=null,this.loadAttachments()},handleQuery:function(){this.queryParam.page=0,this.loadAttachments()},onUploadClose:function(){this.loadAttachments(),this.loadMediaTypes()}}},d=c,u=(e("e402"),e("17cc")),m=Object(u["a"])(d,n,i,!1,null,"18d41aa9",null);a["default"]=m.exports},9298:function(t,a,e){},"975e":function(t,a,e){"use strict";var n=e("9efd"),i="/api/admin/photos",s={query:function(t){return Object(n["a"])({url:i,params:t,method:"get"})},create:function(t){return Object(n["a"])({url:i,data:t,method:"post"})},update:function(t,a){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"put",data:a})},delete:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"delete"})}};a["a"]=s},a796:function(t,a,e){"use strict";var n=e("f753"),i=e.n(n),s=e("9efd"),o="/api/admin/attachments",l={query:function(t){return Object(s["a"])({url:o,params:t,method:"get"})},get:function(t){return Object(s["a"])({url:"".concat(o,"/").concat(t),method:"get"})},delete:function(t){return Object(s["a"])({url:"".concat(o,"/").concat(t),method:"delete"})},update:function(t,a){return Object(s["a"])({url:"".concat(o,"/").concat(t),method:"put",data:a})},getMediaTypes:function(){return Object(s["a"])({url:"".concat(o,"/media_types"),method:"get"})}};l.CancelToken=i.a.CancelToken,l.isCancel=i.a.isCancel,l.upload=function(t,a,e){return Object(s["a"])({url:"".concat(o,"/upload"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},l.uploads=function(t,a,e){return Object(s["a"])({url:"".concat(o,"/uploads"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},l.type={LOCAL:{type:"local",text:"本地"},SMMS:{type:"smms",text:"SM.MS"},UPYUN:{type:"upyun",text:"又拍云"},QNYUN:{type:"qnyun",text:"七牛云"},ALIYUN:{type:"aliyun",text:"阿里云"}},a["a"]=l},b3a7:function(t,a,e){"use strict";var n=e("9298"),i=e.n(n);i.a},e402:function(t,a,e){"use strict";var n=e("3e5b"),i=e.n(n);i.a}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5000e55c"],{"3e5b":function(t,a,e){},"5bcf":function(t,a,e){"use strict";var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("a-drawer",{attrs:{title:"附件详情",width:t.isMobile()?"100%":"460",closable:"",visible:t.visiable,destroyOnClose:""},on:{close:t.onClose}},[e("a-row",{attrs:{type:"flex",align:"middle"}},[e("a-col",{attrs:{span:24}},[e("a-skeleton",{attrs:{active:"",loading:t.detailLoading,paragraph:{rows:8}}},[e("div",{staticClass:"attach-detail-img"},[e("img",{attrs:{src:t.attachment.path}})])])],1),e("a-divider"),e("a-col",{attrs:{span:24}},[e("a-skeleton",{attrs:{active:"",loading:t.detailLoading,paragraph:{rows:8}}},[e("a-list",{attrs:{itemLayout:"horizontal"}},[e("a-list-item",[e("a-list-item-meta",[t.editable?e("template",{slot:"description"},[e("a-input",{on:{blur:t.doUpdateAttachment},model:{value:t.attachment.name,callback:function(a){t.$set(t.attachment,"name",a)},expression:"attachment.name"}})],1):e("template",{slot:"description"},[t._v(t._s(t.attachment.name))]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 附件名:\n "),e("a",{attrs:{href:"javascript:void(0);"}},[e("a-icon",{attrs:{type:"edit"},on:{click:t.handleEditName}})],1)])],2)],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.mediaType}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("附件类型:")])])],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.typeProperty}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("存储位置:")])])],1),e("a-list-item",[e("a-list-item-meta",[e("template",{slot:"description"},[t._v("\n "+t._s(t._f("fileSizeFormat")(t.attachment.size))+"\n ")]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("附件大小:")])],2)],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.height+"x"+t.attachment.width}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("图片尺寸:")])])],1),e("a-list-item",[e("a-list-item-meta",[e("template",{slot:"description"},[t._v("\n "+t._s(t._f("moment")(t.attachment.createTime))+"\n ")]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("上传日期:")])],2)],1),e("a-list-item",[e("a-list-item-meta",{attrs:{description:t.attachment.path}},[e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n 普通链接:\n "),e("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handleCopyNormalLink}},[e("a-icon",{attrs:{type:"copy"}})],1)])])],1),e("a-list-item",[e("a-list-item-meta",[e("span",{attrs:{slot:"description"},slot:"description"},[t._v("!["+t._s(t.attachment.name)+"]("+t._s(t.attachment.path)+")")]),e("span",{attrs:{slot:"title"},slot:"title"},[t._v("\n Markdown 格式:\n "),e("a",{attrs:{href:"javascript:void(0);"},on:{click:t.handleCopyMarkdownLink}},[e("a-icon",{attrs:{type:"copy"}})],1)])])],1)],1)],1)],1)],1),e("a-divider",{staticClass:"divider-transparent"}),e("div",{staticClass:"bottom-control"},[t.addToPhoto?e("a-popconfirm",{attrs:{title:"你确定要添加到图库?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleAddToPhoto}},[e("a-button",{staticStyle:{marginRight:"8px"},attrs:{type:"dashed"}},[t._v("添加到图库")])],1):t._e(),e("a-popconfirm",{attrs:{title:"你确定要删除该附件?",okText:"确定",cancelText:"取消"},on:{confirm:t.handleDeleteAttachment}},[e("a-button",{attrs:{type:"danger"}},[t._v("删除")])],1)],1)],1)},i=[],s=(e("7364"),e("ac0d")),o=e("a796"),l=e("975e"),r={name:"AttachmentDetailDrawer",mixins:[s["a"],s["b"]],data:function(){return{detailLoading:!0,editable:!1,photo:{}}},model:{prop:"visiable",event:"close"},props:{attachment:{type:Object,required:!0},addToPhoto:{type:Boolean,required:!1,default:!1},visiable:{type:Boolean,required:!1,default:!0}},created:function(){this.loadSkeleton()},watch:{visiable:function(t,a){this.$log.debug("old value",a),this.$log.debug("new value",t),t&&this.loadSkeleton()}},methods:{loadSkeleton:function(){var t=this;this.detailLoading=!0,setTimeout(function(){t.detailLoading=!1},500)},handleDeleteAttachment:function(){var t=this;o["a"].delete(this.attachment.id).then(function(a){t.$message.success("删除成功!"),t.$emit("delete",t.attachment),t.onClose()})},handleEditName:function(){this.editable=!this.editable},doUpdateAttachment:function(){var t=this;o["a"].update(this.attachment.id,this.attachment).then(function(a){t.$log.debug("Updated attachment",a.data.data),t.$message.success("附件修改成功!")}),this.editable=!1},handleCopyNormalLink:function(){var t=this,a="".concat(this.attachment.path);this.$copyText(a).then(function(a){console.log("copy",a),t.$message.success("复制成功!")}).catch(function(a){console.log("copy.err",a),t.$message.error("复制失败!")})},handleCopyMarkdownLink:function(){var t=this,a="![".concat(this.attachment.name,"](").concat(this.attachment.path,")");this.$copyText(a).then(function(a){console.log("copy",a),t.$message.success("复制成功!")}).catch(function(a){console.log("copy.err",a),t.$message.error("复制失败!")})},handleAddToPhoto:function(){var t=this;this.photo["name"]=this.attachment.name,this.photo["thumbnail"]=this.attachment.thumbPath,this.photo["url"]=this.attachment.path,this.photo["takeTime"]=(new Date).getTime(),l["a"].create(this.photo).then(function(a){t.$message.success("添加成功!")})},onClose:function(){this.$emit("close",!1)}}},c=r,d=(e("b3a7"),e("17cc")),u=Object(d["a"])(c,n,i,!1,null,null,null);a["a"]=u.exports},"61d0":function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=this,e=a.$createElement,n=a._self._c||e;return n("page-view",[n("a-row",{attrs:{gutter:12,type:"flex",align:"middle"}},[n("a-col",{staticClass:"search-box",attrs:{span:24}},[n("a-card",{attrs:{bordered:!1}},[n("div",{staticClass:"table-page-search-wrapper"},[n("a-form",{attrs:{layout:"inline"}},[n("a-row",{attrs:{gutter:48}},[n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"关键词"}},[n("a-input",{model:{value:a.queryParam.keyword,callback:function(t){a.$set(a.queryParam,"keyword",t)},expression:"queryParam.keyword"}})],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"存储位置"}},[n("a-select",{on:{change:a.handleQuery},model:{value:a.queryParam.attachmentType,callback:function(t){a.$set(a.queryParam,"attachmentType",t)},expression:"queryParam.attachmentType"}},a._l(Object.keys(a.attachmentType),function(t){return n("a-select-option",{key:t,attrs:{value:t}},[a._v(a._s(a.attachmentType[t].text))])}),1)],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("a-form-item",{attrs:{label:"文件类型"}},[n("a-select",{on:{change:a.handleQuery},model:{value:a.queryParam.mediaType,callback:function(t){a.$set(a.queryParam,"mediaType",t)},expression:"queryParam.mediaType"}},a._l(a.mediaTypes,function(t,e){return n("a-select-option",{key:e,attrs:{value:t}},[a._v(a._s(t))])}),1)],1)],1),n("a-col",{attrs:{md:6,sm:24}},[n("span",{staticClass:"table-page-search-submitButtons"},[n("a-button",{attrs:{type:"primary"},on:{click:a.handleQuery}},[a._v("查询")]),n("a-button",{staticStyle:{"margin-left":"8px"},on:{click:a.handleResetParam}},[a._v("重置")])],1)])],1)],1)],1),n("div",{staticClass:"table-operator"},[n("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:function(){return t.uploadVisible=!0}}},[a._v("上传")])],1)])],1),n("a-col",{attrs:{span:24}},[n("a-list",{attrs:{grid:{gutter:12,xs:1,sm:2,md:4,lg:6,xl:6,xxl:6},dataSource:a.formattedDatas,loading:a.listLoading},scopedSlots:a._u([{key:"renderItem",fn:function(t,e){return n("a-list-item",{key:e},[n("a-card",{attrs:{bodyStyle:{padding:0},hoverable:""},on:{click:function(e){return a.handleShowDetailDrawer(t)}}},[n("div",{staticClass:"attach-thumb"},[n("img",{attrs:{src:t.thumbPath}})]),n("a-card-meta",[n("ellipsis",{attrs:{slot:"description",length:a.isMobile()?36:16,tooltip:""},slot:"description"},[a._v(a._s(t.name))])],1)],1)],1)}}])})],1)],1),n("div",{staticClass:"page-wrapper"},[n("a-pagination",{staticClass:"pagination",attrs:{total:a.pagination.total,defaultPageSize:a.pagination.size,pageSizeOptions:["18","36","54","72","90","108"],showSizeChanger:""},on:{change:a.handlePaginationChange,showSizeChange:a.handlePaginationChange}})],1),n("a-modal",{attrs:{title:"上传附件",footer:null,afterClose:a.onUploadClose},model:{value:a.uploadVisible,callback:function(t){a.uploadVisible=t},expression:"uploadVisible"}},[n("upload",{attrs:{name:"file",multiple:"",uploadHandler:a.uploadHandler}},[n("p",{staticClass:"ant-upload-drag-icon"},[n("a-icon",{attrs:{type:"inbox"}})],1),n("p",{staticClass:"ant-upload-text"},[a._v("点击选择文件或将文件拖拽到此处")]),n("p",{staticClass:"ant-upload-hint"},[a._v("支持单个或批量上传")])])],1),a.selectAttachment?n("AttachmentDetailDrawer",{attrs:{attachment:a.selectAttachment,addToPhoto:!0},on:{delete:function(){return t.loadAttachments()}},model:{value:a.drawerVisiable,callback:function(t){a.drawerVisiable=t},expression:"drawerVisiable"}}):a._e()],1)},i=[],s=(e("b745"),e("680ad")),o=e("ac0d"),l=e("5bcf"),r=e("a796"),c={components:{PageView:s["b"],AttachmentDetailDrawer:l["a"]},mixins:[o["a"],o["b"]],data:function(){return{attachmentType:r["a"].type,listLoading:!0,uploadVisible:!1,selectAttachment:{},attachments:[],mediaTypes:[],editable:!1,pagination:{page:1,size:18,sort:null},queryParam:{page:0,size:18,sort:null,keyword:null,mediaType:null,attachmentType:null},uploadHandler:r["a"].upload,drawerVisiable:!1}},computed:{formattedDatas:function(){var t=this;return this.attachments.map(function(a){return a.typeProperty=t.attachmentType[a.type],a})}},created:function(){this.loadAttachments(),this.loadMediaTypes()},methods:{loadAttachments:function(){var t=this;this.queryParam.page=this.pagination.page-1,this.queryParam.size=this.pagination.size,this.queryParam.sort=this.pagination.sort,this.listLoading=!0,r["a"].query(this.queryParam).then(function(a){t.attachments=a.data.data.content,t.pagination.total=a.data.data.total,t.listLoading=!1})},loadMediaTypes:function(){var t=this;r["a"].getMediaTypes().then(function(a){t.mediaTypes=a.data.data})},handleShowDetailDrawer:function(t){this.selectAttachment=t,this.drawerVisiable=!0},handlePaginationChange:function(t,a){this.$log.debug("Current: ".concat(t,", PageSize: ").concat(a)),this.pagination.page=t,this.pagination.size=a,this.loadAttachments()},handleResetParam:function(){this.queryParam.keyword=null,this.queryParam.mediaType=null,this.queryParam.attachmentType=null,this.loadAttachments()},handleQuery:function(){this.queryParam.page=0,this.loadAttachments()},onUploadClose:function(){this.loadAttachments(),this.loadMediaTypes()}}},d=c,u=(e("e402"),e("17cc")),m=Object(u["a"])(d,n,i,!1,null,"18d41aa9",null);a["default"]=m.exports},9298:function(t,a,e){},"975e":function(t,a,e){"use strict";var n=e("9efd"),i="/api/admin/photos",s={query:function(t){return Object(n["a"])({url:i,params:t,method:"get"})},create:function(t){return Object(n["a"])({url:i,data:t,method:"post"})},update:function(t,a){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"put",data:a})},delete:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"delete"})}};a["a"]=s},a796:function(t,a,e){"use strict";var n=e("f753"),i=e.n(n),s=e("9efd"),o="/api/admin/attachments",l={query:function(t){return Object(s["a"])({url:o,params:t,method:"get"})},get:function(t){return Object(s["a"])({url:"".concat(o,"/").concat(t),method:"get"})},delete:function(t){return Object(s["a"])({url:"".concat(o,"/").concat(t),method:"delete"})},update:function(t,a){return Object(s["a"])({url:"".concat(o,"/").concat(t),method:"put",data:a})},getMediaTypes:function(){return Object(s["a"])({url:"".concat(o,"/media_types"),method:"get"})}};l.CancelToken=i.a.CancelToken,l.isCancel=i.a.isCancel,l.upload=function(t,a,e){return Object(s["a"])({url:"".concat(o,"/upload"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},l.uploads=function(t,a,e){return Object(s["a"])({url:"".concat(o,"/uploads"),timeout:864e4,data:t,onUploadProgress:a,cancelToken:e,method:"post"})},l.type={LOCAL:{type:"local",text:"本地"},SMMS:{type:"smms",text:"SM.MS"},UPYUN:{type:"upyun",text:"又拍云"},QNYUN:{type:"qnyun",text:"七牛云"},ALIYUN:{type:"aliyun",text:"阿里云"}},a["a"]=l},b3a7:function(t,a,e){"use strict";var n=e("9298"),i=e.n(n);i.a},e402:function(t,a,e){"use strict";var n=e("3e5b"),i=e.n(n);i.a}}]); \ No newline at end of file diff --git a/src/main/resources/admin/js/chunk-bb4f0d4a.8511af49.js b/src/main/resources/admin/js/chunk-bb4f0d4a.8511af49.js new file mode 100644 index 000000000..70af6ce50 --- /dev/null +++ b/src/main/resources/admin/js/chunk-bb4f0d4a.8511af49.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-bb4f0d4a"],{"26ea":function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=this,a=e.$createElement,o=e._self._c||a;return o("div",{staticClass:"page-header-index-wide"},[o("a-row",[o("a-col",{attrs:{span:24}},[o("div",{staticClass:"card-container"},[o("a-tabs",{attrs:{type:"card"}},[o("a-tab-pane",{key:"general"},[o("span",{attrs:{slot:"tab"},slot:"tab"},[o("a-icon",{attrs:{type:"tool"}}),e._v("常规设置\n ")],1),o("a-form",{attrs:{layout:"vertical"}},[o("a-form-item",{attrs:{label:"博客标题:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.blog_title,callback:function(t){e.$set(e.options,"blog_title",t)},expression:"options.blog_title"}})],1),o("a-form-item",{attrs:{label:"博客地址:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{placeholder:"如:https://halo.run"},model:{value:e.options.blog_url,callback:function(t){e.$set(e.options,"blog_url",t)},expression:"options.blog_url"}})],1),o("a-form-item",{attrs:{label:"Logo:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.blog_logo,callback:function(t){e.$set(e.options,"blog_logo",t)},expression:"options.blog_logo"}},[o("a",{attrs:{slot:"addonAfter",href:"javascript:void(0);"},on:{click:function(){return t.logoDrawerVisible=!0}},slot:"addonAfter"},[o("a-icon",{attrs:{type:"picture"}})],1)])],1),o("a-form-item",{attrs:{label:"Favicon:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.blog_favicon,callback:function(t){e.$set(e.options,"blog_favicon",t)},expression:"options.blog_favicon"}},[o("a",{attrs:{slot:"addonAfter",href:"javascript:void(0);"},on:{click:function(){return t.faviconDrawerVisible=!0}},slot:"addonAfter"},[o("a-icon",{attrs:{type:"picture"}})],1)])],1),o("a-form-item",{attrs:{label:"页脚信息:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"textarea",autosize:{minRows:5}},model:{value:e.options.blog_footer_info,callback:function(t){e.$set(e.options,"blog_footer_info",t)},expression:"options.blog_footer_info"}})],1),o("a-form-item",[o("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveOptions}},[e._v("保存")])],1)],1)],1),o("a-tab-pane",{key:"seo"},[o("span",{attrs:{slot:"tab"},slot:"tab"},[o("a-icon",{attrs:{type:"global"}}),e._v("SEO 设置\n ")],1),o("a-form",{attrs:{layout:"vertical"}},[o("a-form-item",{attrs:{label:"屏蔽搜索引擎:","wrapper-col":e.wrapperCol}},[o("a-switch",{model:{value:e.options.seo_spider_disabled,callback:function(t){e.$set(e.options,"seo_spider_disabled",t)},expression:"options.seo_spider_disabled"}})],1),o("a-form-item",{attrs:{label:"关键词: ","wrapper-col":e.wrapperCol}},[o("a-tooltip",{attrs:{trigger:["focus"],placement:"right",title:"多个关键词以英文逗号隔开"}},[o("a-input",{model:{value:e.options.seo_keywords,callback:function(t){e.$set(e.options,"seo_keywords",t)},expression:"options.seo_keywords"}})],1)],1),o("a-form-item",{attrs:{label:"博客描述:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.seo_description,callback:function(t){e.$set(e.options,"seo_description",t)},expression:"options.seo_description"}})],1),o("a-form-item",[o("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveOptions}},[e._v("保存")])],1)],1)],1),o("a-tab-pane",{key:"post"},[o("span",{attrs:{slot:"tab"},slot:"tab"},[o("a-icon",{attrs:{type:"form"}}),e._v("文章设置\n ")],1),o("a-form",{attrs:{layout:"vertical"}},[o("a-form-item",{attrs:{label:"首页显示条数:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"number"},model:{value:e.options.post_index_page_size,callback:function(t){e.$set(e.options,"post_index_page_size",t)},expression:"options.post_index_page_size"}})],1),o("a-form-item",{attrs:{label:"RSS 显示条数:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"number"},model:{value:e.options.rss_page_size,callback:function(t){e.$set(e.options,"rss_page_size",t)},expression:"options.rss_page_size"}})],1),o("a-form-item",{attrs:{label:"文章摘要字数:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"number"},model:{value:e.options.post_summary_length,callback:function(t){e.$set(e.options,"post_summary_length",t)},expression:"options.post_summary_length"}})],1),o("a-form-item",[o("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveOptions}},[e._v("保存")])],1)],1)],1),o("a-tab-pane",{key:"comment"},[o("span",{attrs:{slot:"tab"},slot:"tab"},[o("a-icon",{attrs:{type:"message"}}),e._v("评论设置\n ")],1),o("a-form",{attrs:{layout:"vertical"}},[o("a-form-item",{attrs:{label:"评论者头像:","wrapper-col":e.wrapperCol}},[o("a-select",{model:{value:e.options.comment_gravatar_default,callback:function(t){e.$set(e.options,"comment_gravatar_default",t)},expression:"options.comment_gravatar_default"}},[o("a-select-option",{attrs:{value:"mm"}},[e._v("默认")]),o("a-select-option",{attrs:{value:"identicon"}},[e._v("抽象几何图形")]),o("a-select-option",{attrs:{value:"monsterid"}},[e._v("小怪物")]),o("a-select-option",{attrs:{value:"wavatar"}},[e._v("Wavatar")]),o("a-select-option",{attrs:{value:"retro"}},[e._v("复古")]),o("a-select-option",{attrs:{value:"robohash"}},[e._v("机器人")]),o("a-select-option",{attrs:{value:"blank"}},[e._v("不显示头像")])],1)],1),o("a-form-item",{attrs:{label:"评论审核后才显示:","wrapper-col":e.wrapperCol}},[o("a-switch",{model:{value:e.options.comment_new_need_check,callback:function(t){e.$set(e.options,"comment_new_need_check",t)},expression:"options.comment_new_need_check"}})],1),o("a-form-item",{attrs:{label:"新评论通知:","wrapper-col":e.wrapperCol}},[o("a-switch",{model:{value:e.options.comment_new_notice,callback:function(t){e.$set(e.options,"comment_new_notice",t)},expression:"options.comment_new_notice"}})],1),o("a-form-item",{attrs:{label:"评论回复通知对方:","wrapper-col":e.wrapperCol}},[o("a-switch",{model:{value:e.options.comment_reply_notice,callback:function(t){e.$set(e.options,"comment_reply_notice",t)},expression:"options.comment_reply_notice"}})],1),o("a-form-item",{attrs:{label:"API 评论开关:","wrapper-col":e.wrapperCol}},[o("a-switch",{model:{value:e.options.comment_api_enabled,callback:function(t){e.$set(e.options,"comment_api_enabled",t)},expression:"options.comment_api_enabled"}})],1),o("a-form-item",{attrs:{label:"每页显示条数: ","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"number"},model:{value:e.options.comment_page_size,callback:function(t){e.$set(e.options,"comment_page_size",t)},expression:"options.comment_page_size"}})],1),o("a-form-item",{attrs:{label:"占位提示:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.comment_content_placeholder,callback:function(t){e.$set(e.options,"comment_content_placeholder",t)},expression:"options.comment_content_placeholder"}})],1),o("a-form-item",[o("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveOptions}},[e._v("保存")])],1)],1)],1),o("a-tab-pane",{key:"attachment"},[o("span",{attrs:{slot:"tab"},slot:"tab"},[o("a-icon",{attrs:{type:"picture"}}),e._v("附件设置\n ")],1),o("a-form",{attrs:{layout:"vertical"}},[o("a-form-item",{attrs:{label:"存储位置:","wrapper-col":e.wrapperCol}},[o("a-select",{on:{change:e.handleAttachChange},model:{value:e.options.attachment_type,callback:function(t){e.$set(e.options,"attachment_type",t)},expression:"options.attachment_type"}},e._l(Object.keys(e.attachmentType),function(t){return o("a-select-option",{key:t,attrs:{value:t}},[e._v(e._s(e.attachmentType[t].text))])}),1)],1),o("div",{directives:[{name:"show",rawName:"v-show",value:e.upyunFormHidden,expression:"upyunFormHidden"}],staticClass:"upyunForm"},[o("a-form-item",{attrs:{label:"域名:","wrapper-col":e.wrapperCol}},[o("a-tooltip",{attrs:{trigger:["focus"],placement:"right",title:"需要加上 http:// 或者 https://"}},[o("a-input",{model:{value:e.options.oss_upyun_domain,callback:function(t){e.$set(e.options,"oss_upyun_domain",t)},expression:"options.oss_upyun_domain"}})],1)],1),o("a-form-item",{attrs:{label:"空间名称:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_upyun_bucket,callback:function(t){e.$set(e.options,"oss_upyun_bucket",t)},expression:"options.oss_upyun_bucket"}})],1),o("a-form-item",{attrs:{label:"操作员名称:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_upyun_operator,callback:function(t){e.$set(e.options,"oss_upyun_operator",t)},expression:"options.oss_upyun_operator"}})],1),o("a-form-item",{attrs:{label:"操作员密码:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"password"},model:{value:e.options.oss_upyun_password,callback:function(t){e.$set(e.options,"oss_upyun_password",t)},expression:"options.oss_upyun_password"}})],1),o("a-form-item",{attrs:{label:"文件目录:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_upyun_source,callback:function(t){e.$set(e.options,"oss_upyun_source",t)},expression:"options.oss_upyun_source"}})],1),o("a-form-item",{attrs:{label:"缩略图处理策略:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_upyun_style_rule,callback:function(t){e.$set(e.options,"oss_upyun_style_rule",t)},expression:"options.oss_upyun_style_rule"}})],1)],1),o("div",{directives:[{name:"show",rawName:"v-show",value:e.qnyunFormHidden,expression:"qnyunFormHidden"}],staticClass:"qnyunForm"},[o("a-form-item",{attrs:{label:"区域:","wrapper-col":e.wrapperCol}},[o("a-select",{model:{value:e.options.oss_qiniu_zone,callback:function(t){e.$set(e.options,"oss_qiniu_zone",t)},expression:"options.oss_qiniu_zone"}},[o("a-select-option",{attrs:{value:"auto"}},[e._v("自动选择")]),o("a-select-option",{attrs:{value:"z0"}},[e._v("华东")]),o("a-select-option",{attrs:{value:"z1"}},[e._v("华北")]),o("a-select-option",{attrs:{value:"z2"}},[e._v("华南")]),o("a-select-option",{attrs:{value:"na0"}},[e._v("北美")]),o("a-select-option",{attrs:{value:"as0"}},[e._v("东南亚")])],1)],1),o("a-form-item",{attrs:{label:"域名:","wrapper-col":e.wrapperCol}},[o("a-tooltip",{attrs:{trigger:["focus"],placement:"right",title:"需要加上 http:// 或者 https://"}},[o("a-input",{model:{value:e.options.oss_qiniu_domain,callback:function(t){e.$set(e.options,"oss_qiniu_domain",t)},expression:"options.oss_qiniu_domain"}})],1)],1),o("a-form-item",{attrs:{label:"Access Key:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_qiniu_access_key,callback:function(t){e.$set(e.options,"oss_qiniu_access_key",t)},expression:"options.oss_qiniu_access_key"}})],1),o("a-form-item",{attrs:{label:"Secret Key:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_qiniu_secret_key,callback:function(t){e.$set(e.options,"oss_qiniu_secret_key",t)},expression:"options.oss_qiniu_secret_key"}})],1),o("a-form-item",{attrs:{label:"Bucket:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_qiniu_bucket,callback:function(t){e.$set(e.options,"oss_qiniu_bucket",t)},expression:"options.oss_qiniu_bucket"}})],1),o("a-form-item",{attrs:{label:"缩略图处理策略:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_qiniu_style_rule,callback:function(t){e.$set(e.options,"oss_qiniu_style_rule",t)},expression:"options.oss_qiniu_style_rule"}})],1)],1),o("div",{directives:[{name:"show",rawName:"v-show",value:e.aliyunFormHidden,expression:"aliyunFormHidden"}],staticClass:"aliyunForm"},[o("a-form-item",{attrs:{label:"Bucket:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_aliyun_bucket_name,callback:function(t){e.$set(e.options,"oss_aliyun_bucket_name",t)},expression:"options.oss_aliyun_bucket_name"}})],1),o("a-form-item",{attrs:{label:"EndPoint(地域节点):","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_aliyun_endpoint,callback:function(t){e.$set(e.options,"oss_aliyun_endpoint",t)},expression:"options.oss_aliyun_endpoint"}})],1),o("a-form-item",{attrs:{label:"Access Key:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_aliyun_access_key,callback:function(t){e.$set(e.options,"oss_aliyun_access_key",t)},expression:"options.oss_aliyun_access_key"}})],1),o("a-form-item",{attrs:{label:"Access Secret:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_aliyun_access_secret,callback:function(t){e.$set(e.options,"oss_aliyun_access_secret",t)},expression:"options.oss_aliyun_access_secret"}})],1),o("a-form-item",{attrs:{label:"缩略图处理策略:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_aliyun_style_rule,callback:function(t){e.$set(e.options,"oss_aliyun_style_rule",t)},expression:"options.oss_aliyun_style_rule"}})],1)],1),o("a-form-item",[o("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveOptions}},[e._v("保存")])],1)],1)],1),o("a-tab-pane",{key:"smtp"},[o("span",{attrs:{slot:"tab"},slot:"tab"},[o("a-icon",{attrs:{type:"mail"}}),e._v("SMTP 服务\n ")],1),o("div",{staticClass:"custom-tab-wrapper"},[o("a-tabs",[o("a-tab-pane",{key:"1",attrs:{tab:"发信设置"}},[o("a-form",{attrs:{layout:"vertical"}},[o("a-form-item",{attrs:{label:"是否启用:","wrapper-col":e.wrapperCol}},[o("a-switch",{model:{value:e.options.email_enabled,callback:function(t){e.$set(e.options,"email_enabled",t)},expression:"options.email_enabled"}})],1),o("a-form-item",{attrs:{label:"SMTP 地址:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.email_host,callback:function(t){e.$set(e.options,"email_host",t)},expression:"options.email_host"}})],1),o("a-form-item",{attrs:{label:"发送协议:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.email_protocol,callback:function(t){e.$set(e.options,"email_protocol",t)},expression:"options.email_protocol"}})],1),o("a-form-item",{attrs:{label:"SSL 端口:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.email_ssl_port,callback:function(t){e.$set(e.options,"email_ssl_port",t)},expression:"options.email_ssl_port"}})],1),o("a-form-item",{attrs:{label:"邮箱账号:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.email_username,callback:function(t){e.$set(e.options,"email_username",t)},expression:"options.email_username"}})],1),o("a-form-item",{attrs:{label:"邮箱密码:","wrapper-col":e.wrapperCol}},[o("a-tooltip",{attrs:{trigger:["focus"],placement:"right",title:"部分邮箱可能是授权码"}},[o("a-input",{model:{value:e.options.email_password,callback:function(t){e.$set(e.options,"email_password",t)},expression:"options.email_password"}})],1)],1),o("a-form-item",{attrs:{label:"发件人:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.email_from_name,callback:function(t){e.$set(e.options,"email_from_name",t)},expression:"options.email_from_name"}})],1),o("a-form-item",[o("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveOptions}},[e._v("保存")])],1)],1)],1),o("a-tab-pane",{key:"2",attrs:{tab:"发送测试"}},[o("a-form",{attrs:{layout:"vertical"}},[o("a-form-item",{attrs:{label:"收件人:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.mailParam.to,callback:function(t){e.$set(e.mailParam,"to",t)},expression:"mailParam.to"}})],1),o("a-form-item",{attrs:{label:"主题:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.mailParam.subject,callback:function(t){e.$set(e.mailParam,"subject",t)},expression:"mailParam.subject"}})],1),o("a-form-item",{attrs:{label:"内容:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"textarea",autosize:{minRows:5}},model:{value:e.mailParam.content,callback:function(t){e.$set(e.mailParam,"content",t)},expression:"mailParam.content"}})],1),o("a-form-item",[o("a-button",{attrs:{type:"primary"},on:{click:e.handleTestMailClick}},[e._v("发送")])],1)],1)],1)],1)],1)]),o("a-tab-pane",{key:"api"},[o("span",{attrs:{slot:"tab"},slot:"tab"},[o("a-icon",{attrs:{type:"align-left"}}),e._v("API 设置\n ")],1),o("a-form",{attrs:{layout:"vertical"}},[o("a-form-item",{attrs:{label:"API 服务:","wrapper-col":e.wrapperCol}},[o("a-switch",{model:{value:e.options.api_enabled,callback:function(t){e.$set(e.options,"api_enabled",t)},expression:"options.api_enabled"}})],1),o("a-form-item",{attrs:{label:"Access key:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.api_access_key,callback:function(t){e.$set(e.options,"api_access_key",t)},expression:"options.api_access_key"}})],1),o("a-form-item",[o("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveOptions}},[e._v("保存")])],1)],1)],1),o("a-tab-pane",{key:"other"},[o("span",{attrs:{slot:"tab"},slot:"tab"},[o("a-icon",{attrs:{type:"align-left"}}),e._v("其他设置\n ")],1),o("a-form",{attrs:{layout:"vertical"}},[o("a-form-item",{attrs:{label:"自定义 head:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"textarea",autosize:{minRows:5}},model:{value:e.options.blog_custom_head,callback:function(t){e.$set(e.options,"blog_custom_head",t)},expression:"options.blog_custom_head"}})],1),o("a-form-item",{attrs:{label:"统计代码:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"textarea",autosize:{minRows:5}},model:{value:e.options.blog_statistics_code,callback:function(t){e.$set(e.options,"blog_statistics_code",t)},expression:"options.blog_statistics_code"}})],1),o("a-form-item",[o("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveOptions}},[e._v("保存")])],1)],1)],1)],1)],1)])],1),o("AttachmentSelectDrawer",{attrs:{title:"选择 Logo"},on:{listenToSelect:e.handleSelectLogo},model:{value:e.logoDrawerVisible,callback:function(t){e.logoDrawerVisible=t},expression:"logoDrawerVisible"}}),o("AttachmentSelectDrawer",{attrs:{title:"选择 Favicon"},on:{listenToSelect:e.handleSelectFavicon},model:{value:e.faviconDrawerVisible,callback:function(t){e.faviconDrawerVisible=t},expression:"faviconDrawerVisible"}})],1)},s=[],n=a("e20c"),i=a("3993"),l=a("482b"),r=a("9efd"),p="/api/admin/mails",c={testMail:function(t){return Object(r["a"])({url:"".concat(p,"/test"),method:"post",data:t})}},u=c,m=a("a796"),d=a("591a"),_={components:{AttachmentSelectDrawer:i["a"]},data:function(){return{attachmentType:m["a"].type,wrapperCol:{xl:{span:8},lg:{span:8},sm:{span:12},xs:{span:24}},upyunFormHidden:!1,qnyunFormHidden:!1,aliyunFormHidden:!1,logoDrawerVisible:!1,faviconDrawerVisible:!1,options:[],mailParam:{}}},mounted:function(){this.loadOptions()},methods:Object(n["a"])({},Object(d["b"])(["loadUser"]),{loadOptions:function(){var t=this;l["a"].listAll().then(function(e){t.options=e.data.data,t.handleAttachChange(t.options["attachment_type"])})},handleSaveOptions:function(){var t=this;l["a"].save(this.options).then(function(e){t.loadOptions(),t.loadUser(),t.$message.success("保存成功!")})},handleAttachChange:function(t){switch(t){case"LOCAL":case"SMMS":this.upyunFormHidden=!1,this.qnyunFormHidden=!1,this.aliyunFormHidden=!1;break;case"UPYUN":this.upyunFormHidden=!0,this.qnyunFormHidden=!1,this.aliyunFormHidden=!1;break;case"QNYUN":this.qnyunFormHidden=!0,this.upyunFormHidden=!1,this.aliyunFormHidden=!1;break;case"ALIYUN":this.aliyunFormHidden=!0,this.qnyunFormHidden=!1,this.upyunFormHidden=!1;break}},handleSelectLogo:function(t){this.options.blog_logo=t.path,this.logoDrawerVisible=!1},handleTestMailClick:function(){var t=this;u.testMail(this.mailParam).then(function(e){t.$message.info(e.data.message)})},handleSelectFavicon:function(t){this.options.blog_favicon=t.path,this.faviconDrawerVisible=!1}})},b=_,f=a("17cc"),v=Object(f["a"])(b,o,s,!1,null,null,null);e["default"]=v.exports},"307b":function(t,e,a){"use strict";var o=a("6fda"),s=a.n(o);s.a},3993:function(t,e,a){"use strict";var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-drawer",{attrs:{title:t.title,width:t.isMobile()?"100%":t.drawerWidth,closable:"",visible:t.visiable,destroyOnClose:""},on:{close:t.onClose}},[a("a-row",{attrs:{type:"flex",align:"middle"}},[a("a-input-search",{attrs:{placeholder:"搜索附件",enterButton:""}})],1),a("a-divider"),a("a-row",{attrs:{type:"flex",align:"middle"}},[a("a-skeleton",{attrs:{active:"",loading:t.skeletonLoading,paragraph:{rows:18}}},[a("a-col",{attrs:{span:24}},t._l(t.attachments,function(e,o){return a("div",{key:o,staticClass:"attach-item",on:{click:function(a){return t.handleSelectAttachment(e)}}},[a("img",{attrs:{src:e.thumbPath}})])}),0)],1)],1),a("a-divider"),a("div",{staticClass:"page-wrapper"},[a("a-pagination",{attrs:{defaultPageSize:t.pagination.size,total:t.pagination.total},on:{change:t.handlePaginationChange}})],1),a("a-divider",{staticClass:"divider-transparent"}),a("div",{staticClass:"bottom-control"},[a("a-button",{attrs:{type:"primary"},on:{click:t.handleShowUploadModal}},[t._v("上传附件")])],1)],1),a("a-modal",{attrs:{title:"上传附件",footer:null,afterClose:t.onUploadClose},model:{value:t.uploadVisible,callback:function(e){t.uploadVisible=e},expression:"uploadVisible"}},[a("upload",{attrs:{name:"file",multiple:"",uploadHandler:t.attachmentUploadHandler}},[a("p",{staticClass:"ant-upload-drag-icon"},[a("a-icon",{attrs:{type:"inbox"}})],1),a("p",{staticClass:"ant-upload-text"},[t._v("点击选择文件或将文件拖拽到此处")]),a("p",{staticClass:"ant-upload-hint"},[t._v("支持单个或批量上传")])])],1)],1)},s=[],n=(a("d4d5"),a("ac0d")),i=a("a796"),l={name:"AttachmentSelectDrawer",mixins:[n["a"],n["b"]],model:{prop:"visiable",event:"close"},props:{visiable:{type:Boolean,required:!1,default:!1},drawerWidth:{type:Number,required:!1,default:460},title:{type:String,required:!1,default:"选择附件"}},data:function(){return{uploadVisible:!1,skeletonLoading:!0,pagination:{page:1,size:12,sort:""},attachments:[],attachmentUploadHandler:i["a"].upload}},created:function(){this.loadSkeleton(),this.loadAttachments()},watch:{visiable:function(t,e){t&&this.loadSkeleton()}},methods:{loadSkeleton:function(){var t=this;this.skeletonLoading=!0,setTimeout(function(){t.skeletonLoading=!1},500)},handleShowUploadModal:function(){this.uploadVisible=!0},loadAttachments:function(){var t=this,e=Object.assign({},this.pagination);e.page--,i["a"].query(e).then(function(e){t.attachments=e.data.data.content,t.pagination.total=e.data.data.total})},handleSelectAttachment:function(t){this.$emit("listenToSelect",t)},handlePaginationChange:function(t,e){this.pagination.page=t,this.pagination.size=e,this.loadAttachments()},handleAttachmentUploadSuccess:function(){this.$message.success("上传成功!"),this.loadAttachments()},onUploadClose:function(){this.loadSkeleton(),this.loadAttachments()},onClose:function(){this.$emit("close",!1)}}},r=l,p=(a("307b"),a("17cc")),c=Object(p["a"])(r,o,s,!1,null,null,null);e["a"]=c.exports},"6fda":function(t,e,a){},a796:function(t,e,a){"use strict";var o=a("f753"),s=a.n(o),n=a("9efd"),i="/api/admin/attachments",l={query:function(t){return Object(n["a"])({url:i,params:t,method:"get"})},get:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"get"})},delete:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"delete"})},update:function(t,e){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"put",data:e})},getMediaTypes:function(){return Object(n["a"])({url:"".concat(i,"/media_types"),method:"get"})}};l.CancelToken=s.a.CancelToken,l.isCancel=s.a.isCancel,l.upload=function(t,e,a){return Object(n["a"])({url:"".concat(i,"/upload"),timeout:864e4,data:t,onUploadProgress:e,cancelToken:a,method:"post"})},l.uploads=function(t,e,a){return Object(n["a"])({url:"".concat(i,"/uploads"),timeout:864e4,data:t,onUploadProgress:e,cancelToken:a,method:"post"})},l.type={LOCAL:{type:"local",text:"本地"},SMMS:{type:"smms",text:"SM.MS"},UPYUN:{type:"upyun",text:"又拍云"},QNYUN:{type:"qnyun",text:"七牛云"},ALIYUN:{type:"aliyun",text:"阿里云"}},e["a"]=l}}]); \ No newline at end of file diff --git a/src/main/resources/admin/js/chunk-bb4f0d4a.ef7d1ded.js b/src/main/resources/admin/js/chunk-bb4f0d4a.ef7d1ded.js deleted file mode 100644 index 63824b98b..000000000 --- a/src/main/resources/admin/js/chunk-bb4f0d4a.ef7d1ded.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-bb4f0d4a"],{"26ea":function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=this,a=e.$createElement,o=e._self._c||a;return o("div",{staticClass:"page-header-index-wide"},[o("a-row",[o("a-col",{attrs:{span:24}},[o("div",{staticClass:"card-container"},[o("a-tabs",{attrs:{type:"card"}},[o("a-tab-pane",{key:"general"},[o("span",{attrs:{slot:"tab"},slot:"tab"},[o("a-icon",{attrs:{type:"tool"}}),e._v("常规设置\n ")],1),o("a-form",{attrs:{layout:"vertical"}},[o("a-form-item",{attrs:{label:"博客标题:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.blog_title,callback:function(t){e.$set(e.options,"blog_title",t)},expression:"options.blog_title"}})],1),o("a-form-item",{attrs:{label:"博客地址:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{placeholder:"如:https://halo.run"},model:{value:e.options.blog_url,callback:function(t){e.$set(e.options,"blog_url",t)},expression:"options.blog_url"}})],1),o("a-form-item",{attrs:{label:"Logo:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.blog_logo,callback:function(t){e.$set(e.options,"blog_logo",t)},expression:"options.blog_logo"}},[o("a",{attrs:{slot:"addonAfter",href:"javascript:void(0);"},on:{click:function(){return t.logoDrawerVisible=!0}},slot:"addonAfter"},[o("a-icon",{attrs:{type:"picture"}})],1)])],1),o("a-form-item",{attrs:{label:"Favicon:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.blog_favicon,callback:function(t){e.$set(e.options,"blog_favicon",t)},expression:"options.blog_favicon"}},[o("a",{attrs:{slot:"addonAfter",href:"javascript:void(0);"},on:{click:function(){return t.faviconDrawerVisible=!0}},slot:"addonAfter"},[o("a-icon",{attrs:{type:"picture"}})],1)])],1),o("a-form-item",{attrs:{label:"页脚信息:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"textarea",autosize:{minRows:5}},model:{value:e.options.blog_footer_info,callback:function(t){e.$set(e.options,"blog_footer_info",t)},expression:"options.blog_footer_info"}})],1),o("a-form-item",[o("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveOptions}},[e._v("保存")])],1)],1)],1),o("a-tab-pane",{key:"seo"},[o("span",{attrs:{slot:"tab"},slot:"tab"},[o("a-icon",{attrs:{type:"global"}}),e._v("SEO 设置\n ")],1),o("a-form",{attrs:{layout:"vertical"}},[o("a-form-item",{attrs:{label:"关键词: ","wrapper-col":e.wrapperCol}},[o("a-tooltip",{attrs:{trigger:["focus"],placement:"right",title:"多个关键词以英文逗号隔开"}},[o("a-input",{model:{value:e.options.seo_keywords,callback:function(t){e.$set(e.options,"seo_keywords",t)},expression:"options.seo_keywords"}})],1)],1),o("a-form-item",{attrs:{label:"博客描述:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.seo_description,callback:function(t){e.$set(e.options,"seo_description",t)},expression:"options.seo_description"}})],1),o("a-form-item",{attrs:{label:"百度站点验证:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.seo_verification_baidu,callback:function(t){e.$set(e.options,"seo_verification_baidu",t)},expression:"options.seo_verification_baidu"}})],1),o("a-form-item",{attrs:{label:"Google 站点验证:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.seo_verification_google,callback:function(t){e.$set(e.options,"seo_verification_google",t)},expression:"options.seo_verification_google"}})],1),o("a-form-item",{attrs:{label:"Bing 站点验证:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.seo_verification_bing,callback:function(t){e.$set(e.options,"seo_verification_bing",t)},expression:"options.seo_verification_bing"}})],1),o("a-form-item",{attrs:{label:"360 站点验证:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.seo_verification_qihu,callback:function(t){e.$set(e.options,"seo_verification_qihu",t)},expression:"options.seo_verification_qihu"}})],1),o("a-form-item",[o("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveOptions}},[e._v("保存")])],1)],1)],1),o("a-tab-pane",{key:"post"},[o("span",{attrs:{slot:"tab"},slot:"tab"},[o("a-icon",{attrs:{type:"form"}}),e._v("文章设置\n ")],1),o("a-form",{attrs:{layout:"vertical"}},[o("a-form-item",{attrs:{label:"首页显示条数:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"number"},model:{value:e.options.post_index_page_size,callback:function(t){e.$set(e.options,"post_index_page_size",t)},expression:"options.post_index_page_size"}})],1),o("a-form-item",{attrs:{label:"RSS 显示条数:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"number"},model:{value:e.options.rss_page_size,callback:function(t){e.$set(e.options,"rss_page_size",t)},expression:"options.rss_page_size"}})],1),o("a-form-item",{attrs:{label:"文章摘要字数:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"number"},model:{value:e.options.post_summary_length,callback:function(t){e.$set(e.options,"post_summary_length",t)},expression:"options.post_summary_length"}})],1),o("a-form-item",[o("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveOptions}},[e._v("保存")])],1)],1)],1),o("a-tab-pane",{key:"comment"},[o("span",{attrs:{slot:"tab"},slot:"tab"},[o("a-icon",{attrs:{type:"message"}}),e._v("评论设置\n ")],1),o("a-form",{attrs:{layout:"vertical"}},[o("a-form-item",{attrs:{label:"评论者头像:","wrapper-col":e.wrapperCol}},[o("a-select",{model:{value:e.options.comment_gravatar_default,callback:function(t){e.$set(e.options,"comment_gravatar_default",t)},expression:"options.comment_gravatar_default"}},[o("a-select-option",{attrs:{value:"mm"}},[e._v("默认")]),o("a-select-option",{attrs:{value:"identicon"}},[e._v("抽象几何图形")]),o("a-select-option",{attrs:{value:"monsterid"}},[e._v("小怪物")]),o("a-select-option",{attrs:{value:"wavatar"}},[e._v("Wavatar")]),o("a-select-option",{attrs:{value:"retro"}},[e._v("复古")]),o("a-select-option",{attrs:{value:"robohash"}},[e._v("机器人")]),o("a-select-option",{attrs:{value:"blank"}},[e._v("不显示头像")])],1)],1),o("a-form-item",{attrs:{label:"评论审核后才显示:","wrapper-col":e.wrapperCol}},[o("a-switch",{model:{value:e.options.comment_new_need_check,callback:function(t){e.$set(e.options,"comment_new_need_check",t)},expression:"options.comment_new_need_check"}})],1),o("a-form-item",{attrs:{label:"新评论通知:","wrapper-col":e.wrapperCol}},[o("a-switch",{model:{value:e.options.comment_new_notice,callback:function(t){e.$set(e.options,"comment_new_notice",t)},expression:"options.comment_new_notice"}})],1),o("a-form-item",{attrs:{label:"评论回复通知对方:","wrapper-col":e.wrapperCol}},[o("a-switch",{model:{value:e.options.comment_reply_notice,callback:function(t){e.$set(e.options,"comment_reply_notice",t)},expression:"options.comment_reply_notice"}})],1),o("a-form-item",{attrs:{label:"API 评论开关:","wrapper-col":e.wrapperCol}},[o("a-switch",{model:{value:e.options.comment_api_enabled,callback:function(t){e.$set(e.options,"comment_api_enabled",t)},expression:"options.comment_api_enabled"}})],1),o("a-form-item",{attrs:{label:"每页显示条数: ","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"number"},model:{value:e.options.comment_page_size,callback:function(t){e.$set(e.options,"comment_page_size",t)},expression:"options.comment_page_size"}})],1),o("a-form-item",{attrs:{label:"占位提示:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.comment_content_placeholder,callback:function(t){e.$set(e.options,"comment_content_placeholder",t)},expression:"options.comment_content_placeholder"}})],1),o("a-form-item",[o("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveOptions}},[e._v("保存")])],1)],1)],1),o("a-tab-pane",{key:"attachment"},[o("span",{attrs:{slot:"tab"},slot:"tab"},[o("a-icon",{attrs:{type:"picture"}}),e._v("附件设置\n ")],1),o("a-form",{attrs:{layout:"vertical"}},[o("a-form-item",{attrs:{label:"存储位置:","wrapper-col":e.wrapperCol}},[o("a-select",{on:{change:e.handleAttachChange},model:{value:e.options.attachment_type,callback:function(t){e.$set(e.options,"attachment_type",t)},expression:"options.attachment_type"}},e._l(Object.keys(e.attachmentType),function(t){return o("a-select-option",{key:t,attrs:{value:t}},[e._v(e._s(e.attachmentType[t].text))])}),1)],1),o("div",{directives:[{name:"show",rawName:"v-show",value:e.upyunFormHidden,expression:"upyunFormHidden"}],staticClass:"upyunForm"},[o("a-form-item",{attrs:{label:"域名:","wrapper-col":e.wrapperCol}},[o("a-tooltip",{attrs:{trigger:["focus"],placement:"right",title:"需要加上 http:// 或者 https://"}},[o("a-input",{model:{value:e.options.oss_upyun_domain,callback:function(t){e.$set(e.options,"oss_upyun_domain",t)},expression:"options.oss_upyun_domain"}})],1)],1),o("a-form-item",{attrs:{label:"空间名称:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_upyun_bucket,callback:function(t){e.$set(e.options,"oss_upyun_bucket",t)},expression:"options.oss_upyun_bucket"}})],1),o("a-form-item",{attrs:{label:"操作员名称:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_upyun_operator,callback:function(t){e.$set(e.options,"oss_upyun_operator",t)},expression:"options.oss_upyun_operator"}})],1),o("a-form-item",{attrs:{label:"操作员密码:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"password"},model:{value:e.options.oss_upyun_password,callback:function(t){e.$set(e.options,"oss_upyun_password",t)},expression:"options.oss_upyun_password"}})],1),o("a-form-item",{attrs:{label:"文件目录:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_upyun_source,callback:function(t){e.$set(e.options,"oss_upyun_source",t)},expression:"options.oss_upyun_source"}})],1),o("a-form-item",{attrs:{label:"缩略图处理策略:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_upyun_style_rule,callback:function(t){e.$set(e.options,"oss_upyun_style_rule",t)},expression:"options.oss_upyun_style_rule"}})],1)],1),o("div",{directives:[{name:"show",rawName:"v-show",value:e.qnyunFormHidden,expression:"qnyunFormHidden"}],staticClass:"qnyunForm"},[o("a-form-item",{attrs:{label:"区域:","wrapper-col":e.wrapperCol}},[o("a-select",{model:{value:e.options.oss_qiniu_zone,callback:function(t){e.$set(e.options,"oss_qiniu_zone",t)},expression:"options.oss_qiniu_zone"}},[o("a-select-option",{attrs:{value:"auto"}},[e._v("自动选择")]),o("a-select-option",{attrs:{value:"z0"}},[e._v("华东")]),o("a-select-option",{attrs:{value:"z1"}},[e._v("华北")]),o("a-select-option",{attrs:{value:"z2"}},[e._v("华南")]),o("a-select-option",{attrs:{value:"na0"}},[e._v("北美")]),o("a-select-option",{attrs:{value:"as0"}},[e._v("东南亚")])],1)],1),o("a-form-item",{attrs:{label:"域名:","wrapper-col":e.wrapperCol}},[o("a-tooltip",{attrs:{trigger:["focus"],placement:"right",title:"需要加上 http:// 或者 https://"}},[o("a-input",{model:{value:e.options.oss_qiniu_domain,callback:function(t){e.$set(e.options,"oss_qiniu_domain",t)},expression:"options.oss_qiniu_domain"}})],1)],1),o("a-form-item",{attrs:{label:"Access Key:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_qiniu_access_key,callback:function(t){e.$set(e.options,"oss_qiniu_access_key",t)},expression:"options.oss_qiniu_access_key"}})],1),o("a-form-item",{attrs:{label:"Secret Key:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_qiniu_secret_key,callback:function(t){e.$set(e.options,"oss_qiniu_secret_key",t)},expression:"options.oss_qiniu_secret_key"}})],1),o("a-form-item",{attrs:{label:"Bucket:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_qiniu_bucket,callback:function(t){e.$set(e.options,"oss_qiniu_bucket",t)},expression:"options.oss_qiniu_bucket"}})],1),o("a-form-item",{attrs:{label:"缩略图处理策略:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_qiniu_style_rule,callback:function(t){e.$set(e.options,"oss_qiniu_style_rule",t)},expression:"options.oss_qiniu_style_rule"}})],1)],1),o("div",{directives:[{name:"show",rawName:"v-show",value:e.aliyunFormHidden,expression:"aliyunFormHidden"}],staticClass:"aliyunForm"},[o("a-form-item",{attrs:{label:"Bucket:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_aliyun_bucket_name,callback:function(t){e.$set(e.options,"oss_aliyun_bucket_name",t)},expression:"options.oss_aliyun_bucket_name"}})],1),o("a-form-item",{attrs:{label:"EndPoint(地域节点):","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_aliyun_endpoint,callback:function(t){e.$set(e.options,"oss_aliyun_endpoint",t)},expression:"options.oss_aliyun_endpoint"}})],1),o("a-form-item",{attrs:{label:"Access Key:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_aliyun_access_key,callback:function(t){e.$set(e.options,"oss_aliyun_access_key",t)},expression:"options.oss_aliyun_access_key"}})],1),o("a-form-item",{attrs:{label:"Access Secret:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_aliyun_access_secret,callback:function(t){e.$set(e.options,"oss_aliyun_access_secret",t)},expression:"options.oss_aliyun_access_secret"}})],1),o("a-form-item",{attrs:{label:"缩略图处理策略:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.oss_aliyun_style_rule,callback:function(t){e.$set(e.options,"oss_aliyun_style_rule",t)},expression:"options.oss_aliyun_style_rule"}})],1)],1),o("a-form-item",[o("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveOptions}},[e._v("保存")])],1)],1)],1),o("a-tab-pane",{key:"smtp"},[o("span",{attrs:{slot:"tab"},slot:"tab"},[o("a-icon",{attrs:{type:"mail"}}),e._v("SMTP 服务\n ")],1),o("div",{staticClass:"custom-tab-wrapper"},[o("a-tabs",[o("a-tab-pane",{key:"1",attrs:{tab:"发信设置"}},[o("a-form",{attrs:{layout:"vertical"}},[o("a-form-item",{attrs:{label:"是否启用:","wrapper-col":e.wrapperCol}},[o("a-switch",{model:{value:e.options.email_enabled,callback:function(t){e.$set(e.options,"email_enabled",t)},expression:"options.email_enabled"}})],1),o("a-form-item",{attrs:{label:"SMTP 地址:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.email_host,callback:function(t){e.$set(e.options,"email_host",t)},expression:"options.email_host"}})],1),o("a-form-item",{attrs:{label:"发送协议:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.email_protocol,callback:function(t){e.$set(e.options,"email_protocol",t)},expression:"options.email_protocol"}})],1),o("a-form-item",{attrs:{label:"SSL 端口:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.email_ssl_port,callback:function(t){e.$set(e.options,"email_ssl_port",t)},expression:"options.email_ssl_port"}})],1),o("a-form-item",{attrs:{label:"邮箱账号:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.email_username,callback:function(t){e.$set(e.options,"email_username",t)},expression:"options.email_username"}})],1),o("a-form-item",{attrs:{label:"邮箱密码:","wrapper-col":e.wrapperCol}},[o("a-tooltip",{attrs:{trigger:["focus"],placement:"right",title:"部分邮箱可能是授权码"}},[o("a-input",{model:{value:e.options.email_password,callback:function(t){e.$set(e.options,"email_password",t)},expression:"options.email_password"}})],1)],1),o("a-form-item",{attrs:{label:"发件人:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.email_from_name,callback:function(t){e.$set(e.options,"email_from_name",t)},expression:"options.email_from_name"}})],1),o("a-form-item",[o("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveOptions}},[e._v("保存")])],1)],1)],1),o("a-tab-pane",{key:"2",attrs:{tab:"发送测试"}},[o("a-form",{attrs:{layout:"vertical"}},[o("a-form-item",{attrs:{label:"收件人:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.mailParam.to,callback:function(t){e.$set(e.mailParam,"to",t)},expression:"mailParam.to"}})],1),o("a-form-item",{attrs:{label:"主题:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.mailParam.subject,callback:function(t){e.$set(e.mailParam,"subject",t)},expression:"mailParam.subject"}})],1),o("a-form-item",{attrs:{label:"内容:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"textarea",autosize:{minRows:5}},model:{value:e.mailParam.content,callback:function(t){e.$set(e.mailParam,"content",t)},expression:"mailParam.content"}})],1),o("a-form-item",[o("a-button",{attrs:{type:"primary"},on:{click:e.handleTestMailClick}},[e._v("发送")])],1)],1)],1)],1)],1)]),o("a-tab-pane",{key:"other"},[o("span",{attrs:{slot:"tab"},slot:"tab"},[o("a-icon",{attrs:{type:"align-left"}}),e._v("其他设置\n ")],1),o("a-form",{attrs:{layout:"vertical"}},[o("a-form-item",{attrs:{label:"API 服务:","wrapper-col":e.wrapperCol}},[o("a-switch",{model:{value:e.options.api_enabled,callback:function(t){e.$set(e.options,"api_enabled",t)},expression:"options.api_enabled"}})],1),o("a-form-item",{attrs:{label:"Access key:","wrapper-col":e.wrapperCol}},[o("a-input",{model:{value:e.options.api_access_key,callback:function(t){e.$set(e.options,"api_access_key",t)},expression:"options.api_access_key"}})],1),o("a-form-item",{attrs:{label:"屏蔽搜索引擎:","wrapper-col":e.wrapperCol}},[o("a-switch",{model:{value:e.options.spider_disabled,callback:function(t){e.$set(e.options,"spider_disabled",t)},expression:"options.spider_disabled"}})],1),o("a-form-item",{attrs:{label:"自定义 head:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"textarea",autosize:{minRows:5}},model:{value:e.options.blog_custom_head,callback:function(t){e.$set(e.options,"blog_custom_head",t)},expression:"options.blog_custom_head"}})],1),o("a-form-item",{attrs:{label:"统计代码:","wrapper-col":e.wrapperCol}},[o("a-input",{attrs:{type:"textarea",autosize:{minRows:5}},model:{value:e.options.blog_statistics_code,callback:function(t){e.$set(e.options,"blog_statistics_code",t)},expression:"options.blog_statistics_code"}})],1),o("a-form-item",[o("a-button",{attrs:{type:"primary"},on:{click:e.handleSaveOptions}},[e._v("保存")])],1)],1)],1)],1)],1)])],1),o("AttachmentSelectDrawer",{attrs:{title:"选择 Logo"},on:{listenToSelect:e.handleSelectLogo},model:{value:e.logoDrawerVisible,callback:function(t){e.logoDrawerVisible=t},expression:"logoDrawerVisible"}}),o("AttachmentSelectDrawer",{attrs:{title:"选择 Favicon"},on:{listenToSelect:e.handleSelectFavicon},model:{value:e.faviconDrawerVisible,callback:function(t){e.faviconDrawerVisible=t},expression:"faviconDrawerVisible"}})],1)},s=[],n=a("e20c"),i=a("3993"),l=a("482b"),r=a("9efd"),p="/api/admin/mails",c={testMail:function(t){return Object(r["a"])({url:"".concat(p,"/test"),method:"post",data:t})}},u=c,m=a("a796"),d=a("591a"),_={components:{AttachmentSelectDrawer:i["a"]},data:function(){return{attachmentType:m["a"].type,wrapperCol:{xl:{span:8},lg:{span:8},sm:{span:12},xs:{span:24}},upyunFormHidden:!1,qnyunFormHidden:!1,aliyunFormHidden:!1,logoDrawerVisible:!1,faviconDrawerVisible:!1,options:[],mailParam:{}}},mounted:function(){this.loadOptions()},methods:Object(n["a"])({},Object(d["b"])(["loadUser"]),{loadOptions:function(){var t=this;l["a"].listAll().then(function(e){t.options=e.data.data,t.handleAttachChange(t.options["attachment_type"])})},handleSaveOptions:function(){var t=this;l["a"].save(this.options).then(function(e){t.loadOptions(),t.loadUser(),t.$message.success("保存成功!")})},handleAttachChange:function(t){switch(t){case"LOCAL":case"SMMS":this.upyunFormHidden=!1,this.qnyunFormHidden=!1,this.aliyunFormHidden=!1;break;case"UPYUN":this.upyunFormHidden=!0,this.qnyunFormHidden=!1,this.aliyunFormHidden=!1;break;case"QNYUN":this.qnyunFormHidden=!0,this.upyunFormHidden=!1,this.aliyunFormHidden=!1;break;case"ALIYUN":this.aliyunFormHidden=!0,this.qnyunFormHidden=!1,this.upyunFormHidden=!1;break}},handleSelectLogo:function(t){this.options.blog_logo=t.path,this.logoDrawerVisible=!1},handleTestMailClick:function(){var t=this;u.testMail(this.mailParam).then(function(e){t.$message.info(e.data.message)})},handleSelectFavicon:function(t){this.options.blog_favicon=t.path,this.faviconDrawerVisible=!1}})},b=_,f=a("17cc"),v=Object(f["a"])(b,o,s,!1,null,null,null);e["default"]=v.exports},"307b":function(t,e,a){"use strict";var o=a("6fda"),s=a.n(o);s.a},3993:function(t,e,a){"use strict";var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-drawer",{attrs:{title:t.title,width:t.isMobile()?"100%":t.drawerWidth,closable:"",visible:t.visiable,destroyOnClose:""},on:{close:t.onClose}},[a("a-row",{attrs:{type:"flex",align:"middle"}},[a("a-input-search",{attrs:{placeholder:"搜索附件",enterButton:""}})],1),a("a-divider"),a("a-row",{attrs:{type:"flex",align:"middle"}},[a("a-skeleton",{attrs:{active:"",loading:t.skeletonLoading,paragraph:{rows:18}}},[a("a-col",{attrs:{span:24}},t._l(t.attachments,function(e,o){return a("div",{key:o,staticClass:"attach-item",on:{click:function(a){return t.handleSelectAttachment(e)}}},[a("img",{attrs:{src:e.thumbPath}})])}),0)],1)],1),a("a-divider"),a("div",{staticClass:"page-wrapper"},[a("a-pagination",{attrs:{defaultPageSize:t.pagination.size,total:t.pagination.total},on:{change:t.handlePaginationChange}})],1),a("a-divider",{staticClass:"divider-transparent"}),a("div",{staticClass:"bottom-control"},[a("a-button",{attrs:{type:"primary"},on:{click:t.handleShowUploadModal}},[t._v("上传附件")])],1)],1),a("a-modal",{attrs:{title:"上传附件",footer:null,afterClose:t.onUploadClose},model:{value:t.uploadVisible,callback:function(e){t.uploadVisible=e},expression:"uploadVisible"}},[a("upload",{attrs:{name:"file",multiple:"",uploadHandler:t.attachmentUploadHandler}},[a("p",{staticClass:"ant-upload-drag-icon"},[a("a-icon",{attrs:{type:"inbox"}})],1),a("p",{staticClass:"ant-upload-text"},[t._v("点击选择文件或将文件拖拽到此处")]),a("p",{staticClass:"ant-upload-hint"},[t._v("支持单个或批量上传")])])],1)],1)},s=[],n=(a("d4d5"),a("ac0d")),i=a("a796"),l={name:"AttachmentSelectDrawer",mixins:[n["a"],n["b"]],model:{prop:"visiable",event:"close"},props:{visiable:{type:Boolean,required:!1,default:!1},drawerWidth:{type:Number,required:!1,default:460},title:{type:String,required:!1,default:"选择附件"}},data:function(){return{uploadVisible:!1,skeletonLoading:!0,pagination:{page:1,size:12,sort:""},attachments:[],attachmentUploadHandler:i["a"].upload}},created:function(){this.loadSkeleton(),this.loadAttachments()},watch:{visiable:function(t,e){t&&this.loadSkeleton()}},methods:{loadSkeleton:function(){var t=this;this.skeletonLoading=!0,setTimeout(function(){t.skeletonLoading=!1},500)},handleShowUploadModal:function(){this.uploadVisible=!0},loadAttachments:function(){var t=this,e=Object.assign({},this.pagination);e.page--,i["a"].query(e).then(function(e){t.attachments=e.data.data.content,t.pagination.total=e.data.data.total})},handleSelectAttachment:function(t){this.$emit("listenToSelect",t)},handlePaginationChange:function(t,e){this.pagination.page=t,this.pagination.size=e,this.loadAttachments()},handleAttachmentUploadSuccess:function(){this.$message.success("上传成功!"),this.loadAttachments()},onUploadClose:function(){this.loadSkeleton(),this.loadAttachments()},onClose:function(){this.$emit("close",!1)}}},r=l,p=(a("307b"),a("17cc")),c=Object(p["a"])(r,o,s,!1,null,null,null);e["a"]=c.exports},"6fda":function(t,e,a){},a796:function(t,e,a){"use strict";var o=a("f753"),s=a.n(o),n=a("9efd"),i="/api/admin/attachments",l={query:function(t){return Object(n["a"])({url:i,params:t,method:"get"})},get:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"get"})},delete:function(t){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"delete"})},update:function(t,e){return Object(n["a"])({url:"".concat(i,"/").concat(t),method:"put",data:e})},getMediaTypes:function(){return Object(n["a"])({url:"".concat(i,"/media_types"),method:"get"})}};l.CancelToken=s.a.CancelToken,l.isCancel=s.a.isCancel,l.upload=function(t,e,a){return Object(n["a"])({url:"".concat(i,"/upload"),timeout:864e4,data:t,onUploadProgress:e,cancelToken:a,method:"post"})},l.uploads=function(t,e,a){return Object(n["a"])({url:"".concat(i,"/uploads"),timeout:864e4,data:t,onUploadProgress:e,cancelToken:a,method:"post"})},l.type={LOCAL:{type:"local",text:"本地"},SMMS:{type:"smms",text:"SM.MS"},UPYUN:{type:"upyun",text:"又拍云"},QNYUN:{type:"qnyun",text:"七牛云"},ALIYUN:{type:"aliyun",text:"阿里云"}},e["a"]=l}}]); \ No newline at end of file diff --git a/src/main/resources/admin/js/chunk-c0a1d3c4.41d0d3f8.js b/src/main/resources/admin/js/chunk-c0a1d3c4.60b68f50.js similarity index 99% rename from src/main/resources/admin/js/chunk-c0a1d3c4.41d0d3f8.js rename to src/main/resources/admin/js/chunk-c0a1d3c4.60b68f50.js index 354e56267..d672cc72b 100644 --- a/src/main/resources/admin/js/chunk-c0a1d3c4.41d0d3f8.js +++ b/src/main/resources/admin/js/chunk-c0a1d3c4.60b68f50.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c0a1d3c4"],{2749:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r={bold:!0,italic:!0,header:!0,underline:!0,strikethrough:!0,quote:!0,ol:!0,ul:!0,link:!0,code:!0,table:!0,fullscreen:!0,readmodel:!0,htmlcode:!0,undo:!0,redo:!0,trash:!0,navigation:!0,subfield:!0,preview:!0}},"307b":function(e,t,n){"use strict";var r=n("6fda"),o=n.n(r);o.a},3993:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("a-drawer",{attrs:{title:e.title,width:e.isMobile()?"100%":e.drawerWidth,closable:"",visible:e.visiable,destroyOnClose:""},on:{close:e.onClose}},[n("a-row",{attrs:{type:"flex",align:"middle"}},[n("a-input-search",{attrs:{placeholder:"搜索附件",enterButton:""}})],1),n("a-divider"),n("a-row",{attrs:{type:"flex",align:"middle"}},[n("a-skeleton",{attrs:{active:"",loading:e.skeletonLoading,paragraph:{rows:18}}},[n("a-col",{attrs:{span:24}},e._l(e.attachments,function(t,r){return n("div",{key:r,staticClass:"attach-item",on:{click:function(n){return e.handleSelectAttachment(t)}}},[n("img",{attrs:{src:t.thumbPath}})])}),0)],1)],1),n("a-divider"),n("div",{staticClass:"page-wrapper"},[n("a-pagination",{attrs:{defaultPageSize:e.pagination.size,total:e.pagination.total},on:{change:e.handlePaginationChange}})],1),n("a-divider",{staticClass:"divider-transparent"}),n("div",{staticClass:"bottom-control"},[n("a-button",{attrs:{type:"primary"},on:{click:e.handleShowUploadModal}},[e._v("上传附件")])],1)],1),n("a-modal",{attrs:{title:"上传附件",footer:null,afterClose:e.onUploadClose},model:{value:e.uploadVisible,callback:function(t){e.uploadVisible=t},expression:"uploadVisible"}},[n("upload",{attrs:{name:"file",multiple:"",uploadHandler:e.attachmentUploadHandler}},[n("p",{staticClass:"ant-upload-drag-icon"},[n("a-icon",{attrs:{type:"inbox"}})],1),n("p",{staticClass:"ant-upload-text"},[e._v("点击选择文件或将文件拖拽到此处")]),n("p",{staticClass:"ant-upload-hint"},[e._v("支持单个或批量上传")])])],1)],1)},o=[],i=(n("d4d5"),n("ac0d")),a=n("a796"),s={name:"AttachmentSelectDrawer",mixins:[i["a"],i["b"]],model:{prop:"visiable",event:"close"},props:{visiable:{type:Boolean,required:!1,default:!1},drawerWidth:{type:Number,required:!1,default:460},title:{type:String,required:!1,default:"选择附件"}},data:function(){return{uploadVisible:!1,skeletonLoading:!0,pagination:{page:1,size:12,sort:""},attachments:[],attachmentUploadHandler:a["a"].upload}},created:function(){this.loadSkeleton(),this.loadAttachments()},watch:{visiable:function(e,t){e&&this.loadSkeleton()}},methods:{loadSkeleton:function(){var e=this;this.skeletonLoading=!0,setTimeout(function(){e.skeletonLoading=!1},500)},handleShowUploadModal:function(){this.uploadVisible=!0},loadAttachments:function(){var e=this,t=Object.assign({},this.pagination);t.page--,a["a"].query(t).then(function(t){e.attachments=t.data.data.content,e.pagination.total=t.data.data.total})},handleSelectAttachment:function(e){this.$emit("listenToSelect",e)},handlePaginationChange:function(e,t){this.pagination.page=e,this.pagination.size=t,this.loadAttachments()},handleAttachmentUploadSuccess:function(){this.$message.success("上传成功!"),this.loadAttachments()},onUploadClose:function(){this.loadSkeleton(),this.loadAttachments()},onClose:function(){this.$emit("close",!1)}}},l=s,c=(n("307b"),n("17cc")),u=Object(c["a"])(l,r,o,!1,null,null,null);t["a"]=u.exports},"4cb6":function(e,t,n){},"5bcf":function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-drawer",{attrs:{title:"附件详情",width:e.isMobile()?"100%":"460",closable:"",visible:e.visiable,destroyOnClose:""},on:{close:e.onClose}},[n("a-row",{attrs:{type:"flex",align:"middle"}},[n("a-col",{attrs:{span:24}},[n("a-skeleton",{attrs:{active:"",loading:e.detailLoading,paragraph:{rows:8}}},[n("div",{staticClass:"attach-detail-img"},[n("img",{attrs:{src:e.attachment.path}})])])],1),n("a-divider"),n("a-col",{attrs:{span:24}},[n("a-skeleton",{attrs:{active:"",loading:e.detailLoading,paragraph:{rows:8}}},[n("a-list",{attrs:{itemLayout:"horizontal"}},[n("a-list-item",[n("a-list-item-meta",[e.editable?n("template",{slot:"description"},[n("a-input",{on:{blur:e.doUpdateAttachment},model:{value:e.attachment.name,callback:function(t){e.$set(e.attachment,"name",t)},expression:"attachment.name"}})],1):n("template",{slot:"description"},[e._v(e._s(e.attachment.name))]),n("span",{attrs:{slot:"title"},slot:"title"},[e._v("\n 附件名:\n "),n("a",{attrs:{href:"javascript:void(0);"}},[n("a-icon",{attrs:{type:"edit"},on:{click:e.handleEditName}})],1)])],2)],1),n("a-list-item",[n("a-list-item-meta",{attrs:{description:e.attachment.mediaType}},[n("span",{attrs:{slot:"title"},slot:"title"},[e._v("附件类型:")])])],1),n("a-list-item",[n("a-list-item-meta",{attrs:{description:e.attachment.typeProperty}},[n("span",{attrs:{slot:"title"},slot:"title"},[e._v("存储位置:")])])],1),n("a-list-item",[n("a-list-item-meta",[n("template",{slot:"description"},[e._v("\n "+e._s(e._f("fileSizeFormat")(e.attachment.size))+"\n ")]),n("span",{attrs:{slot:"title"},slot:"title"},[e._v("附件大小:")])],2)],1),n("a-list-item",[n("a-list-item-meta",{attrs:{description:e.attachment.height+"x"+e.attachment.width}},[n("span",{attrs:{slot:"title"},slot:"title"},[e._v("图片尺寸:")])])],1),n("a-list-item",[n("a-list-item-meta",[n("template",{slot:"description"},[e._v("\n "+e._s(e._f("moment")(e.attachment.createTime))+"\n ")]),n("span",{attrs:{slot:"title"},slot:"title"},[e._v("上传日期:")])],2)],1),n("a-list-item",[n("a-list-item-meta",{attrs:{description:e.attachment.path}},[n("span",{attrs:{slot:"title"},slot:"title"},[e._v("\n 普通链接:\n "),n("a",{attrs:{href:"javascript:void(0);"}},[n("a-icon",{attrs:{type:"copy"},on:{click:e.handleCopyNormalLink}})],1)])])],1),n("a-list-item",[n("a-list-item-meta",[n("span",{attrs:{slot:"description"},slot:"description"},[e._v("!["+e._s(e.attachment.name)+"]("+e._s(e.attachment.path)+")")]),n("span",{attrs:{slot:"title"},slot:"title"},[e._v("\n Markdown 格式:\n "),n("a",{attrs:{href:"javascript:void(0);"}},[n("a-icon",{attrs:{type:"copy"},on:{click:e.handleCopyMarkdownLink}})],1)])])],1)],1)],1)],1)],1),n("a-divider",{staticClass:"divider-transparent"}),n("div",{staticClass:"bottom-control"},[e.addToPhoto?n("a-popconfirm",{attrs:{title:"你确定要添加到图库?",okText:"确定",cancelText:"取消"},on:{confirm:e.handleAddToPhoto}},[n("a-button",{staticStyle:{marginRight:"8px"},attrs:{type:"dashed"}},[e._v("添加到图库")])],1):e._e(),n("a-popconfirm",{attrs:{title:"你确定要删除该附件?",okText:"确定",cancelText:"取消"},on:{confirm:e.handleDeleteAttachment}},[n("a-button",{attrs:{type:"danger"}},[e._v("删除")])],1)],1)],1)},o=[],i=(n("7364"),n("ac0d")),a=n("a796"),s=n("975e"),l={name:"AttachmentDetailDrawer",mixins:[i["a"],i["b"]],data:function(){return{detailLoading:!0,editable:!1,photo:{}}},model:{prop:"visiable",event:"close"},props:{attachment:{type:Object,required:!0},addToPhoto:{type:Boolean,required:!1,default:!1},visiable:{type:Boolean,required:!1,default:!0}},created:function(){this.loadSkeleton()},watch:{visiable:function(e,t){this.$log.debug("old value",t),this.$log.debug("new value",e),e&&this.loadSkeleton()}},methods:{loadSkeleton:function(){var e=this;this.detailLoading=!0,setTimeout(function(){e.detailLoading=!1},500)},handleDeleteAttachment:function(){var e=this;a["a"].delete(this.attachment.id).then(function(t){e.$message.success("删除成功!"),e.$emit("delete",e.attachment),e.onClose()})},handleEditName:function(){this.editable=!this.editable},doUpdateAttachment:function(){var e=this;a["a"].update(this.attachment.id,this.attachment).then(function(t){e.$log.debug("Updated attachment",t.data.data),e.$message.success("附件修改成功!")}),this.editable=!1},handleCopyNormalLink:function(){var e=this,t="".concat(this.attachment.path);this.$copyText(t).then(function(t){console.log("copy",t),e.$message.success("复制成功!")}).catch(function(t){console.log("copy.err",t),e.$message.error("复制失败!")})},handleCopyMarkdownLink:function(){var e=this,t="![".concat(this.attachment.name,"](").concat(this.attachment.path,")");this.$copyText(t).then(function(t){console.log("copy",t),e.$message.success("复制成功!")}).catch(function(t){console.log("copy.err",t),e.$message.error("复制失败!")})},handleAddToPhoto:function(){var e=this;this.photo["name"]=this.attachment.name,this.photo["thumbnail"]=this.attachment.thumbPath,this.photo["url"]=this.attachment.path,this.photo["takeTime"]=(new Date).getTime(),s["a"].create(this.photo).then(function(t){e.$message.success("添加成功!")})},onClose:function(){this.$emit("close",!1)}}},c=l,u=(n("b3a7"),n("17cc")),p=Object(u["a"])(c,r,o,!1,null,null,null);t["a"]=p.exports},"5f9f":function(e,t,n){"use strict";var r=n("4cb6"),o=n.n(r);o.a},"6fda":function(e,t,n){},9298:function(e,t,n){},"975e":function(e,t,n){"use strict";var r=n("9efd"),o="/api/admin/photos",i={query:function(e){return Object(r["a"])({url:o,params:e,method:"get"})},create:function(e){return Object(r["a"])({url:o,data:e,method:"post"})},update:function(e,t){return Object(r["a"])({url:"".concat(o,"/").concat(e),method:"put",data:t})},delete:function(e){return Object(r["a"])({url:"".concat(o,"/").concat(e),method:"delete"})}};t["a"]=i},a796:function(e,t,n){"use strict";var r=n("f753"),o=n.n(r),i=n("9efd"),a="/api/admin/attachments",s={query:function(e){return Object(i["a"])({url:a,params:e,method:"get"})},get:function(e){return Object(i["a"])({url:"".concat(a,"/").concat(e),method:"get"})},delete:function(e){return Object(i["a"])({url:"".concat(a,"/").concat(e),method:"delete"})},update:function(e,t){return Object(i["a"])({url:"".concat(a,"/").concat(e),method:"put",data:t})},getMediaTypes:function(){return Object(i["a"])({url:"".concat(a,"/media_types"),method:"get"})}};s.CancelToken=o.a.CancelToken,s.isCancel=o.a.isCancel,s.upload=function(e,t,n){return Object(i["a"])({url:"".concat(a,"/upload"),timeout:864e4,data:e,onUploadProgress:t,cancelToken:n,method:"post"})},s.uploads=function(e,t,n){return Object(i["a"])({url:"".concat(a,"/uploads"),timeout:864e4,data:e,onUploadProgress:t,cancelToken:n,method:"post"})},s.type={LOCAL:{type:"local",text:"本地"},SMMS:{type:"smms",text:"SM.MS"},UPYUN:{type:"upyun",text:"又拍云"},QNYUN:{type:"qnyun",text:"七牛云"},ALIYUN:{type:"aliyun",text:"阿里云"}},t["a"]=s},ac9d:function(module,exports,__webpack_require__){!function(e,t){module.exports=t()}(0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=62)}([function(e,t,n){"use strict";function r(e){return Object.prototype.toString.call(e)}function o(e){return"[object String]"===r(e)}function i(e,t){return w.call(e,t)}function a(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e}function s(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function l(e){return!(e>=55296&&e<=57343)&&!(e>=64976&&e<=65007)&&65535!=(65535&e)&&65534!=(65535&e)&&!(e>=0&&e<=8)&&11!==e&&!(e>=14&&e<=31)&&!(e>=127&&e<=159)&&!(e>1114111)}function c(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function u(e,t){var n=0;return i(D,t)?D[t]:35===t.charCodeAt(0)&&E.test(t)&&(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),l(n))?c(n):e}function p(e){return e.indexOf("\\")<0?e:e.replace(x,"$1")}function _(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(C,function(e,t,n){return t||u(e,n)})}function d(e){return S[e]}function h(e){return A.test(e)?e.replace(T,d):e}function f(e){return e.replace(L,"\\$&")}function m(e){switch(e){case 9:case 32:return!0}return!1}function g(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function b(e){return q.test(e)}function v(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function k(e){return e.trim().replace(/\s+/g," ").toUpperCase()}var w=Object.prototype.hasOwnProperty,x=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,y=/&([a-z#][a-z0-9]{1,31});/gi,C=new RegExp(x.source+"|"+y.source,"gi"),E=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,D=n(48),A=/[&<>"]/,T=/[&<>"]/g,S={"&":"&","<":"<",">":">",'"':"""},L=/[.?*+^$[\]\\(){}|-]/g,q=n(33);t.lib={},t.lib.mdurl=n(52),t.lib.ucmicro=n(187),t.assign=a,t.isString=o,t.has=i,t.unescapeMd=p,t.unescapeAll=_,t.isValidEntityCode=l,t.fromCodePoint=c,t.escapeHtml=h,t.arrayReplaceAt=s,t.isSpace=m,t.isWhiteSpace=g,t.isMdAsciiPunct=v,t.isPunctChar=b,t.escapeRE=f,t.normalizeReference=k},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){e.exports=!n(11)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(5),o=n(13);e.exports=n(3)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(9),o=n(41),i=n(28),a=Object.defineProperty;t.f=n(3)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(81),o=n(19);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(26)("wks"),o=n(14),i=n(1).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(8);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=!0},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){function n(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var i=r(o);return[n].concat(o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"})).concat([i]).join("\n")}return[n].join("\n")}function r(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=n(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;on.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(o=0;o0)return n[0].addEventListener("load",function(){t()}),void t();var r=document.createElement("script"),o=document.getElementsByTagName("head")[0];r.type="text/javascript",r.charset="UTF-8",r.src=e,r.addEventListener?r.addEventListener("load",function(){t()},!1):r.attachEvent&&r.attachEvent("onreadystatechange",function(){"loaded"===window.event.srcElement.readyState&&t()}),o.appendChild(r)}function i(e,t){if("function"!=typeof t&&(t=function(){}),document.querySelectorAll("link[href='"+e+"']").length>0)t();else{var n=document.createElement("link"),r=document.getElementsByTagName("head")[0];n.rel="stylesheet",n.href=e,n.addEventListener?n.addEventListener("load",function(){t()},!1):n.attachEvent&&n.attachEvent("onreadystatechange",function(){"loaded"===window.event.srcElement.readyState&&t()}),r.appendChild(n)}}n.d(t,"g",function(){return a}),n.d(t,"i",function(){return s}),n.d(t,"j",function(){return l}),n.d(t,"k",function(){return c}),n.d(t,"h",function(){return u}),n.d(t,"l",function(){return p}),n.d(t,"m",function(){return _}),n.d(t,"e",function(){return d}),n.d(t,"f",function(){return h}),n.d(t,"b",function(){return f}),t.d=o,t.c=i,n.d(t,"a",function(){return m});var a=function(e,t,n){var o=t.prefix,i=t.subfix,a=t.str;if(t.type,e.focus(),"number"==typeof e.selectionStart&&"number"==typeof e.selectionEnd){var s=e.selectionStart,l=e.selectionEnd,c=e.value;s===l?(e.value=c.substring(0,s)+o+a+i+c.substring(l,c.length),e.selectionStart=s+o.length,e.selectionEnd=s+(a.length+o.length)):c.substring(s-o.length,s)===o&&c.substring(l,l+i.length)===i&&r(o,i,c,s,l)?(e.value=c.substring(0,s-o.length)+c.substring(s,l)+c.substring(l+i.length,c.length),e.selectionStart=s-o.length,e.selectionEnd=l-o.length):(e.value=c.substring(0,s)+o+c.substring(s,l)+i+c.substring(l,c.length),e.selectionStart=s+o.length,e.selectionEnd=s+(l-s+o.length))}else alert("Error: Browser version is too low");n.d_value=e.value,e.focus()},s=function(e){var t=e.getTextareaDom();if("number"==typeof t.selectionStart&&"number"==typeof t.selectionEnd){var n=t.selectionStart,r=t.selectionEnd,o=t.value;if(n===r)t.value=o.substring(0,n)+"1. "+o.substring(r,o.length),t.selectionEnd=t.selectionStart=n+3;else{for(var i=n;i>0&&"\n"!==o.substring(i-1,i);)i--;for(var a=o.substring(i,r),s=a.split("\n"),l=0;l0&&"\n"!==o.substring(i-1,i);)i--;for(var a=r;a0&&"\n"!==o.substring(i-1,i);)i--;var a=o.substring(i,r),s=a.replace(/\n/g,"\n- ");s="- "+s,t.value=o.substring(0,i)+s+o.substring(r,o.length),t.selectionStart=i,t.selectionEnd=r+s.length-a.length}}else alert("Error: Browser version is too low");e.d_value=t.value,t.focus()},u=function(e,t){t=t?new Array(t).fill(" ").join(""):"\t";var n=e.getTextareaDom();if("number"==typeof n.selectionStart&&"number"==typeof n.selectionEnd){var r=n.selectionStart,o=n.selectionEnd,i=n.value,a=i.substring(0,r).split("\n").pop();if(a.match(/^\s*[0-9]+\.\s+\S*/)){var s=a.replace(/(\d+)/,1);n.value=i.substring(0,r-s.length)+t+s+i.substring(o,i.length)}else a.match(/^\s*-\s+\S*/)?n.value=i.substring(0,r-a.length)+t+a+i.substring(o,i.length):n.value=i.substring(0,r)+t+i.substring(o,i.length);n.selectionStart=n.selectionEnd=r+t.length}else alert("Error: Browser version is too low");e.d_value=n.value,n.focus()},p=function(e,t){var n=new RegExp(t?"\\s{"+t+"}":"\t");console.log("regTab:",n);var r=e.getTextareaDom();if("number"==typeof r.selectionStart&&"number"==typeof r.selectionEnd){var o=r.selectionStart,i=r.selectionEnd,a=r.value,s=a.substring(0,o).split("\n").pop();s.search(n)>=0&&(r.value=a.substring(0,o-s.length)+s.replace(n,"")+a.substring(i,a.length),r.selectionStart=r.selectionEnd=o-(t||1))}else alert("Error: Browser version is too low");e.d_value=r.value,r.focus()},_=function(e,t){var n=e.getTextareaDom();if("number"==typeof n.selectionStart&&"number"==typeof n.selectionEnd){var r=n.selectionStart,o=n.selectionEnd,i=n.value,a=i.substring(0,r).split("\n").pop(),s=a.match(/^\s*(?:[0-9]+\.|-)\s+\S+/);if(s){t.preventDefault();var l=s.shift().match(/^\s*(?:[0-9]+\.|-)\s/).shift();if(l.search(/-/)>=0)n.value=i.substring(0,r)+"\n"+l+i.substring(o,i.length),n.selectionStart=n.selectionEnd=r+l.length+1;else{var c=l.replace(/(\d+)/,parseInt(l)+1);n.value=i.substring(0,r)+"\n"+c+i.substring(o,i.length),n.selectionStart=n.selectionEnd=r+c.length+1}}else{var u=a.match(/^\s*(?:[0-9]+\.|-)\s+$/);if(u){t.preventDefault();var p=u.shift().length;n.value=i.substring(0,r-p)+"\n"+i.substring(o,i.length),n.selectionStart=n.selectionEnd=r-p}}}else alert("Error: Browser version is too low");e.d_value=n.value,n.focus()},d=function(e,t){var n=void 0;n=e.$refs.navigationContent,n.innerHTML=e.d_render;var r=n.children;if(r.length)for(var o=0;o=0&&n.scrollHeight!==t.edit_scroll_height&&n.scrollHeight-n.offsetHeight-n.scrollTop<=30&&(t.$refs.vNoteEdit.scrollTop=n.scrollHeight-n.offsetHeight,r=1),t.edit_scroll_height=n.scrollHeight,t.$refs.vShowContent.scrollHeight>t.$refs.vShowContent.offsetHeight&&(t.$refs.vShowContent.scrollTop=(t.$refs.vShowContent.scrollHeight-t.$refs.vShowContent.offsetHeight)*r)},f=function(e){e.$el.addEventListener("fullscreenchange",function(t){e.$toolbar_right_read_change_status()},!1),e.$el.addEventListener("mozfullscreenchange",function(t){e.$toolbar_right_read_change_status()},!1),e.$el.addEventListener("webkitfullscreenchange",function(t){e.$toolbar_right_read_change_status()},!1),e.$el.addEventListener("msfullscreenchange",function(t){e.$toolbar_right_read_change_status()},!1)},m=function(e){e.$refs.vShowContent.addEventListener("click",function(t){t=t||window.event;var n=t.srcElement?t.srcElement:t.target;"IMG"===n.tagName&&(e.imageClick?e.imageClick(n):e.d_preview_imgsrc=n.src)})}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){e.exports={}},function(e,t,n){var r=n(46),o=n(20);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(5).f,o=n(2),i=n(7)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){var r=n(26)("keys"),o=n(14);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(10),o=n(1),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(12)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(8);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(1),o=n(10),i=n(12),a=n(30),s=n(5).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){t.f=n(7)},function(e,t,n){"use strict";function r(){this.__rules__=[],this.__cache__=null}r.prototype.__find__=function(e){for(var t=0;t=0&&(n=this.attrs[t][1]),n},r.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=r},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E49\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){function r(e){o||n(194)}var o=!1,i=n(16)(n(59),n(191),r,"data-v-548e2160",null);i.options.__file="D:\\webstrom\\workplace\\mavonEditor\\src\\components\\md-toolbar-left.vue",i.esModule&&Object.keys(i.esModule).some(function(e){return"default"!==e&&"__"!==e.substr(0,2)})&&console.error("named exports are not supported in *.vue files."),i.options.functional&&console.error("[vue-loader] md-toolbar-left.vue: functional components are not supported with templates, they should use render functions."),e.exports=i.exports},function(e,t,n){var r=n(16)(n(60),n(189),null,null,null);r.options.__file="D:\\webstrom\\workplace\\mavonEditor\\src\\components\\md-toolbar-right.vue",r.esModule&&Object.keys(r.esModule).some(function(e){return"default"!==e&&"__"!==e.substr(0,2)})&&console.error("named exports are not supported in *.vue files."),r.options.functional&&console.error("[vue-loader] md-toolbar-right.vue: functional components are not supported with templates, they should use render functions."),e.exports=r.exports},function(e,t,n){"use strict";t.a={"1c":"1c",abnf:"abnf",accesslog:"accesslog",actionscript:"actionscript",as:"actionscript",ada:"ada",apache:"apache",apacheconf:"apache",applescript:"applescript",osascript:"applescript",arduino:"arduino",armasm:"armasm",arm:"armasm",asciidoc:"asciidoc",adoc:"asciidoc",aspectj:"aspectj",autohotkey:"autohotkey",ahk:"autohotkey",autoit:"autoit",avrasm:"avrasm",awk:"awk",axapta:"axapta",bash:"bash",sh:"bash",zsh:"bash",basic:"basic",bnf:"bnf",brainfuck:"brainfuck",bf:"brainfuck",cal:"cal",capnproto:"capnproto",capnp:"capnproto",ceylon:"ceylon",clean:"clean",icl:"clean",dcl:"clean","clojure-repl":"clojure-repl",clojure:"clojure",clj:"clojure",cmake:"cmake","cmake.in":"cmake",coffeescript:"coffeescript",coffee:"coffeescript",cson:"coffeescript",iced:"coffeescript",coq:"coq",cos:"cos",cls:"cos",cpp:"cpp",c:"cpp",cc:"cpp",h:"cpp","c++":"cpp","h++":"cpp",hpp:"cpp",crmsh:"crmsh",crm:"crmsh",pcmk:"crmsh",crystal:"crystal",cr:"crystal",cs:"cs",csharp:"cs",csp:"csp",css:"css",d:"d",dart:"dart",delphi:"delphi",dpr:"delphi",dfm:"delphi",pas:"delphi",pascal:"delphi",freepascal:"delphi",lazarus:"delphi",lpr:"delphi",lfm:"delphi",diff:"diff",patch:"diff",django:"django",jinja:"django",dns:"dns",bind:"dns",zone:"dns",dockerfile:"dockerfile",docker:"dockerfile",dos:"dos",bat:"dos",cmd:"dos",dsconfig:"dsconfig",dts:"dts",dust:"dust",dst:"dust",ebnf:"ebnf",elixir:"elixir",elm:"elm",erb:"erb","erlang-repl":"erlang-repl",erlang:"erlang",erl:"erlang",excel:"excel",xlsx:"excel",xls:"excel",fix:"fix",flix:"flix",fortran:"fortran",f90:"fortran",f95:"fortran",fsharp:"fsharp",fs:"fsharp",gams:"gams",gms:"gams",gauss:"gauss",gss:"gauss",gcode:"gcode",nc:"gcode",gherkin:"gherkin",feature:"gherkin",glsl:"glsl",go:"go",golang:"go",golo:"golo",gradle:"gradle",groovy:"groovy",haml:"haml",handlebars:"handlebars",hbs:"handlebars","html.hbs":"handlebars","html.handlebars":"handlebars",haskell:"haskell",hs:"haskell",haxe:"haxe",hx:"haxe",hsp:"hsp",htmlbars:"htmlbars",http:"http",https:"http",hy:"hy",hylang:"hy",inform7:"inform7",i7:"inform7",ini:"ini",toml:"ini",irpf90:"irpf90",java:"java",jsp:"java",javascript:"javascript",js:"javascript",jsx:"javascript","jboss-cli":"jboss-cli","wildfly-cli":"jboss-cli",json:"json","julia-repl":"julia-repl",julia:"julia",kotlin:"kotlin",lasso:"lasso",ls:"livescript",lassoscript:"lasso",ldif:"ldif",leaf:"leaf",less:"less",lisp:"lisp",livecodeserver:"livecodeserver",livescript:"livescript",llvm:"llvm",lsl:"lsl",lua:"lua",makefile:"makefile",mk:"makefile",mak:"makefile",markdown:"markdown",md:"markdown",mkdown:"markdown",mkd:"markdown",mathematica:"mathematica",mma:"mathematica",matlab:"matlab",maxima:"maxima",mel:"mel",mercury:"mercury",m:"mercury",moo:"mercury",mipsasm:"mipsasm",mips:"mipsasm",mizar:"mizar",mojolicious:"mojolicious",monkey:"monkey",moonscript:"moonscript",moon:"moonscript",n1ql:"n1ql",nginx:"nginx",nginxconf:"nginx",nimrod:"nimrod",nim:"nimrod",nix:"nix",nixos:"nix",nsis:"nsis",objectivec:"objectivec",mm:"objectivec",objc:"objectivec","obj-c":"objectivec",ocaml:"ocaml",ml:"sml",openscad:"openscad",scad:"openscad",oxygene:"oxygene",parser3:"parser3",perl:"perl",pl:"perl",pm:"perl",pf:"pf","pf.conf":"pf",php:"php",php3:"php",php4:"php",php5:"php",php6:"php",pony:"pony",powershell:"powershell",ps:"powershell",processing:"processing",profile:"profile",prolog:"prolog",protobuf:"protobuf",puppet:"puppet",pp:"puppet",purebasic:"purebasic",pb:"purebasic",pbi:"purebasic",python:"python",py:"python",gyp:"python",q:"q",k:"q",kdb:"q",qml:"qml",qt:"qml",r:"r",rib:"rib",roboconf:"roboconf",graph:"roboconf",instances:"roboconf",routeros:"routeros",mikrotik:"routeros",rsl:"rsl",ruby:"ruby",rb:"ruby",gemspec:"ruby",podspec:"ruby",thor:"ruby",irb:"ruby",ruleslanguage:"ruleslanguage",rust:"rust",rs:"rust",scala:"scala",scheme:"scheme",scilab:"scilab",sci:"scilab",scss:"scss",shell:"shell",console:"shell",smali:"smali",smalltalk:"smalltalk",st:"smalltalk",sml:"sml",sqf:"sqf",sql:"sql",stan:"stan",stata:"stata",do:"stata",ado:"stata",step21:"step21",p21:"step21",step:"step21",stp:"step21",stylus:"stylus",styl:"stylus",subunit:"subunit",swift:"swift",taggerscript:"taggerscript",tap:"tap",tcl:"tcl",tk:"tcl",tex:"tex",thrift:"thrift",tp:"tp",twig:"twig",craftcms:"twig",typescript:"typescript",ts:"typescript",vala:"vala",vbnet:"vbnet",vb:"vbnet","vbscript-html":"vbscript-html",vbscript:"vbscript",vbs:"vbscript",verilog:"verilog",v:"verilog",sv:"verilog",svh:"verilog",vhdl:"vhdl",vim:"vim",x86asm:"x86asm",xl:"xl",tao:"xl",xml:"xml",html:"xml",xhtml:"xml",rss:"xml",atom:"xml",xjb:"xml",xsd:"xml",xsl:"xml",plist:"xml",xquery:"xquery",xpath:"xquery",xq:"xquery",yaml:"yaml",yml:"yaml",YAML:"yaml",zephir:"zephir",zep:"zephir"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(72),i=r(o),a=n(71),s=r(a),l="function"==typeof s.default&&"symbol"==typeof i.default?function(e){return typeof e}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":typeof e};t.default="function"==typeof s.default&&"symbol"===l(i.default)?function(e){return void 0===e?"undefined":l(e)}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":void 0===e?"undefined":l(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(8),o=n(1).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var r=n(1),o=n(10),i=n(78),a=n(4),s=n(2),l=function(e,t,n){var c,u,p,_=e&l.F,d=e&l.G,h=e&l.S,f=e&l.P,m=e&l.B,g=e&l.W,b=d?o:o[t]||(o[t]={}),v=b.prototype,k=d?r:h?r[t]:(r[t]||{}).prototype;for(c in d&&(n=t),n)(u=!_&&k&&void 0!==k[c])&&s(b,c)||(p=u?k[c]:n[c],b[c]=d&&"function"!=typeof k[c]?n[c]:m&&u?i(p,r):g&&k[c]==p?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(p):f&&"function"==typeof p?i(Function.call,p):p,f&&((b.virtual||(b.virtual={}))[c]=p,e&l.R&&v&&!v[c]&&a(v,c,p)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){e.exports=!n(3)&&!n(11)(function(){return 7!=Object.defineProperty(n(39)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";var r=n(12),o=n(40),i=n(47),a=n(4),s=n(21),l=n(83),c=n(24),u=n(89),p=n(7)("iterator"),_=!([].keys&&"next"in[].keys()),d=function(){return this};e.exports=function(e,t,n,h,f,m,g){l(n,t,h);var b,v,k,w=function(e){if(!_&&e in E)return E[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",y="values"==f,C=!1,E=e.prototype,D=E[p]||E["@@iterator"]||f&&E[f],A=D||w(f),T=f?y?w("entries"):A:void 0,S="Array"==t&&E.entries||D;if(S&&(k=u(S.call(new e)))!==Object.prototype&&k.next&&(c(k,x,!0),r||"function"==typeof k[p]||a(k,p,d)),y&&D&&"values"!==D.name&&(C=!0,A=function(){return D.call(this)}),r&&!g||!_&&!C&&E[p]||a(E,p,A),s[t]=A,s[x]=d,f)if(b={values:y?A:w("values"),keys:m?A:w("keys"),entries:T},g)for(v in b)v in E||i(E,v,b[v]);else o(o.P+o.F*(_||C),t,b);return b}},function(e,t,n){var r=n(9),o=n(86),i=n(20),a=n(25)("IE_PROTO"),s=function(){},l=function(){var e,t=n(39)("iframe"),r=i.length;for(t.style.display="none",n(80).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("