PageSourceSearch

https://snapbox.ai/assets/SnapMagazineSetting-C7p0gfzg.js

js snapbox.ai collected 2026-10-05 12:40:02 UTC 7,573 bytes, 1 lines download raw bytes

1import{_ as R,m as U,r as S,o as F,A as C,p as M,c,b as e,h as v,e as b,t as N,w as d,s as V,k as w,i as A,q as p,v as z,F as L,u as O,j as y,g as _}from"./index-GRB8Jcml.js";import{S as j,a as D,b as q}from"./snap_footer-B9eSqtLO.js";import{C as E}from"./compressor.esm-FeJMiU6q.js";import{M as P}from"./MagazineService-muCZR2sY.js";/* empty css             */import"./UserService-B39Vk0W_.js";const x={name:"SnapSetting",components:{SNAP_MENU:j,SNAP_HEADER:D,SNAP_FOOTER:q},setup(){const t=U({alert_display:!1,alert_confirm:!1,msg:"",brand:"",title:"",intro:"",link:"",brand_name:"",is_connected:""}),l=O();var r=S({});r.value.style="cursor: pointer";var s=S({});s.value.style="cursor: pointer";const k=o=>{const n=o.target.files[0];if(console.log(n),n.type!="image/png"&&n.type!="image/jpeg"&&n.type!="image/jpg")return alert("이미지 파일을 선택해주세요."),!1;var i=1;n.size>6194304?i=.1:n.size>5194304?i=.2:n.size>4194304?i=.3:n.size>3145728?i=.4:n.size>2097152?i=.5:i=1,new E(n,{quality:i,success(a){let m={file:a,style:"background-image: url("+URL.createObjectURL(a)+");background-position: center; cursor: pointer"};s.value=m},error(a){console.log(a.message)}}),console.log(s.value)},h=o=>{const n=o.target.files[0];if(console.log(n),n.type!="image/png"&&n.type!="image/jpeg"&&n.type!="image/jpg")return alert("이미지 파일을 선택해주세요."),!1;var i=1;n.size>6194304?i=.1:n.size>5194304?i=.2:n.size>4194304?i=.3:n.size>3145728?i=.4:n.size>2097152?i=.5:i=1,new E(n,{quality:i,success(a){let m={file:a,style:"background-image: url("+URL.createObjectURL(a)+");background-position: center; cursor: pointer"};r.value=m},error(a){console.log(a.message)}}),console.log(r.value)};let u=()=>{P.readSetting().then(o=>{if(console.log(o),o.data.code=="S"){let n=o.data.data;t.brand=n.brand,t.title=n.title,t.intro=n.intro,t.link=n.link,t.is_connected=n.is_connected==1,t.logo_url=n.logo,t.photo_url=n.main_image;let i={style:"background-image: url("+t.logo_url+");background-position: center; cursor: pointer"};r.value=i;let a={style:"background-image: url("+t.photo_url+");background-position: center; cursor: pointer"};s.value=a}else alert("데이터를 가져오는데 실패하였습니다.")}).catch(o=>{console.log(o)})},g=()=>{if(!r.value.file&&!t.logo_url)return alert("로고를 선택해주세요."),!1;if(!s.value.file&&!t.photo_url)return alert("메인이미지를 선택해주세요."),!1;if(!t.brand)return alert("브랜드명을 입력해주세요."),!1;if(!t.title)return alert("타이틀을 입력해주세요."),!1;if(!t.intro)return alert("브랜드소개글을 입력해주세요."),!1;if(!t.link)return alert("링크 url을 입력해주세요."),!1;if(confirm("저장하시겠습니까?")){let o=new FormData;r.value.file&&o.append("logo",r.value.file),s.value.file&&o.append("photo",s.value.file),t.is_connected?o.append("is_connected",1):o.append("is_connected",0),o.append("brand",t.brand),o.append("title",t.title),o.append("intro",t.intro),o.append("link",t.link),P.setting(o).then(n=>{console.log(n),n.data.code=="S"?(alert("저장되었습니다."),u()):alert("저장에 실패하였습니다.")}).catch(n=>{console.log(n)})}},f=()=>{confirm("로그아웃 하시겠습니까?")&&C.logout()};return F(()=>{console.log("mounted!"),u(),t.brand_name=C.getNickname()}),{logo:r,photo:s,save:g,onPhotoChange:k,onLogoChange:h,logout:f,...M(t),router:l}}},T={class:"dashboard_body flex flex-col"},B={class:"dash_section"},H={class:"contents_area grow p-8"},I={class:"con grow"},K={class:"dash_form box p-8 bg-white"},G={class:"font-bold text-lg mb-3 icon_snapicon flex items-center"},J=["href"],Q={class:"toggle"},W=["src"],X=["src"],Y={class:"flex items-center gap-2"},Z={class:"flex items-center gap-2"},$={class:"flex items-center gap-2"},ee={class:"flex items-center gap-2"},le={class:"btn_area"},te={class:"popup_layer"},oe={class:"alert"},ne={style:{height:"50px"}},se={class:"msg"},ie={class:"btn_area"};function ae(t,l,r,s,k,h){const u=y("SNAP_HEADER"),g=y("SNAP_MENU"),f=y("SNAP_FOOTER");return _(),c(L,null,[e("div",T,[v(u),e("div",B,[v(g),e("div",H,[e("div",I,[l[24]||(l[24]=e("div",{class:"contents_title"},[e("h1",null,"매거진설정"),e("h2",null,"브랜드 매거진 메인화면 설정화면 입니다.")],-1)),e("div",K,[e("div",G,[e("a",{class:"!text-black hover:underline",target:"_blank",href:"https://snapbox.ai/"+t.brand_name+"_official"},[l[13]||(l[13]=b("snapbox.ai/")),e("span",null,N(t.brand_name),1),l[14]||(l[14]=b("_official"))],8,J)]),e("table",null,[e("tbody",null,[e("tr",null,[l[17]||(l[17]=e("th",null,"매거진 공개여부",-1)),e("td",null,[e("div",Q,[d(e("input",{type:"checkbox",role:"switch",id:"toggle_radio01",class:"toggle_radio","onUpdate:modelValue":l[0]||(l[0]=o=>t.is_connected=o)},null,512),[[V,t.is_connected]]),l[15]||(l[15]=e("label",{for:"toggle_radio01"},null,-1))]),l[16]||(l[16]=e("div",{style:{padding:"5px 0",color:"#666"}}
1," 활성화 시에만 매거진 링크가 오픈됩니다. ",-1))])]),e("tr",null,[l[18]||(l[18]=e("th",null,"로고",-1)),e("td",null,[e("div",null,[e("input",{type:"file",onChange:l[1]||(l[1]=(...o)=>s.onLogoChange&&s.onLogoChange(...o)),ref:"logoFile"},null,544),e("div",{class:"file_photo h-24",style:w(s.logo.style),onClick:l[2]||(l[2]=o=>t.$refs.logoFile.click())},[s.logo.url?(_(),c("img",{key:0,src:s.logo.url,alt:"Selected Logo"},null,8,W)):A("",!0)],4)])])]),e("tr",null,[l[19]||(l[19]=e("th",null,"메인이미지",-1)),e("td",null,[e("div",null,[e("input",{type:"file",onChange:l[3]||(l[3]=(...o)=>s.onPhotoChange&&s.onPhotoChange(...o)),ref:"newFile"},null,544),e("div",{class:"file_photo",style:w(s.photo.style),onClick:l[4]||(l[4]=o=>t.$refs.newFile.click())},[s.photo.url?(_(),c("img",{key:0,src:s.photo.url,alt:"Selected Image"},null,8,X)):A("",!0)],4)])])]),e("tr",null,[l[20]||(l[20]=e("th",null,"브랜드명",-1)),e("td",null,[e("div",Y,[d(e("input",{class:"!w-full",type:"text",placeholder:"브랜드명을 입력해주세요.","onUpdate:modelValue":l[5]||(l[5]=o=>t.brand=o)},null,512),[[p,t.brand]])])])]),e("tr",null,[l[21]||(l[21]=e("th",null,"타이틀",-1)),e("td",null,[e("div",Z,[d(e("input",{class:"!w-full",type:"text",placeholder:"타이틀을 입력해주세요.","onUpdate:modelValue":l[6]||(l[6]=o=>t.title=o)},null,512),[[p,t.title]])])])]),e("tr",null,[l[22]||(l[22]=e("th",null,"브랜드소개글",-1)),e("td",null,[e("div",$,[d(e("input",{class:"!w-full",type:"text",placeholder:"브랜드 소개글을 작성해주세요.","onUpdate:modelValue":l[7]||(l[7]=o=>t.intro=o)},null,512),[[p,t.intro]])])])]),e("tr",null,[l[23]||(l[23]=e("th",null,"링크url",-1)),e("td",null,[e("div",ee,[d(e("input",{class:"!w-full",type:"text",placeholder:"메인화면 클릭 시 이동할 url을 입력해주세요.","onUpdate:modelValue":l[8]||(l[8]=o=>t.link=o)},null,512),[[p,t.link]])])])])])]),e("div",le,[e("button",{type:"button",class:"btn_save",onClick:l[9]||(l[9]=(...o)=>s.save&&s.save(...o))}," 저장 ")])])]),v(f)])])]),d(e("div",te,[e("div",oe,[e("h1",ne,[l[25]||(l[25]=b(" 알림")),e("button",{type:"button",class:"btn_close",onClick:l[10]||(l[10]=o=>t.alert_display=!1)}," 닫기 ")]),e("div",se,N(t.msg),1),e("div",ie,[d(e("button",{type:"button",class:"btn_basic",onClick:l[11]||(l[11]=o=>t.alert_display=!1)}," 취소 ",512),[[z,t.alert_confirm]]),e("button",{type:"button",class:"btn_basic btn_color_BK",style:{"margin-left":"5px"},onClick:l[12]||(l[12]=(...o)=>t.clickConfirm&&t.clickConfirm(...o))}," 확인 ")])])],512),[[z,t.alert_display]])],64)}const me=R(x,[["render",ae]]);export{me 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.