1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6720],{24797:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/moderation/rules",function(){return s(77198)}])},57358:(e,t,s)=>{"use strict";s.d(t,{A:()=>o});var n=s(81639),a=s(36601),i=s(32071);class r extends a.B{details=async()=>{if(!i.ow)throw Error("No community record ID found");return super.get(`/api/community/management/${i.ow}/`)};update=async e=>{if(!i.ow)throw Error("No community record ID found");return super.patch(`/api/community/management/${i.ow}/`,e)};getSiteRules=async()=>super.get("/api/users/moderator/rules/");updateSiteRules=async e=>super.post("/api/users/moderator/rules/",e);listImageUploads=async e=>super.get(`/api/users/listImages/?${n.stringify(e)}`)}let o=new r},58991:e=>{e.exports={container:"rules_container__KyNtC",content:"rules_content__YEnN1",codeBlock:"rules_codeBlock__FMT9f",options:"rules_options__VC42l",datetime:"rules_datetime__eYlnm",controls:"rules_controls__2wWRa"}},77198:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSP:()=>p,default:()=>_});var n=s(75038),a=s(76430),i=s(98381),r=s(57358),o=s(21159),l=s(79761),c=s(65293),d=s(68835),u=s(90922),m=s(58991),h=s.n(m),p=!0;let _=({rules:e})=>{let t=(0,i.useRouter)(),[s,m]=(0,a.useState)(e.asteriStartTime),[p,_]=(0,a.useState)(e.asteriStopTime),[g,w]=(0,a.useState)(e.maintenencePageEnabled),[N,y]=(0,a.useState)(!1);return(0,n.jsxs)(l.A,{title:"Archidekt site rules",robots:"noindex",className:h().container,children:[(0,n.jsxs)("div",{className:h().content,children:[(0,n.jsx)("h3",{children:"Current site rules"}),(0,n.jsx)("p",{children:"These settings can take up to 60 seconds to update. Once updated, anyone who loads Archidekt will get the updated information. Datetimes are displayed in UTC."}),(0,n.jsx)("pre",{className:h().codeBlock,children:JSON.stringify(e,void 0,2)}),(0,n.jsxs)("div",{className:h().options,children:[(0,n.jsxs)("div",{className:h().datetime,children:[(0,n.jsx)("label",{htmlFor:"startTime",children:"Asteri start time (local time)"}),(0,n.jsx)("input",{id:"startTime",type:"datetime-local",value:s,onChange:e=>m(e.currentTarget.value)})]}),(0,n.jsxs)("div",{className:h().datetime,children:[(0,n.jsx)("label",{htmlFor:"stopTime",children:"Asteri stop time (local time)"}),(0,n.jsx)("input",{id:"stopTime",type:"datetime-local",value:p,onChange:e=>_(e.currentTarget.value)})]}),(0,n.jsx)(c.A,{header:"Maintenance Enabled",description:"Once enabled, the site will only load the maintenance page. The only way to undo this is through the database - use with caution.",onClick:()=>g?w(!1):y(!0),checked:g})]}),(0,n.jsx)("div",{className:h().controls,children:(0,n.jsx)(d.A,{color:"green",icon:"save",onClick:()=>{r.A.updateSiteRules({asteriStartTime:new Date(s).toISOString(),asteriStopTime:new Date(p).toISOString(),maintenencePageEnabled:g}).then(()=>t.reload()).catch(e=>o.A.create(e,"Rules Page","error"))},children:"Save rules"})})]}),(0,n.jsx)(u.A,{header:"Confirm enable maintenance",message:"Enabling maintenance mode will lock the website. This CANNOT BE UNDONE THROUGH A WEB BROWSER. Are you sure you want to enable maintenance mode?",buttonText:"Enable maintenance",open:N,onClose:()=>y(!1),onConfirm:()=>{w(!0),y(!1)}})]})}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=24797)),_N_E=e.O()}]); 2//# sourceMappingURL=rules-eaac96d3a2289dcf.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.