Enhance SvelteKit project by adding new API routes for dark mode toggling, updating existing route parameters, and improving type definitions. Refactor component imports and optimize asset handling for better performance and maintainability.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
import"../chunks/Bzak7iHL.js";import{p as U,t as b,j as n,m as V,n as W,q as X,g as a,x as C,l as v,y as Y,o as s,$ as Z,s as l,v as e,w as B,k as Q,i as tt}from"../chunks/DScGFiBY.js";import{s as u}from"../chunks/B7h8GtFa.js";import{i as at}from"../chunks/BlbL38UD.js";import{e as et}from"../chunks/BhGBB4Qh.js";import{h as st}from"../chunks/ChlQth4G.js";import{s as rt}from"../chunks/BPc-JNDc.js";import{B as T}from"../chunks/CcEFwafz.js";import{C as z,a as A}from"../chunks/Y4l2nr7b.js";import{I as ot}from"../chunks/CB0VnWqK.js";var nt=v('<p class="text-muted-foreground text-center text-sm"> </p> <p class="text-muted-foreground text-center text-xs"> </p> <a href="/transactions/new"><!></a> <a href="/"><!></a>',1),lt=v('<a class="font-medium hover:underline"> </a>'),it=v('<div class="flex flex-col gap-2"></div>'),ct=v('<main class="container mx-auto flex flex-col gap-6 px-4 py-6 sm:px-6 sm:py-8"><div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between"><div class="flex items-center gap-3 min-w-0"><a href="/" class="text-muted-foreground hover:text-foreground shrink-0 text-sm" title="Back to main">Back</a> <h1 class="text-xl font-semibold truncate sm:text-2xl">Transactions</h1></div> <div class="flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-center sm:gap-2"><div class="w-full sm:w-64 sm:min-w-0"><!></div> <span class="text-muted-foreground text-sm shrink-0"> </span> <a href="/transactions/new" class="block shrink-0"><!></a></div></div> <!></main>');function gt(D,q){U(q,!0);let p=Y("");const i=Q(()=>{var t;return((t=q.data)==null?void 0:t.transactions)??[]}),d=Q(()=>(()=>{const t=a(p).trim().toLowerCase();return t?a(i).filter(r=>r.id.toLowerCase().includes(t)):a(i)})());var h=ct();st("1q0dtg6",t=>{W(()=>{Z.title="Transactions – Stackq"})});var x=s(h),N=l(s(x),2),$=s(N),E=s($);ot(E,{type:"search",placeholder:"Search transactions…",class:"h-11 w-full sm:h-9",get value(){return a(p)},set value(t){X(p,t,!0)}}),e($);var _=l($,2),F=s(_);e(_);var j=l(_,2),G=s(j);T(G,{class:"w-full sm:w-auto min-h-11",children:(t,r)=>{B();var c=C("New transaction");n(t,c)},$$slots:{default:!0}}),e(j),e(N),e(x);var H=l(x,2);{var J=t=>{z(t,{children:(r,c)=>{A(r,{class:"flex flex-col items-center justify-center gap-4 py-12",children:(f,I)=>{var g=nt(),m=tt(g),L=s(m,!0);e(m);var o=l(m,2),w=s(o,!0);e(o);var y=l(o,2),M=s(y);T(M,{variant:"outline",children:(k,R)=>{B();var P=C("New transaction");n(k,P)},$$slots:{default:!0}}),e(y);var S=l(y,2),O=s(S);T(O,{variant:"ghost",children:(k,R)=>{B();var P=C("Back to home");n(k,P)},$$slots:{default:!0}}),e(S),b(()=>{u(L,a(i).length===0?"No transactions yet.":"No transactions match your search."),u(w,a(i).length===0?"Create a transaction to get started.":"Try a different search.")}),n(f,g)},$$slots:{default:!0}})},$$slots:{default:!0}})},K=t=>{var r=it();et(r,21,()=>a(d),c=>c.id,(c,f)=>{z(c,{children:(I,g)=>{A(I,{class:"p-4",children:(m,L)=>{var o=lt(),w=s(o);e(o),b(()=>{rt(o,"href",`/transactions/${a(f).id??""}`),u(w,`Transaction ${a(f).id??""}`)}),n(m,o)},$$slots:{default:!0}})},$$slots:{default:!0}})}),e(r),n(t,r)};at(H,t=>{a(d).length===0?t(J):t(K,!1)})}e(h),b(()=>u(F,`${a(d).length??""}${a(d).length!==a(i).length?` of ${a(i).length}`:""} transactions`)),n(D,h),V()}export{gt as component};
|
||||
Reference in New Issue
Block a user