diff --git a/js/dist/admin.js b/js/dist/admin.js index d70d71c..1cf1b5e 100644 --- a/js/dist/admin.js +++ b/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var s in n)t.o(n,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:n[s]})},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);const n=flarum.core.compat["admin/app"];var s=t.n(n);function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}const i=flarum.core.compat["admin/components/ExtensionPage"];var o=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,a(e,n);var o=i.prototype;return o.oninit=function(e){t.prototype.oninit.call(this,e)},o.content=function(t){var e=this.setting("fof-sitemap.mode")();return"cache"!==e&&"cache-disk"!==e||this.setting("fof-sitemap.mode")("multi-file"),[m("div",{className:"ExtensionPage-settings FoFSitemapSettingsPage"},m("div",{className:"container"},s().forum.attribute("fof-sitemap.usersIndexAvailable")?this.buildSettingComponent({type:"switch",setting:"fof-sitemap.excludeUsers",label:s().translator.trans("fof-sitemap.admin.settings.exclude_users"),help:s().translator.trans("fof-sitemap.admin.settings.exclude_users_help")}):null,this.modeChoice(),m("hr",null),m("h3",null,s().translator.trans("fof-sitemap.admin.settings.advanced_options_label")),m("div",{className:"Form-group"},this.buildSettingComponent({type:"select",setting:"fof-sitemap.frequency",options:{hourly:s().translator.trans("fof-sitemap.admin.settings.frequency.hourly"),"twice-daily":s().translator.trans("fof-sitemap.admin.settings.frequency.twice_daily"),daily:s().translator.trans("fof-sitemap.admin.settings.frequency.daily")},label:s().translator.trans("fof-sitemap.admin.settings.frequency_label")})),this.buildSettingComponent({type:"switch",setting:"fof-sitemap.riskyPerformanceImprovements",label:s().translator.trans("fof-sitemap.admin.settings.risky_performance_improvements"),help:s().translator.trans("fof-sitemap.admin.settings.risky_performance_improvements_help")}),this.submitButton(t)))]},o.modeChoice=function(){return s().forum.attribute("fof-sitemap.modeChoice")?m("div",null,this.buildSettingComponent({type:"select",setting:"fof-sitemap.mode",options:{run:s().translator.trans("fof-sitemap.admin.settings.modes.runtime"),"multi-file":s().translator.trans("fof-sitemap.admin.settings.modes.multi_file")},label:s().translator.trans("fof-sitemap.admin.settings.mode_label")}),m("p",null,s().translator.trans("fof-sitemap.admin.settings.mode_help")),m("div",null,m("h3",null,s().translator.trans("fof-sitemap.admin.settings.mode_help_runtime_label")),m("p",null,s().translator.trans("fof-sitemap.admin.settings.mode_help_runtime"))),m("h4",null,s().translator.trans("fof-sitemap.admin.settings.mode_help_schedule")),m("p",null,s().translator.trans("fof-sitemap.admin.settings.mode_help_schedule_setup",{a:m("a",{href:"https://docs.flarum.org/console/#schedulerun",target:"_blank",rel:"noopener"})})),m("div",null,m("h3",null,s().translator.trans("fof-sitemap.admin.settings.mode_help_multi_label")),m("p",null,s().translator.trans("fof-sitemap.admin.settings.mode_help_multi")))):null},i}(t.n(i)());s().initializers.add("fof/sitemap",(function(){s().extensionData.for("fof-sitemap").registerPage(o)}))})(),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 n in s)t.o(s,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:s[n]})},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);const s=flarum.core.compat["admin/app"];var n=t.n(s);function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}const a=flarum.core.compat["admin/components/ExtensionPage"];var o=function(t){var e,s;function a(){return t.apply(this,arguments)||this}s=t,(e=a).prototype=Object.create(s.prototype),e.prototype.constructor=e,i(e,s);var o=a.prototype;return o.oninit=function(e){t.prototype.oninit.call(this,e)},o.content=function(t){var e=this.setting("fof-sitemap.mode")();return"cache"!==e&&"cache-disk"!==e||this.setting("fof-sitemap.mode")("multi-file"),[m("div",{className:"ExtensionPage-settings FoFSitemapSettingsPage"},m("div",{className:"container"},n().forum.attribute("fof-sitemap.usersIndexAvailable")?this.buildSettingComponent({type:"switch",setting:"fof-sitemap.excludeUsers",label:n().translator.trans("fof-sitemap.admin.settings.exclude_users"),help:n().translator.trans("fof-sitemap.admin.settings.exclude_users_help")}):null,m("div",{className:"Form-group"},m("h3",null,n().translator.trans("fof-sitemap.admin.settings.soft_404.heading")),m("p",{className:"helpText"},n().translator.trans("fof-sitemap.admin.settings.soft_404.help")),n().forum.attribute("fof-sitemap.usersIndexAvailable")?this.buildSettingComponent({type:"number",setting:"fof-sitemap.model.user.comments.minimum_item_threshold",label:n().translator.trans("fof-sitemap.admin.settings.soft_404.user.comments.minimum_item_threshold_label"),help:n().translator.trans("fof-sitemap.admin.settings.soft_404.user.comments.minimum_item_threshold_help"),min:0,required:!0}):null,n().initializers.has("flarum-tags")?this.buildSettingComponent({type:"number",setting:"fof-sitemap.model.tags.discussion.minimum_item_threshold",label:n().translator.trans("fof-sitemap.admin.settings.soft_404.tags.discussion.minimum_item_threshold_label"),help:n().translator.trans("fof-sitemap.admin.settings.soft_404.tags.discussion.minimum_item_threshold_help"),min:0,required:!0}):null),this.modeChoice(),m("hr",null),m("h3",null,n().translator.trans("fof-sitemap.admin.settings.advanced_options_label")),m("div",{className:"Form-group"},this.buildSettingComponent({type:"select",setting:"fof-sitemap.frequency",options:{hourly:n().translator.trans("fof-sitemap.admin.settings.frequency.hourly"),"twice-daily":n().translator.trans("fof-sitemap.admin.settings.frequency.twice_daily"),daily:n().translator.trans("fof-sitemap.admin.settings.frequency.daily")},label:n().translator.trans("fof-sitemap.admin.settings.frequency_label")})),this.buildSettingComponent({type:"switch",setting:"fof-sitemap.riskyPerformanceImprovements",label:n().translator.trans("fof-sitemap.admin.settings.risky_performance_improvements"),help:n().translator.trans("fof-sitemap.admin.settings.risky_performance_improvements_help")}),this.submitButton(t)))]},o.modeChoice=function(){return n().forum.attribute("fof-sitemap.modeChoice")?m("div",null,this.buildSettingComponent({type:"select",setting:"fof-sitemap.mode",options:{run:n().translator.trans("fof-sitemap.admin.settings.modes.runtime"),"multi-file":n().translator.trans("fof-sitemap.admin.settings.modes.multi_file")},label:n().translator.trans("fof-sitemap.admin.settings.mode_label")}),m("p",null,n().translator.trans("fof-sitemap.admin.settings.mode_help")),m("div",null,m("h3",null,n().translator.trans("fof-sitemap.admin.settings.mode_help_runtime_label")),m("p",null,n().translator.trans("fof-sitemap.admin.settings.mode_help_runtime"))),m("h4",null,n().translator.trans("fof-sitemap.admin.settings.mode_help_schedule")),m("p",null,n().translator.trans("fof-sitemap.admin.settings.mode_help_schedule_setup",{a:m("a",{href:"https://docs.flarum.org/console/#schedulerun",target:"_blank",rel:"noopener"})})),m("div",null,m("h3",null,n().translator.trans("fof-sitemap.admin.settings.mode_help_multi_label")),m("p",null,n().translator.trans("fof-sitemap.admin.settings.mode_help_multi")))):null},a}(t.n(a)());n().initializers.add("fof/sitemap",(function(){n().extensionData.for("fof-sitemap").registerPage(o)}))})(),module.exports=e})(); //# 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 ddd11b2..7b6977a 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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,cAAAA,IAAsB,eAAee,aAAa3B,EACnD,G","sources":["webpack://@fof/sitemap/webpack/bootstrap","webpack://@fof/sitemap/webpack/runtime/compat get default export","webpack://@fof/sitemap/webpack/runtime/define property getters","webpack://@fof/sitemap/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/sitemap/webpack/runtime/make namespace object","webpack://@fof/sitemap/external root \"flarum.core.compat['admin/app']\"","webpack://@fof/sitemap/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/sitemap/external root \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@fof/sitemap/./src/admin/components/SitemapSettingsPage.js","webpack://@fof/sitemap/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/sitemap/./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.core.compat['admin/app'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/ExtensionPage'];","import app from 'flarum/admin/app';\nimport ExtensionPage from 'flarum/admin/components/ExtensionPage';\n\nexport default class SitemapSettingsPage extends ExtensionPage {\n oninit(vnode) {\n super.oninit(vnode);\n }\n\n content(vnode) {\n const currentMode = this.setting('fof-sitemap.mode')();\n\n // Change setting value client-side so the Select reflects which option is effectively used\n if (currentMode === 'cache' || currentMode === 'cache-disk') {\n this.setting('fof-sitemap.mode')('multi-file');\n }\n\n return [\n
{app.translator.trans('fof-sitemap.admin.settings.mode_help')}
\n\n{app.translator.trans('fof-sitemap.admin.settings.mode_help_runtime')}
\n\n {app.translator.trans('fof-sitemap.admin.settings.mode_help_schedule_setup', {\n a: ,\n })}\n
\n{app.translator.trans('fof-sitemap.admin.settings.mode_help_multi')}
\n{app.translator.trans('fof-sitemap.admin.settings.soft_404.help')}
\n {app.forum.attribute('fof-sitemap.usersIndexAvailable')\n ? this.buildSettingComponent({\n type: 'number',\n setting: 'fof-sitemap.model.user.comments.minimum_item_threshold',\n label: app.translator.trans('fof-sitemap.admin.settings.soft_404.user.comments.minimum_item_threshold_label'),\n help: app.translator.trans('fof-sitemap.admin.settings.soft_404.user.comments.minimum_item_threshold_help'),\n min: 0,\n required: true,\n })\n : null}\n {app.initializers.has('flarum-tags')\n ? this.buildSettingComponent({\n type: 'number',\n setting: 'fof-sitemap.model.tags.discussion.minimum_item_threshold',\n label: app.translator.trans('fof-sitemap.admin.settings.soft_404.tags.discussion.minimum_item_threshold_label'),\n help: app.translator.trans('fof-sitemap.admin.settings.soft_404.tags.discussion.minimum_item_threshold_help'),\n min: 0,\n required: true,\n })\n : null}\n{app.translator.trans('fof-sitemap.admin.settings.mode_help')}
\n\n{app.translator.trans('fof-sitemap.admin.settings.mode_help_runtime')}
\n\n {app.translator.trans('fof-sitemap.admin.settings.mode_help_schedule_setup', {\n a: ,\n })}\n
\n{app.translator.trans('fof-sitemap.admin.settings.mode_help_multi')}
\n