- Deleted apps/web/src/utils/optimisticStoreUpdates.ts (unused file) - File was unused - no imports found in codebase - Mutations already use React Query's onMutate pattern - No TypeScript errors after deletion - Actions 4.4.1.2 and 4.4.1.3 complete
2 lines
7.1 KiB
JavaScript
2 lines
7.1 KiB
JavaScript
import{j as e,bc as x,n as b,a3 as f,r as d,ae as j,ab as y,a6 as v,az as N,bd as k,B as w}from"./chunk-Cad8leGS.js";import{c as C}from"./index-D792PhRw.js";import"./chunk-wkfC2Tom.js";import"./chunk-BoPufJSi.js";import"./chunk-VMUEamc6.js";import"./chunk-Df4po8fP.js";import"./chunk-B7sOPOlf.js";import"./chunk-B4NZlYwU.js";import"./chunk-BlDLB1ZZ.js";const F=[{id:"cyber",name:"Cyber",colors:["#66FCF1","#FF00FF"],description:"Neon Cyan & Magenta",gradient:"linear-gradient(135deg, #66FCF1 0%, #FF00FF 100%)"},{id:"ocean",name:"Ocean",colors:["#0EA5E9","#06B6D4"],description:"Sky Blue & Teal",gradient:"linear-gradient(135deg, #0EA5E9 0%, #06B6D4 100%)"},{id:"forest",name:"Forest",colors:["#22C55E","#84CC16"],description:"Green & Lime",gradient:"linear-gradient(135deg, #22C55E 0%, #84CC16 100%)"},{id:"sunset",name:"Sunset",colors:["#F97316","#A855F7"],description:"Orange & Purple",gradient:"linear-gradient(135deg, #F97316 0%, #A855F7 100%)"}];function S({currentTheme:o,onThemeChange:i}){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-kodo-cyan to-kodo-magenta flex items-center justify-center",children:e.jsx(x,{className:"w-5 h-5 text-white"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-xl font-bold text-white",children:"Color Theme"}),e.jsx("p",{className:"text-sm text-kodo-secondary",children:"Choose your visual style"})]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:F.map(a=>e.jsxs("button",{onClick:()=>i(a.id),className:`group relative p-6 rounded-2xl border-2 transition-all duration-300 text-left overflow-hidden ${o===a.id?"border-kodo-cyan bg-kodo-cyan/10 shadow-lg shadow-kodo-cyan/20":"border-white/10 bg-kodo-graphite/50 hover:border-white/30 hover:bg-kodo-graphite"}`,children:[e.jsx("div",{className:"absolute inset-0 opacity-10 group-hover:opacity-20 transition-opacity",style:{background:a.gradient}}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("div",{className:"flex items-center gap-4 mb-3",children:e.jsx("div",{className:"flex gap-2",children:a.colors.map((r,l)=>e.jsx("div",{className:"w-10 h-10 rounded-lg shadow-lg transform group-hover:scale-110 transition-transform",style:{backgroundColor:r}},l))})}),e.jsxs("div",{className:"mb-2",children:[e.jsx("div",{className:"font-bold text-lg text-white mb-1",children:a.name}),e.jsx("div",{className:"text-sm text-kodo-secondary",children:a.description})]}),o===a.id&&e.jsxs("div",{className:"flex items-center gap-2 text-kodo-cyan font-mono text-sm animate-slide-in-left",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-kodo-cyan animate-glow-pulse"}),"Active Theme"]})]})]},a.id))})]})}function M(){const{data:o}=b(),{theme:i,setTheme:a,language:r,setLanguage:l}=C(),{toast:c}=f(),[t,h]=d.useState("profile"),[n,m]=d.useState("cyber");d.useEffect(()=>{document.documentElement.setAttribute("data-color-theme",n)},[n]);const g=s=>{m(s),c({message:`Switched to ${s} theme`,type:"success"})},p=[{id:"profile",label:"Profile",icon:y},{id:"notifications",label:"Notifications",icon:v},{id:"privacy",label:"Privacy",icon:N},{id:"appearance",label:"Appearance",icon:x},{id:"language",label:"Language",icon:k}];return e.jsxs("div",{className:"min-h-screen p-6 space-y-6",children:[e.jsx("div",{className:"glass-hud rounded-2xl border-white/10 p-6 hud-corner",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-kodo-cyan/20 flex items-center justify-center border border-kodo-cyan/30",children:e.jsx(j,{className:"w-6 h-6 text-kodo-cyan"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-display font-bold text-white",children:"Settings"}),e.jsx("p",{className:"text-sm text-kodo-secondary",children:"Manage your account preferences"})]})]})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[e.jsx("div",{className:"glass-hud rounded-xl border-white/10 p-4 h-fit",children:e.jsx("nav",{className:"space-y-1",children:p.map(s=>{const u=s.icon;return e.jsxs("button",{onClick:()=>h(s.id),className:`w-full flex items-center gap-3 px-4 py-3 rounded-lg transition-all ${t===s.id?"bg-kodo-cyan/10 text-kodo-cyan border border-kodo-cyan/30":"text-kodo-secondary hover:text-white hover:bg-white/5"}`,children:[e.jsx(u,{className:"w-4 h-4"}),e.jsx("span",{className:"text-sm font-medium",children:s.label})]},s.id)})})}),e.jsxs("div",{className:"lg:col-span-3 glass-hud rounded-xl border-white/10 p-6",children:[t==="profile"&&e.jsxs("div",{className:"space-y-6",children:[e.jsx("h2",{className:"text-xl font-bold text-white",children:"Profile Settings"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-white mb-2",children:"Username"}),e.jsx("input",{type:"text",defaultValue:o?.username,className:"w-full px-4 py-2 bg-kodo-graphite border border-white/10 rounded-lg text-white focus:border-kodo-cyan focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-white mb-2",children:"Email"}),e.jsx("input",{type:"email",defaultValue:o?.email,className:"w-full px-4 py-2 bg-kodo-graphite border border-white/10 rounded-lg text-white focus:border-kodo-cyan focus:outline-none"})]}),e.jsx(w,{className:"bg-kodo-cyan hover:bg-kodo-cyan/80 text-black",onClick:()=>c({message:"Profile settings updated successfully",type:"success"}),children:"Save Changes"})]})]}),t==="appearance"&&e.jsxs("div",{className:"space-y-6",children:[e.jsx("h2",{className:"text-xl font-bold text-white",children:"Appearance"}),e.jsx(S,{currentTheme:n,onThemeChange:g}),e.jsxs("div",{className:"border-t border-white/10 pt-6 mt-6",children:[e.jsx("label",{className:"block text-sm font-medium text-white mb-2",children:"Light/Dark Mode"}),e.jsx("div",{className:"grid grid-cols-3 gap-3",children:["light","dark","system"].map(s=>e.jsx("button",{onClick:()=>a(s),className:`px-4 py-3 rounded-lg border transition-all ${i===s?"bg-kodo-cyan/10 border-kodo-cyan text-kodo-cyan":"border-white/10 text-kodo-secondary hover:border-white/20"}`,children:s.charAt(0).toUpperCase()+s.slice(1)},s))})]})]}),t==="language"&&e.jsxs("div",{className:"space-y-6",children:[e.jsx("h2",{className:"text-xl font-bold text-white",children:"Language"}),e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-white mb-2",children:"Preferred Language"}),e.jsxs("select",{value:r,onChange:s=>l(s.target.value),className:"w-full px-4 py-2 bg-kodo-graphite border border-white/10 rounded-lg text-white focus:border-kodo-cyan focus:outline-none",children:[e.jsx("option",{value:"en",children:"English"}),e.jsx("option",{value:"fr",children:"Français"})]})]})})]}),(t==="notifications"||t==="privacy")&&e.jsxs("div",{className:"space-y-6",children:[e.jsx("h2",{className:"text-xl font-bold text-white",children:t==="notifications"?"Notifications":"Privacy"}),e.jsxs("p",{className:"text-kodo-secondary",children:["Settings for ",t," will be available soon."]})]})]})]})]})}export{M as SettingsPage};
|
|
//# sourceMappingURL=SettingsPage-DaENWK8y.js.map
|