diff --git a/extensions/lock/js/dist/admin.js b/extensions/lock/js/dist/admin.js index 18c06e1766..6b9d95884d 100644 --- a/extensions/lock/js/dist/admin.js +++ b/extensions/lock/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var e={n:o=>{var r=o&&o.__esModule?()=>o.default:()=>o;return e.d(r,{a:r}),r},d:(o,r)=>{for(var a in r)e.o(r,a)&&!e.o(o,a)&&Object.defineProperty(o,a,{enumerable:!0,get:r[a]})},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 r=flarum.reg.get("core","admin/app");var a=e.n(r);a().initializers.add("lock",(()=>{a().extensionData.for("flarum-lock").registerPermission({icon:"fas fa-lock",label:a().translator.trans("flarum-lock.admin.permissions.lock_discussions_label"),permission:"discussion.lock"},"moderate",95)}))})(),module.exports=o})(); +(()=>{var e={n:r=>{var o=r&&r.__esModule?()=>r.default:()=>r;return e.d(o,{a:o}),o},d:(r,o)=>{for(var t in o)e.o(o,t)&&!e.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:o[t]})},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:()=>l});const o=flarum.reg.get("core","admin/app");var t=e.n(o);const n=flarum.reg.get("core","common/extenders");var a=e.n(n);class s{pattern(){return"is:locked"}toFilter(e,r){return{[(r?"-":"")+"locked"]:!0}}filterKey(){return"locked"}fromFilter(e,r){return"".concat(r?"-":"","is:locked")}}flarum.reg.add("flarum-lock","common/query/discussions/LockedGambit",s);const l=[(new(a().Search)).gambit("discussions",s)];t().initializers.add("lock",(()=>{t().extensionData.for("flarum-lock").registerPermission({icon:"fas fa-lock",label:t().translator.trans("flarum-lock.admin.permissions.lock_discussions_label"),permission:"discussion.lock"},"moderate",95)}))})(),module.exports=r})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/lock/js/dist/admin.js.map b/extensions/lock/js/dist/admin.js.map index 6a55fa6c2c..c7ffb78c43 100644 --- a/extensions/lock/js/dist/admin.js.map +++ b/extensions/lock/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCC5D,qBAAqB,QAAQ,KAC3B,sBAAsB,eAAeW,mBAAmB,CACtDC,KAAM,cACNC,MAAO,qBAAqB,wDAC5BC,WAAY,mBACX,WAAY,GAAG,G","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/lock/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","import app from 'flarum/admin/app';\napp.initializers.add('lock', () => {\n app.extensionData.for('flarum-lock').registerPermission({\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.admin.permissions.lock_discussions_label'),\n permission: 'discussion.lock'\n }, 'moderate', 95);\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","registerPermission","icon","label","permission"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,oB,aCA7C,MAAMW,EACnBC,UACE,MAAO,WACT,CACAC,SAASC,EAAUC,GAEjB,MAAO,CACL,EAFWA,EAAS,IAAM,IAAM,WAEzB,EAEX,CACAC,YACE,MAAO,QACT,CACAC,WAAWT,EAAOO,GAChB,MAAO,GAAGG,OAAOH,EAAS,IAAM,GAAI,YACtC,EAEFN,OAAOC,IAAIS,IAAI,cAAe,wCAAyCR,GCfvE,UAAgB,IAAI,aACnBS,OAAO,cAAeT,ICDvB,qBAAqB,QAAQ,KAC3B,sBAAsB,eAAeU,mBAAmB,CACtDC,KAAM,cACNC,MAAO,qBAAqB,wDAC5BC,WAAY,mBACX,WAAY,GAAG,G","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/lock/./src/common/query/discussions/LockedGambit.ts","webpack://@flarum/lock/./src/common/extend.ts","webpack://@flarum/lock/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","export default class LockedGambit {\n pattern() {\n return 'is:locked';\n }\n toFilter(_matches, negate) {\n const key = (negate ? '-' : '') + 'locked';\n return {\n [key]: true\n };\n }\n filterKey() {\n return 'locked';\n }\n fromFilter(value, negate) {\n return \"\".concat(negate ? '-' : '', \"is:locked\");\n }\n}\nflarum.reg.add('flarum-lock', 'common/query/discussions/LockedGambit', LockedGambit);","import Extend from 'flarum/common/extenders';\nimport LockedGambit from './query/discussions/LockedGambit';\nexport default [new Extend.Search() //\n.gambit('discussions', LockedGambit)];","import app from 'flarum/admin/app';\nexport { default as extend } from './extend';\napp.initializers.add('lock', () => {\n app.extensionData.for('flarum-lock').registerPermission({\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.admin.permissions.lock_discussions_label'),\n permission: 'discussion.lock'\n }, 'moderate', 95);\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","LockedGambit","pattern","toFilter","_matches","negate","filterKey","fromFilter","concat","add","gambit","registerPermission","icon","label","permission"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/lock/js/dist/forum.js b/extensions/lock/js/dist/forum.js index 6ab51df546..92910ecaf4 100644 --- a/extensions/lock/js/dist/forum.js +++ b/extensions/lock/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var o={n:t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},d:(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{extend:()=>P});const e=flarum.reg.get("core","common/extend"),n=flarum.reg.get("core","forum/app");var r=o.n(n);const s=flarum.reg.get("core","forum/components/Notification");var c=o.n(s);class a extends(c()){icon(){return"fas fa-lock"}href(){const o=this.attrs.notification;return r().route.discussion(o.subject(),o.content().postNumber)}content(){return r().translator.trans("flarum-lock.forum.notifications.discussion_locked_text",{user:this.attrs.notification.fromUser()})}excerpt(){return null}}flarum.reg.add("flarum-lock","forum/components/DiscussionLockedNotification",a);const i=flarum.reg.get("core","common/models/Discussion");var u=o.n(i);const l=flarum.reg.get("core","common/components/Badge");var d=o.n(l);const f=flarum.reg.get("core","forum/utils/DiscussionControls");var k=o.n(f);const g=flarum.reg.get("core","forum/components/DiscussionPage");var p=o.n(g);const b=flarum.reg.get("core","common/components/Button");var _=o.n(b);const v=flarum.reg.get("core","common/extenders");var y=o.n(v);const x=flarum.reg.get("core","forum/components/EventPost");var L=o.n(x);class h extends(L()){icon(){return this.attrs.post.content().locked?"fas fa-lock":"fas fa-unlock"}descriptionKey(){return this.attrs.post.content().locked?"flarum-lock.forum.post_stream.discussion_locked_text":"flarum-lock.forum.post_stream.discussion_unlocked_text"}}flarum.reg.add("flarum-lock","forum/components/DiscussionLockedPost",h);const P=[(new(y().PostTypes)).add("discussionLocked",h),new(y().Model)(u()).attribute("isLocked").attribute("canLock")];r().initializers.add("flarum-lock",(()=>{r().notificationComponents.discussionLocked=a,(0,e.extend)(u().prototype,"badges",(function(o){this.isLocked()&&o.add("locked",m(d(),{type:"locked",label:r().translator.trans("flarum-lock.forum.badge.locked_tooltip"),icon:"fas fa-lock"}))})),(0,e.extend)(k(),"moderationControls",(function(o,t){t.canLock()&&o.add("lock",m(_(),{icon:"fas fa-lock",onclick:this.lockAction.bind(t)},r().translator.trans("flarum-lock.forum.discussion_controls.".concat(t.isLocked()?"unlock":"lock","_button"))))})),k().lockAction=function(){this.save({isLocked:!this.isLocked()}).then((()=>{r().current.matches(p())&&r().current.get("stream").update(),m.redraw()}))},(0,e.extend)("flarum/forum/components/NotificationGrid","notificationTypes",(function(o){o.add("discussionLocked",{name:"discussionLocked",icon:"fas fa-lock",label:r().translator.trans("flarum-lock.forum.settings.notify_discussion_locked_label")})}))}))})(),module.exports=t})(); +(()=>{var o={n:t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},d:(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{extend:()=>S});const e=flarum.reg.get("core","common/extend"),n=flarum.reg.get("core","forum/app");var r=o.n(n);const s=flarum.reg.get("core","forum/components/Notification");var c=o.n(s);class a extends(c()){icon(){return"fas fa-lock"}href(){const o=this.attrs.notification;return r().route.discussion(o.subject(),o.content().postNumber)}content(){return r().translator.trans("flarum-lock.forum.notifications.discussion_locked_text",{user:this.attrs.notification.fromUser()})}excerpt(){return null}}flarum.reg.add("flarum-lock","forum/components/DiscussionLockedNotification",a);const i=flarum.reg.get("core","common/models/Discussion");var l=o.n(i);const u=flarum.reg.get("core","common/components/Badge");var d=o.n(u);const f=flarum.reg.get("core","forum/utils/DiscussionControls");var k=o.n(f);const g=flarum.reg.get("core","forum/components/DiscussionPage");var p=o.n(g);const b=flarum.reg.get("core","common/components/Button");var _=o.n(b);const y=flarum.reg.get("core","common/extenders");var v=o.n(y);const L=flarum.reg.get("core","forum/components/EventPost");var h=o.n(L);class x extends(h()){icon(){return this.attrs.post.content().locked?"fas fa-lock":"fas fa-unlock"}descriptionKey(){return this.attrs.post.content().locked?"flarum-lock.forum.post_stream.discussion_locked_text":"flarum-lock.forum.post_stream.discussion_unlocked_text"}}flarum.reg.add("flarum-lock","forum/components/DiscussionLockedPost",x);class P{pattern(){return"is:locked"}toFilter(o,t){return{[(t?"-":"")+"locked"]:!0}}filterKey(){return"locked"}fromFilter(o,t){return"".concat(t?"-":"","is:locked")}}flarum.reg.add("flarum-lock","common/query/discussions/LockedGambit",P);const S=[(new(v().Search)).gambit("discussions",P),(new(v().PostTypes)).add("discussionLocked",x),new(v().Model)(l()).attribute("isLocked").attribute("canLock")];r().initializers.add("flarum-lock",(()=>{r().notificationComponents.discussionLocked=a,(0,e.extend)(l().prototype,"badges",(function(o){this.isLocked()&&o.add("locked",m(d(),{type:"locked",label:r().translator.trans("flarum-lock.forum.badge.locked_tooltip"),icon:"fas fa-lock"}))})),(0,e.extend)(k(),"moderationControls",(function(o,t){t.canLock()&&o.add("lock",m(_(),{icon:"fas fa-lock",onclick:this.lockAction.bind(t)},r().translator.trans("flarum-lock.forum.discussion_controls.".concat(t.isLocked()?"unlock":"lock","_button"))))})),k().lockAction=function(){this.save({isLocked:!this.isLocked()}).then((()=>{r().current.matches(p())&&r().current.get("stream").update(),m.redraw()}))},(0,e.extend)("flarum/forum/components/NotificationGrid","notificationTypes",(function(o){o.add("discussionLocked",{name:"discussionLocked",icon:"fas fa-lock",label:r().translator.trans("flarum-lock.forum.settings.notify_discussion_locked_label")})}))}))})(),module.exports=t})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/lock/js/dist/forum.js.map b/extensions/lock/js/dist/forum.js.map index 5c89086238..1f68c6c562 100644 --- a/extensions/lock/js/dist/forum.js.map +++ b/extensions/lock/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"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","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/Notification')\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedNotification.js","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/DiscussionPage')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/EventPost')\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedPost.js","webpack://@flarum/lock/./src/forum/extend.ts","webpack://@flarum/lock/./src/forum/index.js","webpack://@flarum/lock/./src/forum/addLockBadge.js","webpack://@flarum/lock/./src/forum/addLockControl.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Notification');","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nexport default class DiscussionLockedNotification extends Notification {\n icon() {\n return 'fas fa-lock';\n }\n href() {\n const notification = this.attrs.notification;\n return app.route.discussion(notification.subject(), notification.content().postNumber);\n }\n content() {\n return app.translator.trans('flarum-lock.forum.notifications.discussion_locked_text', {\n user: this.attrs.notification.fromUser()\n });\n }\n excerpt() {\n return null;\n }\n}\nflarum.reg.add('flarum-lock', 'forum/components/DiscussionLockedNotification', DiscussionLockedNotification);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/EventPost');","import EventPost from 'flarum/forum/components/EventPost';\nexport default class DiscussionLockedPost extends EventPost {\n icon() {\n return this.attrs.post.content().locked ? 'fas fa-lock' : 'fas fa-unlock';\n }\n descriptionKey() {\n return this.attrs.post.content().locked ? 'flarum-lock.forum.post_stream.discussion_locked_text' : 'flarum-lock.forum.post_stream.discussion_unlocked_text';\n }\n}\nflarum.reg.add('flarum-lock', 'forum/components/DiscussionLockedPost', DiscussionLockedPost);","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionLockedPost from './components/DiscussionLockedPost';\nexport default [new Extend.PostTypes() //\n.add('discussionLocked', DiscussionLockedPost), new Extend.Model(Discussion) //\n.attribute('isLocked').attribute('canLock')];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport DiscussionLockedNotification from './components/DiscussionLockedNotification';\nimport addLockBadge from './addLockBadge';\nimport addLockControl from './addLockControl';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-lock', () => {\n app.notificationComponents.discussionLocked = DiscussionLockedNotification;\n addLockBadge();\n addLockControl();\n extend('flarum/forum/components/NotificationGrid', 'notificationTypes', function (items) {\n items.add('discussionLocked', {\n name: 'discussionLocked',\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.forum.settings.notify_discussion_locked_label')\n });\n });\n});","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\nexport default function addLockBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.isLocked()) {\n badges.add('locked', m(Badge, {\n type: \"locked\",\n label: app.translator.trans('flarum-lock.forum.badge.locked_tooltip'),\n icon: \"fas fa-lock\"\n }));\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\nexport default function addLockControl() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canLock()) {\n items.add('lock', m(Button, {\n icon: \"fas fa-lock\",\n onclick: this.lockAction.bind(discussion)\n }, app.translator.trans(\"flarum-lock.forum.discussion_controls.\".concat(discussion.isLocked() ? 'unlock' : 'lock', \"_button\"))));\n }\n });\n DiscussionControls.lockAction = function () {\n this.save({\n isLocked: !this.isLocked()\n }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n m.redraw();\n });\n };\n}"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","DiscussionLockedNotification","icon","href","notification","this","attrs","subject","content","postNumber","user","fromUser","excerpt","add","DiscussionLockedPost","post","locked","descriptionKey","attribute","extend","badges","isLocked","m","type","label","items","discussion","canLock","onclick","lockAction","bind","concat","save","then","update","redraw","name"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"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","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/Notification')\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedNotification.js","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/DiscussionPage')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/EventPost')\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedPost.js","webpack://@flarum/lock/./src/common/query/discussions/LockedGambit.ts","webpack://@flarum/lock/./src/common/extend.ts","webpack://@flarum/lock/./src/forum/extend.ts","webpack://@flarum/lock/./src/forum/index.js","webpack://@flarum/lock/./src/forum/addLockBadge.js","webpack://@flarum/lock/./src/forum/addLockControl.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Notification');","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nexport default class DiscussionLockedNotification extends Notification {\n icon() {\n return 'fas fa-lock';\n }\n href() {\n const notification = this.attrs.notification;\n return app.route.discussion(notification.subject(), notification.content().postNumber);\n }\n content() {\n return app.translator.trans('flarum-lock.forum.notifications.discussion_locked_text', {\n user: this.attrs.notification.fromUser()\n });\n }\n excerpt() {\n return null;\n }\n}\nflarum.reg.add('flarum-lock', 'forum/components/DiscussionLockedNotification', DiscussionLockedNotification);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/EventPost');","import EventPost from 'flarum/forum/components/EventPost';\nexport default class DiscussionLockedPost extends EventPost {\n icon() {\n return this.attrs.post.content().locked ? 'fas fa-lock' : 'fas fa-unlock';\n }\n descriptionKey() {\n return this.attrs.post.content().locked ? 'flarum-lock.forum.post_stream.discussion_locked_text' : 'flarum-lock.forum.post_stream.discussion_unlocked_text';\n }\n}\nflarum.reg.add('flarum-lock', 'forum/components/DiscussionLockedPost', DiscussionLockedPost);","export default class LockedGambit {\n pattern() {\n return 'is:locked';\n }\n toFilter(_matches, negate) {\n const key = (negate ? '-' : '') + 'locked';\n return {\n [key]: true\n };\n }\n filterKey() {\n return 'locked';\n }\n fromFilter(value, negate) {\n return \"\".concat(negate ? '-' : '', \"is:locked\");\n }\n}\nflarum.reg.add('flarum-lock', 'common/query/discussions/LockedGambit', LockedGambit);","import Extend from 'flarum/common/extenders';\nimport LockedGambit from './query/discussions/LockedGambit';\nexport default [new Extend.Search() //\n.gambit('discussions', LockedGambit)];","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionLockedPost from './components/DiscussionLockedPost';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.PostTypes() //\n.add('discussionLocked', DiscussionLockedPost), new Extend.Model(Discussion) //\n.attribute('isLocked').attribute('canLock')];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport DiscussionLockedNotification from './components/DiscussionLockedNotification';\nimport addLockBadge from './addLockBadge';\nimport addLockControl from './addLockControl';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-lock', () => {\n app.notificationComponents.discussionLocked = DiscussionLockedNotification;\n addLockBadge();\n addLockControl();\n extend('flarum/forum/components/NotificationGrid', 'notificationTypes', function (items) {\n items.add('discussionLocked', {\n name: 'discussionLocked',\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.forum.settings.notify_discussion_locked_label')\n });\n });\n});","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\nexport default function addLockBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.isLocked()) {\n badges.add('locked', m(Badge, {\n type: \"locked\",\n label: app.translator.trans('flarum-lock.forum.badge.locked_tooltip'),\n icon: \"fas fa-lock\"\n }));\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\nexport default function addLockControl() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canLock()) {\n items.add('lock', m(Button, {\n icon: \"fas fa-lock\",\n onclick: this.lockAction.bind(discussion)\n }, app.translator.trans(\"flarum-lock.forum.discussion_controls.\".concat(discussion.isLocked() ? 'unlock' : 'lock', \"_button\"))));\n }\n });\n DiscussionControls.lockAction = function () {\n this.save({\n isLocked: !this.isLocked()\n }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n m.redraw();\n });\n };\n}"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","DiscussionLockedNotification","icon","href","notification","this","attrs","subject","content","postNumber","user","fromUser","excerpt","add","DiscussionLockedPost","post","locked","descriptionKey","LockedGambit","pattern","toFilter","_matches","negate","filterKey","fromFilter","concat","gambit","attribute","extend","badges","isLocked","m","type","label","items","discussion","canLock","onclick","lockAction","bind","save","then","update","redraw","name"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/nicknames/js/dist/admin.js b/extensions/nicknames/js/dist/admin.js index 7a6e92bb2d..03bb0ab7d3 100644 --- a/extensions/nicknames/js/dist/admin.js +++ b/extensions/nicknames/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var e={n:n=>{var a=n&&n.__esModule?()=>n.default:()=>n;return e.d(a,{a}),a},d:(n,a)=>{for(var t in a)e.o(a,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:a[t]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};(()=>{"use strict";e.r(n);const a=flarum.reg.get("core","admin/app");var t=e.n(a);const r=flarum.reg.get("core","common/components/Alert");var s=e.n(r);const i=flarum.reg.get("core","common/components/Link");var l=e.n(i);t().initializers.add("flarum/nicknames",(()=>{t().extensionData.for("flarum-nicknames").registerSetting((function(){if("nickname"!==t().data.settings.display_name_driver)return m("div",{className:"Form-group"},m(s(),{dismissible:!1},t().translator.trans("flarum-nicknames.admin.wrong_driver",{a:m(l(),{href:t().route("basics")})})))})).registerSetting({setting:"flarum-nicknames.set_on_registration",type:"boolean",label:t().translator.trans("flarum-nicknames.admin.settings.set_on_registration_label")}).registerSetting({setting:"flarum-nicknames.random_username",type:"boolean",label:t().translator.trans("flarum-nicknames.admin.settings.random_username_label"),help:t().translator.trans("flarum-nicknames.admin.settings.random_username_help")}).registerSetting({setting:"flarum-nicknames.unique",type:"boolean",label:t().translator.trans("flarum-nicknames.admin.settings.unique_label")}).registerSetting({setting:"flarum-nicknames.regex",type:"text",label:t().translator.trans("flarum-nicknames.admin.settings.regex_label")}).registerSetting({setting:"flarum-nicknames.min",type:"number",label:t().translator.trans("flarum-nicknames.admin.settings.min_label")}).registerSetting({setting:"flarum-nicknames.max",type:"number",label:t().translator.trans("flarum-nicknames.admin.settings.max_label")}).registerPermission({icon:"fas fa-user-tag",label:t().translator.trans("flarum-nicknames.admin.permissions.edit_own_nickname_label"),permission:"user.editOwnNickname"},"start")}))})(),module.exports=n})(); +(()=>{var e={n:n=>{var a=n&&n.__esModule?()=>n.default:()=>n;return e.d(a,{a}),a},d:(n,a)=>{for(var t in a)e.o(a,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:a[t]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};(()=>{"use strict";e.r(n);const a=flarum.reg.get("core","admin/app");var t=e.n(a);const r=flarum.reg.get("core","common/components/Alert");var s=e.n(r);const i=flarum.reg.get("core","common/components/Link");var l=e.n(i);const o=flarum.reg.get("core","admin/components/BasicsPage");var c=e.n(o);const g=flarum.reg.get("core","common/utils/extractText");var u=e.n(g);const d=flarum.reg.get("core","common/extend");t().initializers.add("flarum/nicknames",(()=>{t().extensionData.for("flarum-nicknames").registerSetting((function(){if("nickname"!==t().data.settings.display_name_driver)return m("div",{className:"Form-group"},m(s(),{dismissible:!1},t().translator.trans("flarum-nicknames.admin.wrong_driver",{a:m(l(),{href:t().route("basics")})})))})).registerSetting({setting:"flarum-nicknames.set_on_registration",type:"boolean",label:t().translator.trans("flarum-nicknames.admin.settings.set_on_registration_label")}).registerSetting({setting:"flarum-nicknames.random_username",type:"boolean",label:t().translator.trans("flarum-nicknames.admin.settings.random_username_label"),help:t().translator.trans("flarum-nicknames.admin.settings.random_username_help")}).registerSetting({setting:"flarum-nicknames.unique",type:"boolean",label:t().translator.trans("flarum-nicknames.admin.settings.unique_label")}).registerSetting({setting:"flarum-nicknames.regex",type:"text",label:t().translator.trans("flarum-nicknames.admin.settings.regex_label")}).registerSetting({setting:"flarum-nicknames.min",type:"number",label:t().translator.trans("flarum-nicknames.admin.settings.min_label")}).registerSetting({setting:"flarum-nicknames.max",type:"number",label:t().translator.trans("flarum-nicknames.admin.settings.max_label")}).registerPermission({icon:"fas fa-user-tag",label:t().translator.trans("flarum-nicknames.admin.permissions.edit_own_nickname_label"),permission:"user.editOwnNickname"},"start"),(0,d.extend)(c().prototype,"driverLocale",(function(e){e.display_name.nickname=u()(t().translator.trans("flarum-nicknames.admin.basics.display_name_driver_options.nickname"))}))}))})(),module.exports=n})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/nicknames/js/dist/admin.js.map b/extensions/nicknames/js/dist/admin.js.map index e9ee8054d4..3d92d0c0fa 100644 --- a/extensions/nicknames/js/dist/admin.js.map +++ b/extensions/nicknames/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,IACzBH,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,2B,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,0B,aCG5D,qBAAqB,oBAAoB,KACvC,sBAAsB,oBAAoBW,iBAAgB,WACxD,GAA8C,aAA1C,sCACJ,OAAOC,EAAE,MAAO,CACdC,UAAW,cACVD,EAAE,IAAO,CACVE,aAAa,GACZ,qBAAqB,sCAAuC,CAC7DtB,EAAGoB,EAAE,IAAM,CACTG,KAAM,UAAU,eAGtB,IAAGJ,gBAAgB,CACjBK,QAAS,uCACTC,KAAM,UACNC,MAAO,qBAAqB,+DAC3BP,gBAAgB,CACjBK,QAAS,mCACTC,KAAM,UACNC,MAAO,qBAAqB,yDAC5BC,KAAM,qBAAqB,0DAC1BR,gBAAgB,CACjBK,QAAS,0BACTC,KAAM,UACNC,MAAO,qBAAqB,kDAC3BP,gBAAgB,CACjBK,QAAS,yBACTC,KAAM,OACNC,MAAO,qBAAqB,iDAC3BP,gBAAgB,CACjBK,QAAS,uBACTC,KAAM,SACNC,MAAO,qBAAqB,+CAC3BP,gBAAgB,CACjBK,QAAS,uBACTC,KAAM,SACNC,MAAO,qBAAqB,+CAC3BE,mBAAmB,CACpBC,KAAM,kBACNH,MAAO,qBAAqB,8DAC5BI,WAAY,wBACX,QAAQ,G","sources":["webpack://@flarum/nicknames/webpack/bootstrap","webpack://@flarum/nicknames/webpack/runtime/compat get default export","webpack://@flarum/nicknames/webpack/runtime/define property getters","webpack://@flarum/nicknames/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/nicknames/webpack/runtime/make namespace object","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'common/components/Alert')\"","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/nicknames/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Alert');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Link');","import app from 'flarum/admin/app';\nimport Alert from 'flarum/common/components/Alert';\nimport Link from 'flarum/common/components/Link';\napp.initializers.add('flarum/nicknames', () => {\n app.extensionData.for('flarum-nicknames').registerSetting(function () {\n if (app.data.settings.display_name_driver === 'nickname') return;\n return m(\"div\", {\n className: \"Form-group\"\n }, m(Alert, {\n dismissible: false\n }, app.translator.trans('flarum-nicknames.admin.wrong_driver', {\n a: m(Link, {\n href: app.route('basics')\n })\n })));\n }).registerSetting({\n setting: 'flarum-nicknames.set_on_registration',\n type: 'boolean',\n label: app.translator.trans('flarum-nicknames.admin.settings.set_on_registration_label')\n }).registerSetting({\n setting: 'flarum-nicknames.random_username',\n type: 'boolean',\n label: app.translator.trans('flarum-nicknames.admin.settings.random_username_label'),\n help: app.translator.trans('flarum-nicknames.admin.settings.random_username_help')\n }).registerSetting({\n setting: 'flarum-nicknames.unique',\n type: 'boolean',\n label: app.translator.trans('flarum-nicknames.admin.settings.unique_label')\n }).registerSetting({\n setting: 'flarum-nicknames.regex',\n type: 'text',\n label: app.translator.trans('flarum-nicknames.admin.settings.regex_label')\n }).registerSetting({\n setting: 'flarum-nicknames.min',\n type: 'number',\n label: app.translator.trans('flarum-nicknames.admin.settings.min_label')\n }).registerSetting({\n setting: 'flarum-nicknames.max',\n type: 'number',\n label: app.translator.trans('flarum-nicknames.admin.settings.max_label')\n }).registerPermission({\n icon: 'fas fa-user-tag',\n label: app.translator.trans('flarum-nicknames.admin.permissions.edit_own_nickname_label'),\n permission: 'user.editOwnNickname'\n }, 'start');\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","registerSetting","m","className","dismissible","href","setting","type","label","help","registerPermission","icon","permission"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,IACzBH,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,2B,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,0B,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,+B,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,4B,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,iBCM5D,qBAAqB,oBAAoB,KACvC,sBAAsB,oBAAoBW,iBAAgB,WACxD,GAA8C,aAA1C,sCACJ,OAAOC,EAAE,MAAO,CACdC,UAAW,cACVD,EAAE,IAAO,CACVE,aAAa,GACZ,qBAAqB,sCAAuC,CAC7DtB,EAAGoB,EAAE,IAAM,CACTG,KAAM,UAAU,eAGtB,IAAGJ,gBAAgB,CACjBK,QAAS,uCACTC,KAAM,UACNC,MAAO,qBAAqB,+DAC3BP,gBAAgB,CACjBK,QAAS,mCACTC,KAAM,UACNC,MAAO,qBAAqB,yDAC5BC,KAAM,qBAAqB,0DAC1BR,gBAAgB,CACjBK,QAAS,0BACTC,KAAM,UACNC,MAAO,qBAAqB,kDAC3BP,gBAAgB,CACjBK,QAAS,yBACTC,KAAM,OACNC,MAAO,qBAAqB,iDAC3BP,gBAAgB,CACjBK,QAAS,uBACTC,KAAM,SACNC,MAAO,qBAAqB,+CAC3BP,gBAAgB,CACjBK,QAAS,uBACTC,KAAM,SACNC,MAAO,qBAAqB,+CAC3BE,mBAAmB,CACpBC,KAAM,kBACNH,MAAO,qBAAqB,8DAC5BI,WAAY,wBACX,UACH,IAAAC,QAAO,cAAsB,gBAAgB,SAAUC,GACrDA,EAAOC,aAAuB,SAAI,IAAY,qBAAqB,sEACrE,GAAE,G","sources":["webpack://@flarum/nicknames/webpack/bootstrap","webpack://@flarum/nicknames/webpack/runtime/compat get default export","webpack://@flarum/nicknames/webpack/runtime/define property getters","webpack://@flarum/nicknames/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/nicknames/webpack/runtime/make namespace object","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'common/components/Alert')\"","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'admin/components/BasicsPage')\"","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/nicknames/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/nicknames/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Alert');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Link');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/components/BasicsPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/extractText');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","import app from 'flarum/admin/app';\nimport Alert from 'flarum/common/components/Alert';\nimport Link from 'flarum/common/components/Link';\nimport BasicsPage from 'flarum/admin/components/BasicsPage';\nimport extractText from 'flarum/common/utils/extractText';\nimport { extend } from 'flarum/common/extend';\napp.initializers.add('flarum/nicknames', () => {\n app.extensionData.for('flarum-nicknames').registerSetting(function () {\n if (app.data.settings.display_name_driver === 'nickname') return;\n return m(\"div\", {\n className: \"Form-group\"\n }, m(Alert, {\n dismissible: false\n }, app.translator.trans('flarum-nicknames.admin.wrong_driver', {\n a: m(Link, {\n href: app.route('basics')\n })\n })));\n }).registerSetting({\n setting: 'flarum-nicknames.set_on_registration',\n type: 'boolean',\n label: app.translator.trans('flarum-nicknames.admin.settings.set_on_registration_label')\n }).registerSetting({\n setting: 'flarum-nicknames.random_username',\n type: 'boolean',\n label: app.translator.trans('flarum-nicknames.admin.settings.random_username_label'),\n help: app.translator.trans('flarum-nicknames.admin.settings.random_username_help')\n }).registerSetting({\n setting: 'flarum-nicknames.unique',\n type: 'boolean',\n label: app.translator.trans('flarum-nicknames.admin.settings.unique_label')\n }).registerSetting({\n setting: 'flarum-nicknames.regex',\n type: 'text',\n label: app.translator.trans('flarum-nicknames.admin.settings.regex_label')\n }).registerSetting({\n setting: 'flarum-nicknames.min',\n type: 'number',\n label: app.translator.trans('flarum-nicknames.admin.settings.min_label')\n }).registerSetting({\n setting: 'flarum-nicknames.max',\n type: 'number',\n label: app.translator.trans('flarum-nicknames.admin.settings.max_label')\n }).registerPermission({\n icon: 'fas fa-user-tag',\n label: app.translator.trans('flarum-nicknames.admin.permissions.edit_own_nickname_label'),\n permission: 'user.editOwnNickname'\n }, 'start');\n extend(BasicsPage.prototype, 'driverLocale', function (locale) {\n locale.display_name['nickname'] = extractText(app.translator.trans('flarum-nicknames.admin.basics.display_name_driver_options.nickname'));\n });\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","registerSetting","m","className","dismissible","href","setting","type","label","help","registerPermission","icon","permission","extend","locale","display_name"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/sticky/js/dist/admin.js b/extensions/sticky/js/dist/admin.js index dc68e09089..f73cd5bee1 100644 --- a/extensions/sticky/js/dist/admin.js +++ b/extensions/sticky/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var e={n:r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},d:(r,t)=>{for(var a in t)e.o(t,a)&&!e.o(r,a)&&Object.defineProperty(r,a,{enumerable:!0,get:t[a]})},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);const t=flarum.reg.get("core","admin/app");var a=e.n(t);a().initializers.add("flarum-sticky",(()=>{a().extensionData.for("flarum-sticky").registerPermission({icon:"fas fa-thumbtack",label:a().translator.trans("flarum-sticky.admin.permissions.sticky_discussions_label"),permission:"discussion.sticky"},"moderate",95)}))})(),module.exports=r})(); +(()=>{var e={n:r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},d:(r,t)=>{for(var s in t)e.o(t,s)&&!e.o(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:t[s]})},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:()=>n});const t=flarum.reg.get("core","admin/app");var s=e.n(t);const i=flarum.reg.get("core","common/extenders");var o=e.n(i);class a{pattern(){return"is:sticky"}toFilter(e,r){return{[(r?"-":"")+"sticky"]:!0}}filterKey(){return"sticky"}fromFilter(e,r){return"".concat(r?"-":"","is:sticky")}}flarum.reg.add("flarum-sticky","common/query/discussions/StickyGambit",a);const n=[(new(o().Search)).gambit("discussions",a)];s().initializers.add("flarum-sticky",(()=>{s().extensionData.for("flarum-sticky").registerPermission({icon:"fas fa-thumbtack",label:s().translator.trans("flarum-sticky.admin.permissions.sticky_discussions_label"),permission:"discussion.sticky"},"moderate",95)}))})(),module.exports=r})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/sticky/js/dist/admin.js.map b/extensions/sticky/js/dist/admin.js.map index 7fd3732f8f..74ff2179f3 100644 --- a/extensions/sticky/js/dist/admin.js.map +++ b/extensions/sticky/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCC5D,qBAAqB,iBAAiB,KACpC,sBAAsB,iBAAiBW,mBAAmB,CACxDC,KAAM,mBACNC,MAAO,qBAAqB,4DAC5BC,WAAY,qBACX,WAAY,GAAG,G","sources":["webpack://@flarum/sticky/webpack/bootstrap","webpack://@flarum/sticky/webpack/runtime/compat get default export","webpack://@flarum/sticky/webpack/runtime/define property getters","webpack://@flarum/sticky/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/sticky/webpack/runtime/make namespace object","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/sticky/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","import app from 'flarum/admin/app';\napp.initializers.add('flarum-sticky', () => {\n app.extensionData.for('flarum-sticky').registerPermission({\n icon: 'fas fa-thumbtack',\n label: app.translator.trans('flarum-sticky.admin.permissions.sticky_discussions_label'),\n permission: 'discussion.sticky'\n }, 'moderate', 95);\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","registerPermission","icon","label","permission"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,oB,aCA7C,MAAMW,EACnBC,UACE,MAAO,WACT,CACAC,SAASC,EAAUC,GAEjB,MAAO,CACL,EAFWA,EAAS,IAAM,IAAM,WAEzB,EAEX,CACAC,YACE,MAAO,QACT,CACAC,WAAWT,EAAOO,GAChB,MAAO,GAAGG,OAAOH,EAAS,IAAM,GAAI,YACtC,EAEFN,OAAOC,IAAIS,IAAI,gBAAiB,wCAAyCR,GCfzE,UAAgB,IAAI,aACnBS,OAAO,cAAeT,ICDvB,qBAAqB,iBAAiB,KACpC,sBAAsB,iBAAiBU,mBAAmB,CACxDC,KAAM,mBACNC,MAAO,qBAAqB,4DAC5BC,WAAY,qBACX,WAAY,GAAG,G","sources":["webpack://@flarum/sticky/webpack/bootstrap","webpack://@flarum/sticky/webpack/runtime/compat get default export","webpack://@flarum/sticky/webpack/runtime/define property getters","webpack://@flarum/sticky/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/sticky/webpack/runtime/make namespace object","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/sticky/./src/common/query/discussions/StickyGambit.ts","webpack://@flarum/sticky/./src/common/extend.ts","webpack://@flarum/sticky/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","export default class StickyGambit {\n pattern() {\n return 'is:sticky';\n }\n toFilter(_matches, negate) {\n const key = (negate ? '-' : '') + 'sticky';\n return {\n [key]: true\n };\n }\n filterKey() {\n return 'sticky';\n }\n fromFilter(value, negate) {\n return \"\".concat(negate ? '-' : '', \"is:sticky\");\n }\n}\nflarum.reg.add('flarum-sticky', 'common/query/discussions/StickyGambit', StickyGambit);","import Extend from 'flarum/common/extenders';\nimport StickyGambit from './query/discussions/StickyGambit';\nexport default [new Extend.Search() //\n.gambit('discussions', StickyGambit)];","import app from 'flarum/admin/app';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-sticky', () => {\n app.extensionData.for('flarum-sticky').registerPermission({\n icon: 'fas fa-thumbtack',\n label: app.translator.trans('flarum-sticky.admin.permissions.sticky_discussions_label'),\n permission: 'discussion.sticky'\n }, 'moderate', 95);\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","StickyGambit","pattern","toFilter","_matches","negate","filterKey","fromFilter","concat","add","gambit","registerPermission","icon","label","permission"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/sticky/js/dist/forum.js b/extensions/sticky/js/dist/forum.js index 57188237ff..e0cfc90d2d 100644 --- a/extensions/sticky/js/dist/forum.js +++ b/extensions/sticky/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var t={n:e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},d:(e,s)=>{for(var o in s)t.o(s,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:s[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e),t.d(e,{extend:()=>L});const s=flarum.reg.get("core","forum/app");var o=t.n(s);const r=flarum.reg.get("core","common/extend"),n=flarum.reg.get("core","common/models/Discussion");var c=t.n(n);const i=flarum.reg.get("core","common/components/Badge");var a=t.n(i);const u=flarum.reg.get("core","forum/utils/DiscussionControls");var l=t.n(u);const d=flarum.reg.get("core","forum/components/DiscussionPage");var f=t.n(d);const g=flarum.reg.get("core","common/components/Button");var y=t.n(g);const p=flarum.reg.get("core","forum/states/DiscussionListState");var k=t.n(p);const v=flarum.reg.get("core","forum/components/DiscussionListItem");var b=t.n(v);const h=flarum.reg.get("core","forum/components/IndexPage");var S=t.n(h);const x=flarum.reg.get("core","common/utils/string"),P=flarum.reg.get("core","common/utils/classList");var _=t.n(P);const D=flarum.reg.get("core","common/extenders");var O=t.n(D);const j=flarum.reg.get("core","forum/components/EventPost");var w=t.n(j);class I extends(w()){icon(){return"fas fa-thumbtack"}descriptionKey(){return this.attrs.post.content().sticky?"flarum-sticky.forum.post_stream.discussion_stickied_text":"flarum-sticky.forum.post_stream.discussion_unstickied_text"}}flarum.reg.add("flarum-sticky","forum/components/DiscussionStickiedPost",I);const L=[(new(O().PostTypes)).add("discussionStickied",I),new(O().Model)(c()).attribute("isSticky").attribute("canSticky")];o().initializers.add("flarum-sticky",(()=>{(0,r.extend)(c().prototype,"badges",(function(t){this.isSticky()&&t.add("sticky",m(a(),{type:"sticky",label:o().translator.trans("flarum-sticky.forum.badge.sticky_tooltip"),icon:"fas fa-thumbtack"}),10)})),(0,r.extend)(l(),"moderationControls",(function(t,e){e.canSticky()&&t.add("sticky",m(y(),{icon:"fas fa-thumbtack",onclick:this.stickyAction.bind(e)},o().translator.trans("flarum-sticky.forum.discussion_controls.".concat(e.isSticky()?"unsticky":"sticky","_button"))))})),l().stickyAction=function(){this.save({isSticky:!this.isSticky()}).then((()=>{o().current.matches(f())&&o().current.get("stream").update(),m.redraw()}))},(0,r.extend)(k().prototype,"requestParams",(function(t){(o().current.matches(S())||o().current.matches(f()))&&t.include.push("firstPost")})),(0,r.extend)(b().prototype,"infoItems",(function(t){const e=this.attrs.discussion;if(e.isSticky()&&!this.attrs.params.q&&!e.lastReadPostNumber()){const s=e.firstPost();if(s){const e=(0,x.truncate)(s.contentPlain(),175);t.add("excerpt",m("div",null,e),-100)}}})),(0,r.extend)(b().prototype,"elementAttrs",(function(t){this.attrs.discussion.isSticky()&&(t.className=_()(t.className,"DiscussionListItem--sticky"))}))}))})(),module.exports=e})(); +(()=>{var t={n:e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},d:(e,s)=>{for(var r in s)t.o(s,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:s[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e),t.d(e,{extend:()=>M});const s=flarum.reg.get("core","forum/app");var r=t.n(s);const o=flarum.reg.get("core","common/extend"),n=flarum.reg.get("core","common/models/Discussion");var c=t.n(n);const i=flarum.reg.get("core","common/components/Badge");var a=t.n(i);const u=flarum.reg.get("core","forum/utils/DiscussionControls");var l=t.n(u);const d=flarum.reg.get("core","forum/components/DiscussionPage");var f=t.n(d);const y=flarum.reg.get("core","common/components/Button");var g=t.n(y);const k=flarum.reg.get("core","forum/states/DiscussionListState");var p=t.n(k);const b=flarum.reg.get("core","forum/components/DiscussionListItem");var v=t.n(b);const S=flarum.reg.get("core","forum/components/IndexPage");var h=t.n(S);const x=flarum.reg.get("core","common/utils/string"),P=flarum.reg.get("core","common/utils/classList");var _=t.n(P);const D=flarum.reg.get("core","common/extenders");var w=t.n(D);const O=flarum.reg.get("core","forum/components/EventPost");var j=t.n(O);class I extends(j()){icon(){return"fas fa-thumbtack"}descriptionKey(){return this.attrs.post.content().sticky?"flarum-sticky.forum.post_stream.discussion_stickied_text":"flarum-sticky.forum.post_stream.discussion_unstickied_text"}}flarum.reg.add("flarum-sticky","forum/components/DiscussionStickiedPost",I);class L{pattern(){return"is:sticky"}toFilter(t,e){return{[(e?"-":"")+"sticky"]:!0}}filterKey(){return"sticky"}fromFilter(t,e){return"".concat(e?"-":"","is:sticky")}}flarum.reg.add("flarum-sticky","common/query/discussions/StickyGambit",L);const M=[(new(w().Search)).gambit("discussions",L),(new(w().PostTypes)).add("discussionStickied",I),new(w().Model)(c()).attribute("isSticky").attribute("canSticky")];r().initializers.add("flarum-sticky",(()=>{(0,o.extend)(c().prototype,"badges",(function(t){this.isSticky()&&t.add("sticky",m(a(),{type:"sticky",label:r().translator.trans("flarum-sticky.forum.badge.sticky_tooltip"),icon:"fas fa-thumbtack"}),10)})),(0,o.extend)(l(),"moderationControls",(function(t,e){e.canSticky()&&t.add("sticky",m(g(),{icon:"fas fa-thumbtack",onclick:this.stickyAction.bind(e)},r().translator.trans("flarum-sticky.forum.discussion_controls.".concat(e.isSticky()?"unsticky":"sticky","_button"))))})),l().stickyAction=function(){this.save({isSticky:!this.isSticky()}).then((()=>{r().current.matches(f())&&r().current.get("stream").update(),m.redraw()}))},(0,o.extend)(p().prototype,"requestParams",(function(t){(r().current.matches(h())||r().current.matches(f()))&&t.include.push("firstPost")})),(0,o.extend)(v().prototype,"infoItems",(function(t){const e=this.attrs.discussion;if(e.isSticky()&&!this.attrs.params.q&&!e.lastReadPostNumber()){const s=e.firstPost();if(s){const e=(0,x.truncate)(s.contentPlain(),175);t.add("excerpt",m("div",null,e),-100)}}})),(0,o.extend)(v().prototype,"elementAttrs",(function(t){this.attrs.discussion.isSticky()&&(t.className=_()(t.className,"DiscussionListItem--sticky"))}))}))})(),module.exports=e})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/sticky/js/dist/forum.js.map b/extensions/sticky/js/dist/forum.js.map index 28ef970f90..448e839199 100644 --- a/extensions/sticky/js/dist/forum.js.map +++ b/extensions/sticky/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"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","sources":["webpack://@flarum/sticky/webpack/bootstrap","webpack://@flarum/sticky/webpack/runtime/compat get default export","webpack://@flarum/sticky/webpack/runtime/define property getters","webpack://@flarum/sticky/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/sticky/webpack/runtime/make namespace object","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/components/DiscussionPage')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/states/DiscussionListState')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/components/DiscussionListItem')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/components/IndexPage')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/utils/string')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/sticky/external root \"flarum.reg.get('core', 'forum/components/EventPost')\"","webpack://@flarum/sticky/./src/forum/components/DiscussionStickiedPost.js","webpack://@flarum/sticky/./src/forum/extend.ts","webpack://@flarum/sticky/./src/forum/index.js","webpack://@flarum/sticky/./src/forum/addStickyBadge.js","webpack://@flarum/sticky/./src/forum/addStickyControl.js","webpack://@flarum/sticky/./src/forum/addStickyExcerpt.js","webpack://@flarum/sticky/./src/forum/addStickyClass.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/states/DiscussionListState');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionListItem');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/IndexPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/string');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/classList');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/EventPost');","import EventPost from 'flarum/forum/components/EventPost';\nexport default class DiscussionStickiedPost extends EventPost {\n icon() {\n return 'fas fa-thumbtack';\n }\n descriptionKey() {\n return this.attrs.post.content().sticky ? 'flarum-sticky.forum.post_stream.discussion_stickied_text' : 'flarum-sticky.forum.post_stream.discussion_unstickied_text';\n }\n}\nflarum.reg.add('flarum-sticky', 'forum/components/DiscussionStickiedPost', DiscussionStickiedPost);","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionStickiedPost from './components/DiscussionStickiedPost';\nexport default [new Extend.PostTypes() //\n.add('discussionStickied', DiscussionStickiedPost), new Extend.Model(Discussion) //\n.attribute('isSticky').attribute('canSticky')];","import app from 'flarum/forum/app';\nimport addStickyBadge from './addStickyBadge';\nimport addStickyControl from './addStickyControl';\nimport addStickyExcerpt from './addStickyExcerpt';\nimport addStickyClass from './addStickyClass';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-sticky', () => {\n addStickyBadge();\n addStickyControl();\n addStickyExcerpt();\n addStickyClass();\n});","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\nexport default function addStickyBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.isSticky()) {\n badges.add('sticky', m(Badge, {\n type: \"sticky\",\n label: app.translator.trans('flarum-sticky.forum.badge.sticky_tooltip'),\n icon: \"fas fa-thumbtack\"\n }), 10);\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\nexport default function addStickyControl() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canSticky()) {\n items.add('sticky', m(Button, {\n icon: \"fas fa-thumbtack\",\n onclick: this.stickyAction.bind(discussion)\n }, app.translator.trans(\"flarum-sticky.forum.discussion_controls.\".concat(discussion.isSticky() ? 'unsticky' : 'sticky', \"_button\"))));\n }\n });\n DiscussionControls.stickyAction = function () {\n this.save({\n isSticky: !this.isSticky()\n }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n m.redraw();\n });\n };\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport { truncate } from 'flarum/common/utils/string';\nexport default function addStickyExcerpt() {\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n if (app.current.matches(IndexPage) || app.current.matches(DiscussionPage)) {\n params.include.push('firstPost');\n }\n });\n extend(DiscussionListItem.prototype, 'infoItems', function (items) {\n const discussion = this.attrs.discussion;\n if (discussion.isSticky() && !this.attrs.params.q && !discussion.lastReadPostNumber()) {\n const firstPost = discussion.firstPost();\n if (firstPost) {\n const excerpt = truncate(firstPost.contentPlain(), 175);\n\n // Wrapping in
Hello World
Hello World
Hello World