diff --git a/js/dist/admin.js b/js/dist/admin.js index 9a6bd88..f651477 100644 --- a/js/dist/admin.js +++ b/js/dist/admin.js @@ -1,2 +1,2 @@ -module.exports=function(t){var n={};function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var r in t)e.d(o,r,function(n){return t[n]}.bind(null,r));return o},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=10)}([function(t,n){t.exports=flarum.core.compat["components/Button"]},function(t,n){t.exports=flarum.core.compat["utils/withAttr"]},function(t,n){t.exports=flarum.core.compat.app},function(t,n){t.exports=flarum.core.compat.extend},function(t,n){t.exports=flarum.core.compat["components/AdminNav"]},function(t,n){t.exports=flarum.core.compat["components/AdminLinkButton"]},function(t,n){t.exports=flarum.core.compat["components/Page"]},function(t,n){t.exports=flarum.core.compat["utils/saveSettings"]},function(t,n){t.exports=flarum.core.compat["components/Switch"]},function(t,n){t.exports=flarum.core.compat["utils/Stream"]},function(t,n,e){"use strict";e.r(n);var o=e(2),r=e.n(o),a=e(3),s=e(4),i=e.n(s),l=e(5),p=e.n(l);var u=e(0),d=e.n(u),c=e(6),f=e.n(c),y=e(7),h=e.n(y),b=e(8),g=e.n(b),v=e(1),x=e.n(v),$=e(9),_=e.n($),w=function(t){var n,e;function o(){return t.apply(this,arguments)||this}e=t,(n=o).prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e;var r=o.prototype;return r.oninit=function(n){var e=this;t.prototype.oninit.call(this,n),this.fields=["mailhtml","newPost","postMentioned","userMentioned","includeCSS"],this.values=[],this.settingsPrefix="fof-pretty-mail";var o=app.data.settings;this.fields.forEach((function(t){return e.values[t]=_()(o[e.addPrefix(t)])}))},r.view=function(){var t=this;return[m("div",{style:"padding-bottom: 20px",className:"SettingsPage"},[m("div",{className:"container"},[m("Form-group",[m("Form",{onsubmit:this.onsubmit.bind(this)},[m("h1",app.translator.trans("fof-pretty-mail.admin.settings.label")),m("div",{className:"helpText",style:"margin: 10px 0 10px"},app.translator.trans("fof-pretty-mail.admin.settings.help",{strong:m("strong",null)})),m("label",app.translator.trans("fof-pretty-mail.admin.settings.default")),m("br"),d.a.component({type:"button",style:"margin-bottom: 10px",className:"Button Button--primary",onclick:function(){confirm(app.translator.trans("fof-pretty-mail.admin.settings.confirm")+" default?")&&t.values.mailhtml('\n\n \n \n @if ($forumStyle !== \'\')\n \n @endif\n\n\n
\n
\n {{ $settings->get(\'forum_title\') }}\n
\n
\n
\n {!! $body !!}\n
\n\n\n')}},app.translator.trans("fof-pretty-mail.admin.settings.reset")),m("textarea.FormControl",{rows:"15",value:this.values.mailhtml(),style:"margin: 10px 0 10px",oninput:x()("value",this.values.mailhtml)}),m("h3",app.translator.trans("fof-pretty-mail.admin.settings.notifications")),m("div",{className:"helpText",style:"margin-top: 10px"},app.translator.trans("fof-pretty-mail.admin.settings.notificationHelp")),m("label",app.translator.trans("fof-pretty-mail.admin.settings.newPost")),m("br"),d.a.component({type:"button",style:"margin: 10px 0 10px",className:"Button Button--primary",onclick:function(){confirm(app.translator.trans("fof-pretty-mail.admin.settings.confirm")+" newPost?")&&t.values.newPost('\n\n \n \n \n\n\n
\n
\n {{ $settings->get(\'forum_title\') }}\n
\n
\n
\n
\n

Hey {!! $user->display_name !!}!

\n\n

{!! $blueprint->post->user->username !!} made a post in a discussion you\'re following: {!! $blueprint->post->discussion->title !!}

\n\n ---\n\n
\n
\n
\n {!! $blueprint->post->formatContent() !!}\n
\n
\n
\n ---\n\n

You won\'t receive any more notifications about this discussion until you\'re up-to-date.

\n
\n
\n\n\n')}},app.translator.trans("fof-pretty-mail.admin.settings.reset")),m("textarea.FormControl",{rows:"15",value:this.values.newPost(),style:"margin-bottom: 10px",oninput:x()("value",this.values.newPost)}),m("label",app.translator.trans("fof-pretty-mail.admin.settings.userMentioned")),m("br"),d.a.component({type:"button",style:"margin: 10px 0 10px",className:"Button Button--primary",onclick:function(){confirm(app.translator.trans("fof-pretty-mail.admin.settings.confirm")+" userMentioned?")&&t.values.userMentioned('\n\n \n \n \n\n\n
\n
\n {{ $settings->get(\'forum_title\') }}\n
\n
\n
\n
\n

Hey {!! $user->display_name !!}!

\n\n

{!! $blueprint->post->user->username !!} mentioned you in a post in {!! $blueprint->post->discussion->title !!}.

\n\n ---\n\n
\n
\n
\n {!! $blueprint->post->formatContent() !!}\n
\n
\n
\n\n\n')}},app.translator.trans("fof-pretty-mail.admin.settings.reset")),m("textarea.FormControl",{rows:"15",value:this.values.userMentioned(),style:"margin-bottom: 10px",oninput:x()("value",this.values.userMentioned)}),m("label",app.translator.trans("fof-pretty-mail.admin.settings.postMentioned")),m("br"),d.a.component({type:"button",style:"margin: 10px 0 10px",className:"Button Button--primary",onclick:function(){confirm(app.translator.trans("fof-pretty-mail.admin.settings.confirm")+" postMentioned?")&&t.values.postMentioned('\n\n \n \n \n\n\n
\n
\n {{ $settings->get(\'forum_title\') }}\n
\n
\n
\n
\n

Hey {!! $user->display_name !!}!

\n\n

{!! $blueprint->reply->user->username !!} replied to your post (#{!! $blueprint->post->number !!}) in {!! $blueprint->post->discussion->title !!}.

\n\n ---\n\n
\n
\n
\n {!! $blueprint->reply->formatContent() !!}\n
\n
\n
\n\n\n')}},app.translator.trans("fof-pretty-mail.admin.settings.reset")),m("textarea.FormControl",{rows:"15",value:this.values.postMentioned(),style:"margin-bottom: 10px",oninput:x()("value",this.values.postMentioned)}),m("h1",app.translator.trans("fof-pretty-mail.admin.css_settings.label")),m("div",{className:"helpText",style:"margin: 10px 0 10px"},app.translator.trans("fof-pretty-mail.admin.css_settings.help",{strong:m("strong",null)})),g.a.component({className:"Form-group",state:"1"===this.values.includeCSS(),onchange:function(n){return t.values.includeCSS(n?"1":"0")}},app.translator.trans("fof-pretty-mail.admin.css_settings.switch_label")),d.a.component({type:"submit",className:"Button Button--primary",loading:this.loading,disabled:!this.changed()},app.translator.trans("core.admin.settings.submit_button"))])])])])]},r.changed=function(){var t=this;return this.fields.some((function(n){return t.values[n]()!==app.data.settings[t.addPrefix(n)]}))},r.onsubmit=function(t){var n=this;if(t.preventDefault(),this.fields.forEach((function(t){return n.checkContent(t)})),!this.loading){this.loading=!0;var e={};this.fields.forEach((function(t){return e[n.addPrefix(t)]=n.values[t]()})),h()(e).then((function(){n.loading=!1,app.alerts.show({type:"success"},app.translator.trans("core.admin.basics.saved_message"))}))}},r.addPrefix=function(t){return this.settingsPrefix+"."+t},r.checkContent=function(t){this.values[t]().includes("$baseUrl")&&app.alerts.show({type:"warning"},t+": The use of $baseUrl is deprecated. Use $url->to('forum')->base() instead."),this.values[t]().includes("app()->url()")&&app.alerts.show({type:"error"},t+": app()->url() has been replaced. Use $url->to('forum')->base() instead.")},o}(f.a);r.a.initializers.add("fof-pretty-mail",(function(){app.routes["fof-pretty-mail"]={path:"/fof/pretty-mail",component:w},app.extensionSettings["fof-pretty-mail"]=function(){return m.route.set(app.route("fof-pretty-mail"))},Object(a.extend)(i.a.prototype,"items",(function(t){t.add("fof-pretty-mail",p.a.component({href:app.route("fof-pretty-mail"),icon:"fas fa-envelope-open",description:app.translator.trans("fof-pretty-mail.admin.nav.desc")},"Pretty Mail"))}))}))}]); +module.exports=function(t){var n={};function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var r in t)e.d(o,r,function(n){return t[n]}.bind(null,r));return o},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=10)}([function(t,n){t.exports=flarum.core.compat["components/Button"]},function(t,n){t.exports=flarum.core.compat["utils/withAttr"]},function(t,n){t.exports=flarum.core.compat.app},function(t,n){t.exports=flarum.core.compat.extend},function(t,n){t.exports=flarum.core.compat["components/AdminNav"]},function(t,n){t.exports=flarum.core.compat["components/AdminLinkButton"]},function(t,n){t.exports=flarum.core.compat["components/Page"]},function(t,n){t.exports=flarum.core.compat["utils/saveSettings"]},function(t,n){t.exports=flarum.core.compat["components/Switch"]},function(t,n){t.exports=flarum.core.compat["utils/Stream"]},function(t,n,e){"use strict";e.r(n);var o=e(2),r=e.n(o),a=e(3),s=e(4),i=e.n(s),l=e(5),p=e.n(l);var u=e(0),d=e.n(u),c=e(6),f=e.n(c),y=e(7),h=e.n(y),b=e(8),g=e.n(b),v=e(1),x=e.n(v),$=e(9),_=e.n($),w=function(t){var n,e;function o(){return t.apply(this,arguments)||this}e=t,(n=o).prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e;var r=o.prototype;return r.oninit=function(n){var e=this;t.prototype.oninit.call(this,n),this.fields=["mailhtml","newPost","postMentioned","userMentioned","includeCSS"],this.values=[],this.settingsPrefix="fof-pretty-mail";var o=app.data.settings;this.fields.forEach((function(t){return e.values[t]=_()(o[e.addPrefix(t)])}))},r.view=function(){var t=this;return[m("div",{style:"padding-bottom: 20px",className:"SettingsPage"},[m("div",{className:"container"},[m("Form-group",[m("Form",{onsubmit:this.onsubmit.bind(this)},[m("h1",app.translator.trans("fof-pretty-mail.admin.settings.label")),m("div",{className:"helpText",style:"margin: 10px 0 10px"},app.translator.trans("fof-pretty-mail.admin.settings.help",{strong:m("strong",null)})),m("label",app.translator.trans("fof-pretty-mail.admin.settings.default")),m("br"),d.a.component({type:"button",style:"margin-bottom: 10px",className:"Button Button--primary",onclick:function(){confirm(app.translator.trans("fof-pretty-mail.admin.settings.confirm")+" default?")&&t.values.mailhtml('\n\n \n \n @if ($forumStyle !== \'\')\n \n @endif\n\n\n
\n
\n {{ $settings->get(\'forum_title\') }}\n
\n
\n
\n {!! $body !!}\n
\n\n\n')}},app.translator.trans("fof-pretty-mail.admin.settings.reset")),m("textarea.FormControl",{rows:"15",value:this.values.mailhtml(),style:"margin: 10px 0 10px",oninput:x()("value",this.values.mailhtml)}),m("h3",app.translator.trans("fof-pretty-mail.admin.settings.notifications")),m("div",{className:"helpText",style:"margin-top: 10px"},app.translator.trans("fof-pretty-mail.admin.settings.notificationHelp")),m("label",app.translator.trans("fof-pretty-mail.admin.settings.newPost")),m("br"),d.a.component({type:"button",style:"margin: 10px 0 10px",className:"Button Button--primary",onclick:function(){confirm(app.translator.trans("fof-pretty-mail.admin.settings.confirm")+" newPost?")&&t.values.newPost('\n\n \n \n \n\n\n
\n
\n {{ $settings->get(\'forum_title\') }}\n
\n
\n
\n
\n

Hey {!! $user->display_name !!}!

\n\n

{!! $blueprint->post->user->username !!} made a post in a discussion you\'re following: {!! $blueprint->post->discussion->title !!}

\n\n ---\n\n
\n
\n
\n {!! $blueprint->post->formatContent() !!}\n
\n
\n
\n ---\n\n

You won\'t receive any more notifications about this discussion until you\'re up-to-date.

\n
\n
\n\n\n')}},app.translator.trans("fof-pretty-mail.admin.settings.reset")),m("textarea.FormControl",{rows:"15",value:this.values.newPost(),style:"margin-bottom: 10px",oninput:x()("value",this.values.newPost)}),m("label",app.translator.trans("fof-pretty-mail.admin.settings.userMentioned")),m("br"),d.a.component({type:"button",style:"margin: 10px 0 10px",className:"Button Button--primary",onclick:function(){confirm(app.translator.trans("fof-pretty-mail.admin.settings.confirm")+" userMentioned?")&&t.values.userMentioned('\n\n \n \n \n\n\n
\n
\n {{ $settings->get(\'forum_title\') }}\n
\n
\n
\n
\n

Hey {!! $user->display_name !!}!

\n\n

{!! $blueprint->post->user->username !!} mentioned you in a post in {!! $blueprint->post->discussion->title !!}.

\n\n ---\n\n
\n
\n
\n {!! $blueprint->post->formatContent() !!}\n
\n
\n
\n\n\n')}},app.translator.trans("fof-pretty-mail.admin.settings.reset")),m("textarea.FormControl",{rows:"15",value:this.values.userMentioned(),style:"margin-bottom: 10px",oninput:x()("value",this.values.userMentioned)}),m("label",app.translator.trans("fof-pretty-mail.admin.settings.postMentioned")),m("br"),d.a.component({type:"button",style:"margin: 10px 0 10px",className:"Button Button--primary",onclick:function(){confirm(app.translator.trans("fof-pretty-mail.admin.settings.confirm")+" postMentioned?")&&t.values.postMentioned('\n\n \n \n \n\n\n
\n
\n {{ $settings->get(\'forum_title\') }}\n
\n
\n
\n
\n

Hey {!! $user->display_name !!}!

\n\n

{!! $blueprint->reply->user->username !!} replied to your post (#{!! $blueprint->post->number !!}) in {!! $blueprint->post->discussion->title !!}.

\n\n ---\n\n
\n
\n
\n {!! $blueprint->reply->formatContent() !!}\n
\n
\n
\n\n\n')}},app.translator.trans("fof-pretty-mail.admin.settings.reset")),m("textarea.FormControl",{rows:"15",value:this.values.postMentioned(),style:"margin-bottom: 10px",oninput:x()("value",this.values.postMentioned)}),m("h1",app.translator.trans("fof-pretty-mail.admin.css_settings.label")),m("div",{className:"helpText",style:"margin: 10px 0 10px"},app.translator.trans("fof-pretty-mail.admin.css_settings.help",{strong:m("strong",null)})),g.a.component({className:"Form-group",state:"1"===this.values.includeCSS(),onchange:function(n){return t.values.includeCSS(n?"1":"0")}},app.translator.trans("fof-pretty-mail.admin.css_settings.switch_label")),d.a.component({type:"submit",className:"Button Button--primary",loading:this.loading,disabled:!this.changed()},app.translator.trans("core.admin.settings.submit_button"))])])])])]},r.changed=function(){var t=this;return this.fields.some((function(n){return t.values[n]()!==app.data.settings[t.addPrefix(n)]}))},r.onsubmit=function(t){var n=this;if(t.preventDefault(),!this.loading){this.loading=!0;var e={};this.fields.forEach((function(t){return e[n.addPrefix(t)]=n.values[t]()})),h()(e).then((function(){n.loading=!1,app.alerts.show({type:"success"},app.translator.trans("core.admin.basics.saved_message"))}))}},r.addPrefix=function(t){return this.settingsPrefix+"."+t},o}(f.a);r.a.initializers.add("fof-pretty-mail",(function(){app.routes["fof-pretty-mail"]={path:"/fof/pretty-mail",component:w},app.extensionSettings["fof-pretty-mail"]=function(){return m.route.set(app.route("fof-pretty-mail"))},Object(a.extend)(i.a.prototype,"items",(function(t){t.add("fof-pretty-mail",p.a.component({href:app.route("fof-pretty-mail"),icon:"fas fa-envelope-open",description:app.translator.trans("fof-pretty-mail.admin.nav.desc")},"Pretty Mail"))}))}))}]); //# 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 3391c5c..ae707db 100644 --- a/js/dist/admin.js.map +++ b/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@fof/pretty-mail/webpack/bootstrap","webpack://@fof/pretty-mail/external \"flarum.core.compat['components/Button']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['utils/withAttr']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['app']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['extend']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['components/AdminNav']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['components/AdminLinkButton']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['components/Page']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['utils/saveSettings']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['components/Switch']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['utils/Stream']\"","webpack://@fof/pretty-mail/./src/admin/components/SettingsPage.js","webpack://@fof/pretty-mail/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/pretty-mail/./src/admin/defaults.js","webpack://@fof/pretty-mail/./src/admin/index.js","webpack://@fof/pretty-mail/./src/admin/addSettingsPage.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","SettingsPage","subClass","superClass","constructor","__proto__","oninit","vnode","this","fields","values","settingsPrefix","settings","app","data","forEach","Stream","addPrefix","view","style","className","onsubmit","translator","trans","strong","Button","component","type","onclick","confirm","mailhtml","rows","oninput","withAttr","newPost","userMentioned","postMentioned","Switch","state","includeCSS","onchange","enabled","loading","disabled","changed","some","e","preventDefault","checkContent","saveSettings","then","alerts","show","includes","Page","initializers","add","routes","path","extensionSettings","route","set","extend","AdminNav","items","AdminLinkButton","href","icon","description"],"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,EA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mB,KAAKE,OAAOrB,KAAOgE,SAAS,aAC5BxC,IAAIsC,OAAOC,KAAK,CAAEzB,KAAM,WAAatC,EAAM,+EAE3CmB,KAAKE,OAAOrB,KAAOgE,SAAS,iBAC5BxC,IAAIsC,OAAOC,KAAK,CAAEzB,KAAM,SAAWtC,EAAM,6E,GApMXiE,KGN1CzC,IAAI0C,aAAaC,IAAI,mBAAmB,WCGpC3C,IAAI4C,OAAO,mBAAqB,CAAEC,KAAM,mBAAoBhC,UAAWzB,GAEvEY,IAAI8C,kBAAkB,mBAAqB,kBAAMzF,EAAE0F,MAAMC,IAAIhD,IAAI+C,MAAM,qBAEvEE,iBAAOC,IAASrE,UAAW,SAAS,SAAAsE,GAChCA,EAAMR,IACF,kBACAS,IAAgBvC,UACZ,CACIwC,KAAMrD,IAAI+C,MAAM,mBAChBO,KAAM,uBACNC,YAAavD,IAAIS,WAAWC,MAAM,mCAEtC","file":"admin.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 = 10);\n","module.exports = flarum.core.compat['components/Button'];","module.exports = flarum.core.compat['utils/withAttr'];","module.exports = flarum.core.compat['app'];","module.exports = flarum.core.compat['extend'];","module.exports = flarum.core.compat['components/AdminNav'];","module.exports = flarum.core.compat['components/AdminLinkButton'];","module.exports = flarum.core.compat['components/Page'];","module.exports = flarum.core.compat['utils/saveSettings'];","module.exports = flarum.core.compat['components/Switch'];","module.exports = flarum.core.compat['utils/Stream'];","import Button from 'flarum/components/Button';\r\nimport Page from 'flarum/components/Page';\r\nimport saveSettings from 'flarum/utils/saveSettings';\r\nimport Switch from 'flarum/components/Switch';\r\nimport withAttr from 'flarum/utils/withAttr';\r\nimport Stream from 'flarum/utils/Stream';\r\n\r\nimport * as defaults from '../defaults';\r\n\r\nexport default class SettingsPage extends Page {\r\n oninit(vnode) {\r\n super.oninit(vnode);\r\n this.fields = ['mailhtml', 'newPost', 'postMentioned', 'userMentioned', 'includeCSS'];\r\n\r\n this.values = [];\r\n\r\n this.settingsPrefix = 'fof-pretty-mail';\r\n\r\n const settings = app.data.settings;\r\n\r\n this.fields.forEach(key => (this.values[key] = Stream(settings[this.addPrefix(key)])));\r\n }\r\n\r\n view() {\r\n return [\r\n m('div', { style: 'padding-bottom: 20px', className: 'SettingsPage' }, [\r\n m('div', { className: 'container' }, [\r\n m('Form-group', [\r\n m('Form', { onsubmit: this.onsubmit.bind(this) }, [\r\n m('h1', app.translator.trans('fof-pretty-mail.admin.settings.label')),\r\n m(\r\n 'div',\r\n {\r\n className: 'helpText',\r\n style: 'margin: 10px 0 10px',\r\n },\r\n app.translator.trans('fof-pretty-mail.admin.settings.help', { strong: })\r\n ),\r\n m('label', app.translator.trans('fof-pretty-mail.admin.settings.default')),\r\n m('br'),\r\n Button.component(\r\n {\r\n type: 'button',\r\n style: 'margin-bottom: 10px',\r\n className: 'Button Button--primary',\r\n onclick: () => {\r\n if (confirm(app.translator.trans('fof-pretty-mail.admin.settings.confirm') + ' default?')) {\r\n this.values.mailhtml(defaults.mailto);\r\n }\r\n },\r\n },\r\n app.translator.trans('fof-pretty-mail.admin.settings.reset')\r\n ),\r\n m('textarea.FormControl', {\r\n rows: '15',\r\n value: this.values.mailhtml(),\r\n style: 'margin: 10px 0 10px',\r\n oninput: withAttr('value', this.values.mailhtml),\r\n }),\r\n m('h3', app.translator.trans('fof-pretty-mail.admin.settings.notifications')),\r\n m(\r\n 'div',\r\n {\r\n className: 'helpText',\r\n style: 'margin-top: 10px',\r\n },\r\n app.translator.trans('fof-pretty-mail.admin.settings.notificationHelp')\r\n ),\r\n m('label', app.translator.trans('fof-pretty-mail.admin.settings.newPost')),\r\n m('br'),\r\n Button.component(\r\n {\r\n type: 'button',\r\n style: 'margin: 10px 0 10px',\r\n className: 'Button Button--primary',\r\n onclick: () => {\r\n if (confirm(app.translator.trans('fof-pretty-mail.admin.settings.confirm') + ' newPost?')) {\r\n this.values.newPost(defaults.newPost);\r\n }\r\n },\r\n },\r\n app.translator.trans('fof-pretty-mail.admin.settings.reset')\r\n ),\r\n m('textarea.FormControl', {\r\n rows: '15',\r\n value: this.values.newPost(),\r\n style: 'margin-bottom: 10px',\r\n oninput: withAttr('value', this.values.newPost),\r\n }),\r\n m('label', app.translator.trans('fof-pretty-mail.admin.settings.userMentioned')),\r\n m('br'),\r\n Button.component(\r\n {\r\n type: 'button',\r\n style: 'margin: 10px 0 10px',\r\n className: 'Button Button--primary',\r\n onclick: () => {\r\n if (confirm(app.translator.trans('fof-pretty-mail.admin.settings.confirm') + ' userMentioned?')) {\r\n this.values.userMentioned(defaults.userMentioned);\r\n }\r\n },\r\n },\r\n app.translator.trans('fof-pretty-mail.admin.settings.reset')\r\n ),\r\n m('textarea.FormControl', {\r\n rows: '15',\r\n value: this.values.userMentioned(),\r\n style: 'margin-bottom: 10px',\r\n oninput: withAttr('value', this.values.userMentioned),\r\n }),\r\n m('label', app.translator.trans('fof-pretty-mail.admin.settings.postMentioned')),\r\n m('br'),\r\n Button.component(\r\n {\r\n type: 'button',\r\n style: 'margin: 10px 0 10px',\r\n className: 'Button Button--primary',\r\n onclick: () => {\r\n if (confirm(app.translator.trans('fof-pretty-mail.admin.settings.confirm') + ' postMentioned?')) {\r\n this.values.postMentioned(defaults.postMentioned);\r\n }\r\n },\r\n },\r\n app.translator.trans('fof-pretty-mail.admin.settings.reset')\r\n ),\r\n m('textarea.FormControl', {\r\n rows: '15',\r\n value: this.values.postMentioned(),\r\n style: 'margin-bottom: 10px',\r\n oninput: withAttr('value', this.values.postMentioned),\r\n }),\r\n m('h1', app.translator.trans('fof-pretty-mail.admin.css_settings.label')),\r\n m(\r\n 'div',\r\n {\r\n className: 'helpText',\r\n style: 'margin: 10px 0 10px',\r\n },\r\n app.translator.trans('fof-pretty-mail.admin.css_settings.help', { strong: })\r\n ),\r\n Switch.component(\r\n {\r\n className: 'Form-group',\r\n state: this.values.includeCSS() === '1',\r\n onchange: enabled => this.values.includeCSS(enabled ? '1' : '0'),\r\n },\r\n app.translator.trans('fof-pretty-mail.admin.css_settings.switch_label')\r\n ),\r\n Button.component(\r\n {\r\n type: 'submit',\r\n className: 'Button Button--primary',\r\n loading: this.loading,\r\n disabled: !this.changed(),\r\n },\r\n app.translator.trans('core.admin.settings.submit_button')\r\n ),\r\n ]),\r\n ]),\r\n ]),\r\n ]),\r\n ];\r\n }\r\n\r\n /**\r\n * @returns {boolean}\r\n */\r\n changed() {\r\n var fieldsCheck = this.fields.some(key => this.values[key]() !== app.data.settings[this.addPrefix(key)]);\r\n return fieldsCheck;\r\n }\r\n\r\n /**\r\n * @param e\r\n */\r\n onsubmit(e) {\r\n e.preventDefault();\r\n this.fields.forEach(key => this.checkContent(key));\r\n\r\n if (this.loading) return;\r\n\r\n this.loading = true;\r\n\r\n const settings = {};\r\n\r\n this.fields.forEach(key => (settings[this.addPrefix(key)] = this.values[key]()));\r\n\r\n saveSettings(settings).then(() => {\r\n this.loading = false;\r\n app.alerts.show({ type: 'success' }, app.translator.trans('core.admin.basics.saved_message'));\r\n });\r\n }\r\n\r\n /**\r\n * @returns string\r\n */\r\n addPrefix(key) {\r\n return this.settingsPrefix + '.' + key;\r\n }\r\n\r\n checkContent(key) {\r\n if (this.values[key]().includes('$baseUrl')) {\r\n app.alerts.show({ type: 'warning' }, key + \": The use of $baseUrl is deprecated. Use $url->to('forum')->base() instead.\");\r\n }\r\n if (this.values[key]().includes('app()->url()')) {\r\n app.alerts.show({ type: 'error' }, key + \": app()->url() has been replaced. Use $url->to('forum')->base() instead.\");\r\n }\r\n }\r\n}\r\n","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","export const mailto = `\r\n\r\n \r\n \r\n @if ($forumStyle !== '')\r\n \r\n @endif\r\n\r\n\r\n\r\n
\r\n {!! $body !!}\r\n
\r\n
\r\n
\r\n

Sent from {{ $settings->get('forum_title') }} using FoF Pretty Mail

\r\n
\r\n
\r\n\r\n`;\r\n\r\nexport const newPost = `\r\n\r\n \r\n \r\n \r\n\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n {!! $blueprint->post->formatContent() !!}\r\n
\r\n
\r\n
\r\n ---\r\n\r\n

You won't receive any more notifications about this discussion until you're up-to-date.

\r\n
\r\n
\r\n
\r\n
\r\n

Sent from {{ $settings->get('forum_title') }} using FoF Pretty Mail

\r\n
\r\n
\r\n\r\n`;\r\n\r\nexport const userMentioned = `\r\n\r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n
\r\n
\r\n

Sent from {{ $settings->get('forum_title') }} using FoF Pretty Mail

\r\n
\r\n
\r\n\r\n`;\r\n\r\nexport const postMentioned = `\r\n\r\n \r\n \r\n \r\n\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n {!! $blueprint->reply->formatContent() !!}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Sent from {{ $settings->get('forum_title') }} using FoF Pretty Mail

\r\n
\r\n
\r\n\r\n`;\r\n","import app from 'flarum/app';\r\nimport addSettingsPage from './addSettingsPage';\r\n\r\napp.initializers.add('fof-pretty-mail', () => {\r\n // Add a settings pane for the extension\r\n addSettingsPage();\r\n});\r\n","import { extend } from 'flarum/extend';\r\nimport AdminNav from 'flarum/components/AdminNav';\r\nimport AdminLinkButton from 'flarum/components/AdminLinkButton';\r\nimport SettingsPage from './components/SettingsPage';\r\n\r\nexport default function() {\r\n app.routes['fof-pretty-mail'] = { path: '/fof/pretty-mail', component: SettingsPage };\r\n\r\n app.extensionSettings['fof-pretty-mail'] = () => m.route.set(app.route('fof-pretty-mail'));\r\n\r\n extend(AdminNav.prototype, 'items', items => {\r\n items.add(\r\n 'fof-pretty-mail',\r\n AdminLinkButton.component(\r\n {\r\n href: app.route('fof-pretty-mail'),\r\n icon: 'fas fa-envelope-open',\r\n description: app.translator.trans('fof-pretty-mail.admin.nav.desc'),\r\n },\r\n 'Pretty Mail'\r\n )\r\n );\r\n });\r\n}\r\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@fof/pretty-mail/webpack/bootstrap","webpack://@fof/pretty-mail/external \"flarum.core.compat['components/Button']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['utils/withAttr']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['app']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['extend']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['components/AdminNav']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['components/AdminLinkButton']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['components/Page']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['utils/saveSettings']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['components/Switch']\"","webpack://@fof/pretty-mail/external \"flarum.core.compat['utils/Stream']\"","webpack://@fof/pretty-mail/./src/admin/components/SettingsPage.js","webpack://@fof/pretty-mail/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/pretty-mail/./src/admin/defaults.js","webpack://@fof/pretty-mail/./src/admin/index.js","webpack://@fof/pretty-mail/./src/admin/addSettingsPage.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","SettingsPage","subClass","superClass","constructor","__proto__","oninit","vnode","this","fields","values","settingsPrefix","settings","app","data","forEach","Stream","addPrefix","view","style","className","onsubmit","translator","trans","strong","Button","component","type","onclick","confirm","mailhtml","rows","oninput","withAttr","newPost","userMentioned","postMentioned","Switch","state","includeCSS","onchange","enabled","loading","disabled","changed","some","e","preventDefault","saveSettings","then","alerts","show","Page","initializers","add","routes","path","extensionSettings","route","set","extend","AdminNav","items","AdminLinkButton","href","icon","description"],"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,EA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AM,gD,EAYjDqB,QAAA,WAAU,WAEN,OADkBpC,KAAKC,OAAOoC,MAAK,SAAAxD,GAAG,OAAI,EAAKqB,OAAOrB,OAAWwB,IAAIC,KAAKF,SAAS,EAAKK,UAAU5B,Q,EAOtGgC,SAAA,SAASyB,GAAG,WAGR,GAFAA,EAAEC,kBAEEvC,KAAKkC,QAAT,CAEAlC,KAAKkC,SAAU,EAEf,IAAM9B,EAAW,GAEjBJ,KAAKC,OAAOM,SAAQ,SAAA1B,GAAG,OAAKuB,EAAS,EAAKK,UAAU5B,IAAQ,EAAKqB,OAAOrB,QAExE2D,IAAapC,GAAUqC,MAAK,WACxB,EAAKP,SAAU,EACf7B,IAAIqC,OAAOC,KAAK,CAAExB,KAAM,WAAad,IAAIS,WAAWC,MAAM,yC,EAOlEN,UAAA,SAAU5B,GACN,OAAOmB,KAAKG,eAAiB,IAAMtB,G,GA3LD+D,KGN1CvC,IAAIwC,aAAaC,IAAI,mBAAmB,WCGpCzC,IAAI0C,OAAO,mBAAqB,CAAEC,KAAM,mBAAoB9B,UAAWzB,GAEvEY,IAAI4C,kBAAkB,mBAAqB,kBAAMvF,EAAEwF,MAAMC,IAAI9C,IAAI6C,MAAM,qBAEvEE,iBAAOC,IAASnE,UAAW,SAAS,SAAAoE,GAChCA,EAAMR,IACF,kBACAS,IAAgBrC,UACZ,CACIsC,KAAMnD,IAAI6C,MAAM,mBAChBO,KAAM,uBACNC,YAAarD,IAAIS,WAAWC,MAAM,mCAEtC","file":"admin.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 = 10);\n","module.exports = flarum.core.compat['components/Button'];","module.exports = flarum.core.compat['utils/withAttr'];","module.exports = flarum.core.compat['app'];","module.exports = flarum.core.compat['extend'];","module.exports = flarum.core.compat['components/AdminNav'];","module.exports = flarum.core.compat['components/AdminLinkButton'];","module.exports = flarum.core.compat['components/Page'];","module.exports = flarum.core.compat['utils/saveSettings'];","module.exports = flarum.core.compat['components/Switch'];","module.exports = flarum.core.compat['utils/Stream'];","import Button from 'flarum/components/Button';\r\nimport Page from 'flarum/components/Page';\r\nimport saveSettings from 'flarum/utils/saveSettings';\r\nimport Switch from 'flarum/components/Switch';\r\nimport withAttr from 'flarum/utils/withAttr';\r\nimport Stream from 'flarum/utils/Stream';\r\n\r\nimport * as defaults from '../defaults';\r\n\r\nexport default class SettingsPage extends Page {\r\n oninit(vnode) {\r\n super.oninit(vnode);\r\n this.fields = ['mailhtml', 'newPost', 'postMentioned', 'userMentioned', 'includeCSS'];\r\n\r\n this.values = [];\r\n\r\n this.settingsPrefix = 'fof-pretty-mail';\r\n\r\n const settings = app.data.settings;\r\n\r\n this.fields.forEach(key => (this.values[key] = Stream(settings[this.addPrefix(key)])));\r\n }\r\n\r\n view() {\r\n return [\r\n m('div', { style: 'padding-bottom: 20px', className: 'SettingsPage' }, [\r\n m('div', { className: 'container' }, [\r\n m('Form-group', [\r\n m('Form', { onsubmit: this.onsubmit.bind(this) }, [\r\n m('h1', app.translator.trans('fof-pretty-mail.admin.settings.label')),\r\n m(\r\n 'div',\r\n {\r\n className: 'helpText',\r\n style: 'margin: 10px 0 10px',\r\n },\r\n app.translator.trans('fof-pretty-mail.admin.settings.help', { strong: })\r\n ),\r\n m('label', app.translator.trans('fof-pretty-mail.admin.settings.default')),\r\n m('br'),\r\n Button.component(\r\n {\r\n type: 'button',\r\n style: 'margin-bottom: 10px',\r\n className: 'Button Button--primary',\r\n onclick: () => {\r\n if (confirm(app.translator.trans('fof-pretty-mail.admin.settings.confirm') + ' default?')) {\r\n this.values.mailhtml(defaults.mailto);\r\n }\r\n },\r\n },\r\n app.translator.trans('fof-pretty-mail.admin.settings.reset')\r\n ),\r\n m('textarea.FormControl', {\r\n rows: '15',\r\n value: this.values.mailhtml(),\r\n style: 'margin: 10px 0 10px',\r\n oninput: withAttr('value', this.values.mailhtml),\r\n }),\r\n m('h3', app.translator.trans('fof-pretty-mail.admin.settings.notifications')),\r\n m(\r\n 'div',\r\n {\r\n className: 'helpText',\r\n style: 'margin-top: 10px',\r\n },\r\n app.translator.trans('fof-pretty-mail.admin.settings.notificationHelp')\r\n ),\r\n m('label', app.translator.trans('fof-pretty-mail.admin.settings.newPost')),\r\n m('br'),\r\n Button.component(\r\n {\r\n type: 'button',\r\n style: 'margin: 10px 0 10px',\r\n className: 'Button Button--primary',\r\n onclick: () => {\r\n if (confirm(app.translator.trans('fof-pretty-mail.admin.settings.confirm') + ' newPost?')) {\r\n this.values.newPost(defaults.newPost);\r\n }\r\n },\r\n },\r\n app.translator.trans('fof-pretty-mail.admin.settings.reset')\r\n ),\r\n m('textarea.FormControl', {\r\n rows: '15',\r\n value: this.values.newPost(),\r\n style: 'margin-bottom: 10px',\r\n oninput: withAttr('value', this.values.newPost),\r\n }),\r\n m('label', app.translator.trans('fof-pretty-mail.admin.settings.userMentioned')),\r\n m('br'),\r\n Button.component(\r\n {\r\n type: 'button',\r\n style: 'margin: 10px 0 10px',\r\n className: 'Button Button--primary',\r\n onclick: () => {\r\n if (confirm(app.translator.trans('fof-pretty-mail.admin.settings.confirm') + ' userMentioned?')) {\r\n this.values.userMentioned(defaults.userMentioned);\r\n }\r\n },\r\n },\r\n app.translator.trans('fof-pretty-mail.admin.settings.reset')\r\n ),\r\n m('textarea.FormControl', {\r\n rows: '15',\r\n value: this.values.userMentioned(),\r\n style: 'margin-bottom: 10px',\r\n oninput: withAttr('value', this.values.userMentioned),\r\n }),\r\n m('label', app.translator.trans('fof-pretty-mail.admin.settings.postMentioned')),\r\n m('br'),\r\n Button.component(\r\n {\r\n type: 'button',\r\n style: 'margin: 10px 0 10px',\r\n className: 'Button Button--primary',\r\n onclick: () => {\r\n if (confirm(app.translator.trans('fof-pretty-mail.admin.settings.confirm') + ' postMentioned?')) {\r\n this.values.postMentioned(defaults.postMentioned);\r\n }\r\n },\r\n },\r\n app.translator.trans('fof-pretty-mail.admin.settings.reset')\r\n ),\r\n m('textarea.FormControl', {\r\n rows: '15',\r\n value: this.values.postMentioned(),\r\n style: 'margin-bottom: 10px',\r\n oninput: withAttr('value', this.values.postMentioned),\r\n }),\r\n m('h1', app.translator.trans('fof-pretty-mail.admin.css_settings.label')),\r\n m(\r\n 'div',\r\n {\r\n className: 'helpText',\r\n style: 'margin: 10px 0 10px',\r\n },\r\n app.translator.trans('fof-pretty-mail.admin.css_settings.help', { strong: })\r\n ),\r\n Switch.component(\r\n {\r\n className: 'Form-group',\r\n state: this.values.includeCSS() === '1',\r\n onchange: enabled => this.values.includeCSS(enabled ? '1' : '0'),\r\n },\r\n app.translator.trans('fof-pretty-mail.admin.css_settings.switch_label')\r\n ),\r\n Button.component(\r\n {\r\n type: 'submit',\r\n className: 'Button Button--primary',\r\n loading: this.loading,\r\n disabled: !this.changed(),\r\n },\r\n app.translator.trans('core.admin.settings.submit_button')\r\n ),\r\n ]),\r\n ]),\r\n ]),\r\n ]),\r\n ];\r\n }\r\n\r\n /**\r\n * @returns {boolean}\r\n */\r\n changed() {\r\n var fieldsCheck = this.fields.some(key => this.values[key]() !== app.data.settings[this.addPrefix(key)]);\r\n return fieldsCheck;\r\n }\r\n\r\n /**\r\n * @param e\r\n */\r\n onsubmit(e) {\r\n e.preventDefault();\r\n\r\n if (this.loading) return;\r\n\r\n this.loading = true;\r\n\r\n const settings = {};\r\n\r\n this.fields.forEach(key => (settings[this.addPrefix(key)] = this.values[key]()));\r\n\r\n saveSettings(settings).then(() => {\r\n this.loading = false;\r\n app.alerts.show({ type: 'success' }, app.translator.trans('core.admin.basics.saved_message'));\r\n });\r\n }\r\n\r\n /**\r\n * @returns string\r\n */\r\n addPrefix(key) {\r\n return this.settingsPrefix + '.' + key;\r\n }\r\n}\r\n","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","export const mailto = `\r\n\r\n \r\n \r\n @if ($forumStyle !== '')\r\n \r\n @endif\r\n\r\n\r\n\r\n
\r\n {!! $body !!}\r\n
\r\n
\r\n
\r\n

Sent from {{ $settings->get('forum_title') }} using FoF Pretty Mail

\r\n
\r\n
\r\n\r\n`;\r\n\r\nexport const newPost = `\r\n\r\n \r\n \r\n \r\n\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n {!! $blueprint->post->formatContent() !!}\r\n
\r\n
\r\n
\r\n ---\r\n\r\n

You won't receive any more notifications about this discussion until you're up-to-date.

\r\n
\r\n
\r\n
\r\n
\r\n

Sent from {{ $settings->get('forum_title') }} using FoF Pretty Mail

\r\n
\r\n
\r\n\r\n`;\r\n\r\nexport const userMentioned = `\r\n\r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n
\r\n
\r\n

Sent from {{ $settings->get('forum_title') }} using FoF Pretty Mail

\r\n
\r\n
\r\n\r\n`;\r\n\r\nexport const postMentioned = `\r\n\r\n \r\n \r\n \r\n\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n {!! $blueprint->reply->formatContent() !!}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Sent from {{ $settings->get('forum_title') }} using FoF Pretty Mail

\r\n
\r\n
\r\n\r\n`;\r\n","import app from 'flarum/app';\r\nimport addSettingsPage from './addSettingsPage';\r\n\r\napp.initializers.add('fof-pretty-mail', () => {\r\n // Add a settings pane for the extension\r\n addSettingsPage();\r\n});\r\n","import { extend } from 'flarum/extend';\r\nimport AdminNav from 'flarum/components/AdminNav';\r\nimport AdminLinkButton from 'flarum/components/AdminLinkButton';\r\nimport SettingsPage from './components/SettingsPage';\r\n\r\nexport default function() {\r\n app.routes['fof-pretty-mail'] = { path: '/fof/pretty-mail', component: SettingsPage };\r\n\r\n app.extensionSettings['fof-pretty-mail'] = () => m.route.set(app.route('fof-pretty-mail'));\r\n\r\n extend(AdminNav.prototype, 'items', items => {\r\n items.add(\r\n 'fof-pretty-mail',\r\n AdminLinkButton.component(\r\n {\r\n href: app.route('fof-pretty-mail'),\r\n icon: 'fas fa-envelope-open',\r\n description: app.translator.trans('fof-pretty-mail.admin.nav.desc'),\r\n },\r\n 'Pretty Mail'\r\n )\r\n );\r\n });\r\n}\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/js/src/admin/components/SettingsPage.js b/js/src/admin/components/SettingsPage.js index 071efd0..f0f9b81 100644 --- a/js/src/admin/components/SettingsPage.js +++ b/js/src/admin/components/SettingsPage.js @@ -175,7 +175,6 @@ export default class SettingsPage extends Page { */ onsubmit(e) { e.preventDefault(); - this.fields.forEach(key => this.checkContent(key)); if (this.loading) return; @@ -197,13 +196,4 @@ export default class SettingsPage extends Page { addPrefix(key) { return this.settingsPrefix + '.' + key; } - - checkContent(key) { - if (this.values[key]().includes('$baseUrl')) { - app.alerts.show({ type: 'warning' }, key + ": The use of $baseUrl is deprecated. Use $url->to('forum')->base() instead."); - } - if (this.values[key]().includes('app()->url()')) { - app.alerts.show({ type: 'error' }, key + ": app()->url() has been replaced. Use $url->to('forum')->base() instead."); - } - } }