diff --git a/js/dist/admin.js b/js/dist/admin.js index d49c023..f43fd72 100644 --- a/js/dist/admin.js +++ b/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var e={n:a=>{var t=a&&a.__esModule?()=>a.default:()=>a;return e.d(t,{a:t}),t},d:(a,t)=>{for(var l in t)e.o(t,l)&&!e.o(a,l)&&Object.defineProperty(a,l,{enumerable:!0,get:t[l]})},o:(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},a={};(()=>{"use strict";e.r(a);const t=flarum.core.compat["admin/app"];var l=e.n(t);const c=flarum.core.compat["common/components/Link"];var r=e.n(c);const n=flarum.core.compat["common/extend"],s=flarum.core.compat["admin/components/StatusWidget"];var o=e.n(s);const p=flarum.core.compat["common/components/Button"];var i=e.n(p);function d(){l().request({url:l().forum.attribute("apiUrl")+"/lscache-purge",method:"GET"}).then((function(){l().alerts.show({type:"success"},l().translator.trans("acpl-lscache.admin.purge_all_success"))}))}l().initializers.add("acpl-lscache",(function(){l().extensionData.for("acpl-lscache").registerSetting({setting:"acpl-lscache.public_cache_ttl",label:l().translator.trans("acpl-lscache.admin.public_cache_ttl_label"),help:l().translator.trans("acpl-lscache.admin.public_cache_ttl_help"),type:"number",min:30}).registerSetting({setting:"acpl-lscache.clearing_cache_listener",label:l().translator.trans("acpl-lscache.admin.clearing_cache_listener_label"),type:"boolean"}).registerSetting({setting:"acpl-lscache.serve_stale",label:l().translator.trans("acpl-lscache.admin.serve_stale_label"),help:l().translator.trans("acpl-lscache.admin.serve_stale_help"),type:"boolean"}).registerSetting({setting:"acpl-lscache.purge_on_discussion_update",label:l().translator.trans("acpl-lscache.admin.purge_on_discussion_update_label"),help:l().translator.trans("acpl-lscache.admin.purge_on_discussion_update_help",{a:m(r(),{href:"https://docs.litespeedtech.com/lscache/devguide/controls/#cache-tag",external:!0,target:"_blank"})}),type:"textarea"}).registerSetting({setting:"acpl-lscache.cache_exclude",label:l().translator.trans("acpl-lscache.admin.cache_exclude_label"),help:l().translator.trans("acpl-lscache.admin.cache_exclude_help"),type:"textarea"}).registerSetting({setting:"acpl-lscache.drop_qs",label:l().translator.trans("acpl-lscache.admin.drop_qs_label"),help:l().translator.trans("acpl-lscache.admin.drop_qs_help",{a:m(r(),{href:"https://docs.litespeedtech.com/lscache/start/#drop-junk-query-strings",external:!0,target:"_blank"})}),type:"textarea"}),(0,n.extend)(o().prototype,"toolsItems",(function(e){e.add("clearLSCache",m(i(),{onclick:d},l().translator.trans("acpl-lscache.admin.purge_all")))}))}))})(),module.exports=a})(); +(()=>{var e={n:a=>{var t=a&&a.__esModule?()=>a.default:()=>a;return e.d(t,{a:t}),t},d:(a,t)=>{for(var l in t)e.o(t,l)&&!e.o(a,l)&&Object.defineProperty(a,l,{enumerable:!0,get:t[l]})},o:(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},a={};(()=>{"use strict";e.r(a);const t=flarum.core.compat["admin/app"];var l=e.n(t);const c=flarum.core.compat["common/components/Link"];var r=e.n(c);const n=flarum.core.compat["common/extend"],s=flarum.core.compat["admin/components/StatusWidget"];var o=e.n(s);const p=flarum.core.compat["common/components/Button"];var i=e.n(p);function h(){l().request({url:l().forum.attribute("apiUrl")+"/lscache-purge",method:"GET"}).then((function(){l().alerts.show({type:"success"},l().translator.trans("acpl-lscache.admin.purge_all_success"))}))}l().initializers.add("acpl-lscache",(function(){l().extensionData.for("acpl-lscache").registerSetting({setting:"acpl-lscache.cache_enabled",label:l().translator.trans("acpl-lscache.admin.cache_enabled_label"),help:l().translator.trans("acpl-lscache.admin.cache_enabled_help",{a:m(r(),{href:"https://docs.litespeedtech.com/lscache/noplugin/installation/#verify-your-site-is-being-cached",external:!0,target:"_blank"})}),type:"boolean"}).registerSetting({setting:"acpl-lscache.public_cache_ttl",label:l().translator.trans("acpl-lscache.admin.public_cache_ttl_label"),help:l().translator.trans("acpl-lscache.admin.public_cache_ttl_help"),type:"number",min:30}).registerSetting({setting:"acpl-lscache.clearing_cache_listener",label:l().translator.trans("acpl-lscache.admin.clearing_cache_listener_label"),type:"boolean"}).registerSetting({setting:"acpl-lscache.serve_stale",label:l().translator.trans("acpl-lscache.admin.serve_stale_label"),help:l().translator.trans("acpl-lscache.admin.serve_stale_help"),type:"boolean"}).registerSetting({setting:"acpl-lscache.purge_on_discussion_update",label:l().translator.trans("acpl-lscache.admin.purge_on_discussion_update_label"),help:l().translator.trans("acpl-lscache.admin.purge_on_discussion_update_help",{a:m(r(),{href:"https://docs.litespeedtech.com/lscache/devguide/controls/#cache-tag",external:!0,target:"_blank"})}),type:"textarea"}).registerSetting({setting:"acpl-lscache.cache_exclude",label:l().translator.trans("acpl-lscache.admin.cache_exclude_label"),help:l().translator.trans("acpl-lscache.admin.cache_exclude_help"),type:"textarea"}).registerSetting({setting:"acpl-lscache.drop_qs",label:l().translator.trans("acpl-lscache.admin.drop_qs_label"),help:l().translator.trans("acpl-lscache.admin.drop_qs_help",{a:m(r(),{href:"https://docs.litespeedtech.com/lscache/start/#drop-junk-query-strings",external:!0,target:"_blank"})}),type:"textarea"}),(0,n.extend)(o().prototype,"toolsItems",(function(e){e.add("clearLSCache",m(i(),{onclick:h},l().translator.trans("acpl-lscache.admin.purge_all")))}))}))})(),module.exports=a})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index d9adbca..c4f0596 100644 --- a/js/dist/admin.js.map +++ b/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,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R,IAAAA,WAAAA,MAAqB,uCAC3BI,KAAM,YAEPC,gBAAgB,CACfC,QAAS,0CACTC,MAAOP,IAAAA,WAAAA,MAAqB,uDAC5BQ,KAAMR,IAAAA,WAAAA,MAAqB,qDAAsD,CAC/ErB,EAAG+B,EAACC,IAAI,CAACC,KAAK,sEAAsEC,UAAU,EAAMC,OAAO,aAE7GV,KAAM,aAEPC,gBAAgB,CACfC,QAAS,6BACTC,MAAOP,IAAAA,WAAAA,MAAqB,0CAC5BQ,KAAMR,IAAAA,WAAAA,MAAqB,yCAC3BI,KAAM,aAEPC,gBAAgB,CACfC,QAAS,uBACTC,MAAOP,IAAAA,WAAAA,MAAqB,oCAC5BQ,KAAMR,IAAAA,WAAAA,MAAqB,kCAAmC,CAC5DrB,EAAG+B,EAACC,IAAI,CAACC,KAAK,wEAAwEC,UAAU,EAAMC,OAAO,aAE/GV,KAAM,cD1BVW,EAAAA,EAAAA,QAAOC,IAAAA,UAAwB,cAAc,SAACC,GAC5CA,EAAMC,IAAI,eAAgBR,EAACS,IAAM,CAACC,QAASrB,GAAqBC,IAAAA,WAAAA,MAAqB,iCACvF,GC4BF,G","sources":["webpack://@acpl/flarum-lscache/webpack/bootstrap","webpack://@acpl/flarum-lscache/webpack/runtime/compat get default export","webpack://@acpl/flarum-lscache/webpack/runtime/define property getters","webpack://@acpl/flarum-lscache/webpack/runtime/hasOwnProperty shorthand","webpack://@acpl/flarum-lscache/webpack/runtime/make namespace object","webpack://@acpl/flarum-lscache/external root \"flarum.core.compat['admin/app']\"","webpack://@acpl/flarum-lscache/external root \"flarum.core.compat['common/components/Link']\"","webpack://@acpl/flarum-lscache/external root \"flarum.core.compat['common/extend']\"","webpack://@acpl/flarum-lscache/external root \"flarum.core.compat['admin/components/StatusWidget']\"","webpack://@acpl/flarum-lscache/external root \"flarum.core.compat['common/components/Button']\"","webpack://@acpl/flarum-lscache/./src/admin/addPurgeLSCacheButton.tsx","webpack://@acpl/flarum-lscache/./src/admin/index.tsx"],"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['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/StatusWidget'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","import app from 'flarum/admin/app';\nimport { extend } from 'flarum/common/extend';\nimport StatusWidget from 'flarum/admin/components/StatusWidget';\nimport Button from 'flarum/common/components/Button';\nimport type ItemList from 'flarum/common/utils/ItemList';\nimport type { Children } from 'mithril';\n\nfunction handleClearLSCache() {\n app\n .request({\n url: `${app.forum.attribute('apiUrl')}/lscache-purge`,\n method: 'GET',\n })\n .then(() => {\n app.alerts.show({ type: 'success' }, app.translator.trans('acpl-lscache.admin.purge_all_success'));\n });\n}\n\nexport default () => {\n extend(StatusWidget.prototype, 'toolsItems', (items: ItemList) => {\n items.add('clearLSCache', );\n });\n};\n","import app from 'flarum/admin/app';\nimport Link from 'flarum/common/components/Link';\nimport addPurgeLSCacheButton from './addPurgeLSCacheButton';\n\napp.initializers.add('acpl-lscache', () => {\n app.extensionData\n .for('acpl-lscache')\n .registerSetting({\n setting: 'acpl-lscache.public_cache_ttl',\n label: app.translator.trans('acpl-lscache.admin.public_cache_ttl_label'),\n help: app.translator.trans('acpl-lscache.admin.public_cache_ttl_help'),\n type: 'number',\n min: 30,\n })\n .registerSetting({\n setting: 'acpl-lscache.clearing_cache_listener',\n label: app.translator.trans('acpl-lscache.admin.clearing_cache_listener_label'),\n type: 'boolean',\n })\n .registerSetting({\n setting: 'acpl-lscache.serve_stale',\n label: app.translator.trans('acpl-lscache.admin.serve_stale_label'),\n help: app.translator.trans('acpl-lscache.admin.serve_stale_help'),\n type: 'boolean',\n })\n .registerSetting({\n setting: 'acpl-lscache.purge_on_discussion_update',\n label: app.translator.trans('acpl-lscache.admin.purge_on_discussion_update_label'),\n help: app.translator.trans('acpl-lscache.admin.purge_on_discussion_update_help', {\n a: ,\n }),\n type: 'textarea',\n })\n .registerSetting({\n setting: 'acpl-lscache.cache_exclude',\n label: app.translator.trans('acpl-lscache.admin.cache_exclude_label'),\n help: app.translator.trans('acpl-lscache.admin.cache_exclude_help'),\n type: 'textarea',\n })\n .registerSetting({\n setting: 'acpl-lscache.drop_qs',\n label: app.translator.trans('acpl-lscache.admin.drop_qs_label'),\n help: app.translator.trans('acpl-lscache.admin.drop_qs_help', {\n a: ,\n }),\n type: 'textarea',\n });\n\n addPurgeLSCacheButton();\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","core","compat","handleClearLSCache","app","url","method","then","type","registerSetting","setting","label","help","min","m","Link","href","external","target","extend","StatusWidget","items","add","Button","onclick"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,I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CACTC,MAAOP,IAAAA,WAAAA,MAAqB,6CAC5BQ,KAAMR,IAAAA,WAAAA,MAAqB,4CAC3BI,KAAM,SACNU,IAAK,KAENT,gBAAgB,CACfC,QAAS,uCACTC,MAAOP,IAAAA,WAAAA,MAAqB,oDAC5BI,KAAM,YAEPC,gBAAgB,CACfC,QAAS,2BACTC,MAAOP,IAAAA,WAAAA,MAAqB,wCAC5BQ,KAAMR,IAAAA,WAAAA,MAAqB,uCAC3BI,KAAM,YAEPC,gBAAgB,CACfC,QAAS,0CACTC,MAAOP,IAAAA,WAAAA,MAAqB,uDAC5BQ,KAAMR,IAAAA,WAAAA,MAAqB,qDAAsD,CAC/ErB,EAAG8B,EAACC,IAAI,CAACC,KAAK,sEAAsEC,UAAU,EAAMC,OAAO,aAE7GT,KAAM,aAEPC,gBAAgB,CACfC,QAAS,6BACTC,MAAOP,IAAAA,WAAAA,MAAqB,0CAC5BQ,KAAMR,IAAAA,WAAAA,MAAqB,yCAC3BI,KAAM,aAEPC,gBAAgB,CACfC,QAAS,uBACTC,MAAOP,IAAAA,WAAAA,MAAqB,oCAC5BQ,KAAMR,IAAAA,WAAAA,MAAqB,kCAAmC,CAC5DrB,EAAG8B,EAACC,IAAI,CAACC,KAAK,wEAAwEC,UAAU,EAAMC,OAAO,aAE/GT,KAAM,cDxCVW,EAAAA,EAAAA,QAAOC,IAAAA,UAAwB,cAAc,SAACC,GAC5CA,EAAMC,IAAI,eAAgBT,EAACU,IAAM,CAACC,QAASrB,GAAqBC,IAAAA,WAAAA,MAAqB,iCACvF,GC0CF,G","sources":["webpack://@acpl/flarum-lscache/webpack/bootstrap","webpack://@acpl/flarum-lscache/webpack/runtime/compat get default export","webpack://@acpl/flarum-lscache/webpack/runtime/define property getters","webpack://@acpl/flarum-lscache/webpack/runtime/hasOwnProperty shorthand","webpack://@acpl/flarum-lscache/webpack/runtime/make namespace object","webpack://@acpl/flarum-lscache/external root \"flarum.core.compat['admin/app']\"","webpack://@acpl/flarum-lscache/external root \"flarum.core.compat['common/components/Link']\"","webpack://@acpl/flarum-lscache/external root \"flarum.core.compat['common/extend']\"","webpack://@acpl/flarum-lscache/external root \"flarum.core.compat['admin/components/StatusWidget']\"","webpack://@acpl/flarum-lscache/external root \"flarum.core.compat['common/components/Button']\"","webpack://@acpl/flarum-lscache/./src/admin/addPurgeLSCacheButton.tsx","webpack://@acpl/flarum-lscache/./src/admin/index.tsx"],"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['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/StatusWidget'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","import app from 'flarum/admin/app';\nimport { extend } from 'flarum/common/extend';\nimport StatusWidget from 'flarum/admin/components/StatusWidget';\nimport Button from 'flarum/common/components/Button';\nimport type ItemList from 'flarum/common/utils/ItemList';\nimport type { Children } from 'mithril';\n\nfunction handleClearLSCache() {\n app\n .request({\n url: `${app.forum.attribute('apiUrl')}/lscache-purge`,\n method: 'GET',\n })\n .then(() => {\n app.alerts.show({ type: 'success' }, app.translator.trans('acpl-lscache.admin.purge_all_success'));\n });\n}\n\nexport default () => {\n extend(StatusWidget.prototype, 'toolsItems', (items: ItemList) => {\n items.add('clearLSCache', );\n });\n};\n","import app from 'flarum/admin/app';\nimport Link from 'flarum/common/components/Link';\nimport addPurgeLSCacheButton from './addPurgeLSCacheButton';\n\napp.initializers.add('acpl-lscache', () => {\n app.extensionData\n .for('acpl-lscache')\n .registerSetting({\n setting: 'acpl-lscache.cache_enabled',\n label: app.translator.trans('acpl-lscache.admin.cache_enabled_label'),\n help: app.translator.trans('acpl-lscache.admin.cache_enabled_help', {\n a: (\n \n ),\n }),\n type: 'boolean',\n })\n .registerSetting({\n setting: 'acpl-lscache.public_cache_ttl',\n label: app.translator.trans('acpl-lscache.admin.public_cache_ttl_label'),\n help: app.translator.trans('acpl-lscache.admin.public_cache_ttl_help'),\n type: 'number',\n min: 30,\n })\n .registerSetting({\n setting: 'acpl-lscache.clearing_cache_listener',\n label: app.translator.trans('acpl-lscache.admin.clearing_cache_listener_label'),\n type: 'boolean',\n })\n .registerSetting({\n setting: 'acpl-lscache.serve_stale',\n label: app.translator.trans('acpl-lscache.admin.serve_stale_label'),\n help: app.translator.trans('acpl-lscache.admin.serve_stale_help'),\n type: 'boolean',\n })\n .registerSetting({\n setting: 'acpl-lscache.purge_on_discussion_update',\n label: app.translator.trans('acpl-lscache.admin.purge_on_discussion_update_label'),\n help: app.translator.trans('acpl-lscache.admin.purge_on_discussion_update_help', {\n a: ,\n }),\n type: 'textarea',\n })\n .registerSetting({\n setting: 'acpl-lscache.cache_exclude',\n label: app.translator.trans('acpl-lscache.admin.cache_exclude_label'),\n help: app.translator.trans('acpl-lscache.admin.cache_exclude_help'),\n type: 'textarea',\n })\n .registerSetting({\n setting: 'acpl-lscache.drop_qs',\n label: app.translator.trans('acpl-lscache.admin.drop_qs_label'),\n help: app.translator.trans('acpl-lscache.admin.drop_qs_help', {\n a: ,\n }),\n type: 'textarea',\n });\n\n addPurgeLSCacheButton();\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","core","compat","handleClearLSCache","app","url","method","then","type","registerSetting","setting","label","help","m","Link","href","external","target","min","extend","StatusWidget","items","add","Button","onclick"],"sourceRoot":""} \ No newline at end of file