PageSourceSearch

https://ace.skin/assets/SupportNewTicketPage-8ECfjWqG.js

js ace.skin collected 2026-09-24 15:12:10 UTC 6,112 bytes, 1 lines download raw bytes

1import{bd as E,b as W,f as F,x as P,r as a,eb as I,j as e,B as g,q as $,K as q,v as z,dW as n,aJ as B,L as R,e9 as _,H as f,c8 as D}from"./index-DKnJqYmH.js";import{s as b,e as v,a as j,b as k,c as M,d as N}from"./supportPageStyles-g1aLomcw.js";const U=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]],S=E("message-square-plus",U),V=Object.values(I.category),u=50,c=2e4,L={"& .MuiOutlinedInput-root":{bgcolor:"var(--card-alt)",borderRadius:"8px"},"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline":{border:"1px solid var(--border)"},"& .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline":{borderWidth:"1px",borderColor:"var(--primary)"}},T={...L,"& .MuiInputLabel-root":{fontWeight:700,color:"var(--primary)"},"& .MuiInputLabel-root.Mui-focused":{color:"var(--primary)"},"& .MuiInputLabel-root.MuiInputLabel-shrink":{color:"var(--primary)"},"& .MuiFormLabel-asterisk":{color:"var(--primary)"},"& .MuiSelect-select":{color:"var(--foreground)"},"& .MuiSelect-icon":{color:"var(--primary)"},"& .MuiOutlinedInput-input":{color:"var(--foreground)"}},G={...L,"& .MuiInputLabel-root":{fontWeight:700,color:"var(--muted-foreground)"},"& .MuiInputLabel-root.Mui-focused":{color:"var(--foreground)"},"& .MuiInputLabel-root.MuiInputLabel-shrink":{color:"var(--muted-foreground)"},"& .MuiFormLabel-asterisk":{color:"var(--muted-foreground)"},"& .MuiOutlinedInput-input":{color:"var(--foreground)"},"& textarea":{resize:"vertical",minHeight:"88px"}},d={"@media (max-width: 639.95px)":{"& .MuiInputLabel-root":{fontSize:"0.8125rem"},"& .MuiOutlinedInput-input, & .MuiSelect-select":{fontSize:"0.875rem"},"& .MuiFormHelperText-root":{fontSize:"0.6875rem"}}},y={sx:{textAlign:"right",margin:"6px 0 0",fontSize:{xs:"0.6875rem",sm:"0.8125rem"},fontWeight:600,color:"var(--muted-foreground)",lineHeight:1.2}};function K(){const{t}=W(),p=F(),w=P(s=>s.auth.isAuthenticated),[m,C]=a.useState(I.category.OTHER),[i,A]=a.useState(""),[o,O]=a.useState(""),[x,h]=a.useState(!1);if(a.useEffect(()=>(document.title=`${t("supportTickets.newTicket")} - AceSkin`,()=>{document.title="AceSkin"}),[t]),!w)return e.jsx("div",{className:b,children:e.jsxs("div",{className:v,children:[e.jsxs("div",{className:j,children:[e.jsx("div",{className:k,children:e.jsxs("div",{className:"flex gap-3.5",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-(--card-alt)","aria-hidden":!0,children:e.jsx(S,{className:"h-5 w-5 text-foreground",strokeWidth:1.75})}),e.jsxs("div",{className:"min-w-0 pt-0.5",children:[e.jsx("h1",{className:"text-lg font-semibold tracking-tight text-foreground sm:text-xl md:text-2xl",children:t("supportTickets.signInTitle")}),e.jsx("p",{className:"mt-1 text-sm leading-snug text-muted-foreground sm:text-base",children:t("supportTickets.signInBody")})]})]})}),e.jsx("div",{className:M,"aria-hidden":!0})]}),e.jsx("div",{className:q(N,"text-center"),children:e.jsx(g,{component:"a",href:$.getLoginUrl(),children:t("auth.loginWithSteam")})})]})});const H=async s=>{if(s.preventDefault(),!(!i.trim()||!o.trim())){h(!0);try{const r=await _.create({category:m,subject:i.trim().slice(0,u),message:o.trim().slice(0,c)});f.success(t("supportTickets.created"));const l=r?.id;l!=null?p(`/support/tickets/${l}`,{replace:!0}):p("/support",{replace:!0})}catch(r){const l=r instanceof D?r.body?.message??r.message:t("supportTickets.createError");f.error(String(l))}finally{h(!1)}}};return e.jsx("div",{className:b,children:e.jsxs("div",{className:v,children:[e.jsxs("div",{className:j,children:[e.jsx("div",{className:k,children:e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{className:"flex gap-3.5",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-(--card-alt)","aria-hidden":!0,children:e.jsx(S,{className:"h-5 w-5 text-foreground",strokeWidth:1.75})}),e.jsxs("div",{className:"min-w-0 pt-0.5",children:[e.jsx("h1",{className:"text-lg font-semibold tracking-tight text-foreground sm:text-xl md:text-2xl",children:t("supportTickets.newTicket")}),e.jsx("p",{className:"mt-1 text-sm leading-snug text-muted-foreground sm:text-base",children:t("supportTickets.subtitle")})]})]}),e.jsx(z,{to:"/support",className:"shrink-0 text-xs font-bold text-muted-foreground underline-offset-2 hover:text-foreground hover:underline sm:pt-2 sm:text-sm sm:text-[15px]",children:t("supportTickets.backToList")})]})}),e.jsx("div",{className:M,"aria-hidden":!0})]}),e.jsx("div",{className:N,children:e.jsxs("form",{onSubmit:H,className:"flex flex-col gap-5",children:[e.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-5 md:gap-4",children:[e.jsx("div",{className:"min-w-0 md:col-span-2",children:e.jsx(n,{select:!0,required:!0,fullWidth:!0,label:t("supportTickets.category"),value:m,onChange:s=>C(s.target.value),SelectProps:{MenuProps:{disableScrollLock:!0}},sx:{...T,...d},children:V.map(s=>e.jsx(B,{value:s,children:t(`supportTickets.categoryLabel.${s}`,{defaultValue:s})},s))})}),e.jsx("div",{className:"min-w-0 md:col-span-3",children:e.jsx(n,{fullWidth:!0,required:!0,label:t("supportTickets.subject"),value:i,onChange:s=>A(s.target.value),inputProps:{maxLength:u},helperText:`${i.length} / ${u}`,FormHelperTextProps:y,sx:{...T,...d}})})]}
1),e.jsx("div",{className:"min-w-0 w-full",children:e.jsx(n,{fullWidth:!0,required:!0,multiline:!0,minRows:2,label:t("supportTickets.ticketDetails"),placeholder:t("supportTickets.message"),value:o,onChange:s=>O(s.target.value),inputProps:{maxLength:c},helperText:`${o.length} / ${c}`,FormHelperTextProps:y,sx:{...G,...d}})}),e.jsx(g,{type:"submit",disabled:x,className:"w-full sm:w-auto",children:x?e.jsxs(e.Fragment,{children:[e.jsx(R,{className:"mr-2 h-4 w-4 animate-spin"}),t("supportTickets.submitting")]}):t("supportTickets.submit")})]})})]})})}export{K as SupportNewTicketPage};

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.