mirror of https://github.com/halo-dev/halo
parent
5a5e88d157
commit
b6dc37b6f6
37
CHANGELOG.md
37
CHANGELOG.md
|
@ -1,5 +1,42 @@
|
|||
# CHANGELOG
|
||||
|
||||
# 1.5.0-alpha.2
|
||||
|
||||
## Features
|
||||
|
||||
- Admin API 提供批量删除图库图片的接口。 halo-dev/halo#1680 @ruibaby
|
||||
- Admin API 提供批量更新图库图片的接口。 halo-dev/halo#1679 @ruibaby
|
||||
- 后台评论管理提供日志评论管理的界面。 halo-dev/halo-admin#480 @cetr
|
||||
|
||||
## Improvements
|
||||
|
||||
- 优化文章加密和分类加密的逻辑。 halo-dev/halo#1678 @guqing
|
||||
- 优化后台登录页面样式。 halo-dev/halo-admin#456 @ruibaby
|
||||
- 后台主题详情中的链接打开方式修改为打开新窗口。 halo-dev/halo-admin#461 @cetr
|
||||
- 重构后台文章评论列表弹窗。 halo-dev/halo-admin#463 @ruibaby
|
||||
- 优化后台文章/自定义页面设置弹窗中缩略图的样式。 halo-dev/halo-admin#470 halo-dev/halo-admin#471 @ruibaby
|
||||
- 重构后台图库管理页面,支持批量操作图片以及批量从附件库添加图片。 halo-dev/halo-admin#468 @ruibaby
|
||||
- 重构后台文章管理页面,文章列表将不再展示回收站状态的文章,提供单独的回收站入口。 halo-dev/halo-admin#475 @ruibaby
|
||||
- 优化后台文章/自定义页面设置的保存逻辑,提供转为发布/草稿的按钮。保存按钮不再影响到文章状态。 halo-dev/halo-admin#476 @ruibaby
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- 更新默认主题的 submodule 提交,修复模板中部分因为数字中带逗号导致的渲染异常。 halo-dev/halo#1682 @ruibaby
|
||||
- 修复 Content API 的 post 和 sheet 详情接口中内容为空的问题。 halo-dev/halo#1686 @fuzui
|
||||
- 修复评论默认头像因为修改了默认类型但 options 接口没有返回字段导致评论头像无法显示的问题。 halo-dev/halo#1692 @lan-yonghui
|
||||
- 修复使用 leveldb 的情况下,解析错误而没有清空缓存导致无法正常使用系统的问题。 halo-dev/halo#1695 @guqing
|
||||
- 修复 1.5.0-alpha.1 中修改了表结构但是没有修改备份数据和导入数据结构的问题。 halo-dev/halo#1669 @guqing
|
||||
- 修复后台在文章编辑页面切换左侧菜单收缩的时候出现的样式异常。 halo-dev/halo-admin#465 @ruibaby
|
||||
- 修复后台在 1.5.0-alpha.1 版本中,附件图片链接中包含特殊字符导致图片无法显示的问题。 halo-dev/halo-admin#474 @ruibaby
|
||||
|
||||
## Dependencies
|
||||
|
||||
- 修复因为 1.5.0-alpha.1 版本中更新 minio sdk 依赖导致无法正常上传文件的问题。 halo-dev/halo#1666 @JarvisPongSky
|
||||
- 升级 Spring Boot 版本到 2.5.10。 halo-dev/halo#1677 @ruibaby
|
||||
- 升级 Gradle 版本到 7.4。 halo-dev/halo#1697 @guqing
|
||||
- `halo-dev/halo-admin` 常规依赖升级。 halo-dev/halo-admin#453 @ruibaby
|
||||
- `halo-dev/halo-admin` 修改用于切换后台样式的 less 依赖 CDN 为 unpkg。
|
||||
|
||||
# 1.5.0-alpha.1
|
||||
|
||||
## Breaking changes
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
.chosen[data-v-93ae2cf2],.ghost[data-v-93ae2cf2]{opacity:.8;--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.chosen[data-v-93ae2cf2]{padding:0 5px}.drag[data-v-93ae2cf2]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:0 5px}[data-v-93ae2cf2] .ant-list-item-action{display:none}[data-v-93ae2cf2] .menu-item:hover .ant-list-item-action{display:block}
|
|
@ -1 +0,0 @@
|
|||
.chosen[data-v-56da7354],.ghost[data-v-56da7354]{opacity:.8;--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.chosen[data-v-56da7354]{padding:0 5px}.drag[data-v-56da7354]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding:0 5px}[data-v-56da7354] .ant-list-item-action{display:none}[data-v-56da7354] .menu-item:hover .ant-list-item-action{display:block}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
<!doctype html><html lang="zh-cmn-Hans"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="renderer" content="webkit"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/><meta name="robots" content="noindex,nofollow"/><meta name="generator" content="Halo 1.5.0-alpha.1"/><link rel="icon" href="/favicon.ico"/><title>Halo</title><style>body {height: 100%;background-color: #f5f5f5;}#loader{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;border:solid 3px #e5e5e5;border-top-color:#333;border-radius:50%;width:30px;height:30px;animation:spin .6s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}</style><script defer="defer" type="module" src="/js/chunk-vendors.a52c4796.js"></script><script defer="defer" type="module" src="/js/app.a9cfc629.js"></script><link href="/css/chunk-vendors.e6958125.css" rel="stylesheet"><link href="/css/app.a20b4354.css" rel="stylesheet"><script defer="defer" src="/js/chunk-vendors-legacy.b555b0d7.js" nomodule></script><script defer="defer" src="/js/app-legacy.a4fb4ede.js" nomodule></script></head><body><noscript><strong>We're sorry but halo admin client doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"><div id="loader"></div></div></body></html>
|
||||
<!doctype html><html lang="zh-cmn-Hans"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="renderer" content="webkit"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/><meta name="robots" content="noindex,nofollow"/><meta name="generator" content="Halo 1.5.0-alpha.2"/><link rel="icon" href="/favicon.ico"/><title>Halo</title><style>body {height: 100%;background-color: #f5f5f5;}#loader{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto;border:solid 3px #e5e5e5;border-top-color:#333;border-radius:50%;width:30px;height:30px;animation:spin .6s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}</style><script defer="defer" src="/js/chunk-vendors.9a0d13f5.js"></script><script defer="defer" src="/js/app.b0a3a24c.js"></script><link href="/css/chunk-vendors.e6958125.css" rel="stylesheet"><link href="/css/app.fefc29f9.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but halo admin client doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"><div id="loader"></div></div></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[132],{10966:function(e,t,s){s.r(t),s.d(t,{default:function(){return m}});var n=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"container-wrapper animated fadeIn"},[e._m(0),s("div",{staticClass:"login-form"},[s("LoginForm",{on:{success:e.onLoginSucceed}}),e.resetPasswordButtonVisible?s("router-link",{staticClass:"tip",attrs:{to:{name:"ResetPassword"}}},[e._v(" 找回密码 ")]):e._e()],1)])},r=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"halo-logo"},[s("img",{attrs:{alt:"Halo Logo",src:"/images/logo.svg"}})])}],o=s(47458),a=s(86475),i=(s(70315),s(98906)),u=s(63618),c=s(17132),l={components:{LoginForm:u.Z},data:function(){return{resetPasswordButtonVisible:!1}},beforeMount:function(){this.handleVerifyIsInstall(),document.addEventListener("keydown",this.onRegisterResetPasswordKeydown)},beforeDestroy:function(){document.removeEventListener("keydown",this.onRegisterResetPasswordKeydown)},methods:(0,a.Z)((0,a.Z)({},(0,i.nv)(["refreshUserCache","refreshOptionsCache"])),{},{onRegisterResetPasswordKeydown:function(e){72===e.keyCode&&(e.altKey||e.metaKey)&&e.shiftKey&&(e.preventDefault(),this.resetPasswordButtonVisible=!this.resetPasswordButtonVisible)},handleVerifyIsInstall:function(){var e=this;return(0,o.Z)(regeneratorRuntime.mark((function t(){var s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,c.Z.isInstalled();case 2:if(s=t.sent,s.data){t.next=6;break}return t.next=6,e.$router.push({name:"Install"});case 6:case"end":return t.stop()}}),t)})))()},onLoginSucceed:function(){this.refreshUserCache(),this.refreshOptionsCache(),this.$route.query.redirect?this.$router.push(this.$route.query.redirect):this.$router.push({name:"Dashboard"})}})},d=l,h=s(42177),f=(0,h.Z)(d,n,r,!1,null,null,null),m=f.exports}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[763],{95763:function(e,t,n){n.r(t),n.d(t,{default:function(){return y}});var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("page-view",[n("a-row",[n("a-col",{attrs:{span:24}},[e.options.developer_mode?n("div",{staticClass:"card-container"},[n("a-tabs",{attrs:{type:"card"},model:{value:e.activeKey,callback:function(t){e.activeKey=t},expression:"activeKey"}},e._l(e.panes,(function(t){return n("a-tab-pane",{key:t.key},[n("span",{attrs:{slot:"tab"},slot:"tab"},[n("a-icon",{attrs:{type:t.icon}}),e._v(e._s(t.title)+" ")],1),n(t.component,{tag:"component"})],1)})),1)],1):n("a-alert",{attrs:{description:"当前没有启用开发者选项,请启用之后再访问该页面!",message:"提示",showIcon:"",type:"error"}})],1)],1)],1)},i=[],a=n(76381),r=(n(31875),n(29888),n(45107),n(98906)),c=n(50990),s={components:{PageView:c.B4},data:function(){var e=[{title:"运行环境",icon:"safety",component:function(){return n.e(889).then(n.bind(n,64479))},key:"environment"},{title:"实时日志",icon:"code",component:function(){return Promise.all([n.e(147),n.e(192),n.e(164),n.e(617)]).then(n.bind(n,28617))},key:"runtimeLogs"},{title:"系统变量",icon:"table",component:function(){return n.e(139).then(n.bind(n,82139))},key:"optionsList"},{title:"静态存储",icon:"cloud",component:function(){return Promise.all([n.e(147),n.e(671)]).then(n.bind(n,99671))},key:"staticStorage"},{title:"设置",icon:"setting",component:function(){return n.e(442).then(n.bind(n,90442))},key:"settings"}];return{activeKey:e[0].key,panes:e}},computed:(0,a.Z)({},(0,r.Se)(["options"])),beforeRouteEnter:function(e,t,n){var o=e.query.activeKey;n((function(e){o&&(e.activeKey=o)}))},watch:{activeKey:function(e){if(e){var t=this.$router.history.current.path;this.$router.push({path:t,query:{activeKey:e}}).catch((function(e){return e}))}}}},u=s,l=n(18156),p=(0,l.Z)(u,o,i,!1,null,null,null),y=p.exports}}]);
|
||||
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[243],{44243:function(e,t,n){n.r(t),n.d(t,{default:function(){return y}});var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("page-view",[n("a-row",[n("a-col",{attrs:{span:24}},[e.options.developer_mode?n("div",{staticClass:"card-container"},[n("a-tabs",{attrs:{type:"card"},model:{value:e.activeKey,callback:function(t){e.activeKey=t},expression:"activeKey"}},e._l(e.panes,(function(t){return n("a-tab-pane",{key:t.key},[n("span",{attrs:{slot:"tab"},slot:"tab"},[n("a-icon",{attrs:{type:t.icon}}),e._v(e._s(t.title)+" ")],1),n(t.component,{tag:"component"})],1)})),1)],1):n("a-alert",{attrs:{description:"当前没有启用开发者选项,请启用之后再访问该页面!",message:"提示",showIcon:"",type:"error"}})],1)],1)],1)},i=[],a=n(86475),r=(n(31875),n(29888),n(45107),n(98906)),c=n(26278),s={components:{PageView:c.B4},data:function(){var e=[{title:"运行环境",icon:"safety",component:function(){return n.e(174).then(n.bind(n,87174))},key:"environment"},{title:"实时日志",icon:"code",component:function(){return Promise.all([n.e(961),n.e(192),n.e(164),n.e(348)]).then(n.bind(n,94147))},key:"runtimeLogs"},{title:"系统变量",icon:"table",component:function(){return n.e(650).then(n.bind(n,36650))},key:"optionsList"},{title:"静态存储",icon:"cloud",component:function(){return Promise.all([n.e(961),n.e(134)]).then(n.bind(n,27134))},key:"staticStorage"},{title:"设置",icon:"setting",component:function(){return n.e(651).then(n.bind(n,25651))},key:"settings"}];return{activeKey:e[0].key,panes:e}},computed:(0,a.Z)({},(0,r.Se)(["options"])),beforeRouteEnter:function(e,t,n){var o=e.query.activeKey;n((function(e){o&&(e.activeKey=o)}))},watch:{activeKey:function(e){if(e){var t=this.$router.history.current.path;this.$router.push({path:t,query:{activeKey:e}}).catch((function(e){return e}))}}}},u=s,l=n(42177),p=(0,l.Z)(u,o,i,!1,null,null,null),y=p.exports}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[26],{13026:function(e,o,r){r.r(o),r.d(o,{default:function(){return n}});var s=function(){var e=this,o=e.$createElement,r=e._self._c||o;return r("div",{staticClass:"container-wrapper animated fadeIn"},[e._m(0),r("div",[r("a-form-model",{ref:"sendCodeForm",attrs:{model:e.form.model,rules:e.form.sendCodeRules,layout:"vertical"}},[r("a-form-model-item",{attrs:{prop:"username"}},[r("a-input",{attrs:{placeholder:"用户名"},model:{value:e.form.model.username,callback:function(o){e.$set(e.form.model,"username",o)},expression:"form.model.username"}},[r("a-icon",{staticStyle:{color:"rgba(0, 0, 0, 0.25)"},attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),r("a-form-model-item",{attrs:{prop:"email"}},[r("a-input",{attrs:{placeholder:"邮箱"},model:{value:e.form.model.email,callback:function(o){e.$set(e.form.model,"email",o)},expression:"form.model.email"}},[r("a-icon",{staticStyle:{color:"rgba(0, 0, 0, 0.25)"},attrs:{slot:"prefix",type:"mail"},slot:"prefix"})],1)],1)],1),r("a-form-model",{ref:"passwordForm",attrs:{model:e.form.model,rules:e.form.rules,layout:"vertical"}},[r("a-form-model-item",{attrs:{prop:"code"}},[r("a-input",{attrs:{placeholder:"验证码",type:"password"},scopedSlots:e._u([{key:"addonAfter",fn:function(){return[r("a-button",{staticClass:"!p-0 !h-auto",attrs:{type:"link"},on:{click:e.handleSendCode}},[e._v("获取")])]},proxy:!0}]),model:{value:e.form.model.code,callback:function(o){e.$set(e.form.model,"code",o)},expression:"form.model.code"}},[r("a-icon",{staticStyle:{color:"rgba(0, 0, 0, 0.25)"},attrs:{slot:"prefix",type:"safety-certificate"},slot:"prefix"})],1)],1),r("a-form-model-item",{attrs:{prop:"password"}},[r("a-input",{attrs:{autocomplete:"new-password",placeholder:"新密码",type:"password"},model:{value:e.form.model.password,callback:function(o){e.$set(e.form.model,"password",o)},expression:"form.model.password"}},[r("a-icon",{staticStyle:{color:"rgba(0, 0, 0, 0.25)"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),r("a-form-model-item",{attrs:{prop:"confirmPassword"}},[r("a-input",{attrs:{autocomplete:"new-password",placeholder:"确认密码",type:"password"},model:{value:e.form.model.confirmPassword,callback:function(o){e.$set(e.form.model,"confirmPassword",o)},expression:"form.model.confirmPassword"}},[r("a-icon",{staticStyle:{color:"rgba(0, 0, 0, 0.25)"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),r("a-form-model-item",[r("a-button",{attrs:{block:!0,type:"primary"},on:{click:e.handleResetPassword}},[e._v("重置密码")])],1)],1),r("router-link",{staticClass:"tip",attrs:{to:{name:"Login"}}},[e._v(" 返回登录")])],1)])},a=[function(){var e=this,o=e.$createElement,r=e._self._c||o;return r("div",{staticClass:"halo-logo"},[r("img",{attrs:{alt:"Halo Logo",src:"/images/logo.svg"}}),r("span",[e._v("重置密码")])])}],t=(r(87591),r(1540)),l={data(){const e=(e,o,r)=>{o&&this.form.model.password!==o?r(new Error("确认密码与新密码不一致")):r()};return{form:{model:{},sendCodeRules:{username:[{required:!0,message:"* 用户名不能为空",trigger:["change"]}],email:[{required:!0,message:"* 电子邮箱地址不能为空",trigger:["change"]}]},rules:{code:[{required:!0,message:"* 验证码不能为空",trigger:["change"]}],password:[{required:!0,message:"* 新密码不能为空",trigger:["change"]},{max:100,min:8,message:"* 密码的字符长度必须在 8 - 100 之间",trigger:["change"]}],confirmPassword:[{required:!0,message:"* 确认密码不能为空",trigger:["change"]},{validator:e,trigger:["change"]}]}}}},methods:{handleSendCode(){this.$refs.sendCodeForm.validate((async e=>{if(e){const e=this.$message.loading("发送中...",0);try{await t.Z.sendResetPasswordCode(this.form.model),this.$message.success("邮件发送成功,五分钟内有效")}catch(o){this.$log.error("Failed send code: ",o)}finally{e()}}}))},handleResetPassword(){this.$refs.sendCodeForm.validate((e=>{e&&this.$refs.passwordForm.validate((async e=>{if(e)try{await t.Z.resetPassword(this.form.model),await this.$router.push({name:"Login"}),this.$message.success("密码重置成功!")}catch(o){this.$log.error("Failed reset password: ",o)}}))}))}}},i=l,m=r(18156),d=(0,m.Z)(i,s,a,!1,null,null,null),n=d.exports}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[403],{52403:function(t,e,o){o.r(e),o.d(e,{default:function(){return w}});var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("page-view",{attrs:{"sub-title":t.postToStage.inProgress?"当前内容已保存,但还未发布。":"",title:t.postToStage.title?t.postToStage.title:"新文章",affix:""}},[o("template",{slot:"extra"},[o("a-space",[o("a-button",{attrs:{loading:t.previewSaving},on:{click:t.handlePreviewClick}},[t._v("预览")]),o("a-button",{attrs:{type:"primary"},on:{click:function(e){t.postSettingVisible=!0}}},[t._v("发布")])],1)],1),o("a-row",{attrs:{gutter:12}},[o("a-col",{attrs:{span:24}},[o("div",{staticClass:"mb-4"},[o("a-input",{attrs:{placeholder:"请输入文章标题",size:"large"},model:{value:t.postToStage.title,callback:function(e){t.$set(t.postToStage,"title",e)},expression:"postToStage.title"}})],1),o("div",{style:{height:t.editorHeight},attrs:{id:"editor"}},[o("MarkdownEditor",{attrs:{originalContent:t.postToStage.originalContent},on:{"update:originalContent":function(e){return t.$set(t.postToStage,"originalContent",e)},"update:original-content":function(e){return t.$set(t.postToStage,"originalContent",e)},change:t.onContentChange,save:function(e){return t.handleSaveDraft()}}})],1)])],1),o("PostSettingModal",{attrs:{post:t.postToStage,savedCallback:t.onPostSavedCallback,visible:t.postSettingVisible},on:{"update:visible":function(e){t.postSettingVisible=e},onUpdate:t.onUpdateFromSetting}})],2)},a=[],s=o(92158),i=o(26815),r=o(50990),l=o(3832),d=o(86637),h=o(1540),g=o(86763),p=o.n(g),c={mixins:[l.jB,l.KT,l.g3],components:{PostSettingModal:s.Z,MarkdownEditor:i.Z,PageView:r.B4},data(){return{postSettingVisible:!1,postToStage:{},contentChanges:0,previewSaving:!1}},beforeRouteEnter(t,e,o){const n=t.query.postId;o((async t=>{if(n){const{data:e}=await h.Z.post.get(Number(n));t.postToStage=e}}))},destroyed(){window.onbeforeunload&&(window.onbeforeunload=null)},beforeRouteLeave(t,e,o){const n=this.$createElement;this.contentChanges<=1?o():this.$confirm({title:"当前页面数据未保存,确定要离开吗?",content:()=>n("div",{style:"color:red;"},["如果离开当面页面,你的数据很可能会丢失!"]),onOk(){o()},onCancel(){o(!1)}})},mounted(){window.onbeforeunload=function(t){return t=t||window.event,t&&(t.returnValue="当前页面数据未保存,确定要离开吗?"),"当前页面数据未保存,确定要离开吗?"}},beforeMount(){document.addEventListener("keydown",this.onRegisterSaveShortcut)},beforeDestroy(){document.removeEventListener("keydown",this.onRegisterSaveShortcut)},methods:{onRegisterSaveShortcut(t){!t.ctrlKey&&!t.metaKey||t.altKey||t.shiftKey||83!==t.keyCode||(t.preventDefault(),t.stopPropagation(),this.handleSaveDraft())},handleSaveDraft:p()((async function(){if(this.postToStage.id)try{const{data:t}=await h.Z.post.updateDraftById(this.postToStage.id,this.postToStage.originalContent,this.postToStage.content,!0);this.postToStage.inProgress=t.inProgress,this.handleRestoreSavedStatus(),this.$message.success({content:"内容已保存",duration:.5})}catch(t){this.$log.error("Failed to update post content",t)}else await this.handleCreatePost()}),300),async handleCreatePost(){this.postToStage.title||(this.postToStage.title=(0,d._)(new Date,"YYYY-MM-DD-HH-mm-ss"));try{this.postToStage.keepRaw=!0;const{data:t}=await h.Z.post.create(this.postToStage);this.postToStage=t,this.handleRestoreSavedStatus();const e=this.$router.history.current.path;this.$router.push({path:e,query:{postId:this.postToStage.id}}).catch((t=>t)),this.$message.success({content:"文章已创建",duration:.5})}catch(t){this.$log.error("Failed to create post",t)}},async handlePreviewClick(){if(this.previewSaving=!0,this.postToStage.id){const{data:t}=await h.Z.post.updateDraftById(this.postToStage.id,this.postToStage.originalContent,this.postToStage.content,!0);this.postToStage.inProgress=t.inProgress}else await this.handleCreatePost();await this.handleOpenPreview()},async handleOpenPreview(){try{const t=await h.Z.post.getPreviewLinkById(this.postToStage.id);window.open(t,"_blank"),this.handleRestoreSavedStatus()}catch(t){this.$log.error("Failed to get preview link",t)}finally{setTimeout((()=>{this.previewSaving=!1}),400)}},handleRestoreSavedStatus(){this.contentChanges=0},onContentChange({originalContent:t,renderContent:e}){this.contentChanges++,this.postToStage.originalContent=t,this.postToStage.content=e},onPostSavedCallback(){this.contentChanges=0,this.$router.push({name:"PostList"})},onUpdateFromSetting(t){this.postToStage=t}}},u=c,S=o(18156),v=(0,S.Z)(u,n,a,!1,null,null,null),w=v.exports}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[442],{90442:function(e,r,t){t.r(r),t.d(r,{default:function(){return v}});var n=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("a-form",{attrs:{wrapperCol:e.wrapperCol,layout:"vertical"}},[t("a-form-item",{attrs:{label:"开发者选项:"}},[t("a-switch",{model:{value:e.options.developer_mode,callback:function(r){e.$set(e.options,"developer_mode",r)},expression:"options.developer_mode"}})],1),t("a-form-item",[t("ReactiveButton",{attrs:{errored:e.errored,loading:e.saving,erroredText:"保存失败",loadedText:"保存成功",text:"保存",type:"primary"},on:{callback:function(r){e.errored=!1},click:e.handleSaveOptions}})],1)],1)},a=[],o=t(91057),s=t(76381),i=(t(30535),t(85018),t(70315),t(98906)),c=t(1540),l={name:"SettingsForm",data:function(){return{options:{},wrapperCol:{xl:{span:8},lg:{span:8},sm:{span:12},xs:{span:24}},saving:!1,errored:!1}},created:function(){this.handleListOptions()},methods:(0,s.Z)((0,s.Z)({},(0,i.nv)(["refreshOptionsCache"])),{},{handleListOptions:function(){var e=this;return(0,o.Z)(regeneratorRuntime.mark((function r(){var t,n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,c.Z.option.listAsMapViewByKeys(["developer_mode"]);case 3:t=r.sent,n=t.data,e.options=n,r.next=11;break;case 8:r.prev=8,r.t0=r["catch"](0),e.$log.error(r.t0);case 11:case"end":return r.stop()}}),r,null,[[0,8]])})))()},handleSaveOptions:function(){var e=this;return(0,o.Z)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,e.saving=!0,r.next=4,c.Z.option.saveMapView(e.options);case 4:r.next=10;break;case 6:r.prev=6,r.t0=r["catch"](0),e.errored=!1,e.$log.error(r.t0);case 10:return r.prev=10,setTimeout((function(){e.saving=!1}),400),r.next=14,e.handleListOptions();case 14:return r.next=16,e.refreshOptionsCache();case 16:if(e.options.developer_mode){r.next=19;break}return r.next=19,e.$router.replace({name:"ToolList"});case 19:return r.finish(10);case 20:case"end":return r.stop()}}),r,null,[[0,6,10,20]])})))()}})},p=l,u=t(18156),d=(0,u.Z)(p,n,a,!1,null,null,null),v=d.exports}}]);
|
|
@ -1 +0,0 @@
|
|||
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[442],{90442:function(e,t,a){a.r(t),a.d(t,{default:function(){return h}});var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-form",{attrs:{wrapperCol:e.wrapperCol,layout:"vertical"}},[a("a-form-item",{attrs:{label:"开发者选项:"}},[a("a-switch",{model:{value:e.options.developer_mode,callback:function(t){e.$set(e.options,"developer_mode",t)},expression:"options.developer_mode"}})],1),a("a-form-item",[a("ReactiveButton",{attrs:{errored:e.errored,loading:e.saving,erroredText:"保存失败",loadedText:"保存成功",text:"保存",type:"primary"},on:{callback:function(t){e.errored=!1},click:e.handleSaveOptions}})],1)],1)},r=[],s=a(98906),i=a(1540),n={name:"SettingsForm",data(){return{options:{},wrapperCol:{xl:{span:8},lg:{span:8},sm:{span:12},xs:{span:24}},saving:!1,errored:!1}},created(){this.handleListOptions()},methods:{...(0,s.nv)(["refreshOptionsCache"]),async handleListOptions(){try{const{data:e}=await i.Z.option.listAsMapViewByKeys(["developer_mode"]);this.options=e}catch(e){this.$log.error(e)}},async handleSaveOptions(){try{this.saving=!0,await i.Z.option.saveMapView(this.options)}catch(e){this.errored=!1,this.$log.error(e)}finally{setTimeout((()=>{this.saving=!1}),400),await this.handleListOptions(),await this.refreshOptionsCache(),this.options.developer_mode||await this.$router.replace({name:"ToolList"})}}}},l=n,p=a(18156),d=(0,p.Z)(l,o,r,!1,null,null,null),h=d.exports}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[598],{30598:function(t,e,a){a.r(e),a.d(e,{default:function(){return h}});var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("page-view",[a("a-card",{attrs:{bodyStyle:{padding:"16px"},bordered:!1}},[a("div",{staticClass:"table-operator"},[a("a-button",{attrs:{type:"danger"},on:{click:t.handleClearActionLogs}},[t._v("清空操作日志")])],1),a("div",{staticClass:"mt-4"},[a("a-table",{attrs:{columns:t.list.columns,dataSource:t.list.data,loading:t.list.loading,pagination:!1,rowKey:function(t){return t.id},scrollToFirstRowOnChange:!0},scopedSlots:t._u([{key:"type",fn:function(e){return[t._v(" "+t._s(t._f("typeConvert")(e))+" ")]}},{key:"ipAddress",fn:function(e){return[a("div",{staticClass:"blur hover:blur-none transition-all"},[t._v(t._s(e))])]}},{key:"createTime",fn:function(e){return[a("a-tooltip",{attrs:{placement:"top"}},[a("template",{slot:"title"},[t._v(" "+t._s(t._f("moment")(e))+" ")]),t._v(" "+t._s(t._f("timeAgo")(e))+" ")],2)]}}])}),a("div",{staticClass:"page-wrapper"},[a("a-pagination",{staticClass:"pagination",attrs:{current:t.pagination.page,defaultPageSize:t.pagination.size,pageSizeOptions:["10","20","50","100"],total:t.pagination.total,showLessItems:"",showSizeChanger:""},on:{change:t.handlePageChange,showSizeChange:t.handlePageSizeChange}})],1)],1)])],1)},i=[],s=a(47458),r=(a(41479),a(70315),a(26278)),o=a(17132),l=a(94671),c=[{title:"ID",dataIndex:"id"},{title:"类型",dataIndex:"type",scopedSlots:{customRender:"type"}},{title:"关键值",dataIndex:"logKey"},{title:"内容",dataIndex:"content"},{title:"IP",dataIndex:"ipAddress",scopedSlots:{customRender:"ipAddress"}},{title:"操作时间",dataIndex:"createTime",scopedSlots:{customRender:"createTime"}}],d={name:"ActionLog",components:{PageView:r.B4},data:function(){return{list:{columns:c,data:[],total:0,loading:!1,params:{page:0,size:50}}}},computed:{pagination:function(){return{page:this.list.params.page+1,size:this.list.params.size,total:this.list.total}}},created:function(){this.handleListActionLogs()},methods:{handleListActionLogs:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t.list.loading=!0,e.next=4,o.Z.log.list(t.list.params);case 4:a=e.sent,t.list.data=a.data.content,t.list.total=a.data.total,e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](0),t.$log.error(e.t0);case 12:return e.prev=12,t.list.loading=!1,e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[0,9,12,15]])})))()},handlePageChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.list.params.page=t-1,this.handleListActionLogs()},handlePageSizeChange:function(t,e){this.$log.debug("Current: ".concat(t,", PageSize: ").concat(e)),this.list.params.page=0,this.list.params.size=e,this.handleListActionLogs()},handleClearActionLogs:function(){var t=this;t.$confirm({title:"提示",maskClosable:!0,content:"是否确定要清空所有操作日志?",onOk:function(){return(0,s.Z)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.Z.log.clear();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e["catch"](0),t.$log.error("Failed to clear action logs.",e.t0);case 8:return e.prev=8,e.next=11,t.handleListActionLogs();case 11:return e.finish(8);case 12:case"end":return e.stop()}}),e,null,[[0,5,8,12]])})))()}})}},filters:{typeConvert:function(t){var e=l.Js[t];return e?e.text:t}}},u=d,p=a(42177),g=(0,p.Z)(u,n,i,!1,null,null,null),h=g.exports}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[651],{25651:function(e,r,t){t.r(r),t.d(r,{default:function(){return v}});var n=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("a-form",{attrs:{wrapperCol:e.wrapperCol,layout:"vertical"}},[t("a-form-item",{attrs:{label:"开发者选项:"}},[t("a-switch",{model:{value:e.options.developer_mode,callback:function(r){e.$set(e.options,"developer_mode",r)},expression:"options.developer_mode"}})],1),t("a-form-item",[t("ReactiveButton",{attrs:{errored:e.errored,loading:e.saving,erroredText:"保存失败",loadedText:"保存成功",text:"保存",type:"primary"},on:{callback:function(r){e.errored=!1},click:e.handleSaveOptions}})],1)],1)},a=[],o=t(47458),s=t(86475),i=(t(30535),t(85018),t(70315),t(98906)),c=t(17132),l={name:"SettingsForm",data:function(){return{options:{},wrapperCol:{xl:{span:8},lg:{span:8},sm:{span:12},xs:{span:24}},saving:!1,errored:!1}},created:function(){this.handleListOptions()},methods:(0,s.Z)((0,s.Z)({},(0,i.nv)(["refreshOptionsCache"])),{},{handleListOptions:function(){var e=this;return(0,o.Z)(regeneratorRuntime.mark((function r(){var t,n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,c.Z.option.listAsMapViewByKeys(["developer_mode"]);case 3:t=r.sent,n=t.data,e.options=n,r.next=11;break;case 8:r.prev=8,r.t0=r["catch"](0),e.$log.error(r.t0);case 11:case"end":return r.stop()}}),r,null,[[0,8]])})))()},handleSaveOptions:function(){var e=this;return(0,o.Z)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,e.saving=!0,r.next=4,c.Z.option.saveMapView(e.options);case 4:r.next=10;break;case 6:r.prev=6,r.t0=r["catch"](0),e.errored=!1,e.$log.error(r.t0);case 10:return r.prev=10,setTimeout((function(){e.saving=!1}),400),r.next=14,e.handleListOptions();case 14:return r.next=16,e.refreshOptionsCache();case 16:if(e.options.developer_mode){r.next=19;break}return r.next=19,e.$router.replace({name:"ToolList"});case 19:return r.finish(10);case 20:case"end":return r.stop()}}),r,null,[[0,6,10,20]])})))()}})},p=l,u=t(42177),d=(0,u.Z)(p,n,a,!1,null,null,null),v=d.exports}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[70],{82070:function(t,e,a){a.r(e),a.d(e,{default:function(){return h}});var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("page-view",[a("a-card",{attrs:{bodyStyle:{padding:"16px"},bordered:!1}},[a("div",{staticClass:"table-operator"},[a("a-button",{attrs:{type:"danger"},on:{click:t.handleClearActionLogs}},[t._v("清空操作日志")])],1),a("div",{staticClass:"mt-4"},[a("a-table",{attrs:{columns:t.list.columns,dataSource:t.list.data,loading:t.list.loading,pagination:!1,rowKey:function(t){return t.id},scrollToFirstRowOnChange:!0},scopedSlots:t._u([{key:"type",fn:function(e){return[t._v(" "+t._s(t._f("typeConvert")(e))+" ")]}},{key:"ipAddress",fn:function(e){return[a("div",{staticClass:"blur hover:blur-none transition-all"},[t._v(t._s(e))])]}},{key:"createTime",fn:function(e){return[a("a-tooltip",{attrs:{placement:"top"}},[a("template",{slot:"title"},[t._v(" "+t._s(t._f("moment")(e))+" ")]),t._v(" "+t._s(t._f("timeAgo")(e))+" ")],2)]}}])}),a("div",{staticClass:"page-wrapper"},[a("a-pagination",{staticClass:"pagination",attrs:{current:t.pagination.page,defaultPageSize:t.pagination.size,pageSizeOptions:["10","20","50","100"],total:t.pagination.total,showLessItems:"",showSizeChanger:""},on:{change:t.handlePageChange,showSizeChange:t.handlePageSizeChange}})],1)],1)])],1)},i=[],s=a(91057),r=(a(41479),a(70315),a(50990)),o=a(1540),l=a(78588),c=[{title:"ID",dataIndex:"id"},{title:"类型",dataIndex:"type",scopedSlots:{customRender:"type"}},{title:"关键值",dataIndex:"logKey"},{title:"内容",dataIndex:"content"},{title:"IP",dataIndex:"ipAddress",scopedSlots:{customRender:"ipAddress"}},{title:"操作时间",dataIndex:"createTime",scopedSlots:{customRender:"createTime"}}],d={name:"ActionLog",components:{PageView:r.B4},data:function(){return{list:{columns:c,data:[],total:0,loading:!1,params:{page:0,size:50}}}},computed:{pagination:function(){return{page:this.list.params.page+1,size:this.list.params.size,total:this.list.total}}},created:function(){this.handleListActionLogs()},methods:{handleListActionLogs:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t.list.loading=!0,e.next=4,o.Z.log.list(t.list.params);case 4:a=e.sent,t.list.data=a.data.content,t.list.total=a.data.total,e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](0),t.$log.error(e.t0);case 12:return e.prev=12,t.list.loading=!1,e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[0,9,12,15]])})))()},handlePageChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.list.params.page=t-1,this.handleListActionLogs()},handlePageSizeChange:function(t,e){this.$log.debug("Current: ".concat(t,", PageSize: ").concat(e)),this.list.params.page=0,this.list.params.size=e,this.handleListActionLogs()},handleClearActionLogs:function(){var t=this;t.$confirm({title:"提示",maskClosable:!0,content:"是否确定要清空所有操作日志?",onOk:function(){return(0,s.Z)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.Z.log.clear();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e["catch"](0),t.$log.error("Failed to clear action logs.",e.t0);case 8:return e.prev=8,e.next=11,t.handleListActionLogs();case 11:return e.finish(8);case 12:case"end":return e.stop()}}),e,null,[[0,5,8,12]])})))()}})}},filters:{typeConvert:function(t){var e=l.Js[t];return e?e.text:t}}},u=d,p=a(18156),g=(0,p.Z)(u,n,i,!1,null,null,null),h=g.exports}}]);
|
|
@ -1 +0,0 @@
|
|||
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[70],{82070:function(t,a,e){e.r(a),e.d(a,{default:function(){return h}});var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("page-view",[e("a-card",{attrs:{bodyStyle:{padding:"16px"},bordered:!1}},[e("div",{staticClass:"table-operator"},[e("a-button",{attrs:{type:"danger"},on:{click:t.handleClearActionLogs}},[t._v("清空操作日志")])],1),e("div",{staticClass:"mt-4"},[e("a-table",{attrs:{columns:t.list.columns,dataSource:t.list.data,loading:t.list.loading,pagination:!1,rowKey:function(t){return t.id},scrollToFirstRowOnChange:!0},scopedSlots:t._u([{key:"type",fn:function(a){return[t._v(" "+t._s(t._f("typeConvert")(a))+" ")]}},{key:"ipAddress",fn:function(a){return[e("div",{staticClass:"blur hover:blur-none transition-all"},[t._v(t._s(a))])]}},{key:"createTime",fn:function(a){return[e("a-tooltip",{attrs:{placement:"top"}},[e("template",{slot:"title"},[t._v(" "+t._s(t._f("moment")(a))+" ")]),t._v(" "+t._s(t._f("timeAgo")(a))+" ")],2)]}}])}),e("div",{staticClass:"page-wrapper"},[e("a-pagination",{staticClass:"pagination",attrs:{current:t.pagination.page,defaultPageSize:t.pagination.size,pageSizeOptions:["10","20","50","100"],total:t.pagination.total,showLessItems:"",showSizeChanger:""},on:{change:t.handlePageChange,showSizeChange:t.handlePageSizeChange}})],1)],1)])],1)},i=[],n=e(50990),o=e(1540),l=e(78588);const r=[{title:"ID",dataIndex:"id"},{title:"类型",dataIndex:"type",scopedSlots:{customRender:"type"}},{title:"关键值",dataIndex:"logKey"},{title:"内容",dataIndex:"content"},{title:"IP",dataIndex:"ipAddress",scopedSlots:{customRender:"ipAddress"}},{title:"操作时间",dataIndex:"createTime",scopedSlots:{customRender:"createTime"}}];var d={name:"ActionLog",components:{PageView:n.B4},data(){return{list:{columns:r,data:[],total:0,loading:!1,params:{page:0,size:50}}}},computed:{pagination(){return{page:this.list.params.page+1,size:this.list.params.size,total:this.list.total}}},created(){this.handleListActionLogs()},methods:{async handleListActionLogs(){try{this.list.loading=!0;const t=await o.Z.log.list(this.list.params);this.list.data=t.data.content,this.list.total=t.data.total}catch(t){this.$log.error(t)}finally{this.list.loading=!1}},handlePageChange(t=1){this.list.params.page=t-1,this.handleListActionLogs()},handlePageSizeChange(t,a){this.$log.debug(`Current: ${t}, PageSize: ${a}`),this.list.params.page=0,this.list.params.size=a,this.handleListActionLogs()},handleClearActionLogs(){const t=this;t.$confirm({title:"提示",maskClosable:!0,content:"是否确定要清空所有操作日志?",async onOk(){try{await o.Z.log.clear()}catch(a){t.$log.error("Failed to clear action logs.",a)}finally{await t.handleListActionLogs()}}})}},filters:{typeConvert(t){const a=l.Js[t];return a?a.text:t}}},c=d,g=e(18156),p=(0,g.Z)(c,s,i,!1,null,null,null),h=p.exports}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[870],{69870:function(e,t,o){o.r(t),o.d(t,{default:function(){return u}});var a=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("page-view",[o("a-row",{attrs:{gutter:12}},[o("a-col",{staticClass:"pb-3",attrs:{lg:10,md:10,sm:24,xl:10,xs:24}},[o("a-card",{attrs:{bodyStyle:{padding:"16px"},title:e.title}},[o("a-form-model",{ref:"tagForm",attrs:{model:e.form.model,rules:e.form.rules,layout:"horizontal"}},[o("a-form-model-item",{attrs:{help:"* 页面上所显示的名称",label:"名称:",prop:"name"}},[o("a-input",{model:{value:e.form.model.name,callback:function(t){e.$set(e.form.model,"name",t)},expression:"form.model.name"}})],1),o("a-form-model-item",{attrs:{help:"* 一般为单个标签页面的标识,最好为英文",label:"别名:",prop:"slug"}},[o("a-input",{model:{value:e.form.model.slug,callback:function(t){e.$set(e.form.model,"slug",t)},expression:"form.model.slug"}})],1),o("a-form-model-item",{attrs:{label:"颜色:",prop:"color"}},[o("a-input",{scopedSlots:e._u([{key:"addonAfter",fn:function(){return[o("verte",{staticStyle:{cursor:"pointer"},attrs:{model:"hex",picker:"square"},model:{value:e.form.model.color,callback:function(t){e.$set(e.form.model,"color",t)},expression:"form.model.color"}})]},proxy:!0}]),model:{value:e.form.model.color,callback:function(t){e.$set(e.form.model,"color",t)},expression:"form.model.color"}})],1),o("a-form-model-item",{attrs:{help:"* 在标签页面可展示,需要主题支持",label:"封面图:",prop:"thumbnail"}},[o("AttachmentInput",{attrs:{title:"选择封面图"},model:{value:e.form.model.thumbnail,callback:function(t){e.$set(e.form.model,"thumbnail",t)},expression:"form.model.thumbnail"}})],1),o("a-form-model-item",[e.isUpdateMode?o("a-button-group",[o("ReactiveButton",{attrs:{errored:e.form.errored,loading:e.form.saving,erroredText:"更新失败",loadedText:"更新成功",text:"更新",type:"primary"},on:{callback:e.handleSavedCallback,click:e.handleCreateOrUpdateTag}}),o("a-button",{attrs:{type:"dashed"},on:{click:function(t){e.form.model={}}}},[e._v("返回添加")])],1):o("ReactiveButton",{attrs:{errored:e.form.errored,loading:e.form.saving,erroredText:"保存失败",loadedText:"保存成功",text:"保存",type:"primary"},on:{callback:e.handleSavedCallback,click:e.handleCreateOrUpdateTag}}),e.isUpdateMode?o("a-popconfirm",{attrs:{title:"你确定要删除【"+e.form.model.name+"】标签?",cancelText:"取消",okText:"确定"},on:{confirm:function(t){return e.handleDeleteTag(e.form.model.id)}}},[o("a-button",{staticClass:"float-right",attrs:{type:"danger"}},[e._v("删除")])],1):e._e()],1)],1)],1)],1),o("a-col",{staticClass:"pb-3",attrs:{lg:14,md:14,sm:24,xl:14,xs:24}},[o("a-card",{attrs:{bodyStyle:{padding:"16px"},title:"所有标签"}},[o("a-spin",{attrs:{spinning:e.list.loading}},[0===e.list.data.length?o("a-empty"):e._l(e.list.data,(function(t){return o("a-tooltip",{key:t.id,attrs:{placement:"topLeft"}},[o("template",{slot:"title"},[o("span",[e._v(e._s(t.postCount)+" 篇文章")])]),o("post-tag",{staticStyle:{"margin-bottom":"8px",cursor:"pointer"},attrs:{tag:t},nativeOn:{click:function(o){e.form.model=t}}})],2)}))],2)],1)],1)],1)],1)},r=[],l=(o(31875),o(50990)),n=o(1540),i=o(4155),m=o(43154),d={components:{PageView:l.B4,Verte:m.Z},data:function(){return{list:{data:[],loading:!1},form:{model:{color:"#cfd3d7"},saving:!1,errored:!1,rules:{name:[{required:!0,message:"* 标签名称不能为空",trigger:["change"]},{max:255,message:"* 标签名称的字符长度不能超过 255",trigger:["change"]}],slug:[{max:255,message:"* 标签别名的字符长度不能超过 255",trigger:["change"]}],thumbnail:[{max:1023,message:"* 封面图链接的字符长度不能超过 1023",trigger:["change"]}],color:[{max:7,pattern:i.aX,message:"仅支持 hex 颜色值"}]}}}},computed:{title:function(){return this.isUpdateMode?"修改标签":"添加标签"},isUpdateMode:function(){return!!this.form.model.id}},created:function(){this.handleListTags()},methods:{handleListTags:function(){var e=this;this.list.loading=!0,n.Z.tag.list({more:!0}).then((function(t){e.list.data=t.data})).finally((function(){e.list.loading=!1}))},handleDeleteTag:function(e){var t=this;n.Z.tag["delete"](e).finally((function(){t.form.model={color:"#cfd3d7"},t.handleListTags()}))},handleCreateOrUpdateTag:function(){var e=this,t=this;t.$refs.tagForm.validate((function(o){o&&(e.form.saving=!0,t.isUpdateMode?n.Z.tag.update(t.form.model.id,t.form.model).catch((function(){e.form.errored=!0})).finally((function(){setTimeout((function(){t.form.saving=!1}),400)})):n.Z.tag.create(t.form.model).catch((function(){e.form.errored=!0})).finally((function(){setTimeout((function(){t.form.saving=!1}),400)})))}))},handleSavedCallback:function(){var e=this;e.form.errored?e.form.errored=!1:(e.form.model={color:"#cfd3d7"},e.handleListTags())}}},s=d,c=o(18156),f=(0,c.Z)(s,a,r,!1,null,null,null),u=f.exports}}]);
|
||||
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[757],{63757:function(e,t,o){o.r(t),o.d(t,{default:function(){return u}});var a=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("page-view",[o("a-row",{attrs:{gutter:12}},[o("a-col",{staticClass:"pb-3",attrs:{lg:10,md:10,sm:24,xl:10,xs:24}},[o("a-card",{attrs:{bodyStyle:{padding:"16px"},title:e.title}},[o("a-form-model",{ref:"tagForm",attrs:{model:e.form.model,rules:e.form.rules,layout:"horizontal"}},[o("a-form-model-item",{attrs:{help:"* 页面上所显示的名称",label:"名称:",prop:"name"}},[o("a-input",{model:{value:e.form.model.name,callback:function(t){e.$set(e.form.model,"name",t)},expression:"form.model.name"}})],1),o("a-form-model-item",{attrs:{help:"* 一般为单个标签页面的标识,最好为英文",label:"别名:",prop:"slug"}},[o("a-input",{model:{value:e.form.model.slug,callback:function(t){e.$set(e.form.model,"slug",t)},expression:"form.model.slug"}})],1),o("a-form-model-item",{attrs:{label:"颜色:",prop:"color"}},[o("a-input",{scopedSlots:e._u([{key:"addonAfter",fn:function(){return[o("verte",{staticStyle:{cursor:"pointer"},attrs:{model:"hex",picker:"square"},model:{value:e.form.model.color,callback:function(t){e.$set(e.form.model,"color",t)},expression:"form.model.color"}})]},proxy:!0}]),model:{value:e.form.model.color,callback:function(t){e.$set(e.form.model,"color",t)},expression:"form.model.color"}})],1),o("a-form-model-item",{attrs:{help:"* 在标签页面可展示,需要主题支持",label:"封面图:",prop:"thumbnail"}},[o("AttachmentInput",{attrs:{title:"选择封面图"},model:{value:e.form.model.thumbnail,callback:function(t){e.$set(e.form.model,"thumbnail",t)},expression:"form.model.thumbnail"}})],1),o("a-form-model-item",[e.isUpdateMode?o("a-button-group",[o("ReactiveButton",{attrs:{errored:e.form.errored,loading:e.form.saving,erroredText:"更新失败",loadedText:"更新成功",text:"更新",type:"primary"},on:{callback:e.handleSavedCallback,click:e.handleCreateOrUpdateTag}}),o("a-button",{attrs:{type:"dashed"},on:{click:function(t){e.form.model={}}}},[e._v("返回添加")])],1):o("ReactiveButton",{attrs:{errored:e.form.errored,loading:e.form.saving,erroredText:"保存失败",loadedText:"保存成功",text:"保存",type:"primary"},on:{callback:e.handleSavedCallback,click:e.handleCreateOrUpdateTag}}),e.isUpdateMode?o("a-popconfirm",{attrs:{title:"你确定要删除【"+e.form.model.name+"】标签?",cancelText:"取消",okText:"确定"},on:{confirm:function(t){return e.handleDeleteTag(e.form.model.id)}}},[o("a-button",{staticClass:"float-right",attrs:{type:"danger"}},[e._v("删除")])],1):e._e()],1)],1)],1)],1),o("a-col",{staticClass:"pb-3",attrs:{lg:14,md:14,sm:24,xl:14,xs:24}},[o("a-card",{attrs:{bodyStyle:{padding:"16px"},title:"所有标签"}},[o("a-spin",{attrs:{spinning:e.list.loading}},[0===e.list.data.length?o("a-empty"):e._l(e.list.data,(function(t){return o("a-tooltip",{key:t.id,attrs:{placement:"topLeft"}},[o("template",{slot:"title"},[o("span",[e._v(e._s(t.postCount)+" 篇文章")])]),o("post-tag",{staticStyle:{"margin-bottom":"8px",cursor:"pointer"},attrs:{tag:t},nativeOn:{click:function(o){e.form.model=t}}})],2)}))],2)],1)],1)],1)],1)},r=[],l=(o(31875),o(26278)),n=o(17132),i=o(82676),m=o(43154),d={components:{PageView:l.B4,Verte:m.Z},data:function(){return{list:{data:[],loading:!1},form:{model:{color:"#cfd3d7"},saving:!1,errored:!1,rules:{name:[{required:!0,message:"* 标签名称不能为空",trigger:["change"]},{max:255,message:"* 标签名称的字符长度不能超过 255",trigger:["change"]}],slug:[{max:255,message:"* 标签别名的字符长度不能超过 255",trigger:["change"]}],thumbnail:[{max:1023,message:"* 封面图链接的字符长度不能超过 1023",trigger:["change"]}],color:[{max:7,pattern:i.aX,message:"仅支持 hex 颜色值"}]}}}},computed:{title:function(){return this.isUpdateMode?"修改标签":"添加标签"},isUpdateMode:function(){return!!this.form.model.id}},created:function(){this.handleListTags()},methods:{handleListTags:function(){var e=this;this.list.loading=!0,n.Z.tag.list({more:!0}).then((function(t){e.list.data=t.data})).finally((function(){e.list.loading=!1}))},handleDeleteTag:function(e){var t=this;n.Z.tag["delete"](e).finally((function(){t.form.model={color:"#cfd3d7"},t.handleListTags()}))},handleCreateOrUpdateTag:function(){var e=this,t=this;t.$refs.tagForm.validate((function(o){o&&(e.form.saving=!0,t.isUpdateMode?n.Z.tag.update(t.form.model.id,t.form.model).catch((function(){e.form.errored=!0})).finally((function(){setTimeout((function(){t.form.saving=!1}),400)})):n.Z.tag.create(t.form.model).catch((function(){e.form.errored=!0})).finally((function(){setTimeout((function(){t.form.saving=!1}),400)})))}))},handleSavedCallback:function(){var e=this;e.form.errored?e.form.errored=!1:(e.form.model={color:"#cfd3d7"},e.handleListTags())}}},s=d,c=o(42177),f=(0,c.Z)(s,a,r,!1,null,null,null),u=f.exports}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[763],{95763:function(e,t,n){n.r(t),n.d(t,{default:function(){return u}});var o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("page-view",[n("a-row",[n("a-col",{attrs:{span:24}},[e.options.developer_mode?n("div",{staticClass:"card-container"},[n("a-tabs",{attrs:{type:"card"},model:{value:e.activeKey,callback:function(t){e.activeKey=t},expression:"activeKey"}},e._l(e.panes,(function(t){return n("a-tab-pane",{key:t.key},[n("span",{attrs:{slot:"tab"},slot:"tab"},[n("a-icon",{attrs:{type:t.icon}}),e._v(e._s(t.title)+" ")],1),n(t.component,{tag:"component"})],1)})),1)],1):n("a-alert",{attrs:{description:"当前没有启用开发者选项,请启用之后再访问该页面!",message:"提示",showIcon:"",type:"error"}})],1)],1)],1)},a=[],i=n(98906),c=n(50990),s={components:{PageView:c.B4},data(){const e=[{title:"运行环境",icon:"safety",component:()=>n.e(889).then(n.bind(n,64479)),key:"environment"},{title:"实时日志",icon:"code",component:()=>Promise.all([n.e(147),n.e(192),n.e(617)]).then(n.bind(n,28617)),key:"runtimeLogs"},{title:"系统变量",icon:"table",component:()=>n.e(139).then(n.bind(n,82139)),key:"optionsList"},{title:"静态存储",icon:"cloud",component:()=>Promise.all([n.e(147),n.e(671)]).then(n.bind(n,99671)),key:"staticStorage"},{title:"设置",icon:"setting",component:()=>n.e(442).then(n.bind(n,90442)),key:"settings"}];return{activeKey:e[0].key,panes:e}},computed:{...(0,i.Se)(["options"])},beforeRouteEnter(e,t,n){const o=e.query.activeKey;n((e=>{o&&(e.activeKey=o)}))},watch:{activeKey(e){if(e){const t=this.$router.history.current.path;this.$router.push({path:t,query:{activeKey:e}}).catch((e=>e))}}}},r=s,l=n(18156),p=(0,l.Z)(r,o,a,!1,null,null,null),u=p.exports}}]);
|
|
@ -1 +0,0 @@
|
|||
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[765],{6765:function(e,t,s){s.r(t),s.d(t,{default:function(){return m}});var n=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"container-wrapper animated fadeIn"},[e._m(0),s("div",{staticClass:"login-form"},[s("LoginForm",{on:{success:e.onLoginSucceed}}),e.resetPasswordButtonVisible?s("router-link",{staticClass:"tip",attrs:{to:{name:"ResetPassword"}}},[e._v(" 找回密码 ")]):e._e()],1)])},r=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"halo-logo"},[s("img",{attrs:{alt:"Halo Logo",src:"/images/logo.svg"}})])}],o=s(91057),a=s(76381),i=(s(70315),s(98906)),u=s(11896),c=s(1540),l={components:{LoginForm:u.Z},data:function(){return{resetPasswordButtonVisible:!1}},beforeMount:function(){this.handleVerifyIsInstall(),document.addEventListener("keydown",this.onRegisterResetPasswordKeydown)},beforeDestroy:function(){document.removeEventListener("keydown",this.onRegisterResetPasswordKeydown)},methods:(0,a.Z)((0,a.Z)({},(0,i.nv)(["refreshUserCache","refreshOptionsCache"])),{},{onRegisterResetPasswordKeydown:function(e){72===e.keyCode&&(e.altKey||e.metaKey)&&e.shiftKey&&(e.preventDefault(),this.resetPasswordButtonVisible=!this.resetPasswordButtonVisible)},handleVerifyIsInstall:function(){var e=this;return(0,o.Z)(regeneratorRuntime.mark((function t(){var s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,c.Z.isInstalled();case 2:if(s=t.sent,s.data){t.next=6;break}return t.next=6,e.$router.push({name:"Install"});case 6:case"end":return t.stop()}}),t)})))()},onLoginSucceed:function(){this.refreshUserCache(),this.refreshOptionsCache(),this.$route.query.redirect?this.$router.push(this.$route.query.redirect):this.$router.push({name:"Dashboard"})}})},d=l,h=s(18156),f=(0,h.Z)(d,n,r,!1,null,null,null),m=f.exports}}]);
|
|
@ -1 +0,0 @@
|
|||
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[765],{6765:function(e,s,t){t.r(s),t.d(s,{default:function(){return c}});var r=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{staticClass:"container-wrapper animated fadeIn"},[e._m(0),t("div",{staticClass:"login-form"},[t("LoginForm",{on:{success:e.onLoginSucceed}}),e.resetPasswordButtonVisible?t("router-link",{staticClass:"tip",attrs:{to:{name:"ResetPassword"}}},[e._v(" 找回密码 ")]):e._e()],1)])},n=[function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{staticClass:"halo-logo"},[t("img",{attrs:{alt:"Halo Logo",src:"/images/logo.svg"}})])}],o=t(98906),a=t(11896),i=t(1540),l={components:{LoginForm:a.Z},data(){return{resetPasswordButtonVisible:!1}},beforeMount(){this.handleVerifyIsInstall(),document.addEventListener("keydown",this.onRegisterResetPasswordKeydown)},beforeDestroy(){document.removeEventListener("keydown",this.onRegisterResetPasswordKeydown)},methods:{...(0,o.nv)(["refreshUserCache","refreshOptionsCache"]),onRegisterResetPasswordKeydown(e){72===e.keyCode&&(e.altKey||e.metaKey)&&e.shiftKey&&(e.preventDefault(),this.resetPasswordButtonVisible=!this.resetPasswordButtonVisible)},async handleVerifyIsInstall(){const e=await i.Z.isInstalled();e.data||await this.$router.push({name:"Install"})},onLoginSucceed(){this.refreshUserCache(),this.refreshOptionsCache(),this.$route.query.redirect?this.$router.push(this.$route.query.redirect):this.$router.push({name:"Dashboard"})}}},d=l,u=t(18156),h=(0,u.Z)(d,r,n,!1,null,null,null),c=h.exports}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue