mirror of
https://github.com/flarum/framework.git
synced 2025-01-23 03:27:30 +08:00
71b444b6f6
Includes transpiled JS/TS. [skip ci]
1 line
8.4 KiB
Plaintext
Generated
1 line
8.4 KiB
Plaintext
Generated
{"version":3,"file":"forum.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,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,sB,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,2B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,uC,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,yB,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,gC,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCWxDC,IAAAA,aAAAA,IACE,mBACA,WACEC,I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AAY,GAElD,CACF,IACA,G","sources":["webpack://@flarum/approval/webpack/bootstrap","webpack://@flarum/approval/webpack/runtime/compat get default export","webpack://@flarum/approval/webpack/runtime/define property getters","webpack://@flarum/approval/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/approval/webpack/runtime/make namespace object","webpack://@flarum/approval/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/approval/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/approval/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@flarum/approval/external root \"flarum.core.compat['common/models/Post']\"","webpack://@flarum/approval/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@flarum/approval/external root \"flarum.core.compat['forum/components/DiscussionListItem']\"","webpack://@flarum/approval/external root \"flarum.core.compat['forum/components/Post']\"","webpack://@flarum/approval/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@flarum/approval/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/approval/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@flarum/approval/./src/forum/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.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Post'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionListItem'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Post'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/CommentPost'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/PostControls'];","import { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Post from 'flarum/common/models/Post';\nimport Badge from 'flarum/common/components/Badge';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport PostComponent from 'flarum/forum/components/Post';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport Button from 'flarum/common/components/Button';\nimport PostControls from 'flarum/forum/utils/PostControls';\n\napp.initializers.add(\n 'flarum-approval',\n () => {\n Discussion.prototype.isApproved = Discussion.attribute('isApproved');\n\n extend(Discussion.prototype, 'badges', function (items) {\n if (!this.isApproved() && !items.has('hidden')) {\n items.add(\n 'awaitingApproval',\n <Badge type=\"awaitingApproval\" icon=\"fas fa-gavel\" label={app.translator.trans('flarum-approval.forum.badge.awaiting_approval_tooltip')} />\n );\n }\n });\n\n Post.prototype.isApproved = Post.attribute('isApproved');\n Post.prototype.canApprove = Post.attribute('canApprove');\n\n extend(DiscussionListItem.prototype, 'elementAttrs', function (attrs) {\n if (!this.attrs.discussion.isApproved()) {\n attrs.className += ' DiscussionListItem--unapproved';\n }\n });\n\n extend(PostComponent.prototype, 'elementAttrs', function (attrs) {\n if (!this.attrs.post.isApproved()) {\n attrs.className += ' Post--unapproved';\n }\n });\n\n extend(CommentPost.prototype, 'headerItems', function (items) {\n if (!this.attrs.post.isApproved() && !this.attrs.post.isHidden()) {\n items.add('unapproved', app.translator.trans('flarum-approval.forum.post.awaiting_approval_text'));\n }\n });\n\n override(PostComponent.prototype, 'flagReason', function (original, flag) {\n if (flag.type() === 'approval') {\n return app.translator.trans('flarum-approval.forum.post.awaiting_approval_text');\n }\n\n return original(flag);\n });\n\n extend(PostControls, 'destructiveControls', function (items, post) {\n if (!post.isApproved() && post.canApprove()) {\n items.add(\n 'approve',\n <Button icon=\"fas fa-check\" onclick={PostControls.approveAction.bind(post)}>\n {app.translator.trans('flarum-approval.forum.post_controls.approve_button')}\n </Button>,\n 10\n );\n }\n });\n\n PostControls.approveAction = function () {\n this.save({ isApproved: true });\n\n if (this.number() === 1) {\n this.discussion().pushAttributes({ isApproved: true });\n }\n };\n },\n -10\n); // set initializer priority to run after reports\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","core","compat","app","Discussion","extend","items","this","isApproved","has","add","type","icon","label","Post","DiscussionListItem","attrs","discussion","className","PostComponent","post","CommentPost","isHidden","override","original","flag","PostControls","canApprove","onclick","save","number","pushAttributes"],"sourceRoot":""} |