feat: Add comprehensive backend validation, toast notifications, and Tokyo Night theme
- Backend: Add server-side validation with go-playground/validator/v10 - Frontend: Add toast notifications for API errors with @zerodevx/svelte-toast - UI: Complete Tokyo Night theme redesign with modern animations - Docs: Update COMPLETE_DOCUMENTATION.md and README.md with all enhancements - Validation: Email format, password strength, and input sanitization - UX: Real-time error feedback, loading states, and responsive design
This commit is contained in:
1 parent
7448dfff30
commit
55c42f1f99
84 files changed
+7749
-4
No files matched your search
@@ -0,0 +1 @@
|
||||
import{c as p,a as r,f as v}from"../chunks/DUCk1qN8.js";import{b as m,E as g,k as h,a9 as u,h as n,O as _,Q as y,a0 as o,d as f,c,m as w,F as E,G as x}from"../chunks/DnPHkIdi.js";import{B as T}from"../chunks/kSfNJqxT.js";import{s as b}from"../chunks/C9HAc536.js";function A(l,s,...a){var i=new T(l);m(()=>{const t=s()??null;i.ensure(t,t&&(e=>t(e,...a)))},g)}function F(l,s){let a=null,i=n;var t;if(n){a=w;for(var e=_(document.head);e!==null&&(e.nodeType!==y||e.data!==l);)e=o(e);if(e===null)f(!1);else{var d=o(e);e.remove(),c(d)}}n||(t=document.head.appendChild(h()));try{m(()=>s(t),u)}finally{i&&(f(!0),c(a))}}const M="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='107'%20height='128'%20viewBox='0%200%20107%20128'%3e%3ctitle%3esvelte-logo%3c/title%3e%3cpath%20d='M94.157%2022.819c-10.4-14.885-30.94-19.297-45.792-9.835L22.282%2029.608A29.92%2029.92%200%200%200%208.764%2049.65a31.5%2031.5%200%200%200%203.108%2020.231%2030%2030%200%200%200-4.477%2011.183%2031.9%2031.9%200%200%200%205.448%2024.116c10.402%2014.887%2030.942%2019.297%2045.791%209.835l26.083-16.624A29.92%2029.92%200%200%200%2098.235%2078.35a31.53%2031.53%200%200%200-3.105-20.232%2030%2030%200%200%200%204.474-11.182%2031.88%2031.88%200%200%200-5.447-24.116'%20style='fill:%23ff3e00'/%3e%3cpath%20d='M45.817%20106.582a20.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.503%2018%2018%200%200%201%20.624-2.435l.49-1.498%201.337.981a33.6%2033.6%200%200%200%2010.203%205.098l.97.294-.09.968a5.85%205.85%200%200%200%201.052%203.878%206.24%206.24%200%200%200%206.695%202.485%205.8%205.8%200%200%200%201.603-.704L69.27%2076.28a5.43%205.43%200%200%200%202.45-3.631%205.8%205.8%200%200%200-.987-4.371%206.24%206.24%200%200%200-6.698-2.487%205.7%205.7%200%200%200-1.6.704l-9.953%206.345a19%2019%200%200%201-5.296%202.326%2020.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.502%2017.99%2017.99%200%200%201%208.13-12.052l26.081-16.623a19%2019%200%200%201%205.3-2.329%2020.72%2020.72%200%200%201%2022.237%208.243%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-.624%202.435l-.49%201.498-1.337-.98a33.6%2033.6%200%200%200-10.203-5.1l-.97-.294.09-.968a5.86%205.86%200%200%200-1.052-3.878%206.24%206.24%200%200%200-6.696-2.485%205.8%205.8%200%200%200-1.602.704L37.73%2051.72a5.42%205.42%200%200%200-2.449%203.63%205.79%205.79%200%200%200%20.986%204.372%206.24%206.24%200%200%200%206.698%202.486%205.8%205.8%200%200%200%201.602-.704l9.952-6.342a19%2019%200%200%201%205.295-2.328%2020.72%2020.72%200%200%201%2022.237%208.242%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-8.13%2012.053l-26.081%2016.622a19%2019%200%200%201-5.3%202.328'%20style='fill:%23fff'/%3e%3c/svg%3e";var k=v('<link rel="icon"/>');function O(l,s){var a=p();F("12qhfyh",t=>{var e=k();x(()=>b(e,"href",M)),r(t,e)});var i=E(a);A(i,()=>s.children),r(l,a)}export{O as component};
|
||||
@@ -0,0 +1 @@
|
||||
import{f as u,a as h}from"../chunks/DUCk1qN8.js";import{i as g}from"../chunks/VM9GfMNA.js";import{D as l,F as v,G as d,I as _,J as a,K as e,M as x}from"../chunks/DnPHkIdi.js";import{s as o}from"../chunks/DZQwV0xP.js";import{s as $,p}from"../chunks/CKL1QNnB.js";const k={get error(){return p.error},get status(){return p.status}};$.updated.check;const m=k;var b=u("<h1> </h1> <p> </p>",1);function J(i,f){l(f,!1),g();var t=b(),r=v(t),n=a(r,!0);e(r);var s=x(r,2),c=a(s,!0);e(s),d(()=>{o(n,m.status),o(c,m.error?.message)}),h(i,t),_()}export{J as component};
|
||||
@@ -0,0 +1 @@
|
||||
import{f as N,a as T,c as te}from"../chunks/DUCk1qN8.js";import{i as _e}from"../chunks/VM9GfMNA.js";import{o as he}from"../chunks/BOU_Z_Ye.js";import{c as J,h as H,O as me,k as K,a as xe,b as Ee,y as _,P as be,r as ye,H as we,s as se,d as Q,m as V,Q as Te,R as Ae,S as ie,f as Ie,l as $,o as Ne,T as ee,U as ke,V as ne,W as P,X as Ce,Y as Se,Z as Me,_ as F,i as ve,p as de,$ as W,a0 as Re,a1 as Fe,j as De,D as He,I as Oe,a2 as Z,M as Y,J as M,K as S,F as le,G as z}from"../chunks/DnPHkIdi.js";import{s as B}from"../chunks/DZQwV0xP.js";import{i as O}from"../chunks/6OCXa8_L.js";import{s as oe}from"../chunks/C9HAc536.js";function ze(e,i){return i}function Le(e,i,s){for(var u=[],h=i.length,n,l=i.length,t=0;t<h;t++){let f=i[t];de(f,()=>{if(n){if(n.pending.delete(f),n.done.add(f),n.pending.size===0){var m=e.outrogroups;j(ee(n.done)),m.delete(n),m.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var v=u.length===0&&s!==null;if(v){var a=s,o=a.parentNode;Fe(o),o.append(a),e.items.clear()}j(i,!v)}else n={pending:new Set(i),done:new Set},(e.outrogroups??=new Set).add(n)}function j(e,i=!0){for(var s=0;s<e.length;s++)De(e[s],i)}var fe;function Ve(e,i,s,u,h,n=null){var l=e,t=new Map;{var v=e;l=H?J(me(v)):v.appendChild(K())}H&&xe();var a=null,o=be(()=>{var p=s();return ke(p)?p:p==null?[]:ee(p)}),f,m=!0;function D(){c.fallback=a,Ye(c,f,l,i,u),a!==null&&(f.length===0?(a.f&F)===0?ve(a):(a.f^=F,L(a,null,l)):de(a,()=>{a=null}))}var r=Ee(()=>{f=_(o);var p=f.length;let I=!1;if(H){var y=ye(l)===we;y!==(p===0)&&(l=se(),J(l),Q(!1),I=!0)}for(var w=new Set,x=Ie,k=Ne(),d=0;d<p;d+=1){H&&V.nodeType===Te&&V.data===Ae&&(l=V,I=!0,Q(!1));var C=f[d],g=u(C,d),A=m?null:t.get(g);A?(A.v&&ie(A.v,C),A.i&&ie(A.i,d),k&&x.skipped_effects.delete(A.e)):(A=Be(t,m?l:fe??=K(),C,g,d,h,i,s),m||(A.e.f|=F),t.set(g,A)),w.add(g)}if(p===0&&n&&!a&&(m?a=$(()=>n(l)):(a=$(()=>n(fe??=K())),a.f|=F)),H&&p>0&&J(se()),!m)if(k){for(const[U,X]of t)w.has(U)||x.skipped_effects.add(X.e);x.oncommit(D),x.ondiscard(()=>{})}else D();I&&Q(!0),_(o)}),c={effect:r,items:t,outrogroups:null,fallback:a};m=!1,H&&(l=V)}function Ye(e,i,s,u,h){var n=i.length,l=e.items,t=e.effect.first,v,a=null,o=[],f=[],m,D,r,c;for(c=0;c<n;c+=1){if(m=i[c],D=h(m,c),r=l.get(D).e,e.outrogroups!==null)for(const g of e.outrogroups)g.pending.delete(r),g.done.delete(r);if((r.f&F)!==0)if(r.f^=F,r===t)L(r,null,s);else{var p=a?a.next:t;r===e.effect.last&&(e.effect.last=r.prev),r.prev&&(r.prev.next=r.next),r.next&&(r.next.prev=r.prev),R(e,a,r),R(e,r,p),L(r,p,s),a=r,o=[],f=[],t=a.next;continue}if((r.f&W)!==0&&ve(r),r!==t){if(v!==void 0&&v.has(r)){if(o.length<f.length){var I=f[0],y;a=I.prev;var w=o[0],x=o[o.length-1];for(y=0;y<o.length;y+=1)L(o[y],I,s);for(y=0;y<f.length;y+=1)v.delete(f[y]);R(e,w.prev,x.next),R(e,a,w),R(e,x,I),t=I,a=x,c-=1,o=[],f=[]}else v.delete(r),L(r,t,s),R(e,r.prev,r.next),R(e,r,a===null?e.effect.first:a.next),R(e,a,r),a=r;continue}for(o=[],f=[];t!==null&&t!==r;)(v??=new Set).add(t),f.push(t),t=t.next;if(t===null)continue}(r.f&F)===0&&o.push(r),a=r,t=r.next}if(e.outrogroups!==null){for(const g of e.outrogroups)g.pending.size===0&&(j(ee(g.done)),e.outrogroups?.delete(g));e.outrogroups.size===0&&(e.outrogroups=null)}if(t!==null||v!==void 0){var k=[];if(v!==void 0)for(r of v)(r.f&W)===0&&k.push(r);for(;t!==null;)(t.f&W)===0&&t!==e.fallback&&k.push(t),t=t.next;var d=k.length;if(d>0){var C=n===0?s:null;Le(e,k,C)}}}function Be(e,i,s,u,h,n,l,t){var v=(l&Se)!==0?(l&Me)===0?P(s,!1,!1):ne(s):null,a=(l&Ce)!==0?ne(h):null;return{v,i:a,e:$(()=>(n(i,v??s,a??h,t),()=>{e.delete(u)}))}}function L(e,i,s){if(e.nodes)for(var u=e.nodes.start,h=e.nodes.end,n=i&&(i.f&F)===0?i.nodes.start:s;u!==null;){var l=Re(u);if(n.before(u),u===h)return;u=l}}function R(e,i,s){i===null?e.effect.first=s:i.next=s,s===null?e.effect.last=i:s.prev=i}const Pe="/api";async function Ue(e=20,i=0){const s=await fetch(`${Pe}/ebooks?limit=${e}&offset=${i}`);if(!s.ok)throw new Error("Failed to fetch ebooks");return s.json()}var Xe=N('<div class="text-center py-8">Loading ebooks...</div>'),qe=N('<div class="text-red-500 text-center py-8"> </div>'),Ge=N('<div class="text-center py-8 text-gray-500">No ebooks found. Add some ebooks to get started.</div>'),Je=N('<img class="w-full h-full object-cover"/>'),Ke=N('<div class="text-gray-400 text-center p-4"><div class="text-2xl mb-2">📖</div> <div class="text-sm">No Cover</div></div>'),Qe=N('<p class="text-gray-600 text-sm mb-2"> </p>'),We=N('<p class="text-gray-700 text-sm line-clamp-3 svelte-1uha8ag"> </p>'),Ze=N('<div class="bg-white rounded-lg shadow-md overflow-hidden hover:shadow-lg transition-shadow"><div class="aspect-[3/4] bg-gray-200 flex items-center justify-center"><!></div> <div class="p-4"><h3 class="font-semibold text-lg mb-1 line-clamp-2 svelte-1uha8ag"> </h3> <!> <!></div></div>'),$e=N('<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6"></div>'),je=N('<main class="container mx-auto px-4 py-8"><h1 class="text-3xl font-bold mb-8">Ebook Library</h1> <!></mainLine truncated
|
||||
Reference in new issue
Block a user