forum-oauth-center/js/dist/forum.js

2 lines
1.8 KiB
JavaScript
Raw Normal View History

2023-09-28 22:44:45 +08:00
(()=>{var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var r in t)e.o(t,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:t[r]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};(()=>{"use strict";e.r(o);const t=flarum.core.compat["common/app"];e.n(t)().initializers.add("foskym/flarum-oauth-center",(function(){console.log("[foskym/flarum-oauth-center] Hello, forum and admin!")}));const r=flarum.core.compat["forum/app"];var n=e.n(r);const a=flarum.core.compat["common/extend"],u=flarum.core.compat["forum/components/UserPage"];var s=e.n(u);const c=flarum.core.compat["common/components/LinkButton"];var i=e.n(c);function p(e,o){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,o){return e.__proto__=o,e},p(e,o)}var f=function(e){var o,t;function r(){return e.apply(this,arguments)||this}t=e,(o=r).prototype=Object.create(t.prototype),o.prototype.constructor=o,p(o,t);var n=r.prototype;return n.oninit=function(o){e.prototype.oninit.call(this,o),this.loadUser(m.route.param("username"))},n.content=function(){return m("div",{className:"AuthorizePage"})},r}(s());n().initializers.add("foskym/flarum-oauth-center",(function(){n().routes["user.authorize"]={path:"/u/:username/authorize",component:f},(0,a.extend)(s().prototype,"navItems",(function(e){n().session.user&&n().session.user.id()===this.user.id()&&e.add("authorize",i().component({href:n().route("user.authorize",{username:this.user.username()}),icon:"fas fa-user-friends"},[n().translator.trans("foskym-oauth-center.forum.page.label.authorize")]),-110)}))}))})(),module.exports=o})();
2023-09-28 17:47:09 +08:00
//# sourceMappingURL=forum.js.map