filesbox/web/dist/p__Setting__Information.94b...

43 lines
98 KiB
JavaScript
Raw Permalink Normal View History

2024-07-26 06:10:54 +00:00
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7915],{13243:function(){},94135:function(B){B.exports={headOperate:"headOperate___1Pw70",classification:"classification___3swAX",classification_l:"classification_l___Z78i7",classification_r:"classification_r___3Zzda",classification_r_main:"classification_r_main___1qtMh",active:"active___26Dxa"}},94661:function(B){B.exports={informationlistbox:"informationlistbox___248cS",onezeroimglist:"onezeroimglist___lBE6b"}},94062:function(B){B.exports={infoModal:"infoModal___iVGoV",left:"left___2aBSQ",addArticlelinks:"addArticlelinks___2lcJk",coverUploader:"coverUploader___2clKG",labeltitle:"labeltitle___8I63v",right:"right___1mT7T",stowandunfold:"stowandunfold___zXvwO",rightContent:"rightContent___k_2nq",linkDesc:"linkDesc___1A0pa",wordimportbtn:"wordimportbtn___gCs9C",wordtext:"wordtext___11th2",fileUpload:"fileUpload___2jWB5"}},81832:function(B){B.exports={linkModal:"linkModal___a9Ddn",coverUploader:"coverUploader___3QzN7",uploadNode:"uploadNode___3u2s5"}},83879:function(B){B.exports={hrefshare:"hrefshare___2HJC4"}},14877:function(B){B.exports={tagBox:"tagBox___2IyiN"}},39011:function(B){B.exports={uploadAttachment:"uploadAttachment___1b8YD"}},67658:function(B){B.exports={uploadCover:"uploadCover___3uX8s",uploadNode:"uploadNode___3M3NM"}},25205:function(B){B.exports={infomationBox:"infomationBox___11aK_"}},96946:function(B,Te,a){"use strict";var ne=a(11849),fe=a(39428),ee=a(3182),l=a(57663),Z=a(71577),ea=a(67294),Ae=a(30672),Ve=a(37476),ve=a(71975),Qe=a(1977),pe=a(85893),f=R=>{var oe=(0,Ae.YB)(),S=(0,ea.useRef)(),je=(0,Ae.v9)(H=>H.common),ue=je.isMobile,Me=R.modalType,Fe=R.width,Se=R.title,Be=R.formRef,Ce=Be===void 0?S:Be,Ne=R.trigger,C=R.triggerAuth,ce=R.closable,ae=R.submitBtnHide,he=R.visible,_=R.setVisible,J=R.afterClose,y=R.modalChildren,o=R.finish,me=R.isLoading,ye=me===void 0?!1:me,re={width:ue&&Me!="modal"?"100%":Fe||550,title:Se,formRef:Ce,trigger:Ne||(0,pe.jsx)(Z.Z,{type:"primary",icon:(0,pe.jsx)(Qe.Z,{}),disabled:C!==void 0?!C:!1,children:oe.formatMessage({id:"common.add"})}),scrollToFirstError:!0,visible:he,onVisibleChange:_,children:y,submitter:{submitButtonProps:{loading:ye,style:{display:ae?"none":"inline-block"}}},modalProps:{destroyOnClose:!0,closable:ce,maskClosable:!1,afterClose:J},drawerProps:{destroyOnClose:!0,closable:ce,maskClosable:!1,onClose:J,className:"selfDrawer",push:{distance:0}},onFinish:function(){var H=(0,ee.Z)((0,fe.Z)().mark(function We(Ye){return(0,fe.Z)().wrap(function(de){for(;;)switch(de.prev=de.next){case 0:return de.abrupt("return",o(Ye));case 1:case"end":return de.stop()}},We)}));function Le(We){return H.apply(this,arguments)}return Le}()};return Me==="modal"?(0,pe.jsx)(Ve.Y,(0,ne.Z)({},re)):(0,pe.jsx)(ve.a,(0,ne.Z)({},re))};Te.Z=f},42139:function(B,Te,a){"use strict";var ne=a(11849),fe=a(39428),ee=a(3182),l=a(57663),Z=a(71577),ea=a(67294),Ae=a(30672),Ve=a(85473),ve=a(16894),Qe=a(37476),pe=a(71975),f=a(1977),R=a(85893),oe=S=>{var je=(0,Ae.YB)(),ue=(0,Ae.v9)(ia=>ia.common),Me=ue.isMobile,Fe=S.rowKey,Se=Fe===void 0?"":Fe,Be=S.dragSortKey,Ce=S.isLoading,Ne=Ce===void 0?!1:Ce,C=S.columns,ce=C===void 0?[]:C,ae=S.data,he=ae===void 0?[]:ae,_=S.scroll,J=_===void 0?{x:768}:_,y=S.toolbar,o=S.toolbarTitle,me=S.toolbarAuth,ye=S.toolBarRender,re=S.pagination,H=S.pageChange,Le=S.rowClassName,We=S.rowSelection,Ye=S.canDragSort,aa=Ye===void 0?!1:Ye,de=S.handleDragSortEnd,Da=S.triggerClick,da=S.modalType,Pe=S.modalWidth,Za=Pe===void 0?550:Pe,Va=S.title,ta=S.visible,fa=S.setVisible,Ia=S.modalChildren,ua=S.afterClose,ca=S.finish,e=S.isSubmitLoading,ba=e===void 0?!1:e,ma={title:Va,width:Me&&da!="modal"?"100%":Za,scrollToFirstError:!0,visible:ta,onVisibleChange:fa,children:Ia,trigger:(0,R.jsx)(Z.Z,{type:"primary",icon:(0,R.jsx)(f.Z,{}),disabled:me!==void 0?!me:!1,onClick:Da,children:o||je.formatMessage({id:"common.add"})}),submitter:{submitButtonProps:{loading:ba}},modalProps:{destroyOnClose:!0,maskClosable:!1,afterClose:ua},drawerProps:{destroyOnClose:!0,maskClosable:!1,onClose:ua,className:"selfDrawer",push:{distance:0}},onFinish:f
lists advlist autolink emoticons link image imagetools media table preview code fullscreen
charmap print anchor searchreplace visualblocks insertdatetime media paste
`,toolbar:`
undo redo forecolor backcolor
bold italic underline strikethrough
fontselect fontsizeselect formatselect
alignleft aligncenter alignright alignjustify
bullist numlist outdent indent
emoticons link image media table preview code fullscreen
`,fontsize_formats:"12px 13px 14px 15px 16px 18px 20px 22px 24px 28px 32px 36px 48px",font_formats:"\u5FAE\u8F6F\u96C5\u9ED1=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;\u5B8B\u4F53=simsun,serif;\u4EFF\u5B8B\u4F53=FangSong,serif;\u9ED1\u4F53=SimHei,sans-serif;\u6977\u4F53=KaiTi;\u5E7C\u5706=YouYuan;\u534E\u6587\u7EC6\u9ED1=STXihei;\u534E\u6587\u4EFF\u5B8B=STFangsong;\u65B9\u6B63\u8212\u4F53=FZShuTi;\u65B9\u6B63\u59DA\u4F53=FZYaoti;\u534E\u6587\u5F69\u4E91=STCaiyun;\u534E\u6587\u7425\u73C0=STHupo;\u534E\u6587\u65B0\u9B4F=STXinwei;\u534E\u6587\u884C\u6977=STXingkai;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",toolbar_sticky:!0,image_advtab:!0,paste_data_images:!0,images_file_types:"jpg,png,jpeg",automatic_uploads:!0,content_style:`
html, body {
overflow-x: hidden;
}
body{
overflow-y: hidden;
margin: 10px;
line-height: 1;
}
img {
max-width: 100%;
height: auto;
}
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track-piece {
background-color: #ececed;
border-radius: 2px;
}
::-webkit-scrollbar-thumb {
background-color: #cdcdcd;
background-clip: padding-box;
border-radius: 3px;
}
`,images_upload_handler:(C,ce,ae)=>{var he=C.blob();if(!!he.name){var _=new FormData;_.append("file",he),_.append("busType","image"),fetch("/api/disk/upload",{method:"POST",body:_,headers:{token:(0,Z.ej)("token")}}).then(J=>J.status===200?J.json():{success:!1}).then(J=>{var y=J.success,o=J.code,me=J.message;if(y){var ye;ce(window.location.origin+(J==null||(ye=J.data)===null||ye===void 0?void 0:ye.previewPath))}else ae(o?oe.formatMessage({id:o,defaultMessage:me}):oe.formatMessage({id:"explorer.upload.error"}))}).catch(function(J){ae(oe.formatMessage({id:"explorer.upload.error"})),console.log(J)})}},file_picker_types:"image",file_picker_callback:function(ce,ae,he){if(he.filetype=="image"){var _=document.querySelector(".tox-dialog-wrap");_.style.display="none",window.fileBoxApi.fileSelect({title:oe.formatMessage({id:"explorer.selectImage",defaultMessage:"\u8BF7\u9009\u62E9\u56FE\u7247"}),type:"file",allowExt:"png,jpg,jpeg,xbm,tif,svgz,ico,tiff,gif,svg,webp,bmp",callback:function(y){var o,me=y.data,ye=me===void 0?{}:me,re=ye.selectItems,H=re===void 0?[]:re;H!=null&&H.length&&(o=H[0])!==null&&o!==void 0&&o.path&&(_.style.display="flex",ce("".concat("").concat(H[0].path)))}})}}},onEditorChange:(C,ce)=>{var ae=Ne(C);Me(C),Ce(ae?0:1)}})})};Te.Z=ve},7486:function(B,Te,a){"use strict";a.r(Te),a.d(Te,{default:function(){return Gt}});var ne=a(58024),fe=a(91894),ee=a(19273),l=a(67294),Z=a(30672),ea=a(13062),Ae=a(71230),Ve=a(89032),ve=a(15746),Qe=a(49111),pe=a(19650),f=a(2824),R=a(47673),oe=a(4107),S=a(63185),je=a(9676),ue=a(39428),Me=a(3182),Fe=a(20228),Se=a(11382),Be=a(18106),Ce=a(95562),Ne=a(57663),C=a(71577),ce=a(71153),ae=a(60331),he=a(43185),_=a(11324),J=a(34792),y=a(48086),o=a(11849),me=a(38819),ye=a(57119),re=a(1977),H=a(5966),Le=a(90672),We=a(8214),Ye=a(64317),aa=a(52688),de=a(37406),Da=a(1085),da=a.n(Da),Pe=a(96946),Za=a(74295),Va=a(59250),ta=a(13013),fa=a(49101),Ia=a(59918),ua=a(67658),ca=a.n(ua),e=a(85893),ba="setting",ma=N=>{var t=N.busType,p=N.coverKey,d=N.getUrl,M=(0,Z.YB)(),b=(0,Z.v9)(c=>c[ba]),L=b.currentInfo,u=(0,l.useState)(""),v=(0,f.Z)(u,2),P=v[0],U=v[1],s=(0,l.useState)([]),I=(0,f.Z)(s,2),T=I[0],j=I[1],z=(0,e.jsxs)("div",{className:ca().uploadNode,children:[(0,e.jsx)(fa.Z,{style:{fontSize:30,paddingBottom:5}}),(0,e.jsx)("div",{style:{marginTop:8},children:M.formatMessage({id:"information-uploadCover",defaultMessage:"\u4E0A\u4F20\u5C01\u9762"})})]});function Y(c){var x=c.type==="image/jpeg"||c.type==="image/jpg"||c.type==="image/png",O=c.size/1024/1024<1;return x||y.ZP.error("".concat(M.formatMessage({id:"admin.setting.onlyUpload"}),"JPG/PNG")),O||y.ZP.error("".concat(M.formatMessage({id:"admin.setting.noMore"}),"1MB")),x&&O}var A={name:"file",accept:".jpeg,.jpg,.png",action:"/api/disk/upload",headers:{token:(0,de.ej)("token")},data:{busType:t},fileList:T,beforeUpload:Y,showUploadList:{showPreviewIcon:!1},onRemove(){U(""),j([])},onChange:c=>{var x=c.file,O=c.fileList,V=x.status,Q=V===void 0?"":V,W=x.response,E=W===void 0?{}:W;if(Q==="done"){if(E)if(E.success){var i;U((i=E.data)===null||i===void 0?void 0:i.thumb),y.ZP.success(M.formatMessage({id:"explorer.upload.success"}))}else y.ZP.error(E.message)}else Q==="error"&&y.ZP.error(M.formatMessage({id:"explorer.upload.error"}));j(O)}};return(0,l.useEffect)(()=>{d(P)},[P]),(0,l.useEffect)(()=>{L!=null&&L.thumb&&(U(L.thumb),j([{thumbUrl:L[p]}]))},[L==null?void 0:L.infoID]),(0,e.jsx)("div",{className:ca().uploadCover,children:(0,e.jsx)(ta.Z,{placement:"topLeft",overlayStyle:{minWidth:"unset"},menu:{items:[{key:"select",label:M.formatMessage({id:"explorer.select",defaultMessage:"\u7F51\u76D8\u9009\u62E9"})},{key:"upload",label:(0,e.jsx)(Ia.Z,{rotationSlider:!0,showGrid:!0,showReset:!0,aspect:2/1,children:(0,e.jsx)(_.Z,(0,o.Z)((0,o.Z)({},A),{},{showUploadList:!1,children:(0,e.jsx)("div",{children:M.formatMessage({id:"explorer.upload.local",defaultMessage:"\u672C\u5730\u4E0A\u4F20"})})}))})}],onClick:c=>{var x=c.key;x=="select"&&window.fileBoxApi.fileSelect({title:M.formatMessage({id:"explorer.selectImage",defaultMessage:"\u8BF7\u9009\u62E9\u56FE\u7247"