diff --git a/extensions/flags/js/dist/forum.js b/extensions/flags/js/dist/forum.js index ea6c10057..1bce6c9c3 100644 --- a/extensions/flags/js/dist/forum.js +++ b/extensions/flags/js/dist/forum.js @@ -1,2 +1,2 @@ -module.exports=function(t){var a={};function o(e){if(a[e])return a[e].exports;var n=a[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=t,o.c=a,o.d=function(t,a,e){o.o(t,a)||Object.defineProperty(t,a,{enumerable:!0,get:e})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,a){if(1&a&&(t=o(t)),8&a)return t;if(4&a&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&a&&"string"!=typeof t)for(var n in t)o.d(e,n,function(a){return t[a]}.bind(null,n));return e},o.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(a,"a",a),a},o.o=function(t,a){return Object.prototype.hasOwnProperty.call(t,a)},o.p="",o(o.s=23)}([function(t,a){t.exports=flarum.core.compat.app},function(t,a,o){"use strict";function e(t,a){t.prototype=Object.create(a.prototype),t.prototype.constructor=t,t.__proto__=a}o.d(a,"a",(function(){return e}))},function(t,a){t.exports=flarum.core.compat.extend},function(t,a){t.exports=flarum.core.compat.Model},function(t,a,o){"use strict";function e(){return(e=Object.assign||function(t){for(var a=1;a\n
\n

{app.translator.trans('flarum-flags.forum.flagged_posts.title')}

\n
\n
\n \n
\n \n );\n }\n\n /**\n * Load flags into the application's cache if they haven't already\n * been loaded.\n */\n load() {\n if (app.cache.flags && !app.session.user.attribute('newFlagCount')) {\n return;\n }\n\n this.loading = true;\n m.redraw();\n\n app.store.find('flags')\n .then(flags => {\n app.session.user.pushAttributes({newFlagCount: 0});\n app.cache.flags = flags.sort((a, b) => b.createdAt() - a.createdAt());\n })\n .catch(() => {})\n .then(() => {\n this.loading = false;\n m.redraw();\n });\n }\n}\n","import Page from 'flarum/components/Page';\n\nimport FlagList from './FlagList';\n\n/**\n * The `FlagsPage` component shows the flags list. It is only\n * used on mobile devices where the flags dropdown is within the drawer.\n */\nexport default class FlagsPage extends Page {\n init() {\n super.init();\n\n app.history.push('flags');\n\n this.list = new FlagList();\n this.list.load();\n\n this.bodyClass = 'App--flags';\n }\n\n view() {\n return
{this.list.render()}
;\n }\n}\n","import Modal from 'flarum/components/Modal';\nimport Button from 'flarum/components/Button';\n\nexport default class FlagPostModal extends Modal {\n init() {\n super.init();\n\n this.success = false;\n\n this.reason = m.prop('');\n this.reasonDetail = m.prop('');\n }\n\n className() {\n return 'FlagPostModal Modal--medium';\n }\n\n title() {\n return app.translator.trans('flarum-flags.forum.flag_post.title');\n }\n\n content() {\n if (this.success) {\n return (\n
\n
\n

{app.translator.trans('flarum-flags.forum.flag_post.confirmation_message')}

\n
\n \n
\n
\n
\n );\n }\n\n const guidelinesUrl = app.forum.attribute('guidelinesUrl');\n\n return (\n
\n
\n
\n
\n \n\n \n\n \n\n \n
\n
\n\n
\n \n {app.translator.trans('flarum-flags.forum.flag_post.submit_button')}\n \n
\n
\n
\n );\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n app.store.createRecord('flags').save({\n reason: this.reason() === 'other' ? null : this.reason(),\n reasonDetail: this.reasonDetail(),\n relationships: {\n user: app.session.user,\n post: this.props.post\n }\n }, {errorHandler: this.onerror.bind(this)})\n .then(() => this.success = true)\n .catch(() => {})\n .then(this.loaded.bind(this));\n }\n}\n","import { extend } from 'flarum/extend';\nimport app from 'flarum/app';\nimport PostControls from 'flarum/utils/PostControls';\nimport Button from 'flarum/components/Button';\n\nimport FlagPostModal from './components/FlagPostModal';\n\nexport default function() {\n extend(PostControls, 'userControls', function(items, post) {\n if (post.isHidden() || post.contentType() !== 'comment' || !post.canFlag()) return;\n\n items.add('flag',\n \n );\n });\n}\n","import NotificationsDropdown from 'flarum/components/NotificationsDropdown';\n\nimport FlagList from './FlagList';\n\nexport default class FlagsDropdown extends NotificationsDropdown {\n static initProps(props) {\n props.label = props.label || app.translator.trans('flarum-flags.forum.flagged_posts.tooltip');\n props.icon = props.icon || 'fas fa-flag';\n\n super.initProps(props);\n }\n\n init() {\n super.init();\n\n this.list = new FlagList();\n }\n\n goToRoute() {\n m.route(app.route('flags'));\n }\n\n getUnreadCount() {\n return app.cache.flags ? app.cache.flags.length : app.forum.attribute('flagCount');\n }\n\n getNewCount() {\n return app.session.user.attribute('newFlagCount');\n }\n}\n","import { extend } from 'flarum/extend';\nimport app from 'flarum/app';\nimport HeaderSecondary from 'flarum/components/HeaderSecondary';\nimport FlagsDropdown from './components/FlagsDropdown';\n\nexport default function() {\n extend(HeaderSecondary.prototype, 'items', function(items) {\n if (app.forum.attribute('canViewFlags')) {\n items.add('flags', , 15);\n }\n });\n}\n","import { extend } from 'flarum/extend';\nimport app from 'flarum/app';\nimport Post from 'flarum/components/Post';\nimport Button from 'flarum/components/Button';\nimport ItemList from 'flarum/utils/ItemList';\nimport PostControls from 'flarum/utils/PostControls';\nimport humanTime from 'flarum/utils/humanTime';\n\nexport default function() {\n extend(Post.prototype, 'attrs', function(attrs) {\n if (this.props.post.flags().length) {\n attrs.className += ' Post--flagged';\n }\n });\n\n Post.prototype.dismissFlag = function(data) {\n const post = this.props.post;\n\n delete post.data.relationships.flags;\n\n this.subtree.invalidate();\n\n if (app.cache.flags) {\n app.cache.flags.some((flag, i) => {\n if (flag.post() === post) {\n app.cache.flags.splice(i, 1);\n\n if (app.cache.flagIndex === post) {\n let next = app.cache.flags[i];\n\n if (!next) next = app.cache.flags[0];\n\n if (next) {\n const nextPost = next.post();\n app.cache.flagIndex = nextPost;\n m.route(app.route.post(nextPost));\n }\n }\n\n return true;\n }\n });\n }\n\n return app.request({\n url: app.forum.attribute('apiUrl') + post.apiEndpoint() + '/flags',\n method: 'DELETE',\n data\n });\n };\n\n Post.prototype.flagActionItems = function() {\n const items = new ItemList();\n\n const controls = PostControls.destructiveControls(this.props.post);\n\n Object.keys(controls.items).forEach(k => {\n const props = controls.get(k).props;\n\n props.className = 'Button';\n\n extend(props, 'onclick', () => this.dismissFlag());\n });\n\n items.add('controls', (\n
\n {controls.toArray()}\n
\n ));\n\n items.add('dismiss', (\n \n ), -100);\n\n return items;\n };\n\n extend(Post.prototype, 'content', function(vdom) {\n const post = this.props.post;\n const flags = post.flags();\n\n if (!flags.length) return;\n\n if (post.isHidden()) this.revealContent = true;\n\n vdom.unshift(\n
\n
\n {flags.map(flag =>\n
\n {this.flagReason(flag)}\n
\n )}\n
\n
\n {this.flagActionItems().toArray()}\n
\n
\n );\n });\n\n Post.prototype.flagReason = function(flag) {\n if (flag.type() === 'user') {\n const user = flag.user();\n const reason = flag.reason();\n const detail = flag.reasonDetail();\n const time = humanTime(flag.createdAt());\n\n return [\n app.translator.trans(reason ? 'flarum-flags.forum.post.flagged_by_with_reason_text' : 'flarum-flags.forum.post.flagged_by_text', {time, user, reason}),\n detail ? {detail} : ''\n ];\n }\n };\n}\n","import addFlagsToPosts from './addFlagsToPosts';\nimport addFlagControl from './addFlagControl';\nimport addFlagsDropdown from './addFlagsDropdown';\nimport Flag from './models/Flag';\nimport FlagList from './components/FlagList';\nimport FlagPostModal from './components/FlagPostModal';\nimport FlagsPage from './components/FlagsPage';\nimport FlagsDropdown from './components/FlagsDropdown';\n\nexport default {\n 'flags/addFlagsToPosts': addFlagsToPosts,\n 'flags/addFlagControl': addFlagControl,\n 'flags/addFlagsDropdown': addFlagsDropdown,\n 'flags/models/Flag': Flag,\n 'flags/components/FlagList': FlagList,\n 'flags/components/FlagPostModal': FlagPostModal,\n 'flags/components/FlagsPage': FlagsPage,\n 'flags/components/FlagsDropdown': FlagsDropdown,\n};\n","import app from 'flarum/app';\nimport Model from 'flarum/Model';\n\nimport Flag from './models/Flag';\nimport FlagsPage from './components/FlagsPage';\nimport addFlagControl from './addFlagControl';\nimport addFlagsDropdown from './addFlagsDropdown';\nimport addFlagsToPosts from './addFlagsToPosts';\n\napp.initializers.add('flarum-flags', () => {\n app.store.models.posts.prototype.flags = Model.hasMany('flags');\n app.store.models.posts.prototype.canFlag = Model.attribute('canFlag');\n\n app.store.models.flags = Flag;\n\n app.routes.flags = {path: '/flags', component: };\n\n addFlagControl();\n addFlagsDropdown();\n addFlagsToPosts();\n});\n\n// Expose compat API\nimport flagsCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, flagsCompat);\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@flarum/flags/webpack/bootstrap","webpack://@flarum/flags/external \"flarum.core.compat['app']\"","webpack://@flarum/flags/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/flags/external \"flarum.core.compat['extend']\"","webpack://@flarum/flags/external \"flarum.core.compat['Model']\"","webpack://@flarum/flags/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/flags/external \"flarum.core.compat['components/Button']\"","webpack://@flarum/flags/external \"flarum.core.compat['components/Post']\"","webpack://@flarum/flags/external \"flarum.core\"","webpack://@flarum/flags/external \"flarum.core.compat['utils/PostControls']\"","webpack://@flarum/flags/external \"flarum.core.compat['components/Page']\"","webpack://@flarum/flags/external \"flarum.core.compat['Component']\"","webpack://@flarum/flags/external \"flarum.core.compat['components/LoadingIndicator']\"","webpack://@flarum/flags/external \"flarum.core.compat['helpers/avatar']\"","webpack://@flarum/flags/external \"flarum.core.compat['helpers/username']\"","webpack://@flarum/flags/external \"flarum.core.compat['helpers/icon']\"","webpack://@flarum/flags/external \"flarum.core.compat['helpers/humanTime']\"","webpack://@flarum/flags/external \"flarum.core.compat['components/Modal']\"","webpack://@flarum/flags/external \"flarum.core.compat['components/HeaderSecondary']\"","webpack://@flarum/flags/external \"flarum.core.compat['components/NotificationsDropdown']\"","webpack://@flarum/flags/external \"flarum.core.compat['utils/ItemList']\"","webpack://@flarum/flags/external \"flarum.core.compat['utils/humanTime']\"","webpack://@flarum/flags/./src/forum/models/Flag.js","webpack://@flarum/flags/./src/forum/components/FlagList.js","webpack://@flarum/flags/./src/forum/components/FlagsPage.js","webpack://@flarum/flags/./src/forum/states/FlagListState.js","webpack://@flarum/flags/./src/forum/components/FlagPostModal.js","webpack://@flarum/flags/./src/forum/addFlagControl.js","webpack://@flarum/flags/./src/forum/components/FlagsDropdown.js","webpack://@flarum/flags/./src/forum/addFlagsDropdown.js","webpack://@flarum/flags/./src/forum/addFlagsToPosts.js","webpack://@flarum/flags/./src/forum/compat.js","webpack://@flarum/flags/./src/forum/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","_inheritsLoose","subClass","superClass","constructor","__proto__","_extends","assign","target","arguments","length","source","apply","this","Flag","Model","type","attribute","reason","reasonDetail","createdAt","transformDate","post","hasOne","user","FlagList","init","state","props","view","flags","cache","className","app","translator","trans","map","flag","href","route","config","element","isInitialized","$","on","index","avatar","icon","username","em","discussion","title","humanTime","contentPlain","loading","LoadingIndicator","component","Component","FlagsPage","history","push","load","bodyClass","Page","FlagListState","session","redraw","store","find","then","pushAttributes","newFlagCount","sort","a","b","catch","FlagPostModal","success","prop","content","onclick","hide","guidelinesUrl","forum","checked","withAttr","placeholder","oninput","undefined","disabled","onsubmit","e","preventDefault","createRecord","save","relationships","errorHandler","onerror","loaded","Modal","extend","PostControls","items","isHidden","contentType","canFlag","add","modal","show","FlagsDropdown","initProps","label","getMenu","menuClassName","menuClick","showing","goToRoute","getUnreadCount","getNewCount","NotificationsDropdown","HeaderSecondary","Post","attrs","dismissFlag","data","subtree","invalidate","some","splice","next","nextPost","request","url","apiEndpoint","method","flagActionItems","ItemList","controls","destructiveControls","keys","forEach","k","toArray","vdom","revealContent","unshift","flagReason","detail","time","addFlagsToPosts","addFlagControl","addFlagsDropdown","initializers","models","posts","hasMany","routes","path","flagsCompat"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRzB,EAAoB6B,EAAI,SAAS1B,GAChC,IAAIS,EAAST,GAAUA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GAAI,OACb,SAAKL,UAAU,qBACZ,EAAKkH,WAAW7G,QAIvB,SAAKL,UAAU,wBACZnB,KAAK0H,kBAAkBO,iBAMhCrB,IAAK/H,UAAUwJ,WAAa,SAAS7G,GACnC,GAAoB,SAAhBA,EAAKrB,OAAmB,CAC1B,IAAMQ,EAAOa,EAAKb,OACZN,EAASmB,EAAKnB,SACdiI,EAAS9G,EAAKlB,eACdiI,EAAOhG,IAAUf,EAAKjB,aAE5B,MAAO,CACLa,IAAIC,WAAWC,MAAMjB,EAAS,sDAAwD,0CAA2C,CAACkI,OAAM5H,OAAMN,WAC9IiI,EAAS,UAAMnH,UAAU,uBAAuBmH,GAAiB,OCvG1D,GACb,wBAAyBE,EACzB,uBAAwBC,EACxB,yBAA0BC,EAC1B,oBAAqBzI,EACrB,4BAA6BW,EAC7B,iCAAkCmD,EAClC,6BAA8BlB,EAC9B,iCAAkCmD,G,OCPpC5E,IAAIuH,aAAa9C,IAAI,gBAAgB,WACnCzE,IAAIkC,MAAMsF,OAAOC,MAAMhK,UAAUoC,MAAQf,IAAM4I,QAAQ,SACvD1H,IAAIkC,MAAMsF,OAAOC,MAAMhK,UAAU+G,QAAU1F,IAAME,UAAU,WAE3DgB,IAAIkC,MAAMsF,OAAO3H,MAAQhB,EAEzBmB,IAAI2H,OAAO9H,MAAQ,CAAE+H,KAAM,SAAUrG,UAAW,EAAC,EAAD,OAEhDvB,IAAIH,MAAQ,IAAIkC,EAAc/B,KAE9BqH,IACAC,IACAF,OAOF7K,OAAA,IAAAA,CAAcwB,SAAQ8J","file":"forum.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 23);\n","module.exports = flarum.core.compat['app'];","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","module.exports = flarum.core.compat['extend'];","module.exports = flarum.core.compat['Model'];","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","module.exports = flarum.core.compat['components/Button'];","module.exports = flarum.core.compat['components/Post'];","module.exports = flarum.core;","module.exports = flarum.core.compat['utils/PostControls'];","module.exports = flarum.core.compat['components/Page'];","module.exports = flarum.core.compat['Component'];","module.exports = flarum.core.compat['components/LoadingIndicator'];","module.exports = flarum.core.compat['helpers/avatar'];","module.exports = flarum.core.compat['helpers/username'];","module.exports = flarum.core.compat['helpers/icon'];","module.exports = flarum.core.compat['helpers/humanTime'];","module.exports = flarum.core.compat['components/Modal'];","module.exports = flarum.core.compat['components/HeaderSecondary'];","module.exports = flarum.core.compat['components/NotificationsDropdown'];","module.exports = flarum.core.compat['utils/ItemList'];","module.exports = flarum.core.compat['utils/humanTime'];","import Model from 'flarum/Model';\n\nclass Flag extends Model {}\n\nObject.assign(Flag.prototype, {\n type: Model.attribute('type'),\n reason: Model.attribute('reason'),\n reasonDetail: Model.attribute('reasonDetail'),\n createdAt: Model.attribute('createdAt', Model.transformDate),\n\n post: Model.hasOne('post'),\n user: Model.hasOne('user')\n});\n\nexport default Flag;\n","import Component from 'flarum/Component';\nimport LoadingIndicator from 'flarum/components/LoadingIndicator';\nimport avatar from 'flarum/helpers/avatar';\nimport username from 'flarum/helpers/username';\nimport icon from 'flarum/helpers/icon';\nimport humanTime from 'flarum/helpers/humanTime';\n\nexport default class FlagList extends Component {\n init() {\n this.state = this.props.state;\n }\n\n view() {\n const flags = this.state.cache;\n\n return (\n
\n
\n

{app.translator.trans('flarum-flags.forum.flagged_posts.title')}

\n
\n
\n \n
\n
\n );\n }\n}\n","import Page from 'flarum/components/Page';\n\nimport FlagList from './FlagList';\n\n/**\n * The `FlagsPage` component shows the flags list. It is only\n * used on mobile devices where the flags dropdown is within the drawer.\n */\nexport default class FlagsPage extends Page {\n init() {\n super.init();\n\n app.history.push('flags');\n\n app.flags.load();\n\n this.bodyClass = 'App--flags';\n }\n\n view() {\n return
;\n }\n}\n","export default class FlagListState {\n constructor(app) {\n this.app = app;\n\n /**\n * Whether or not the flags are loading.\n *\n * @type {Boolean}\n */\n this.loading = false;\n\n this.cache = [];\n }\n\n /**\n * Load flags into the application's cache if they haven't already\n * been loaded.\n */\n load() {\n if (this.cache.length && !this.app.session.user.attribute('newFlagCount')) {\n return;\n }\n\n this.loading = true;\n m.redraw();\n\n this.app.store.find('flags')\n .then(flags => {\n this.app.session.user.pushAttributes({ newFlagCount: 0 });\n this.cache = flags.sort((a, b) => b.createdAt() - a.createdAt());\n })\n .catch(() => { })\n .then(() => {\n this.loading = false;\n m.redraw();\n });\n }\n}\n","import Modal from 'flarum/components/Modal';\nimport Button from 'flarum/components/Button';\n\nexport default class FlagPostModal extends Modal {\n init() {\n super.init();\n\n this.success = false;\n\n this.reason = m.prop('');\n this.reasonDetail = m.prop('');\n }\n\n className() {\n return 'FlagPostModal Modal--medium';\n }\n\n title() {\n return app.translator.trans('flarum-flags.forum.flag_post.title');\n }\n\n content() {\n if (this.success) {\n return (\n
\n
\n

{app.translator.trans('flarum-flags.forum.flag_post.confirmation_message')}

\n
\n \n
\n
\n
\n );\n }\n\n const guidelinesUrl = app.forum.attribute('guidelinesUrl');\n\n return (\n
\n
\n
\n
\n \n\n \n\n \n\n \n
\n
\n\n
\n \n {app.translator.trans('flarum-flags.forum.flag_post.submit_button')}\n \n
\n
\n
\n );\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n app.store.createRecord('flags').save({\n reason: this.reason() === 'other' ? null : this.reason(),\n reasonDetail: this.reasonDetail(),\n relationships: {\n user: app.session.user,\n post: this.props.post\n }\n }, {errorHandler: this.onerror.bind(this)})\n .then(() => this.success = true)\n .catch(() => {})\n .then(this.loaded.bind(this));\n }\n}\n","import { extend } from 'flarum/extend';\nimport app from 'flarum/app';\nimport PostControls from 'flarum/utils/PostControls';\nimport Button from 'flarum/components/Button';\n\nimport FlagPostModal from './components/FlagPostModal';\n\nexport default function() {\n extend(PostControls, 'userControls', function(items, post) {\n if (post.isHidden() || post.contentType() !== 'comment' || !post.canFlag()) return;\n\n items.add('flag',\n \n );\n });\n}\n","import NotificationsDropdown from 'flarum/components/NotificationsDropdown';\n\nimport FlagList from './FlagList';\n\nexport default class FlagsDropdown extends NotificationsDropdown {\n static initProps(props) {\n props.label = props.label || app.translator.trans('flarum-flags.forum.flagged_posts.tooltip');\n props.icon = props.icon || 'fas fa-flag';\n\n super.initProps(props);\n }\n\n getMenu() {\n return (\n
\n {this.showing ? FlagList.component({ state: this.props.state }) : ''}\n
\n );\n }\n\n goToRoute() {\n m.route(app.route('flags'));\n }\n\n getUnreadCount() {\n return app.flags.cache ? app.flags.cache.length : app.forum.attribute('flagCount');\n }\n\n getNewCount() {\n return app.session.user.attribute('newFlagCount');\n }\n}\n","import { extend } from 'flarum/extend';\nimport app from 'flarum/app';\nimport HeaderSecondary from 'flarum/components/HeaderSecondary';\nimport FlagsDropdown from './components/FlagsDropdown';\n\nexport default function() {\n extend(HeaderSecondary.prototype, 'items', function(items) {\n if (app.forum.attribute('canViewFlags')) {\n items.add('flags', , 15);\n }\n });\n}\n","import { extend } from 'flarum/extend';\nimport app from 'flarum/app';\nimport Post from 'flarum/components/Post';\nimport Button from 'flarum/components/Button';\nimport ItemList from 'flarum/utils/ItemList';\nimport PostControls from 'flarum/utils/PostControls';\nimport humanTime from 'flarum/utils/humanTime';\n\nexport default function() {\n extend(Post.prototype, 'attrs', function(attrs) {\n if (this.props.post.flags().length) {\n attrs.className += ' Post--flagged';\n }\n });\n\n Post.prototype.dismissFlag = function(data) {\n const post = this.props.post;\n\n delete post.data.relationships.flags;\n\n this.subtree.invalidate();\n\n if (app.flags.cache) {\n app.flags.cache.some((flag, i) => {\n if (flag.post() === post) {\n app.flags.cache.splice(i, 1);\n\n if (app.flags.index === post) {\n let next = app.flags.cache[i];\n\n if (!next) next = app.flags.cache[0];\n\n if (next) {\n const nextPost = next.post();\n app.flags.index = nextPost;\n m.route(app.route.post(nextPost));\n }\n }\n\n return true;\n }\n });\n }\n\n return app.request({\n url: app.forum.attribute('apiUrl') + post.apiEndpoint() + '/flags',\n method: 'DELETE',\n data\n });\n };\n\n Post.prototype.flagActionItems = function() {\n const items = new ItemList();\n\n const controls = PostControls.destructiveControls(this.props.post);\n\n Object.keys(controls.items).forEach(k => {\n const props = controls.get(k).props;\n\n props.className = 'Button';\n\n extend(props, 'onclick', () => this.dismissFlag());\n });\n\n items.add('controls', (\n
\n {controls.toArray()}\n
\n ));\n\n items.add('dismiss', (\n \n ), -100);\n\n return items;\n };\n\n extend(Post.prototype, 'content', function(vdom) {\n const post = this.props.post;\n const flags = post.flags();\n\n if (!flags.length) return;\n\n if (post.isHidden()) this.revealContent = true;\n\n vdom.unshift(\n
\n
\n {flags.map(flag =>\n
\n {this.flagReason(flag)}\n
\n )}\n
\n
\n {this.flagActionItems().toArray()}\n
\n
\n );\n });\n\n Post.prototype.flagReason = function(flag) {\n if (flag.type() === 'user') {\n const user = flag.user();\n const reason = flag.reason();\n const detail = flag.reasonDetail();\n const time = humanTime(flag.createdAt());\n\n return [\n app.translator.trans(reason ? 'flarum-flags.forum.post.flagged_by_with_reason_text' : 'flarum-flags.forum.post.flagged_by_text', {time, user, reason}),\n detail ? {detail} : ''\n ];\n }\n };\n}\n","import addFlagsToPosts from './addFlagsToPosts';\nimport addFlagControl from './addFlagControl';\nimport addFlagsDropdown from './addFlagsDropdown';\nimport Flag from './models/Flag';\nimport FlagList from './components/FlagList';\nimport FlagPostModal from './components/FlagPostModal';\nimport FlagsPage from './components/FlagsPage';\nimport FlagsDropdown from './components/FlagsDropdown';\n\nexport default {\n 'flags/addFlagsToPosts': addFlagsToPosts,\n 'flags/addFlagControl': addFlagControl,\n 'flags/addFlagsDropdown': addFlagsDropdown,\n 'flags/models/Flag': Flag,\n 'flags/components/FlagList': FlagList,\n 'flags/components/FlagPostModal': FlagPostModal,\n 'flags/components/FlagsPage': FlagsPage,\n 'flags/components/FlagsDropdown': FlagsDropdown,\n};\n","import app from 'flarum/app';\nimport Model from 'flarum/Model';\n\nimport Flag from './models/Flag';\nimport FlagsPage from './components/FlagsPage';\nimport FlagListState from './states/FlagListState';\nimport addFlagControl from './addFlagControl';\nimport addFlagsDropdown from './addFlagsDropdown';\nimport addFlagsToPosts from './addFlagsToPosts';\n\napp.initializers.add('flarum-flags', () => {\n app.store.models.posts.prototype.flags = Model.hasMany('flags');\n app.store.models.posts.prototype.canFlag = Model.attribute('canFlag');\n\n app.store.models.flags = Flag;\n\n app.routes.flags = { path: '/flags', component: };\n\n app.flags = new FlagListState(app);\n\n addFlagControl();\n addFlagsDropdown();\n addFlagsToPosts();\n});\n\n// Expose compat API\nimport flagsCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, flagsCompat);\n"],"sourceRoot":""} \ No newline at end of file