PageSourceSearch

https://netracuni.com/build/assets/ShopUpdateLogoForm-fab164ba.js

js netracuni.com collected 2026-09-24 09:08:32 UTC 3,024 bytes, 1 lines download raw bytes

1import{T as B,r as h,G as N,o as m,c as d,w as s,f as l,t as r,a as u,b as p,y,I as S,d as j,e as f,j as w,u as t,n as E}from"./app-58d237c0.js";import{_ as V}from"./ActionMessage-c46e694d.js";import{_ as D}from"./FormSection-1b575815.js";import{_ as F}from"./InputError-4d393927.js";import{_ as L}from"./InputLabel-37bb2f63.js";import{_ as T}from"./PrimaryButton-ba04a1e8.js";import{_ as k}from"./SecondaryButton-cc387e7e.js";import{_ as U}from"./StatusMessage-66611233.js";import"./SectionTitle-78fee7b0.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./CloseIcon-bac753bb.js";const A={class:"col-span-6 sm:col-span-4"},M={class:"mt-2"},O=["src","alt"],R={class:"mt-2"},z=["src","alt"],ee={__name:"ShopUpdateLogoForm",props:{shop:Object,permissions:Object},setup(n){const b=n,o=B({_method:"PUT",photo:null}),i=h(null),a=h(null),C=()=>{a.value&&(o.photo=a.value.files[0]),o.post(route("shop.update-logo"),{errorBag:"updateLogo",preserveScroll:!0,onSuccess:()=>v()})},$=()=>{a.value.click()},I=()=>{const e=a.value.files[0];if(!e)return;const c=new FileReader;c.onload=g=>{i.value=g.target.result},c.readAsDataURL(e)},P=()=>{o.post(route("shop.logo.destroy",b.shop),{preserveScroll:!0,onSuccess:()=>{i.value=null,v()}})},v=()=>{var e;(e=a.value)!=null&&e.value&&(a.value.value=null)},_=h(!1);return N(()=>[o.recentlySuccessful,o.hasErrors],()=>{_.value=!1}),(e,c)=>(m(),d(D,{onSubmitted:C},{title:s(()=>[l(r(e.__("shop.logo_settings_title")),1)]),description:s(()=>[l(r(e.__("shop.logo_settings_description")),1)]),form:s(()=>[u("div",A,[u("input",{id:"logo-photo",ref_key:"photoInput",ref:a,type:"file",class:"hidden",onChange:I},null,544),p(L,{for:"logo-photo",value:e.__("shop.logo_settings_title")},null,8,["value"]),y(u("div",M,[n.shop.logo_path?(m(),j("img",{key:0,src:n.shop.logo_url,alt:n.shop.name,class:"object-cover"},null,8,O)):f("",!0)],512),[[S,!i.value]]),y(u("div",R,[u("img",{src:i.value,alt:n.shop.name,style:{"max-width":"300px"}},null,8,z)],512),[[S,i.value]]),p(k,{class:"mt-2 mr-2",type:"button",onClick:w($,["prevent"])},{default:s(()=>[l(r(e.__("shop.logo_select_new")),1)]),_:1},8,["onClick"]),n.shop.logo_path?(m(),d(k,{key:0,type:"button",class:"mt-2",onClick:w(P,["prevent"])},{default:s(()=>[l(r(e.__("shop.logo_remove")),1)]),_:1},8,["onClick"])):f("",!0),p(F,{message:t(o).errors.photo,class:"mt-2"},null,8,["message"])])]),actions:s(()=>[p(V,{on:t(o).recentlySuccessful,class:"mr-3"},{default:s(()=>[l(r(e.__("Saved"))+". ",1)]),_:1},8,["on"]),e.appInfo&&e.appInfo.isApp?(m(),d(U,{key:0,show:!_.value&&(t(o).recentlySuccessful||t(o).hasErrors),type:t(o).recentlySuccessful?"success":"error","auto-hide":t(o).recentlySuccessful?5e3:0,onClose:c[0]||(c[0]=g=>_.value=!0)},{default:s(()=>[l(r(t(o).hasErrors?e.__("save_failed_validation_errors"):e.__("Saved")),1)]),_:1},8,["show","type","auto-hide"])):f("",!0),p(T,{class:E({"opacity-25":t(o).processing}),disabled:t(o).processing},{default:s(()=>[l(r(e.__("Save")),1)]),_:1},8,["class","disabled"])]),_:1}))}};export{ee 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.