1import{M as r,V as o,m as n,q as l,_ as i,r as c,u as d,w as u,e as m,n as p}from"./index-25cd0ebb.js";const h={name:"VwPageEdit",components:{MediumEditor:r,VwSpinner:o},metaInfo(){return{title:this.section.fields.title+" - ÎιαÏείÏιÏη"}},data(){return{error:"",form:{},section:{fields:{title:"",description:"",excerpt:""}},loading:!1,model:{}}},methods:{...n(["setFetching"]),fetch(){this.setFetching({fetching:!0}),l("page",this.$route.params.id).then(s=>{this.section=i.defaultsDeep(s.document,this.model),this.setFetching({fetching:!1})}).catch(s=>{this.setFetching({fetching:!1}),this.loading=!1,this.error=this.$t(`errors.${s}`)})},fieldClass(s){if(!s)return"";if((s.$touched||s.$submitted)&&s.$valid)return"valid";if((s.$touched||s.$submitted)&&s.$invalid)return"invalid"},applyDescription(s){this.section.fields.description=s},applyExcerpt(s){this.section.fields.excerpt=s},onSubmit(){this.error="",this.ladda=c(document.getElementById("save-btn")),this.ladda.start();const s=i.cloneDeep(this.section);return d(s).then(({data:t})=>{this.section=t.document,this.section.description=this.section.description||"",this.ladda.stop()}).catch(t=>{this.ladda.stop(),this.error=this.$t(`errors.${t}`)})},back(){this.$router.go(-1)},toUpper(s){return u(s)}},computed:{...m({fetching:s=>s.fetching})},mounted(){this.fetch()}};var f=function(){var t=this,e=t._self._c;return e("div",[t.section._id?e("div",{staticClass:"admin-menu",class:{errored:t.error}},[e("a",{staticClass:"back",on:{click:t.back}},[e("i",{staticClass:"fa fa-long-arrow-left",attrs:{"aria-hidden":"true"}})]),e("div",{staticClass:"title"},[t._v(" "+t._s(t.toUpper(t.section.fields.title))+" ⢠"+t._s(t.$t("admin.SETTINGS"))+" ")]),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.loading,expression:"!loading"}],staticClass:"buttons"},[e("router-link",{staticClass:"cyan-outline-button button",attrs:{to:`/${t.section._slug}`}},[t._v(" "+t._s(t.$t("admin.VIEW"))+" ")]),e("button",{staticClass:"cyan-button",attrs:{id:"save-btn","data-spinner-size":"22","data-spinner-color":"#000",disabled:t.form.$invalid},on:{click:t.onSubmit}},[e("span",{staticClass:"ladda-label"},[t._v(t._s(t.$t("admin.SAVE")))])])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:t.error,expression:"error"}],staticClass:"error"},[t._v(t._s(t.error))])]):t._e(),e("section",{staticClass:"form-section cf"},[e("vw-spinner",{directives:[{name:"show",rawName:"v-show",value:t.fetching,expression:"fetching"}]}),!t.fetching&&t.section.fields?e("div",[e("div",{staticClass:"boxed"},[e("div",{staticClass:"form-group required-field"},[e("label",[t._v("ΤÎΤÎÎΣ")]),e("textarea",{directives:[{name:"model",rawName:"v-model.lazy",value:t.section.fields.title,expression:"section.fields.title",modifiers:{lazy:!0}}],staticClass:"form-control article-title",attrs:{name:"title",required:""},domProps:{value:t.section.fields.title},on:{change:function(a){return t.$set(t.section.fields,"title",a.target.value)}}})]),e("div",{staticClass:"form-group"},[e("label",[t._v("KEIMENO HEADER")]),e("medium-editor",{staticClass:"form-control",attrs:{text:t.section.fields.excerpt,toolbar:"full"},on:{edit:t.applyExcerpt}})],1),e("div",{staticClass:"form-group"},[e("label",[t._v(t._s(t.$t("admin.DESCRIPTION")))]),e("medium-editor",{staticClass:"form-control",attrs:{text:t.section.fields.description,upload:!0,toolbar:"full"},on:{edit:t.applyDescription}})],1)])]):t._e()],1)])},v=[],_=p(h,f,v,!1,null,null,null,null);const b=_.exports;export{b as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.