PageSourceSearch

https://admin.hellobox.co/build/assets/Home-DO_PSL8I.js

js hellobox.co collected 2026-09-24 09:38:16 UTC 5,657 bytes, 1 lines download raw bytes

1import{S as f}from"./SubmitButton-DrxH_XeR.js";import{_ as x,e as _,u as S}from"./VueFinalModal.esm-DFl72DMY.js";import{s as b}from"./saveSite-BDs6sRb_.js";import{u as v}from"./ucfirst-rWDqDg0g.js";import{q as a,t as p,N as k,s as n,F as u,I as h,u as d,v as w,j as I,k as l,C as K,L as C,z as y,A as g}from"./charts-D6UZp-Tt.js";import"./apiPost-ghyv-hva.js";const T={components:{SubmitButton:f},data(){return{config:window.config||{},site:null,loading:!1,currSectionKey:null,textareaInputs:{}}},created(){this.site=JSON.parse(JSON.stringify(this.adminStore.getCurrSite)),(this.site.translation==null||Object.keys(this.site.translation).length==0)&&(this.site.translation=JSON.parse(JSON.stringify(this.config.translation||{}))),this.textareaInputs=this.getTextareaInputs(),this.currSectionKey=this.sectionKeys[0]||null},computed:{..._(S),sectionKeys(){return this.site==null||this.site.translation==null?[]:Object.keys(this.site.translation)},currentSection(){return this.currSectionKey==null||this.site.translation[this.currSectionKey]==null?{}:this.site.translation[this.currSectionKey]},currentItemKeys(){return Object.keys(this.currentSection)}},methods:{ucfirst:v,sectionKeySelected(s){window.scrollTo!=null&&window.scrollTo(0,0),this.currSectionKey=s},displaySectionKey(s){let t=s.replace(/^areas:/,"").replace(/^pages:/,"").split(/[-_:]/).filter(i=>i.length>0&&!["area","page"].includes(i.toLowerCase()));return this.displayWords(t)},displayItemKey(s){return this.displayWords(s.split(/[-_]/))},displayWords(s){return s.map(t=>{let i=t.toLowerCase();return["rss","url","dmca","cta"].includes(i)?i.toUpperCase():this.ucfirst(i)}).join(" ")},safeKey(s){return s.replace(/[^a-zA-Z0-9_-]/g,"-")},translationInputId(s,t){return"input-translation-"+this.safeKey(s)+"-"+this.safeKey(t)},getTextareaInputs(){let s={};return Object.keys(this.site.translation||{}).forEach(t=>{Object.keys(this.site.translation[t]||{}).forEach(i=>{this.shouldUseTextarea(i,this.site.translation[t][i])&&(s[this.translationInputId(t,i)]=!0)})}),s},shouldUseTextarea(s,t){let i=s.toLowerCase();return["text","text1","text2","description","message"].includes(i)||t!=null&&t.length>90},isLongTranslation(s,t){return this.textareaInputs[this.translationInputId(s,t)]==!0},async submit(){b({getWhat:"translation-settings",siteId:this.site.id,site:this.site,column:"translation_settings"}),this.eventBus.emit("notification-event",{type:"success",message:"Settings saved successfully"})}}},j={key:0,class:"mt-10 w-full max-w-4xl lg:px-0"},N={class:"mt-8 grid gap-8 lg:grid-cols-[14rem_1fr]"},O={class:"lg:border-r lg:border-gray-200 lg:pr-6"},B={class:"mt-3 space-y-[3px]","aria-label":"Translation sections"},V=["id","onClick"],L={class:"flex min-w-0 items-center"},U={class:"mr-2 flex h-2 w-2 shrink-0 items-center justify-center"},z={key:0,class:"block h-[7px] w-[7px] rounded-full bg-gray-700"},J={key:1,class:"block h-[7px] w-[7px] rounded-full bg-gray-300 opacity-0 group-hover:opacity-100"},W={class:"truncate"},A={class:"min-w-0"},E={class:"font-medium text-gray-900"},M={class:"mt-6 max-w-lg space-y-5"},D=["for"],F={class:"mt-2"},q=["id","onUpdate:modelValue","disabled"],H=["id","onUpdate:modelValue","disabled"],Z={class:"button-line"};function G(s,t,i,P,e,o){const m=I("SubmitButton");return e.site!=null?(l(),a("div",j,[t[2]||(t[2]=k('<div class="flex w-full items-center"><div class="text-xl font-light flex items-center text-gray-600"> Settings <span class="text-gray-600 mx-2"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5"></path></svg></span> Translation </div></div>',1)),n("div",N,[n("aside",O,[t[0]||(t[0]=n("div",{class:"font-medium text-gray-900"},"Sections",-1)),n("nav",B,[(l(!0),a(u,null,h(o.sectionKeys,r=>(l(),a("button",{id:"section-translation-"+o.safeKey(r),key:r,type:"button",class:C({"group flex w-full items-center rounded-md border-l-4 py-1.5 pl-0 pr-2 text-left text-sm":!0,"border-transparent bg-gray-100 text-gray-950":r==e.currSectionKey,"border-transparent text-gray-600 hover:text-gray-900":r!=e.currSectionKey}),onClick:K(c=>o.sectionKeySelected(r),["prevent"])},[n("span",L,[n("span",U,[r==e.currSectionKey?(l(),a("span",z)):(l(),a("span",J))]),n("span",W,d(o.displaySectionKey(r)),1)])],10,V))),128))])]),n("section",A,[e.currSectionKey!=null?(l(),a(u,{key:0},[n("div",E,d(o.displaySectionKey(e.currSectionKey)),1),t[1]||(t[1]=n("div",{class:"mt-1 text-gray-500"}," Translate labels used in this part of your site. ",-1)),n("div",M,[(l(!0),a(u,null,h(o.currentItemKeys,r=>(l(),a("div",{key:r},[n("label",{for:o.translationInputId(e.currSectionKey,r),class:"block text-gray-800"},d(o.displayItemKey(r)),9,D),n("div",F,[o.isLongTranslation(e.currSectionKey,r)?y((l(),a("textarea",{key:0,id:o.translationInputId(e.currSectionKey,r),"onUpdate:modelValue":c=>e.site.translation[e.currSectionKey][r]=c,class:"input-standard !h-24 !resize-y !rounded-sm !border-gray-400 !px-3 !py-2 !text-sm !leading-5",disabled:e.loading},null,8,q)),[[g,e.site.translation[e.currSectionKey][r]]]):y((l(),a("input",{key:1,id:o.translationInputId(e.currSectionKey,r),type:"text",class:"input-standard !h-10 !rounded-sm !border-gray-400 !px-3 !py-2 !text-sm","onUpdate:modelValue":c=>e.site.translation[e.currSectionKey][r]=c,disabled:e.loading},null,8,H)),[[g,e.site.translation[e.currSectionKey][r]]])])]))),128))]),n("div",Z,[w(m,{onClick:o.submit,loading:e.loading,label:"Save"},null,8,["onClick","loading"])])],64)):p("",!0)])])])):p("",!0)}const et=x(T,[["render",G]]);export{et 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.