From d63d3d4be53abbbad31f6e4d27c114f46eabd62e Mon Sep 17 00:00:00 2001 From: flarum-bot Date: Tue, 25 Feb 2025 09:37:39 +0000 Subject: [PATCH] Bundled output for commit 37a9785e217791ff60885a35325adcbacac09725 Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci] --- js/dist/admin.js | 2 +- js/dist/admin.js.map | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/dist/admin.js b/js/dist/admin.js index 4fc884b..0d61636 100644 --- a/js/dist/admin.js +++ b/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};(()=>{"use strict";const t=flarum.core.compat.app;var s=e.n(t);const n=flarum.core.compat.extend,o=flarum.core.compat["components/DashboardPage"];var a=e.n(o);function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,i(e,t)}const l=flarum.core.compat["components/DashboardWidget"];var u=e.n(l);const c=flarum.core.compat["components/Button"];var d=e.n(c),h=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var s=t.prototype;return s.oninit=function(t){e.prototype.oninit.call(this,t),this.needsReview=!1,void 0===app.data.settings.seo_review_settings&&(this.needsReview=!0),!this.needsReview&&Math.floor(Date.now()/1e3)>app.data.settings.seo_review_settings&&(this.needsReview=!0)},s.className=function(){return"SeoWidget "+(this.needsReview?"needs-review":"")},s.content=function(){return m("div",null,m("i",{className:"fas fa-check seo-check-icon"})," It's time to review your SEO settings!",d().component({className:"",icon:"far fa-thumbs-up",onclick:function(){return m.route.set("extension/v17development-seo")}},"Do the health-check!"))},t}(u());const p=flarum.core.compat["components/ExtensionPage"];var f=e.n(p);const g=flarum.core.compat["common/Component"];var v=e.n(g);const w=flarum.core.compat["components/FieldSet"];var b=e.n(w);const y=flarum.core.compat["utils/saveSettings"];var x=e.n(y);const _=flarum.core.compat["components/Switch"];var k=e.n(_);const S=flarum.core.compat["components/UploadImageButton"];var N=e.n(S);const F=flarum.core.compat["components/Modal"];var D=e.n(F),B=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var s=t.prototype;return s.oninit=function(t){e.prototype.oninit.call(this,t),this.value=void 0!==app.data.settings.seo_post_crawler&&app.data.settings.seo_post_crawler,this.startValue=this.value,this.closeText="Close",this.loading=!1,void 0===app.data.settings.seo_reviewed_post_crawler&&this.saveReviewedPostCrawler()},s.title=function(){return"Post crawl settings"},s.content=function(){var e=this;return m("div",null,m("div",{className:"Modal-body"},m("div",{className:"Form"},m("b",null,"Read this dialog carefully.")," This function will only be executed on a page refresh on a discussion. You can always change this option later.",m("div",{style:"padding: 10px 0;"},m("b",{style:"display: block; padding-bottom: 10px;"},m("span",{style:"display: inline-block; width: 25px;"},m("i",{className:"fas fa-check"})),"Only index the main post (default)"),"Search engine will only show the main post in the search results. It won't affect loading speed when you navigate to it via forum links."),m("div",{style:"padding: 10px 0;"},m("b",{style:"display: block; padding-bottom: 10px;"},m("span",{style:"display: inline-block; width: 25px;"},m("i",{className:"fas fa-check-double"}))," Index all posts in a discussion (setting enabled)"),"Search engines will understand the discussions and are even able to show some relevant posts underneath the search results. When you have the extension '",m("a",{href:"https://discuss.flarum.org/d/21894-friendsofflarum-best-answer",target:"_blank"},"best answer"),"' installed and enabled on your forum, it will mark the discussion as 'answered' on the search results and redirect the user to that specific post. ",m("b",null,"However, depending on your server settings, this can be heavier"),". It may cost some performance, so it depends on how fast your server is to enable this feature."))),m("div",{style:"padding: 25px 30px; text-align: center;"},m("b",{style:"display: block; padding-bottom: 10px;"},"Do you want to enable this feature?"),m("div",{style:"display: inline-block;"},k().component({state:"1"==this.value,onchange:function(t){return e.change(t)}},"Crawl all posts (it's slower on page refresh, but search results will be better)"))),m("div",{style:"padding: 25px 30px; text-align: center;"},this.closeDialogButton()))},s.change=function(e){this.value=e,this.closeText=this.value!==this.startValue?"Save changes":"Close"},s.closeDialogButton=function(){return m(d(),{type:"submit",className:"Button Button--primary",loading:this.loading},this.closeText)},s.onsubmit=function(e){if(this.value!==this.startValue){this.loading=!0;var t={};t.seo_post_crawler=this.value,x()(t).then(this.onsaved.bind(this))}else this.hide()},s.saveReviewedPostCrawler=function(){var e=this;this.loading=!0;x()({seo_reviewed_post_crawler:!0}).then((function(){e.loading=!1,m.redraw()}))},s.onsaved=function(){this.hide()},t}(D()),T=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var s=t.prototype;return s.oninit=function(t){e.prototype.oninit.call(this,t),this.value=void 0===app.data.settings.seo_robots_text?"":app.data.settings.seo_robots_text,this.startValue=this.value,this.closeText="Close",this.loading=!1},s.title=function(){return"Custom robots.txt"},s.content=function(){var e=this;return m("div",null,m("div",{className:"Modal-body"},m("textarea",{className:"FormControl",value:this.value,placeholder:"Add text to the robots.txt",rows:15,oninput:function(t){e.change(t.target.value)}})),m("div",{style:"padding: 25px 30px; text-align: center;"},this.closeDialogButton()))},s.change=function(e){this.value=e,this.closeText=this.value!==this.startValue?"Save changes":"Close"},s.closeDialogButton=function(){return m(d(),{type:"submit",className:"Button Button--primary",loading:this.loading},this.closeText)},s.onsubmit=function(e){if(this.value!==this.startValue){this.loading=!0;var t={};t.seo_robots_text=this.value,x()(t).then(this.onsaved.bind(this))}else this.hide()},s.onsaved=function(){this.hide()},t}(D());function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,n=Array(t);s=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.split(","));!(t=n()).done;)if(t.value.split(" ").length>4){s=!1;break}return s}const O=flarum.core.compat["utils/Stream"];var C=e.n(O),I=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var s=t.prototype;return s.oninit=function(t){e.prototype.oninit.call(this,t),this.domainDoFollowList=[],this.baseUrl=this.getDomainFromBase(),this.domainDoFollowList=void 0===app.data.settings.seo_dofollow_domains?C()([]):C()(JSON.parse(app.data.settings.seo_dofollow_domains)),this.startValue=this.domainDoFollowList,this.newDomain=C()(""),this.hasChanges=!1,this.loading=!1},s.title=function(){return"Do-follow list"},s.getDomainFromBase=function(){var e=new URL(app.forum.data.attributes.baseUrl).hostname.split(".");return e.slice(Math.max(e.length-2,0)).join(".")},s.content=function(){var e=this;return m("div",null,m("div",{className:"Modal-body"},m("p",null,"Enter the ",m("b",null,"hostnames")," of the domains you want to add to the do-follow list."),m("p",null,"The domain you use for your Flarum instance is added to the list by default."),m("p",{style:{marginBottom:"15px"}},m("a",{href:"https://community.v17.dev/knowledgebase/36",target:"_blank"},"Learn more")," about the do-follow list."),m("div",{className:"FlarumSEO-DoFollowList"},m("input",{type:"text",value:this.baseUrl,readonly:!0,className:"FormControl"}),m(d(),{className:"Button",icon:"fas fa-times",disabled:!0})),this.domainDoFollowList().map((function(t,s){return m("div",{className:"FlarumSEO-DoFollowList"},m("input",{type:"text",value:t,onkeyup:function(t){return e.updateDomain(s,t.target.value)},className:"FormControl"}),m(d(),{className:"Button",icon:"fas fa-times",onclick:function(){return e.removeDomain(s)}}))})),m("div",{className:"FlarumSEO-DoFollowList"},m("input",{type:"text",bidi:this.newDomain,placeholder:"Allow a domain",onkeydown:function(t){13===t.keyCode&&""!==e.newDomain()&&(t.preventDefault(),e.addDomain())},className:"FormControl"}),m(d(),{className:"Button "+(""!==this.newDomain()?"Button--primary":""),icon:"fas fa-plus",onclick:this.addDomain.bind(this)}))),m("div",{style:"padding: 25px 30px; text-align: center;"},m(d(),{type:"submit",className:"Button Button--primary",loading:this.loading},this.hasChanges?"Save changes":"Close")))},s.addDomain=function(){if(this.domainDoFollowList().indexOf(this.newDomain())>=0)return alert("This domain is already present in your do-follow list."),void this.newDomain("");var e=[].concat(this.domainDoFollowList());e.push(this.newDomain()),this.domainDoFollowList(e),this.newDomain(""),this.hasChanges=!0},s.removeDomain=function(e){var t=[].concat(this.domainDoFollowList());t.splice(e,1),this.domainDoFollowList(t),this.hasChanges=!0},s.updateDomain=function(e,t){var s=[].concat(this.domainDoFollowList());s[e]=t,this.domainDoFollowList(s),this.hasChanges=!0},s.onsubmit=function(e){if(this.hasChanges){this.loading=!0;var t={};t.seo_dofollow_domains=JSON.stringify(this.domainDoFollowList().filter((function(e){return""!==e}))),x()(t).then(this.onsaved.bind(this))}else this.hide()},s.onsaved=function(){this.hide()},t}(D());const P=flarum.core.compat["components/Select"];var A=e.n(P),Y=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var s=t.prototype;return s.oninit=function(t){var s=this;e.prototype.oninit.call(this,t),this.saving=!1,this.fields=["forum_title","forum_description","forum_keywords","seo_allow_all_bots","seo_twitter_card_size"],this.values={};var n=app.data.settings;this.fields.forEach((function(e){return s.values[e]=C()(n[e]||"")})),this.allowBotsValue="0"!==n.seo_allow_all_bots,app.forum.data.attributes.seo_social_media_imageUrl=app.data.settings.seo_social_media_image_url,this.showField="all",void 0!==m.route.param("setting")&&(this.showField=m.route.param("setting"))},s.view=function(){var e=this;return m("div",null,this.infoText(),m("form",{onsubmit:this.onsubmit.bind(this),className:"BasicsPage"},b().component({label:app.translator.trans("core.admin.basics.forum_description_heading"),className:"all"!==this.showField&&"description"!==this.showField?"hidden":""},[m("div",{className:"helpText"},app.translator.trans("core.admin.basics.forum_description_text")),m("textarea",{className:"FormControl",bidi:this.values.forum_description}),"description"===this.showField&&d().component({type:"submit",className:"Button Button--primary",loading:this.saving,disabled:!this.changed()},app.translator.trans("core.admin.settings.submit_button"))]),b().component({label:"Forum keywords",className:"all"!==this.showField&&"keywords"!==this.showField?"hidden":""},[m("div",{className:"helpText"},"Enter one or more keywords that describes your forum."),m("textarea",{className:"FormControl",bidi:this.values.forum_keywords,placeholder:"Add a few keywords"}),m("div",{className:"helpText",style:{color:0==E(this.values.forum_keywords())?"red":null}},m("b",null,"Note: Separate keywords with a comma.")," Example: ",m("i",null,"flarum, web development, forum, apples, security")),"keywords"===this.showField&&d().component({type:"submit",className:"Button Button--primary",loading:this.saving,disabled:!this.changed()},app.translator.trans("core.admin.settings.submit_button"))]),b().component({label:"Twitter card size",className:"all"!==this.showField?"hidden":""},[m("div",{className:"helpText"},"When your forum is shared on Twitter, it will have an image (if a social media image has been set up). This can be a big card with a big image, or a small card (summary) with a smaller image."),A().component({options:{large:"Large card (large image)",summary:"Summary card (smaller image)"},value:this.values.seo_twitter_card_size()||"large",onchange:function(t){e.values.seo_twitter_card_size(t),e.hasChanges=!0}}),d().component({type:"submit",className:"Button Button--primary",loading:this.saving,disabled:!this.changed()},app.translator.trans("core.admin.settings.submit_button"))]),b().component({label:"Social media image",className:"social-media-uploader "+("all"!==this.showField&&"social-media"!==this.showField?"hidden":"")},[m("div",{className:"helpText"},"Expecting a square image. Recommended size is 1200x1200 pixels. Otherwise use a landscape image, recommended size is 1200x630.",m("br",null),m("br",null),"This image will be used by Social Media when a user shares a page on your website (Facebook, Twitter, Reddit)."),N().component({name:"seo_social_media_image"})]),b().component({label:"Discussion post crawl settings",className:"all"!==this.showField&&"discussion-post"!==this.showField?"hidden":""},[m("div",{className:"helpText"},"This is an important setting about crawling your discussion posts in search results."),d().component({className:"Button",onclick:function(){return app.modal.show(B)}},"Setup post crawl settings")]),b().component({label:"No-follow links",className:"all"!==this.showField?"hidden":""},[m("div",{className:"helpText"},"All links to external domains will receive a '",m("i",null,"nofollow"),"' attribute by default. This will make sure people do not spam your forum with links to other domains in order to get more referrals."),m("div",{className:"helpText"},"With this setting you are able to add domains to the 'do-follow' list. For example, you can add ",m("i",null,"flarum.org")," to make sure links to this website do not receive a 'nofollow' attribute. ",m("a",{href:"https://community.v17.dev/knowledgebase/36",target:"_blank"},"Learn more"),"."),m("div",{style:"height: 5px;"}),m("div",null,d().component({className:"Button",loading:this.saving,onclick:function(){return app.modal.show(I)}},"Open domain do-follow list"))]),b().component({label:"Open external links in new tab",className:"all"!==this.showField?"hidden":""},[m("div",{className:"helpText"},"This extension will also make sure that external links (to other domains) open in a new tab. Currently it is not possible to disable this setting.")]),b().component({label:"Edit robots.txt",className:"all"!==this.showField&&"robots"!==this.showField?"hidden":""},[m("div",{className:"helpText"},"You can edit your robot.txt here. Please note, writing nonsense could result that crawlers won't visit your site.",m("br",null),m("br",null),"When you've ",m("a",{href:"https://discuss.flarum.org/d/14941-fof-sitemap",target:"_blank"},"FriendsOfFlarum Sitemap")," installed and enabled, it will be automatically added to your robots.txt"),m("div",{style:"height: 5px;"}),k().component({state:this.allowBotsValue,onchange:function(t){return e.saveAllowBots(t)}},"Allow all bots & crawl full site directory"),m("div",{style:"height: 5px;"}),m("div",null,d().component({className:"Button",loading:this.saving,onclick:function(){return app.modal.show(T)}},"Edit robots.txt content")," ",m("a",{href:app.forum.attribute("baseUrl")+"/robots.txt",target:"_blank",className:"robots-link"},"Open robots.txt ",m("i",{className:"fas fa-external-link-alt"})))]),b().component({label:"Updated this setting?",className:"all"===this.showField?"hidden":""},[m("div",{className:"helpText"},"When you think you're ready, click the button below to re-check the status of this setting."),d().component({className:"Button",icon:"fas fa-sync",loading:this.saving,onclick:function(){return m.route.set(app.route("extension",{id:"v17development-seo"}))}},"Back to overview and re-check")])))},s.infoText=function(){if("all"===this.showField)return m("div",null,m("p",null,"This page contains some other settings from around the admin area. However, it's good to have a good overview about these settings. Do not forget to do the SEO check."),m("p",null,"Check all your settings when you first setup this extensions. Maintain them to get the best search results."))},s.changed=function(){var e=this;return this.fields.some((function(t){return e.values[t]()!==app.data.settings[t]}))},s.onsubmit=function(e){var t=this;if(e.preventDefault(),!this.saving){this.saving=!0,app.alerts.dismiss(this.successAlert);var s={};this.fields.forEach((function(e){return s[e]=t.values[e]()})),""===s.seo_twitter_card_size&&(s.seo_twitter_card_size="large"),x()(s).then((function(){return app.alerts.show({type:"success"},app.translator.trans("core.admin.settings.saved_message"))})).catch((function(){})).then((function(){t.saving=!1,m.redraw()}))}},s.saveAllowBots=function(e){var t=this;if(!this.saving){this.saving=!0,this.allowBotsValue=e;var s={};s.seo_allow_all_bots=e,x()(s).then((function(){return app.alerts.show({type:"success"},app.translator.trans("core.admin.settings.saved_message"))})).catch((function(){})).then((function(){t.saving=!1,m.redraw()}))}},s.saveSingleSetting=function(e,t){var s=this;if(!this.saving){this.saving=!0;var n={};n[e]=t,x()(n).then((function(){return app.alerts.show({type:"success"},app.translator.trans("core.admin.settings.saved_message"))})).catch((function(){})).then((function(){s.saving=!1,m.redraw()}))}},t}(v());const U=flarum.core.compat["components/Page"];var W=e.n(U);flarum.core.compat["components/Dropdown"];var M=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var s=t.prototype;return s.oninit=function(t){e.prototype.oninit.call(this,t),this.settings=app.data.settings,this.saving=!1},s.view=function(){return m("div",null,m("p",{className:"seo-intro"},"A quick SEO-health-check overview. If you have questions, ask your question the official ",m("a",{href:"https://discuss.flarum.org/d/18316-flarum-seo",target:"_blank"},"Flarum forums ",m("i",{className:"fas fa-external-link-alt"})),". When you have issues, ",m("a",{href:"https://github.com/v17development/flarum-seo/issues",target:"_blank"},"create a new issue ",m("i",{className:"fas fa-external-link-alt"})),"."),m("p",{className:"seo-intro"},"Are you a developer with some free time left? Contribute to the project ",m("a",{href:"https://github.com/v17development/flarum-seo",target:"_blank"},"on GitHub ",m("i",{className:"fas fa-external-link-alt"})),". Have you have built a Flarum Extension and you'd like to use the SEO tools from this extension? Please ",m("a",{href:"https://community.v17.dev/knowledgebase/22",target:"_blank"},"read the documentation ",m("i",{className:"fas fa-external-link-alt"})),"."),m("p",{className:"seo-intro"},"For optimal search engine results, make sure all checks are green."),m("table",{className:"seo-check-table"},m("thead",null,m("tr",null,m("td",null,"Technique"),m("td",{width:"150"},"Status"))),m("tbody",null,this.forumDescription(),this.forumKeywords(),this.siteUsesSSL(),this.discussionPostSet(),this.socialMediaImage(),this.hasSitemap(),this.registeredSearchEngines(),this.robotsTxt(),this.tagsAvailable(),this.reviewAgain())))},s.forumDescription=function(){var e=void 0!==this.settings.forum_description&&""!==this.settings.forum_description||"must",t="You did not set up a forum description yet!";return!0===e&&this.settings.forum_description.length<=20&&(e=!1,t="Your forum description is lower then 20 characters. Please expand it for better search results."),!0===e&&this.settings.forum_description.indexOf("This is beta software")>=0&&(e="must",t="You did not change the default forum description after installation!"),m("tr",null,m("td",null,"Your forum has a description",this.notPassedError(e,t,"Update description",this.getSettingUrl("description"))),this.passed(e,"description"))},s.forumKeywords=function(){var e=void 0!==this.settings.forum_keywords&&""!==this.settings.forum_keywords;return m("tr",null,m("td",null,"Your forum has keywords set up",this.notPassedError(e,"You did not set up a forum keywords yet!","Update keywords",this.getSettingUrl("keywords"))),this.passed(e,"keywords"))},s.siteUsesSSL=function(){var e=app.forum.attribute("baseUrl").indexOf("https://")>=0||"must";return m("tr",null,m("td",null,"Your site has a secure connection available (SSL/TLS)",this.notPassedError(e,"Your forum does not force a SSL/TLS connection (a secure connection to your website). Most search engines won't index your website or lower your ranking if you have no secure connection available.","How to set up SSL",app.route("extension",{id:"v17development-seo",page:"ssl"}))),this.passed(e))},s.discussionPostSet=function(){var e=void 0!==this.settings.seo_reviewed_post_crawler;return m("tr",null,m("td",null,"Review discussion post crawl settings",this.notPassedError(e,"You will need to review this setting to pass.","Review post settings",this.getSettingUrl("discussion-post"))),this.passed(e))},s.socialMediaImage=function(){var e=!0;return void 0!==this.settings.seo_social_media_image_path&&null!==this.settings.seo_social_media_image_path||(e=!1),m("tr",null,m("td",null,"Set Up a social media image",this.notPassedError(e,"You did not set a social media image for your forum. It is recommended to set one. Your favicon will now be used as preview on social media.","Update image",this.getSettingUrl("social-media"))),this.passed(e))},s.hasSitemap=function(){var e=!0;return-1===app.data.settings.extensions_enabled.indexOf("flagrow-sitemap")&&-1===app.data.settings.extensions_enabled.indexOf("fof-sitemap")&&(e=!1),m("tr",null,m("td",null,"Your forum has a sitemap available",this.notPassedError(e,"It is highly recommended to install the FriendsOfFlarum sitemap extension!","Read more about adding a sitemap",app.route("extension",{id:"v17development-seo",page:"sitemap"}))),this.passed(e))},s.robotsTxt=function(){return m("tr",null,m("td",null,"Your forum has a ",m("b",null,"robots.txt")," available. ",m("a",{href:app.forum.attribute("baseUrl")+"/robots.txt",target:"_blank",className:"robots-link"},"Open robots.txt ",m("i",{className:"fas fa-external-link-alt"}))),this.passed(!0))},s.tagsAvailable=function(){return m("tr",null,m("td",null,"Your forum has ",m("b",null,"meta tags")," available (generated by this plugin)"),this.passed(!0))},s.registeredSearchEngines=function(){var e=void 0!==this.settings.seo_reviewed_search_engines;return m("tr",null,m("td",null,"Register your forum to search engines",this.notPassedError(e,"You will need to review this to pass.","More information",app.route("extension",{id:"v17development-seo",page:"search-engines"}))),this.passed(e))},s.reviewAgain=function(){var e=this,t=!0,s=new Date;return void 0===app.data.settings.seo_review_settings?t=!1:s=new Date(1e3*app.data.settings.seo_review_settings),t&&Math.floor(Date.now()/1e3)>app.data.settings.seo_review_settings&&(t=!1),m("tr",null,m("td",null,"Review your SEO settings every two months. Next review needed on ",m("b",null,s.toDateString()),this.notPassedError(t,"It is time to re-review your SEO settings.","Ok! I reviewed them!",(function(){var t=new Date,s=Math.floor(new Date(t.getFullYear(),t.getMonth()+2,1)/1e3);e.saveSingleSetting("seo_review_settings",s)}))),this.passed(t))},s.getSettingUrl=function(e){return void 0===e&&(e=""),""===e?app.route("extension",{id:"v17development-seo"}):app.route("extension",{id:"v17development-seo",page:"settings",setting:e})},s.passed=function(e){return"must"===e?m("td",{className:"row-must"},m("i",{class:"fas fa-exclamation-circle"})," Warning!"):e?m("td",{className:"row-passed"},m("i",{class:"fas fa-check"})," All set!"):m("td",{className:"row-warning"},m("i",{class:"fas fa-exclamation-circle"})," Warning!")},s.notPassedError=function(e,t,s,n){if(void 0===s&&(s="Update setting"),void 0===n&&(n=app.route("seoSettings")),!0!==e)return m("div",{className:"row-not-passed-error"},t,m("div",{className:"button-container"},d().component({className:"Button",onclick:function(){"string"==typeof n?m.route.set(n):n()}},s)))},s.saveSingleSetting=function(e,t){var s=this;if(!this.saving){this.saving=!0;var n={};n[e]=t,x()(n).then((function(){app.alerts.show({type:"success"},app.translator.trans("core.admin.settings.saved_message"))})).catch((function(){})).then((function(){s.saving=!1,m.redraw()}))}},t}(W()),R=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var s=t.prototype;return s.oninit=function(t){e.prototype.oninit.call(this,t),this.saving=!1,this.hasConfirmed="1"===app.data.settings.seo_reviewed_search_engines},s.view=function(){var e=this;return m("div",null,m("h2",null,"Submit your website to Search Engines"),m("p",null,"It is good practice to let Search Engines know your site is exists. This page will guide you in doing this succesfully."),m("p",null,"It is recommended to have a sitemap ready before completing this guide. If you don't have a sitemap yet, ",m("a",{href:"#/seo/sitemap"},"click here to read more about them"),"."),m("div",null,m("h4",null,"Add your website to the Google search results"),m("p",null,"If you want to add your website to the Google search results, visit the ",m("a",{href:"https://search.google.com/search-console",target:"_blank"},"Google Search Console ",m("i",{className:"fas fa-external-link-alt"})),". You'll need to add your website and verify that you're the owner of the associated domain name."),m("p",null,"When you enter your domain you need to answer the following question for yourself: Do you want to use the 'www' sub-domain in the search results? You can ",m("strong",null,"not")," change this later. Registering your domain in the Google Search Console multiple times won't result in a better ranking."),m("p",null,"When you completed the registration in the Google Search Console, visit the ",m("b",null,"Sitemaps")," page. Pass your ",m("b",null,"sitemap.xml")," to Google. Make sure that Google can crawl your sitemap and will keep doing this.")),m("div",null,m("h4",null,"Add your website to the Bing search results"),m("p",null,"If you want to add your website to the Bing search results, visit the ",m("a",{href:"https://www.bing.com/toolbox/webmaster",target:"_blank"},"Bing Webmaster Tools ",m("i",{className:"fas fa-external-link-alt"}))," and complete the given steps. Not all fields are required."),m("p",null,"Don't forget to configure your sitemap URL. After you verified your website you're all set and Bing will now index your website.")),m("div",null,m("h4",null,"Add your website to the Yandex search results"),m("p",null,"If you want to add your website to the Yandex search results, visit the ",m("a",{href:"https://webmaster.yandex.com",target:"_blank"},"Yandex.Webmaster ",m("i",{className:"fas fa-external-link-alt"}))," and follow the given steps."),m("p",null,"Don't forget to configure the sitemap in the Yandex.Webmaster.")),m("div",null,m("h4",null,"Add your website to the Yahoo search results"),m("p",null,"If you want to add your website to the Yahoo search results, finish your Bing search results registration. Yahoo will use that data.")),m("div",{className:"clear"}),d().component({className:"Button pull-right "+(this.hasConfirmed?"hidden":""),onclick:function(){return e.confirm()},icon:"fas fa-check",loading:this.saving},"I have read this"))},s.confirm=function(){this.saveSingleSetting("seo_reviewed_search_engines",!0)},s.saveSingleSetting=function(e,t){var s=this;if(!this.saving){this.saving=!0;var n={};n[e]=t,x()(n).then((function(){s.hasConfirmed=!0,app.alerts.show({type:"success"},app.translator.trans("core.admin.settings.saved_message"))})).catch((function(){})).then((function(){s.saving=!1,m.redraw()}))}},t}(W()),j=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t.prototype.view=function(){return m("div",null,m("h2",null,"Why do I need an secure connection?"),m("p",null,"Safety and privacy awareness on the web is on the rise. ",m("b",null,"Almost every")," developer/website owner want their website safe to use for their visitors so they won't need to be afraid that their data will be compromised by hackers or website-impersonators."),m("h4",null,"Search engines ",m("i",{className:"fas fa-heart"})," secure connections"),m("p",null,"When you do not have a secure connection to your website, search engines will rank your site much lower then other sites, or even won't index it."),m("p",null,"When you have SSL available, your website will get an higher rank and will be indexed."),m("h4",null,"What is SSL or TLS?"),m("p",null,"The most people know ",m("b",null,"https")," that's used for secure connections as SSL: ",m("i",null,"Secure Sockets Layer"),". Officially it's called TLS: ",m("i",null,"Transport Layer Security"),". This method is used to create a secure connection to your webserver what will prevent attackers or other webservers to impersonate your website and keep your visitors safe. The SSL connection will be broken if that happens and the visitors browsers will warning the user that's it's not trusted."),m("h4",null,"How to add SSL to your website?"),m("p",null,"For people who are using a webhosting, the most common way is to enter the webhosting panel, go to the hosting-settings of your website and click SSL. You can follow the steps to add SSL to your website. The most webhosting companies nowadays are supporting the popular certificate issuer ",m("a",{href:"https://letsencrypt.org/",target:"_blank"}," Let's Encrypt ",m("i",{className:"fas fa-external-link-alt"})),"."),m("h4",null,"Okay, I added SSL!"),m("p",null,"Great! Now, change your ",m("b",null,"config.php")," and change the ",m("b",null,"'url'")," to ",m("b",null,"https"),"!"),m("h4",null,"What if I do not want to add SSL?"),m("p",null,"In that case, you can uninstall this extension as search engines ",m("b",null,"won't index your forum")," or rank them far below other sites due safety reasons."))},t}(W());flarum.core.compat["components/Link"];var G=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t.prototype.view=function(){return m("div",null,m("h2",null,"Why should you use a sitemap?"),m("p",null,"A sitemap is a XML file with a list of all the available pages on your website. It will be used by crawlers and search engines to find pages on your website."),m("p",null,"The sitemap file is automatically generated and does not need any maintenance."),m("h4",null,"What extension should I install?"),m("p",null,"At the moment, ",m("a",{href:"https://discuss.flarum.org/d/14941-fof-sitemap",target:"_blank"},"FriendsOfFlarum Sitemap ",m("i",{className:"fas fa-external-link-alt"}))," is the best extension to install for Flarum. We advice you to install and activate this extension."),m("p",null,"This extension will make sure crawlers will find your forum ",m("b",null,"discussions"),", ",m("b",null,"tags")," (when extension is enabled) and ",m("b",null,"Pages")," extension (when extension is installed and enabled). It will automatically make an sitemap.xml available."),m("h4",null,"I just installed the extension"),m("p",null,"In that case, activate it by clicking the extension in the sidebar at the left . Then this warning will disappear."))},t}(W()),V=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var s=t.prototype;return s.content=function(){var e=m.route.param().page||"health";return m("div",{className:"ExtensionPage-settings FlarumSEO"},m("div",{className:"seo-menu"},m("div",{className:"container"},this.menuButtons(e))),m("div",{className:"container FlarumSeoPage-container"},this.pageContent(e)))},s.menuButtons=function(e){return[d().component({className:"Button "+("health"===e?"item-selected":""),onclick:function(){return m.route.set(app.route("extension",{id:"v17development-seo"}))},icon:"fas fa-heartbeat"},"Health check"),d().component({className:"Button "+("settings"===e?"item-selected":""),onclick:function(){return m.route.set(app.route("extension",{id:"v17development-seo",page:"settings"}))},icon:"fas fa-cogs"},"SEO settings"),d().component({className:"Button "+("sitemap"===e?"item-selected":""),onclick:function(){return m.route.set(app.route("extension",{id:"v17development-seo",page:"sitemap"}))},icon:"fas fa-sitemap"},"Sitemap information"),d().component({className:"Button "+("search-engines"===e?"item-selected":""),onclick:function(){return m.route.set(app.route("extension",{id:"v17development-seo",page:"search-engines"}))},icon:"fas fa-search"},"Search engine information"),d().component({className:"Button "+("ssl"===e?"item-selected":""),onclick:function(){return m.route.set(app.route("extension",{id:"v17development-seo",page:"ssl"}))},icon:"fas fa-shield-alt"},"Set up SSL")]},s.pageContent=function(e){return"search-engines"===e?m(R,null):"settings"===e?m(Y,null):"ssl"===e?m(j,null):"sitemap"===e?m(G,null):m(M,null)},t}(f());const z=flarum.core.compat["admin/components/PermissionGrid"];var q=e.n(z);s().initializers.add("v17development-flarum-seo",(function(){s().extensionData.for("v17development-seo").registerPage(V),(0,n.extend)(a().prototype,"availableWidgets",(function(e){e.add("seo-widget",m(h,null),500)})),s().extensionData.for("v17development-seo").registerPermission({icon:"fas fa-search",label:s().translator.trans("v17development-flarum-seo.admin.permissions.configure_seo"),permission:"seo.canConfigure"},"seo",90),(0,n.extend)(q().prototype,"permissionItems",(function(e){e.add("seo",{label:"SEO",children:this.attrs.extensionId?s().extensionData.getExtensionPermissions(this.extensionId,"seo").toArray():s().extensionData.getAllExtensionPermissions("seo").toArray()},80)}))}))})(),module.exports={}})(); +(()=>{var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var n in s)e.o(s,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:s[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};(()=>{"use strict";e.r(t),e.d(t,{components:()=>Z,pages:()=>ee});const s=flarum.core.compat.app;var n=e.n(s);const o=flarum.core.compat.extend,a=flarum.core.compat["components/DashboardPage"];var i=e.n(a);function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function l(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}const u=flarum.core.compat["components/DashboardWidget"];var c=e.n(u);const d=flarum.core.compat["components/Button"];var h=e.n(d),p=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var s=t.prototype;return s.oninit=function(t){e.prototype.oninit.call(this,t),this.needsReview=!1,void 0===app.data.settings.seo_review_settings&&(this.needsReview=!0),!this.needsReview&&Math.floor(Date.now()/1e3)>app.data.settings.seo_review_settings&&(this.needsReview=!0)},s.className=function(){return"SeoWidget "+(this.needsReview?"needs-review":"")},s.content=function(){return m("div",null,m("i",{className:"fas fa-check seo-check-icon"})," It's time to review your SEO settings!",h().component({className:"",icon:"far fa-thumbs-up",onclick:function(){return m.route.set("extension/v17development-seo")}},"Do the health-check!"))},t}(c());const f=flarum.core.compat["components/ExtensionPage"];var g=e.n(f);const v=flarum.core.compat["common/Component"];var w=e.n(v);const b=flarum.core.compat["components/FieldSet"];var y=e.n(b);const x=flarum.core.compat["utils/saveSettings"];var _=e.n(x);const S=flarum.core.compat["components/Switch"];var k=e.n(S);const N=flarum.core.compat["components/UploadImageButton"];var F=e.n(N);const D=flarum.core.compat["components/Modal"];var B=e.n(D),T=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var s=t.prototype;return s.oninit=function(t){e.prototype.oninit.call(this,t),this.value=void 0!==app.data.settings.seo_post_crawler&&app.data.settings.seo_post_crawler,this.startValue=this.value,this.closeText="Close",this.loading=!1,void 0===app.data.settings.seo_reviewed_post_crawler&&this.saveReviewedPostCrawler()},s.title=function(){return"Post crawl settings"},s.content=function(){var e=this;return m("div",null,m("div",{className:"Modal-body"},m("div",{className:"Form"},m("b",null,"Read this dialog carefully.")," This function will only be executed on a page refresh on a discussion. You can always change this option later.",m("div",{style:"padding: 10px 0;"},m("b",{style:"display: block; padding-bottom: 10px;"},m("span",{style:"display: inline-block; width: 25px;"},m("i",{className:"fas fa-check"})),"Only index the main post (default)"),"Search engine will only show the main post in the search results. It won't affect loading speed when you navigate to it via forum links."),m("div",{style:"padding: 10px 0;"},m("b",{style:"display: block; padding-bottom: 10px;"},m("span",{style:"display: inline-block; width: 25px;"},m("i",{className:"fas fa-check-double"}))," Index all posts in a discussion (setting enabled)"),"Search engines will understand the discussions and are even able to show some relevant posts underneath the search results. When you have the extension '",m("a",{href:"https://discuss.flarum.org/d/21894-friendsofflarum-best-answer",target:"_blank"},"best answer"),"' installed and enabled on your forum, it will mark the discussion as 'answered' on the search results and redirect the user to that specific post. ",m("b",null,"However, depending on your server settings, this can be heavier"),". It may cost some performance, so it depends on how fast your server is to enable this feature."))),m("div",{style:"padding: 25px 30px; text-align: center;"},m("b",{style:"display: block; padding-bottom: 10px;"},"Do you want to enable this feature?"),m("div",{style:"display: inline-block;"},k().component({state:"1"==this.value,onchange:function(t){return e.change(t)}},"Crawl all posts (it's slower on page refresh, but search results will be better)"))),m("div",{style:"padding: 25px 30px; text-align: center;"},this.closeDialogButton()))},s.change=function(e){this.value=e,this.closeText=this.value!==this.startValue?"Save changes":"Close"},s.closeDialogButton=function(){return m(h(),{type:"submit",className:"Button Button--primary",loading:this.loading},this.closeText)},s.onsubmit=function(e){if(this.value!==this.startValue){this.loading=!0;var t={};t.seo_post_crawler=this.value,_()(t).then(this.onsaved.bind(this))}else this.hide()},s.saveReviewedPostCrawler=function(){var e=this;this.loading=!0;_()({seo_reviewed_post_crawler:!0}).then((function(){e.loading=!1,m.redraw()}))},s.onsaved=function(){this.hide()},t}(B()),L=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var s=t.prototype;return s.oninit=function(t){e.prototype.oninit.call(this,t),this.value=void 0===app.data.settings.seo_robots_text?"":app.data.settings.seo_robots_text,this.startValue=this.value,this.closeText="Close",this.loading=!1},s.title=function(){return"Custom robots.txt"},s.content=function(){var e=this;return m("div",null,m("div",{className:"Modal-body"},m("textarea",{className:"FormControl",value:this.value,placeholder:"Add text to the robots.txt",rows:15,oninput:function(t){e.change(t.target.value)}})),m("div",{style:"padding: 25px 30px; text-align: center;"},this.closeDialogButton()))},s.change=function(e){this.value=e,this.closeText=this.value!==this.startValue?"Save changes":"Close"},s.closeDialogButton=function(){return m(h(),{type:"submit",className:"Button Button--primary",loading:this.loading},this.closeText)},s.onsubmit=function(e){if(this.value!==this.startValue){this.loading=!0;var t={};t.seo_robots_text=this.value,_()(t).then(this.onsaved.bind(this))}else this.hide()},s.onsaved=function(){this.hide()},t}(B());function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,n=Array(t);s=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.split(","));!(t=n()).done;)if(t.value.split(" ").length>4){s=!1;break}return s}const C=flarum.core.compat["utils/Stream"];var I=e.n(C),P=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var s=t.prototype;return s.oninit=function(t){e.prototype.oninit.call(this,t),this.domainDoFollowList=[],this.baseUrl=this.getDomainFromBase(),this.domainDoFollowList=void 0===app.data.settings.seo_dofollow_domains?I()([]):I()(JSON.parse(app.data.settings.seo_dofollow_domains)),this.startValue=this.domainDoFollowList,this.newDomain=I()(""),this.hasChanges=!1,this.loading=!1},s.title=function(){return"Do-follow list"},s.getDomainFromBase=function(){var e=new URL(app.forum.data.attributes.baseUrl).hostname.split(".");return e.slice(Math.max(e.length-2,0)).join(".")},s.content=function(){var e=this;return m("div",null,m("div",{className:"Modal-body"},m("p",null,"Enter the ",m("b",null,"hostnames")," of the domains you want to add to the do-follow list."),m("p",null,"The domain you use for your Flarum instance is added to the list by default."),m("p",{style:{marginBottom:"15px"}},m("a",{href:"https://community.v17.dev/knowledgebase/36",target:"_blank"},"Learn more")," about the do-follow list."),m("div",{className:"FlarumSEO-DoFollowList"},m("input",{type:"text",value:this.baseUrl,readonly:!0,className:"FormControl"}),m(h(),{className:"Button",icon:"fas fa-times",disabled:!0})),this.domainDoFollowList().map((function(t,s){return m("div",{className:"FlarumSEO-DoFollowList"},m("input",{type:"text",value:t,onkeyup:function(t){return e.updateDomain(s,t.target.value)},className:"FormControl"}),m(h(),{className:"Button",icon:"fas fa-times",onclick:function(){return e.removeDomain(s)}}))})),m("div",{className:"FlarumSEO-DoFollowList"},m("input",{type:"text",bidi:this.newDomain,placeholder:"Allow a domain",onkeydown:function(t){13===t.keyCode&&""!==e.newDomain()&&(t.preventDefault(),e.addDomain())},className:"FormControl"}),m(h(),{className:"Button "+(""!==this.newDomain()?"Button--primary":""),icon:"fas fa-plus",onclick:this.addDomain.bind(this)}))),m("div",{style:"padding: 25px 30px; text-align: center;"},m(h(),{type:"submit",className:"Button Button--primary",loading:this.loading},this.hasChanges?"Save changes":"Close")))},s.addDomain=function(){if(this.domainDoFollowList().indexOf(this.newDomain())>=0)return alert("This domain is already present in your do-follow list."),void this.newDomain("");var e=[].concat(this.domainDoFollowList());e.push(this.newDomain()),this.domainDoFollowList(e),this.newDomain(""),this.hasChanges=!0},s.removeDomain=function(e){var t=[].concat(this.domainDoFollowList());t.splice(e,1),this.domainDoFollowList(t),this.hasChanges=!0},s.updateDomain=function(e,t){var s=[].concat(this.domainDoFollowList());s[e]=t,this.domainDoFollowList(s),this.hasChanges=!0},s.onsubmit=function(e){if(this.hasChanges){this.loading=!0;var t={};t.seo_dofollow_domains=JSON.stringify(this.domainDoFollowList().filter((function(e){return""!==e}))),_()(t).then(this.onsaved.bind(this))}else this.hide()},s.onsaved=function(){this.hide()},t}(B());const A=flarum.core.compat["components/Select"];var Y=e.n(A);const M=flarum.core.compat["common/utils/ItemList"];var W=e.n(M),U=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var s=t.prototype;return s.oninit=function(t){var s=this;e.prototype.oninit.call(this,t),this.saving=!1,this.fields=["forum_title","forum_description","forum_keywords","seo_allow_all_bots","seo_twitter_card_size"],this.values={};var n=app.data.settings;this.fields.forEach((function(e){return s.values[e]=I()(n[e]||"")})),this.allowBotsValue="0"!==n.seo_allow_all_bots,app.forum.data.attributes.seo_social_media_imageUrl=app.data.settings.seo_social_media_image_url,this.showField="all",void 0!==m.route.param("setting")&&(this.showField=m.route.param("setting"))},s.view=function(){return m("div",null,this.infoText(),m("form",{onsubmit:this.onsubmit.bind(this),className:"BasicsPage"},this.viewItems().toArray()))},s.viewItems=function(){var e=this,t=new(W());return t.add("description",y().component({label:app.translator.trans("core.admin.basics.forum_description_heading"),className:"all"!==this.showField&&"description"!==this.showField?"hidden":""},[m("div",{className:"helpText"},app.translator.trans("core.admin.basics.forum_description_text")),m("textarea",{className:"FormControl",bidi:this.values.forum_description}),"description"===this.showField&&h().component({type:"submit",className:"Button Button--primary",loading:this.saving,disabled:!this.changed()},app.translator.trans("core.admin.settings.submit_button"))]),100),t.add("keywords",y().component({label:"Forum keywords",className:"all"!==this.showField&&"keywords"!==this.showField?"hidden":""},[m("div",{className:"helpText"},"Enter one or more keywords that describes your forum."),m("textarea",{className:"FormControl",bidi:this.values.forum_keywords,placeholder:"Add a few keywords"}),m("div",{className:"helpText",style:{color:0==O(this.values.forum_keywords())?"red":null}},m("b",null,"Note: Separate keywords with a comma.")," Example:"," ",m("i",null,"flarum, web development, forum, apples, security")),"keywords"===this.showField&&h().component({type:"submit",className:"Button Button--primary",loading:this.saving,disabled:!this.changed()},app.translator.trans("core.admin.settings.submit_button"))]),90),t.add("twitterCardSize",y().component({label:"Twitter card size",className:"all"!==this.showField?"hidden":""},[m("div",{className:"helpText"},"When your forum is shared on Twitter, it will have an image (if a social media image has been set up). This can be a big card with a big image, or a small card (summary) with a smaller image."),Y().component({options:{large:"Large card (large image)",summary:"Summary card (smaller image)"},value:this.values.seo_twitter_card_size()||"large",onchange:function(t){e.values.seo_twitter_card_size(t),e.hasChanges=!0}}),h().component({type:"submit",className:"Button Button--primary",loading:this.saving,disabled:!this.changed()},app.translator.trans("core.admin.settings.submit_button"))]),70),t.add("socialMediaImage",y().component({label:"Social media image",className:"social-media-uploader "+("all"!==this.showField&&"social-media"!==this.showField?"hidden":"")},[m("div",{className:"helpText"},"Expecting a square image. Recommended size is 1200x1200 pixels. Otherwise use a landscape image, recommended size is 1200x630.",m("br",null),m("br",null),"This image will be used by Social Media when a user shares a page on your website (Facebook, Twitter, Reddit)."),F().component({name:"seo_social_media_image"})]),60),t.add("crawlSettings",y().component({label:"Discussion post crawl settings",className:"all"!==this.showField&&"discussion-post"!==this.showField?"hidden":""},[m("div",{className:"helpText"},"This is an important setting about crawling your discussion posts in search results."),h().component({className:"Button",onclick:function(){return app.modal.show(T)}},"Setup post crawl settings")]),50),t.add("noFollowLink",y().component({label:"No-follow links",className:"all"!==this.showField?"hidden":""},[m("div",{className:"helpText"},"All links to external domains will receive a '",m("i",null,"nofollow"),"' attribute by default. This will make sure people do not spam your forum with links to other domains in order to get more referrals."),m("div",{className:"helpText"},"With this setting you are able to add domains to the 'do-follow' list. For example, you can add ",m("i",null,"flarum.org")," to make sure links to this website do not receive a 'nofollow' attribute."," ",m("a",{href:"https://community.v17.dev/knowledgebase/36",target:"_blank"},"Learn more"),"."),m("div",{style:"height: 5px;"}),m("div",null,h().component({className:"Button",loading:this.saving,onclick:function(){return app.modal.show(P)}},"Open domain do-follow list"))]),40),t.add("linkTarget",y().component({label:"Open external links in new tab",className:"all"!==this.showField?"hidden":""},[m("div",{className:"helpText"},"This extension will also make sure that external links (to other domains) open in a new tab. Currently it is not possible to disable this setting.")]),30),t.add("robots",y().component({label:"Edit robots.txt",className:"all"!==this.showField&&"robots"!==this.showField?"hidden":""},[m("div",{className:"helpText"},"You can edit your robot.txt here. Please note, writing nonsense could result that crawlers won't visit your site.",m("br",null),m("br",null),"When you've"," ",m("a",{href:"https://discuss.flarum.org/d/14941-fof-sitemap",target:"_blank"},"FriendsOfFlarum Sitemap")," ","installed and enabled, it will be automatically added to your robots.txt"),m("div",{style:"height: 5px;"}),k().component({state:this.allowBotsValue,onchange:function(t){return e.saveAllowBots(t)}},"Allow all bots & crawl full site directory"),m("div",{style:"height: 5px;"}),m("div",null,h().component({className:"Button",loading:this.saving,onclick:function(){return app.modal.show(L)}},"Edit robots.txt content")," ",m("a",{href:app.forum.attribute("baseUrl")+"/robots.txt",target:"_blank",className:"robots-link"},"Open robots.txt ",m("i",{className:"fas fa-external-link-alt"})))]),20),t.add("updated",y().component({label:"Updated this setting?",className:"all"===this.showField?"hidden":""},[m("div",{className:"helpText"},"When you think you're ready, click the button below to re-check the status of this setting."),h().component({className:"Button",icon:"fas fa-sync",loading:this.saving,onclick:function(){return m.route.set(app.route("extension",{id:"v17development-seo"}))}},"Back to overview and re-check")]),10),t},s.infoText=function(){if("all"===this.showField)return m("div",null,m("p",null,"This page contains some other settings from around the admin area. However, it's good to have a good overview about these settings. Do not forget to do the SEO check."),m("p",null,"Check all your settings when you first setup this extensions. Maintain them to get the best search results."))},s.changed=function(){var e=this;return this.fields.some((function(t){return e.values[t]()!==app.data.settings[t]}))},s.onsubmit=function(e){var t=this;if(e.preventDefault(),!this.saving){this.saving=!0,app.alerts.dismiss(this.successAlert);var s={};this.fields.forEach((function(e){return s[e]=t.values[e]()})),""===s.seo_twitter_card_size&&(s.seo_twitter_card_size="large"),_()(s).then((function(){return app.alerts.show({type:"success"},app.translator.trans("core.admin.settings.saved_message"))})).catch((function(){})).then((function(){t.saving=!1,m.redraw()}))}},s.saveAllowBots=function(e){var t=this;if(!this.saving){this.saving=!0,this.allowBotsValue=e;var s={};s.seo_allow_all_bots=e,_()(s).then((function(){return app.alerts.show({type:"success"},app.translator.trans("core.admin.settings.saved_message"))})).catch((function(){})).then((function(){t.saving=!1,m.redraw()}))}},s.saveSingleSetting=function(e,t){var s=this;if(!this.saving){this.saving=!0;var n={};n[e]=t,_()(n).then((function(){return app.alerts.show({type:"success"},app.translator.trans("core.admin.settings.saved_message"))})).catch((function(){})).then((function(){s.saving=!1,m.redraw()}))}},t}(w());const R=flarum.core.compat["components/Page"];var j=e.n(R);const z=flarum.core.compat["components/Dropdown"];var G=e.n(z),H=function(e){function t(){return e.apply(this,arguments)||this}return l(t,e),t.prototype.view=function(){return m("div",{className:"seo-header container"},m("div",{className:"pull-right"},G().component({label:"Tools",icon:"fas fa-cog",buttonClassName:"Button",menuClassName:"Dropdown-menu--right"},[h().component({className:"Button",onclick:function(){return m.route.set(app.route("seo"))},icon:"fas fa-heartbeat"},"Health check"),h().component({className:"Button",onclick:function(){return m.route.set(app.route("seoSettings"))},icon:"fas fa-cogs"},"SEO settings"),h().component({className:"Button",onclick:function(){return m.route.set(app.route("seoSitemap"))},icon:"fas fa-sitemap"},"Sitemap information"),h().component({className:"Button",onclick:function(){return m.route.set(app.route("seoSearchEngines"))},icon:"fas fa-search"},"Search engine information"),h().component({className:"Button",onclick:function(){return m.route.set(app.route("seoSSL"))},icon:"fas fa-shield-alt"},"Set up SSL")])),m("h2",null,"Search Engine Optimization"),m("div",{className:"clear"}))},t}(w()),V=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var s=t.prototype;return s.oninit=function(t){e.prototype.oninit.call(this,t),this.settings=app.data.settings,this.saving=!1},s.view=function(){return m("div",null,m("p",{className:"seo-intro"},"A quick SEO-health-check overview. If you have questions, ask your question the official ",m("a",{href:"https://discuss.flarum.org/d/18316-flarum-seo",target:"_blank"},"Flarum forums ",m("i",{className:"fas fa-external-link-alt"})),". When you have issues, ",m("a",{href:"https://github.com/v17development/flarum-seo/issues",target:"_blank"},"create a new issue ",m("i",{className:"fas fa-external-link-alt"})),"."),m("p",{className:"seo-intro"},"Are you a developer with some free time left? Contribute to the project ",m("a",{href:"https://github.com/v17development/flarum-seo",target:"_blank"},"on GitHub ",m("i",{className:"fas fa-external-link-alt"})),". Have you have built a Flarum Extension and you'd like to use the SEO tools from this extension? Please ",m("a",{href:"https://community.v17.dev/knowledgebase/22",target:"_blank"},"read the documentation ",m("i",{className:"fas fa-external-link-alt"})),"."),m("p",{className:"seo-intro"},"For optimal search engine results, make sure all checks are green."),m("table",{className:"seo-check-table"},m("thead",null,m("tr",null,m("td",null,"Technique"),m("td",{width:"150"},"Status"))),m("tbody",null,this.forumDescription(),this.forumKeywords(),this.siteUsesSSL(),this.discussionPostSet(),this.socialMediaImage(),this.hasSitemap(),this.registeredSearchEngines(),this.robotsTxt(),this.tagsAvailable(),this.reviewAgain())))},s.forumDescription=function(){var e=void 0!==this.settings.forum_description&&""!==this.settings.forum_description||"must",t="You did not set up a forum description yet!";return!0===e&&this.settings.forum_description.length<=20&&(e=!1,t="Your forum description is lower then 20 characters. Please expand it for better search results."),!0===e&&this.settings.forum_description.indexOf("This is beta software")>=0&&(e="must",t="You did not change the default forum description after installation!"),m("tr",null,m("td",null,"Your forum has a description",this.notPassedError(e,t,"Update description",this.getSettingUrl("description"))),this.passed(e,"description"))},s.forumKeywords=function(){var e=void 0!==this.settings.forum_keywords&&""!==this.settings.forum_keywords;return m("tr",null,m("td",null,"Your forum has keywords set up",this.notPassedError(e,"You did not set up a forum keywords yet!","Update keywords",this.getSettingUrl("keywords"))),this.passed(e,"keywords"))},s.siteUsesSSL=function(){var e=app.forum.attribute("baseUrl").indexOf("https://")>=0||"must";return m("tr",null,m("td",null,"Your site has a secure connection available (SSL/TLS)",this.notPassedError(e,"Your forum does not force a SSL/TLS connection (a secure connection to your website). Most search engines won't index your website or lower your ranking if you have no secure connection available.","How to set up SSL",app.route("extension",{id:"v17development-seo",page:"ssl"}))),this.passed(e))},s.discussionPostSet=function(){var e=void 0!==this.settings.seo_reviewed_post_crawler;return m("tr",null,m("td",null,"Review discussion post crawl settings",this.notPassedError(e,"You will need to review this setting to pass.","Review post settings",this.getSettingUrl("discussion-post"))),this.passed(e))},s.socialMediaImage=function(){var e=!0;return void 0!==this.settings.seo_social_media_image_path&&null!==this.settings.seo_social_media_image_path||(e=!1),m("tr",null,m("td",null,"Set Up a social media image",this.notPassedError(e,"You did not set a social media image for your forum. It is recommended to set one. Your favicon will now be used as preview on social media.","Update image",this.getSettingUrl("social-media"))),this.passed(e))},s.hasSitemap=function(){var e=!0;return-1===app.data.settings.extensions_enabled.indexOf("flagrow-sitemap")&&-1===app.data.settings.extensions_enabled.indexOf("fof-sitemap")&&(e=!1),m("tr",null,m("td",null,"Your forum has a sitemap available",this.notPassedError(e,"It is highly recommended to install the FriendsOfFlarum sitemap extension!","Read more about adding a sitemap",app.route("extension",{id:"v17development-seo",page:"sitemap"}))),this.passed(e))},s.robotsTxt=function(){return m("tr",null,m("td",null,"Your forum has a ",m("b",null,"robots.txt")," available. ",m("a",{href:app.forum.attribute("baseUrl")+"/robots.txt",target:"_blank",className:"robots-link"},"Open robots.txt ",m("i",{className:"fas fa-external-link-alt"}))),this.passed(!0))},s.tagsAvailable=function(){return m("tr",null,m("td",null,"Your forum has ",m("b",null,"meta tags")," available (generated by this plugin)"),this.passed(!0))},s.registeredSearchEngines=function(){var e=void 0!==this.settings.seo_reviewed_search_engines;return m("tr",null,m("td",null,"Register your forum to search engines",this.notPassedError(e,"You will need to review this to pass.","More information",app.route("extension",{id:"v17development-seo",page:"search-engines"}))),this.passed(e))},s.reviewAgain=function(){var e=this,t=!0,s=new Date;return void 0===app.data.settings.seo_review_settings?t=!1:s=new Date(1e3*app.data.settings.seo_review_settings),t&&Math.floor(Date.now()/1e3)>app.data.settings.seo_review_settings&&(t=!1),m("tr",null,m("td",null,"Review your SEO settings every two months. Next review needed on ",m("b",null,s.toDateString()),this.notPassedError(t,"It is time to re-review your SEO settings.","Ok! I reviewed them!",(function(){var t=new Date,s=Math.floor(new Date(t.getFullYear(),t.getMonth()+2,1)/1e3);e.saveSingleSetting("seo_review_settings",s)}))),this.passed(t))},s.getSettingUrl=function(e){return void 0===e&&(e=""),""===e?app.route("extension",{id:"v17development-seo"}):app.route("extension",{id:"v17development-seo",page:"settings",setting:e})},s.passed=function(e){return"must"===e?m("td",{className:"row-must"},m("i",{class:"fas fa-exclamation-circle"})," Warning!"):e?m("td",{className:"row-passed"},m("i",{class:"fas fa-check"})," All set!"):m("td",{className:"row-warning"},m("i",{class:"fas fa-exclamation-circle"})," Warning!")},s.notPassedError=function(e,t,s,n){if(void 0===s&&(s="Update setting"),void 0===n&&(n=app.route("seoSettings")),!0!==e)return m("div",{className:"row-not-passed-error"},t,m("div",{className:"button-container"},h().component({className:"Button",onclick:function(){"string"==typeof n?m.route.set(n):n()}},s)))},s.saveSingleSetting=function(e,t){var s=this;if(!this.saving){this.saving=!0;var n={};n[e]=t,_()(n).then((function(){app.alerts.show({type:"success"},app.translator.trans("core.admin.settings.saved_message"))})).catch((function(){})).then((function(){s.saving=!1,m.redraw()}))}},t}(j()),q=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var s=t.prototype;return s.oninit=function(t){e.prototype.oninit.call(this,t),this.saving=!1,this.hasConfirmed="1"===app.data.settings.seo_reviewed_search_engines},s.view=function(){var e=this;return m("div",null,m("h2",null,"Submit your website to Search Engines"),m("p",null,"It is good practice to let Search Engines know your site is exists. This page will guide you in doing this succesfully."),m("p",null,"It is recommended to have a sitemap ready before completing this guide. If you don't have a sitemap yet, ",m("a",{href:"#/seo/sitemap"},"click here to read more about them"),"."),m("div",null,m("h4",null,"Add your website to the Google search results"),m("p",null,"If you want to add your website to the Google search results, visit the ",m("a",{href:"https://search.google.com/search-console",target:"_blank"},"Google Search Console ",m("i",{className:"fas fa-external-link-alt"})),". You'll need to add your website and verify that you're the owner of the associated domain name."),m("p",null,"When you enter your domain you need to answer the following question for yourself: Do you want to use the 'www' sub-domain in the search results? You can ",m("strong",null,"not")," change this later. Registering your domain in the Google Search Console multiple times won't result in a better ranking."),m("p",null,"When you completed the registration in the Google Search Console, visit the ",m("b",null,"Sitemaps")," page. Pass your ",m("b",null,"sitemap.xml")," to Google. Make sure that Google can crawl your sitemap and will keep doing this.")),m("div",null,m("h4",null,"Add your website to the Bing search results"),m("p",null,"If you want to add your website to the Bing search results, visit the ",m("a",{href:"https://www.bing.com/toolbox/webmaster",target:"_blank"},"Bing Webmaster Tools ",m("i",{className:"fas fa-external-link-alt"}))," and complete the given steps. Not all fields are required."),m("p",null,"Don't forget to configure your sitemap URL. After you verified your website you're all set and Bing will now index your website.")),m("div",null,m("h4",null,"Add your website to the Yandex search results"),m("p",null,"If you want to add your website to the Yandex search results, visit the ",m("a",{href:"https://webmaster.yandex.com",target:"_blank"},"Yandex.Webmaster ",m("i",{className:"fas fa-external-link-alt"}))," and follow the given steps."),m("p",null,"Don't forget to configure the sitemap in the Yandex.Webmaster.")),m("div",null,m("h4",null,"Add your website to the Yahoo search results"),m("p",null,"If you want to add your website to the Yahoo search results, finish your Bing search results registration. Yahoo will use that data.")),m("div",{className:"clear"}),h().component({className:"Button pull-right "+(this.hasConfirmed?"hidden":""),onclick:function(){return e.confirm()},icon:"fas fa-check",loading:this.saving},"I have read this"))},s.confirm=function(){this.saveSingleSetting("seo_reviewed_search_engines",!0)},s.saveSingleSetting=function(e,t){var s=this;if(!this.saving){this.saving=!0;var n={};n[e]=t,_()(n).then((function(){s.hasConfirmed=!0,app.alerts.show({type:"success"},app.translator.trans("core.admin.settings.saved_message"))})).catch((function(){})).then((function(){s.saving=!1,m.redraw()}))}},t}(j()),J=function(e){function t(){return e.apply(this,arguments)||this}return l(t,e),t.prototype.view=function(){return m("div",null,m("h2",null,"Why do I need an secure connection?"),m("p",null,"Safety and privacy awareness on the web is on the rise. ",m("b",null,"Almost every")," developer/website owner want their website safe to use for their visitors so they won't need to be afraid that their data will be compromised by hackers or website-impersonators."),m("h4",null,"Search engines ",m("i",{className:"fas fa-heart"})," secure connections"),m("p",null,"When you do not have a secure connection to your website, search engines will rank your site much lower then other sites, or even won't index it."),m("p",null,"When you have SSL available, your website will get an higher rank and will be indexed."),m("h4",null,"What is SSL or TLS?"),m("p",null,"The most people know ",m("b",null,"https")," that's used for secure connections as SSL: ",m("i",null,"Secure Sockets Layer"),". Officially it's called TLS: ",m("i",null,"Transport Layer Security"),". This method is used to create a secure connection to your webserver what will prevent attackers or other webservers to impersonate your website and keep your visitors safe. The SSL connection will be broken if that happens and the visitors browsers will warning the user that's it's not trusted."),m("h4",null,"How to add SSL to your website?"),m("p",null,"For people who are using a webhosting, the most common way is to enter the webhosting panel, go to the hosting-settings of your website and click SSL. You can follow the steps to add SSL to your website. The most webhosting companies nowadays are supporting the popular certificate issuer ",m("a",{href:"https://letsencrypt.org/",target:"_blank"}," Let's Encrypt ",m("i",{className:"fas fa-external-link-alt"})),"."),m("h4",null,"Okay, I added SSL!"),m("p",null,"Great! Now, change your ",m("b",null,"config.php")," and change the ",m("b",null,"'url'")," to ",m("b",null,"https"),"!"),m("h4",null,"What if I do not want to add SSL?"),m("p",null,"In that case, you can uninstall this extension as search engines ",m("b",null,"won't index your forum")," or rank them far below other sites due safety reasons."))},t}(j());flarum.core.compat["components/Link"];var K=function(e){function t(){return e.apply(this,arguments)||this}return l(t,e),t.prototype.view=function(){return m("div",null,m("h2",null,"Why should you use a sitemap?"),m("p",null,"A sitemap is a XML file with a list of all the available pages on your website. It will be used by crawlers and search engines to find pages on your website."),m("p",null,"The sitemap file is automatically generated and does not need any maintenance."),m("h4",null,"What extension should I install?"),m("p",null,"At the moment, ",m("a",{href:"https://discuss.flarum.org/d/14941-fof-sitemap",target:"_blank"},"FriendsOfFlarum Sitemap ",m("i",{className:"fas fa-external-link-alt"}))," is the best extension to install for Flarum. We advice you to install and activate this extension."),m("p",null,"This extension will make sure crawlers will find your forum ",m("b",null,"discussions"),", ",m("b",null,"tags")," (when extension is enabled) and ",m("b",null,"Pages")," extension (when extension is installed and enabled). It will automatically make an sitemap.xml available."),m("h4",null,"I just installed the extension"),m("p",null,"In that case, activate it by clicking the extension in the sidebar at the left . Then this warning will disappear."))},t}(j()),X=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var s=t.prototype;return s.content=function(){var e=m.route.param().page||"health";return m("div",{className:"ExtensionPage-settings FlarumSEO"},m("div",{className:"seo-menu"},m("div",{className:"container"},this.menuButtons(e))),m("div",{className:"container FlarumSeoPage-container"},this.pageContent(e)))},s.menuButtons=function(e){return[h().component({className:"Button "+("health"===e?"item-selected":""),onclick:function(){return m.route.set(app.route("extension",{id:"v17development-seo"}))},icon:"fas fa-heartbeat"},"Health check"),h().component({className:"Button "+("settings"===e?"item-selected":""),onclick:function(){return m.route.set(app.route("extension",{id:"v17development-seo",page:"settings"}))},icon:"fas fa-cogs"},"SEO settings"),h().component({className:"Button "+("sitemap"===e?"item-selected":""),onclick:function(){return m.route.set(app.route("extension",{id:"v17development-seo",page:"sitemap"}))},icon:"fas fa-sitemap"},"Sitemap information"),h().component({className:"Button "+("search-engines"===e?"item-selected":""),onclick:function(){return m.route.set(app.route("extension",{id:"v17development-seo",page:"search-engines"}))},icon:"fas fa-search"},"Search engine information"),h().component({className:"Button "+("ssl"===e?"item-selected":""),onclick:function(){return m.route.set(app.route("extension",{id:"v17development-seo",page:"ssl"}))},icon:"fas fa-shield-alt"},"Set up SSL")]},s.pageContent=function(e){return"search-engines"===e?m(q,null):"settings"===e?m(U,null):"ssl"===e?m(J,null):"sitemap"===e?m(K,null):m(V,null)},t}(g());const $=flarum.core.compat["admin/components/PermissionGrid"];var Q=e.n($),Z={SeoSettings:U,CrawlPostModal:T,DoFollowListModal:P,RobotsModal:L,Header:H,SeoWidget:p},ee={HealthCheck:V,RegisterToSearchEngines:q,SettingsPage:X,Sitemap:K,SSLPage:J};n().initializers.add("v17development-flarum-seo",(function(){n().extensionData.for("v17development-seo").registerPage(X),(0,o.extend)(i().prototype,"availableWidgets",(function(e){e.add("seo-widget",m(p,null),500)})),n().extensionData.for("v17development-seo").registerPermission({icon:"fas fa-search",label:n().translator.trans("v17development-flarum-seo.admin.permissions.configure_seo"),permission:"seo.canConfigure"},"seo",90),(0,o.extend)(Q().prototype,"permissionItems",(function(e){e.add("seo",{label:"SEO",children:this.attrs.extensionId?n().extensionData.getExtensionPermissions(this.extensionId,"seo").toArray():n().extensionData.getAllExtensionPermissions("seo").toArray()},80)}))}))})(),module.exports=t})(); //# 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 0015eec..9215f29 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,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,I,mBCAlF,MAAM,EAA+BI,OAAOC,KAAKC,OAAY,I,aCA7D,MAAM,EAA+BF,OAAOC,KAAKC,OAAe,OCA1D,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCAxD,SAASC,EAAgBC,EAAGC,GAC1B,OAAOF,EAAkBZ,OAAOe,eAAiBf,OAAOe,eAAeC,OAAS,SAAUH,EAAGC,GAC3F,OAAOD,EAAEI,UAAYH,EAAGD,CAC1B,EAAGD,EAAgBC,EAAGC,EACxB,CCHA,SAASI,EAAeL,EAAGd,GACzBc,EAAEP,UAAYN,OAAOmB,OAAOpB,EAAEO,WAAYO,EAAEP,UAAUc,YAAcP,EAAGE,EAAeF,EAAGd,EAC3F,CCHA,MAAM,EAA+BU,OAAOC,KAAKC,OAAO,8B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,qB,aCGnCU,EAAS,SAAA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OC,KAAKC,OAAO,mC,aCOxDmB,IAAAA,aAAiBuL,IAAI,6BAA6B,WAChDvL,IAAAA,cAAiB,IAAK,sBAAsBwL,aAAaN,IAGzDO,EAAAA,EAAAA,QAAOC,IAAAA,UAAyB,oBAAoB,SAACC,GACnDA,EAAQJ,IAAI,aAAc7K,EAACnB,EAAS,MAAK,IAC3C,IAEAS,IAAAA,cAAiB,IAAK,sBAAsB4L,mBAC1C,CACEhL,KAAM,gBACNuG,MAAOnH,IAAAA,WAAeqH,MACpB,6DAEFwE,WAAY,oBAEd,MACA,KAIFJ,EAAAA,EAAAA,QAAOK,IAAAA,UAA0B,mBAAmB,SAAUC,GAE5DA,EAAMR,IACJ,MACA,CACEpE,MAAO,MACP6E,SAAUlM,KAAKmM,MAAMC,YACjBlM,IAAAA,cACGmM,wBAAwBrM,KAAKoM,YAAa,OAC1CE,UACHpM,IAAAA,cAAkBqM,2BAA2B,OAAOD,WAE1D,GAEJ,GACF,G","sources":["webpack://@v17development/flarum-seo/webpack/bootstrap","webpack://@v17development/flarum-seo/webpack/runtime/compat get default export","webpack://@v17development/flarum-seo/webpack/runtime/define property getters","webpack://@v17development/flarum-seo/webpack/runtime/hasOwnProperty shorthand","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['app']\"","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['extend']\"","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['components/DashboardPage']\"","webpack://@v17development/flarum-seo/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@v17development/flarum-seo/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['components/DashboardWidget']\"","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['components/Button']\"","webpack://@v17development/flarum-seo/./src/admin/components/SeoWidget.js","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['components/ExtensionPage']\"","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['common/Component']\"","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['components/FieldSet']\"","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['utils/saveSettings']\"","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['components/Switch']\"","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['components/UploadImageButton']\"","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['components/Modal']\"","webpack://@v17development/flarum-seo/./src/admin/components/Modals/CrawlPostModal.js","webpack://@v17development/flarum-seo/./src/admin/components/Modals/RobotsModal.js","webpack://@v17development/flarum-seo/./src/admin/utils/countKeywords.js","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['utils/Stream']\"","webpack://@v17development/flarum-seo/./src/admin/components/Modals/DoFollowListModal.js","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['components/Select']\"","webpack://@v17development/flarum-seo/./src/admin/components/Forms/SeoSettings.js","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['components/Page']\"","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['components/Dropdown']\"","webpack://@v17development/flarum-seo/./src/admin/components/Header.js","webpack://@v17development/flarum-seo/./src/admin/Pages/HealthCheck.js","webpack://@v17development/flarum-seo/./src/admin/Pages/RegisterToSearchEngines.js","webpack://@v17development/flarum-seo/./src/admin/Pages/SSLPage.js","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['components/Link']\"","webpack://@v17development/flarum-seo/./src/admin/Pages/Sitemap.js","webpack://@v17development/flarum-seo/./src/admin/Pages/SettingsPage.js","webpack://@v17development/flarum-seo/external root \"flarum.core.compat['admin/components/PermissionGrid']\"","webpack://@v17development/flarum-seo/./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))","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/DashboardPage'];","function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/DashboardWidget'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Button'];","import DashboardWidget from 'flarum/components/DashboardWidget';\nimport Button from 'flarum/components/Button';\n\nexport default class SeoWidget extends DashboardWidget {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.needsReview = false;\n\n if(typeof app.data.settings.seo_review_settings === \"undefined\") {\n this.needsReview = true;\n }\n\n // Date passed?\n if(!this.needsReview && Math.floor(Date.now() / 1000) > app.data.settings.seo_review_settings) {\n this.needsReview = true;\n }\n }\n\n className() {\n return 'SeoWidget ' + (this.needsReview ? 'needs-review' : '');\n }\n\n content() {\n return (\n
\n It's time to review your SEO settings!\n\n {Button.component({\n className: '',\n icon: 'far fa-thumbs-up',\n onclick: () => m.route.set(\"extension/v17development-seo\")\n }, 'Do the health-check!')}\n
\n );\n }\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/ExtensionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/FieldSet'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['utils/saveSettings'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Switch'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/UploadImageButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Modal'];","import Modal from 'flarum/components/Modal';\nimport Button from 'flarum/components/Button';\nimport Switch from 'flarum/components/Switch';\nimport saveSettings from 'flarum/utils/saveSettings';\n\nexport default class CrawlPostModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.value = typeof app.data.settings.seo_post_crawler === \"undefined\" ? false : app.data.settings.seo_post_crawler;\n this.startValue = this.value;\n this.closeText = 'Close';\n this.loading = false;\n\n if(typeof app.data.settings.seo_reviewed_post_crawler === \"undefined\") {\n this.saveReviewedPostCrawler();\n }\n }\n\n title() {\n return 'Post crawl settings';\n }\n\n content() {\n return (\n
\n
\n
\n Read this dialog carefully. This function will only be executed on a page refresh on a discussion. You can always change this option later.\n\n
\n Only index the main post (default)\n Search engine will only show the main post in the search results. It won't affect loading speed when you navigate to it via forum links.\n
\n\n
\n Index all posts in a discussion (setting enabled)\n Search engines will understand the discussions and are even able to show some relevant posts underneath the search results. When you have the extension 'best answer' installed and enabled on your forum, it will mark the discussion as 'answered' on the search results and redirect the user to that specific post. However, depending on your server settings, this can be heavier. It may cost some performance, so it depends on how fast your server is to enable this feature.\n
\n
\n
\n
\n Do you want to enable this feature?\n\n
\n {Switch.component({\n state: this.value == '1',\n onchange: (value) => this.change(value),\n }, 'Crawl all posts (it\\'s slower on page refresh, but search results will be better)')}\n
\n
\n
\n {this.closeDialogButton()}\n
\n
\n );\n }\n\n change(value) {\n this.value = value;\n\n this.closeText = this.value !== this.startValue ? 'Save changes' : 'Close';\n }\n\n closeDialogButton() {\n return (\n \n {this.closeText}\n \n );\n }\n\n // Close or save setting\n onsubmit(e) {\n if(this.value === this.startValue) {\n this.hide();\n return;\n }\n\n this.loading = true;\n\n let data = {};\n data.seo_post_crawler = this.value;\n\n saveSettings(data).then(\n this.onsaved.bind(this)\n );\n }\n\n // Save post crawler reviewed\n saveReviewedPostCrawler() {\n this.loading = true;\n\n let data = {};\n data.seo_reviewed_post_crawler = true;\n\n saveSettings(data).then(() => {\n this.loading = false;\n m.redraw();\n });\n }\n\n onsaved() {\n this.hide();\n }\n}","import Modal from 'flarum/components/Modal';\nimport Button from 'flarum/components/Button';\nimport saveSettings from 'flarum/utils/saveSettings';\n\nexport default class RobotsModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.value = typeof app.data.settings.seo_robots_text === \"undefined\" ? '' : app.data.settings.seo_robots_text;\n this.startValue = this.value;\n\n this.closeText = 'Close';\n this.loading = false;\n }\n\n title() {\n return 'Custom robots.txt';\n }\n\n content() {\n return (\n
\n
\n {m('textarea', {\n className: \"FormControl\",\n value: this.value,\n placeholder: 'Add text to the robots.txt',\n rows: 15,\n oninput: (event) => {\n this.change(event.target.value);\n }\n })}\n
\n
\n {this.closeDialogButton()}\n
\n
\n );\n }\n\n change(value) {\n this.value = value;\n\n this.closeText = this.value !== this.startValue ? 'Save changes' : 'Close';\n }\n\n closeDialogButton() {\n return (\n \n {this.closeText}\n \n );\n }\n\n // Close or save setting\n onsubmit(e) {\n if(this.value === this.startValue) {\n this.hide();\n return;\n }\n\n this.loading = true;\n\n let data = {};\n data.seo_robots_text = this.value;\n\n saveSettings(data).then(\n this.onsaved.bind(this)\n );\n }\n\n onsaved() {\n this.hide();\n }\n}","/**\n * Check if the keywords field is filled in correctly\n * \n * @param string _keywords \n */\nexport default function countKeywords(_keywords) {\n // No keywords set up yet\n if(_keywords == \"\") return true;\n\n // Split all commas\n const keywords = _keywords.split(\",\");\n let status_ok = true;\n\n // Go through all keywords\n for (let keyword of keywords) {\n // Keywords shouldn't have more then three spaces\n if(keyword.split(\" \").length > 4) {\n status_ok = false;\n\n break;\n }\n };\n \n // Seems allright\n return status_ok;\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['utils/Stream'];","import Modal from 'flarum/components/Modal';\nimport Button from 'flarum/components/Button';\nimport saveSettings from 'flarum/utils/saveSettings';\nimport Stream from 'flarum/utils/Stream';\n\nexport default class DoFollowListModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.domainDoFollowList = [];\n\n this.baseUrl = this.getDomainFromBase();\n this.domainDoFollowList = typeof app.data.settings.seo_dofollow_domains === \"undefined\" ? Stream([]) : Stream(JSON.parse(app.data.settings.seo_dofollow_domains));\n\n this.startValue = this.domainDoFollowList;\n\n this.newDomain = Stream(\"\");\n\n this.hasChanges = false;\n this.loading = false;\n }\n\n title() {\n return 'Do-follow list';\n }\n\n // Get domain from base URL\n getDomainFromBase() {\n let url = new URL(app.forum.data.attributes.baseUrl);\n \n const hostname = url.hostname.split(\".\");\n\n return hostname.slice(Math.max(hostname.length - 2, 0)).join(\".\");\n }\n\n content() {\n return (\n
\n
\n

Enter the hostnames of the domains you want to add to the do-follow list.

\n\n

The domain you use for your Flarum instance is added to the list by default.

\n\n

\n Learn more about the do-follow list.\n

\n\n
\n \n
\n\n {this.domainDoFollowList().map((domain, key) => {\n return (\n
\n this.updateDomain(key, e.target.value)} className={\"FormControl\"} />\n
\n )\n })}\n\n
\n { \n if(e.keyCode === 13 && this.newDomain() !== '') {\n e.preventDefault();\n this.addDomain();\n }\n }} className={\"FormControl\"} />\n
\n
\n
\n \n {this.hasChanges ? 'Save changes' : 'Close'}\n \n
\n
\n );\n }\n\n /**\n * Add new domain to the list\n */\n addDomain() {\n // Check if the domain is already present\n if(this.domainDoFollowList().indexOf(this.newDomain()) >= 0) {\n alert(\"This domain is already present in your do-follow list.\");\n\n this.newDomain(\"\");\n return;\n }\n \n let updatedData = [...this.domainDoFollowList()];\n \n updatedData.push(this.newDomain());\n\n this.domainDoFollowList(updatedData);\n\n // Reset domain\n this.newDomain(\"\");\n\n // Update the hasChanges\n this.hasChanges = true;\n }\n\n /**\n * Remove domain from the list\n * \n * @param {number} key \n */\n removeDomain(key) {\n let updatedData = [...this.domainDoFollowList()];\n \n updatedData.splice(key, 1);\n\n this.domainDoFollowList(updatedData);\n\n // Update the hasChanges\n this.hasChanges = true;\n }\n\n /**\n * Update domain\n * \n * @param {*} e \n */\n updateDomain(key, value) {\n let updatedData = [...this.domainDoFollowList()];\n updatedData[key] = value;\n\n this.domainDoFollowList(updatedData);\n\n // Update the hasChanges\n this.hasChanges = true;\n }\n\n // Close or save setting\n onsubmit(e) {\n if(!this.hasChanges) {\n this.hide();\n return;\n }\n\n this.loading = true;\n\n let data = {};\n data.seo_dofollow_domains = JSON.stringify(this.domainDoFollowList().filter(val => val !== \"\"));\n\n saveSettings(data).then(\n this.onsaved.bind(this)\n );\n }\n\n onsaved() {\n this.hide();\n }\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/Select'];","import Component from 'flarum/common/Component';\nimport FieldSet from 'flarum/components/FieldSet';\nimport Button from 'flarum/components/Button';\nimport saveSettings from 'flarum/utils/saveSettings';\nimport Switch from 'flarum/components/Switch';\nimport UploadImageButton from 'flarum/components/UploadImageButton';\nimport CrawlPostModal from \"../Modals/CrawlPostModal\";\nimport RobotsModal from \"../Modals/RobotsModal\";\nimport countKeywords from '../../utils/countKeywords';\nimport Stream from 'flarum/utils/Stream';\nimport DoFollowListModal from '../Modals/DoFollowListModal';\nimport Select from 'flarum/components/Select';\n\nexport default class SeoSettings extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.saving = false;\n\n this.fields = [\n 'forum_title',\n 'forum_description',\n 'forum_keywords',\n 'seo_allow_all_bots',\n 'seo_twitter_card_size'\n ];\n this.values = {};\n\n const settings = app.data.settings;\n this.fields.forEach(key => this.values[key] = Stream(settings[key] || \"\"));\n\n this.allowBotsValue = settings.seo_allow_all_bots !== \"0\";\n\n // Cheat 'seo_social_media_imageUrl'\n // Todo: Find a better way\n app.forum.data.attributes.seo_social_media_imageUrl = app.data.settings.seo_social_media_image_url;\n\n this.showField = 'all';\n\n // Single field\n if(m.route.param('setting') !== undefined) {\n this.showField = m.route.param('setting');\n }\n }\n\n // Create the form\n view() {\n return (\n
\n {this.infoText()}\n\n
\n {FieldSet.component({\n label: app.translator.trans('core.admin.basics.forum_description_heading'),\n className: this.showField !== 'all' && this.showField !== 'description' ? 'hidden' : '',\n }, [\n
\n {app.translator.trans('core.admin.basics.forum_description_text')}\n
,\n