2 lines
4.3 KiB
JavaScript
2 lines
4.3 KiB
JavaScript
"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[5787],{2735:function(e,r,t){t.d(r,{Qj:function(){return k},zx:function(){return O}});var o=t(65443),n=t.n(o),a=t(94159),l=t(6285);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},c.apply(this,arguments)}const s=l.z.enum(["pill","roundrect","authn"]),d=l.z.enum(["cherry","strawberry","mango","not-black","red","green","accent","secondary","authn-primary","authn-other"]),b=(l.z.object({buttonStyle:s,color:d,className:l.z.string().optional()}),n()("bg-notWhite","hover:text-notWhite")),u=n()("font-atkinson","font-bold","rounded-full","border-2"),i=n()("body-2","rounded-lg"),g=n()("flex","h-12","items-center","justify-center","rounded-lg","px-6","text-lg"),h=n()("border-cherry","hover:bg-cherry","text-cherry","active:bg-cherry-600","active:border-cherry-600","disabled:text-cherry-300","disabled:border-cherry-300","focus:outline-cherry","focus:ring-cherry",b),y=n()("border-strawberry","hover:bg-strawberry","text-strawberry","active:bg-strawberry-600","active:border-strawberry-600","disabled:text-strawberry-300","disabled:border-strawberry-300","focus:outline-strawberry","focus:ring-strawberry",b),f=n()("border-red","hover:bg-red","text-red","active:bg-red-600","active:border-red-600","disabled:text-red-300","disabled:border-red-300","focus:outline-red",b),m=n()("border-green","hover:bg-green","text-green","active:bg-green-600","active:border-green-600","disabled:text-green-300","disabled:border-green-300","focus:outline-green",b),p=n()("border-mango","hover:bg-mango","text-mango","bg-notBlack","hover:text-notBlack"),v=n()("border-notBlack","hover:bg-notBlack","text-notBlack","focus:outline-notBlack","focus:ring-notBlack",b),x=n()("border-accent","text-accent","bg-foreground","hover:bg-accent","hover:text-text"),w=n()("bg-secondary","text-notWhite","dark:text-notBlack","hover:bg-secondary-600"),E=n()("bg-foreground","text-text","hover:bg-foreground-600","active:bg-foreground-700","disabled:bg-foreground-200"),S=n()("border-2","border-foreground","text-foreground","hover:bg-longan-200"),N=e=>n()("leading-none","align-middle","py-2","px-4","no-select",e.className,{[u]:"pill"===e.buttonStyle,[i]:"roundrect"===e.buttonStyle,[g]:"authn"===e.buttonStyle,[h]:"cherry"===e.color,[y]:"strawberry"===e.color,[p]:"mango"===e.color,[v]:"not-black"===e.color,[f]:"red"===e.color,[x]:"accent"===e.color,[m]:"green"===e.color,[w]:"secondary"===e.color,[E]:"authn-primary"===e.color,[S]:"authn-other"===e.color}),O=a.forwardRef((({buttonStyle:e,color:r,className:t,...o},n)=>{const l=N({buttonStyle:e,color:r,className:t,...o});return a.createElement("button",c({},o,{className:l,ref:n}),o.children)}));O.displayName="Button";const k=a.forwardRef((({buttonStyle:e,color:r,...t},o)=>{const n=N({buttonStyle:e,color:r,...t});return a.createElement("a",c({},t,{className:n,ref:o}),t.children)}));k.displayName="LinkButton"},69458:function(e,r,t){t.r(r),t.d(r,{BanUserForm:function(){return d}});var o=t(71860),n=t(94159),a=t(99838),l=t(3160),c=t(2735),s=t(70496);const d=({userId:e})=>{const{register:r,handleSubmit:t}=(0,a.cI)(),d=(0,l.s0)(),b=o.S.moderation.user.ban.useMutation();return n.createElement("form",{className:"flex max-w-fit flex-col gap-2 rounded-lg border border-accent p-3",onSubmit:t((r=>b.mutateAsync({userId:e,banReason:r.banReason}).then((()=>d(0)))))},n.createElement("h4",{className:"h4"},"ban user"),n.createElement(s.v,{level:"warning",className:"prose"},n.createElement("p",null,n.createElement("b",null,"HEADS UP!"),' This will add the "suspended" permission to the user as well as the "suspended" flag to their self-project and all projcts which they are the sole editor of.'),n.createElement("p",null,"This will also delete ALL POSTS AND COMMENTS from those projects."),n.createElement("p",null,"This last part is very difficult to undo, so ONLY RUN THIS IF YOU ARE GOING SCORCHED EARTH!")),n.createElement("label",null,"reason for banning user:"),n.createElement("textarea",r("banReason",{required:!0})),n.createElement(c.zx,{type:"submit",buttonStyle:"pill",color:"cherry",className:"w-fit"},"ban user"))}}}]);
|
|
//# sourceMappingURL=client-preact-components-pages-moderation-manage-user-ban-user-form.b74d5a13a4c9e4da5588.js.map
|