|
|
|
|
"use strict";(self["webpackChunkhalo_admin"]=self["webpackChunkhalo_admin"]||[]).push([[68],{62068:function(e,t,a){a.r(t),a.d(t,{default:function(){return h}});var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("a-row",{attrs:{gutter:0}},[a("a-col",{staticClass:"h-screen",staticStyle:{"border-right":"1px solid #f2f2f2"},attrs:{md:5,sm:24}},[a("a-spin",{staticClass:"h-full",attrs:{spinning:e.theme.loading}},[a("ThemeSettingForm",{attrs:{theme:e.theme.data,wrapperCol:{span:24}},on:{saved:e.onSettingsSaved},scopedSlots:e._u([{key:"descriptions-item",fn:function(){return[a("a-descriptions-item",[a("a-button",{on:{click:function(t){return e.handleRouteToThemeSetting()}}},[e._v("返回")])],1)]},proxy:!0}])})],1)],1),a("a-col",{staticClass:"h-screen",attrs:{md:19,sm:24}},[a("iframe",{attrs:{id:"themeViewIframe",src:e.options.blog_url,frameborder:"0",height:"100%",scrolling:"auto",width:"100%"}})])],1)},r=[],s=a(54288),i=a(22373),o=(a(70315),a(99868)),l=a(36591),m=a(98906),u={name:"ThemeVisualSetting",components:{ThemeSettingForm:o.Z},data:function(){return{theme:{data:{},loading:!1}}},computed:(0,i.Z)({},(0,m.Se)(["options"])),beforeRouteEnter:function(e,t,a){var n=e.query.themeId;a(function(){var e=(0,s.Z)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.handleGetTheme(n);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},methods:{handleGetTheme:function(e){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function a(){var n,r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.prev=0,t.theme.loading=!0,a.next=4,l.Z.theme.get(e);case 4:n=a.sent,r=n.data,t.theme.data=r;case 7:return a.prev=7,t.theme.loading=!1,a.finish(7);case 10:case"end":return a.stop()}}),a,null,[[0,,7,10]])})))()},handleRouteToThemeSetting:function(){this.$router.push({name:"ThemeSetting",query:{themeId:this.theme.id}})},onSettingsSaved:function(){document.getElementById("themeViewIframe").contentWindow.location.reload()}}},c=u,d=a(70739),f=(0,d.Z)(c,n,r,!1,null,"19de66d0",null),h=f.exports},99868:function(e,t,a){a.d(t,{Z:function(){return d}});var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.theme.id?a("div",{staticClass:"card-container h-full"},[a("a-tabs",{staticClass:"h-full",attrs:{defaultActiveKey:"0",type:"card"}},[a("a-tab-pane",{key:0,attrs:{tab:"关于"}},[e.theme.logo?a("div",[a("a-avatar",{attrs:{alt:e.theme.name,size:72,src:e.theme.logo,shape:"square"}}),a("a-divider")],1):e._e(),a("a-descriptions",{attrs:{column:1,layout:"horizontal"}},[a("a-descriptions-item",{attrs:{label:"作者"}},[a("a",{staticClass:"text-inherit",attrs:{href:e.theme.author.website||"#",target:"_blank"}},[e._v(" "+e._s(e.theme.author.name)+" ")])]),a("a-descriptions-item",{attrs:{label:"介绍"}},[e._v(" "+e._s(e.theme.description||"-")+" ")]),a("a-descriptions-item",{attrs:{label:"官网"}},[a("a",{staticClass:"text-inherit",attrs:{href:e.theme.website||"#",target:"_blank"}},[e._v(" "+e._s(e.theme.website||"-")+" ")])]),a("a-descriptions-item",{attrs:{label:"Git 仓库"}},[a("a",{staticClass:"text-inherit",attrs:{href:e.theme.repo||"#",target:"_blank"}},[e._v(" "+e._s(e.theme.repo||"-")+" ")])]),a("a-descriptions-item",{attrs:{label:"主题标识"}},[e._v(" "+e._s(e.theme.id)+" ")]),a("a-descriptions-item",{attrs:{label:"当前版本"}},[e._v(" "+e._s(e.theme.version)+" ")]),a("a-descriptions-item",{attrs:{label:"存储位置"}},[e._v(" "+e._s(e.theme.themePath)+" ")]),e._t("descriptions-item")],2)],1),e._l(e.form.configurations,(function(t,n){return a("a-tab-pane",{key:n+1,attrs:{tab:t.label}},[a("a-form",{attrs:{wrapperCol:e.wrapperCol,layout:"vertical"}},[e._l(t.items,(function(t,n){return a("a-form-item",{key:n,attrs:{label:t.label+":"}},[t.description&&""!==t.description?a("p",{attrs:{slot:"help"},domProps:{innerHTML:e._s(t.description)},slot:"help"}):e._e(),"TEXT"===t.type?a("a-input",{attrs:{defaultValue:t.defaultValue,placeholder:t.placeholder}
|