PageSourceSearch

https://cdn.archidekt.com/_next/static/chunks/pages/moderation/deck-tags-a03bfd58752c613e.js

js archidekt.com collected 2026-09-25 18:52:42 UTC 4,935 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4454],{6653:(e,a,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/moderation/deck-tags",function(){return s(91724)}])},31452:(e,a,s)=>{"use strict";s.d(a,{A:()=>o});var t=s(75038);s(76430);var n=s(40120),i=s(92910),r=s(97633),c=s.n(r);let o=({main:e,secondary:a,href:s,onClick:r})=>(0,t.jsxs)("div",{className:c().container,children:[(0,t.jsx)("h3",{id:e.replace(" ","_"),children:e}),s&&a&&(0,t.jsxs)(i.A,{href:s,children:[a," ",(0,t.jsx)(n.A,{name:"arrow right"})]}),r&&a&&(0,t.jsxs)("button",{onClick:r,children:[a," ",(0,t.jsx)(n.A,{name:"arrow right"})]}),!s&&!r&&a&&a]})},91724:(e,a,s)=>{"use strict";s.r(a),s.d(a,{__N_SSP:()=>j,default:()=>A});var t=s(75038),n=s(76430),i=s(98381),r=s(93275),c=s(21159),o=s(79761),d=s(31452),l=s(76975),p=s(56771),h=s(69133),u=s(40120),g=s(68835),_=s(550),x=s(98770),m=s.n(x);let k={name:"",aliases:"",description:""};var j=!0;let A=({res:e})=>{let a=(0,i.useRouter)(),[s,x]=(0,n.useState)(!1),[j,A]=(0,n.useState)(`${a.query.q||""}`),[v,C]=(0,n.useState)(!1),[N,f]=(0,n.useState)({...k}),y=(e=k)=>{f({...e}),x(!0)},b=()=>{f({...k}),x(!1)};return(0,t.jsx)(o.A,{title:"Deck tags configuration",robots:"noindex",className:m().container,children:(0,t.jsxs)("div",{className:m().content,children:[(0,t.jsxs)(l.A,{open:s,onClose:b,children:[(0,t.jsx)("h4",{children:"Create / Edit tag"}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),C(!0),(N.id?r.A.update(N):r.A.create(N)).then(()=>{c.A.create("Updated or created deck tag","Deck tag service","success"),b(),a.replace(a.asPath)}).catch(e=>c.A.create(e,"Deck tag service","error")).finally(()=>C(!1))},className:m().form,children:[(0,t.jsx)(p.A,{header:"Tag name",onChange:e=>f({...N,name:e}),placeholder:"Budget",value:N.name,containerClassName:m().input}),(0,t.jsx)(p.A,{header:"Tag aliases",onChange:e=>f({...N,aliases:e}),placeholder:"budget cheap inexpensive poor",value:N.aliases,containerClassName:m().input}),(0,t.jsx)(_.A,{noResize:!0,header:"Description",maxCharacters:2048,onChange:e=>f({...N,description:e}),placeholder:"This tag does X, Y, and Z...",value:N.description}),(0,t.jsxs)("div",{className:m().controls,children:[(0,t.jsx)(g.A,{type:"button",disabled:v,color:"red",onClick:b,children:"Cancel"}),(0,t.jsx)(g.A,{disabled:v,color:"green",type:"submit",children:v?(0,t.jsx)(h.A,{size:"xSmall"}):"Submit"})]})]})]}),(0,t.jsx)(d.A,{main:`Deck tags (${e.length})`,secondary:"Add new tag",onClick:()=>y()}),(0,t.jsxs)("form",{className:m().filterControls,onSubmit:e=>((e,s="")=>{e.preventDefault(),a.replace(`${a.route}?q=${s}`)})(e,j),children:[(0,t.jsx)(p.A,{type:"text",header:"Filter tags",value:j,name:"q",placeholder:"Find tags by their aliases",onChange:A,containerClassName:m().input}),(0,t.jsx)(g.A,{icon:"close",type:"submit"})]}),(0,t.jsx)("div",{className:m().data,children:e.map(e=>(0,t.jsxs)("div",{className:m().tagCard,children:[(0,t.jsxs)("div",{className:m().tag,children:["Name: ",e.name]}),(0,t.jsxs)("div",{children:["Aliases: ",(0,t.jsx)("i",{children:e.aliases||"N/A"})]}),(0,t.jsxs)("p",{children:["Description: ",e.description||"No description"]}),(0,t.jsxs)("div",{className:m().controls,children:[(0,t.jsxs)(g.A,{onClick:()=>y(e),children:[(0,t.jsx)(u.A,{name:"edit"})," Edit"]}),(0,t.jsxs)(g.A,{color:"red",onClick:()=>{!e.id||confirm(`Are you sure you want to delete the "${e.name}" tag?`)&&(C(!0),r.A.remove(e.id).then(()=>a.replace(a.asPath)).catch(()=>c.A.create("Unable to delete tag")).finally(()=>C(!1)))},children:[(0,t.jsx)(u.A,{name:"trash alternate outline"})," Delete"]})]})]},e.id))})]})})}},93275:(e,a,s)=>{"use strict";s.d(a,{A:()=>i});var t=s(36601);class n extends t.B{list=async(e="")=>super.get(`/api/decks/tags/v2/?q=${e}`);create=async e=>super.post("/api/decks/tags/",e);update=async e=>super.patch(`/api/decks/tags/${e.id}/`,e);remove=async e=>super.delete(`/api/decks/tags/${e}/`,void 0,!0);getTags=async e=>super.get(`/api/decks/${e}/tagRelations/`);createDeckRelation=async(e,a,s)=>{let t=await super.post("/api/decks/tagRelations/",{deck:e,tag:a,position:s});return{id:t.id,name:t.name,deckId:t.deck,tagId:t.tag,position:t.position}};updateDeckRelation=async e=>{let a=await super.patch(`/api/decks/tagRelations/${e.id}/`,{position:e.position});return{...e,position:a.position}};removeDeckRelation=async e=>super.delete(`/api/decks/tagRelations/${e}/`,void 0,!0)}let i=new n},97633:e=>{e.exports={flex:"header_flex__ZExkp",container:"header_container__Pg3wx"}},98770:e=>{e.exports={container:"deckTags_container__6Q9_b",content:"deckTags_content__sWPIj",filterControls:"deckTags_filterControls__2JxxO",form:"deckTags_form__xnX9k",input:"deckTags_input__IBkZP",controls:"deckTags_controls__EjUUN",data:"deckTags_data__gWmoa",tagCard:"deckTags_tagCard__drMYQ",description:"deckTags_description__mHtW2"}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=6653)),_N_E=e.O()}]);
2//# sourceMappingURL=deck-tags-a03bfd58752c613e.js.map

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.