Rebuilt dist/ and api release bundle, with the migration for catalog paging indexes. Fix Less build error: fade(@token, N%) on theme tokens failed in both user-app and user-app-v2 CustomerChoiceView; use alpha(), the project's token-aware helper. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2 lines
2.6 KiB
JavaScript
2 lines
2.6 KiB
JavaScript
import{P as x}from"./PageBar-CYcEFFDc.js";import{d as f,b as l,c as r,q as n,m as i,J as P,M as S,N as k,n as b,O as B,P as _,G as v,g as h,h as d,Q as L,R as C,S as E,B as p,F as N,r as $,i as A,D as F,_ as V}from"./index-VWrANxEJ.js";import{S as D}from"./SectionHead-J7ahFDqv.js";import{P as I}from"./ProductCard-C0toFrjN.js";import{u as G}from"./catalogStore-BoknsQzW.js";const H={class:"flex justify-center items-center empty"},M=f({__name:"EmptyState",props:{description:{},image:{}},setup(t){return(e,c)=>(l(),r("div",H,[n(i(P),{description:"موردی یافت نشد",image:t.image,class:"h-[200px] w-[200px] opacity-70"},null,8,["image"])]))}}),T="/assets/favoritEmpty-kbtPAdi5.svg",j=f({__name:"ScrollFetchSearch",props:{loading:{type:Boolean},flag:{type:Boolean},padding:{}},emits:["fetch"],setup(t,{emit:e}){const c=e,a=S(),s=d(null);return k(s,()=>{c("fetch")},{distance:50}),(o,u)=>(l(),r("main",{class:"flex flex-col flex-1 overflow-auto no-scrollbar w-[100vw] max-w-screen-md m-auto",style:b({paddingTop:t.padding||i(a).headerHeight+"px"}),ref_key:"scrollArea",ref:s},[B(o.$slots,"default"),n(_,{cls:"my-[10px]",spinning:t.loading,indicator:!0,tip:"درحال دریافت اطلاعات"},null,8,["spinning"]),t.flag?(l(),v(M,{key:0,image:i(T)},null,8,["image"])):h("",!0)],4))}});function q(){const t=G(),e=L({totalPages:0,productList:t.products,flag:!1});return C(()=>t.products,a=>{e.productList=a,e.flag=a.length<1}),{productsData:e,getProducts:async(a,s=!1,o=!1)=>{if(!s){a.value=o||!t.loaded;try{e.productList=await t.load(o),e.flag=e.productList.length<1}catch(u){console.log(u)}finally{a.value=!1}}}}}const z={class:"newest"},J={key:0,class:"newest__grid"},g=20,O=f({__name:"NewestView",setup(t){const{productsData:e,getProducts:c}=q(),a=d(!1),s=d(!1),o=d(g),u=A(()=>e.productList.slice(0,o.value));E(async()=>{await c(a,!1)});const y=async()=>{if(o.value<e.productList.length){o.value+=g;return}s.value||await c(s,!1,!0)};return(Q,R)=>{const w=F("container");return l(),r("div",z,[n(x,{title:"جدیدترین محصولات","back-to":"home"}),n(_,{spinning:a.value,tip:"درحال دریافت اطلاعات"},{default:p(()=>[n(j,{class:"newest__scroll",loading:s.value,flag:i(e).flag,padding:"0px",onFetch:y},{default:p(()=>[n(w,{class:"newest__body"},{default:p(()=>[n(D,{title:"تازهها",subtitle:"آخرین افزودههای مجموعه"}),i(e).productList.length?(l(),r("div",J,[(l(!0),r(N,null,$(u.value,m=>(l(),v(I,{key:m.id,value:m},null,8,["value"]))),128))])):h("",!0)]),_:1})]),_:1},8,["loading","flag"])]),_:1},8,["spinning"])])}}}),Y=V(O,[["__scopeId","data-v-1566f322"]]);export{Y as default};
|