framework/extensions/suspend/js/dist/admin.js
flarum-bot f784f48906 Bundled output for commit 3a34136e36
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2024-01-09 21:54:15 +00:00

2 lines
1.4 KiB
JavaScript
Generated

(()=>{var e={n:r=>{var s=r&&r.__esModule?()=>r.default:()=>r;return e.d(s,{a:s}),s},d:(r,s)=>{for(var n in s)e.o(s,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:s[n]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};(()=>{"use strict";e.r(r),e.d(r,{extend:()=>c});const s=flarum.reg.get("core","admin/app");var n=e.n(s);const a=flarum.reg.get("core","common/extenders");var t=e.n(a);const o=flarum.reg.get("core","common/app");var u=e.n(o);const d=flarum.reg.get("core","common/query/IGambit");class m extends d.BooleanGambit{key(){return u().translator.trans("flarum-suspend.lib.gambits.users.suspended.key",{},!0)}filterKey(){return"suspended"}enabled(){return!!u().session.user&&u().forum.attribute("canSuspendUsers")}}flarum.reg.add("flarum-suspend","common/query/users/SuspendedGambit",m);const l=flarum.reg.get("core","common/models/User");var i=e.n(l);const c=[(new(t().Search)).gambit("users",m),new(t().Model)(i()).attribute("canSuspend")];n().initializers.add("flarum-suspend",(()=>{n().extensionData.for("flarum-suspend").registerPermission({icon:"fas fa-ban",label:n().translator.trans("flarum-suspend.admin.permissions.suspend_users_label"),permission:"user.suspend"},"moderate")}))})(),module.exports=r})();
//# sourceMappingURL=admin.js.map