diff --git a/app/assets/javascripts/discourse/components/global-notice.js.es6 b/app/assets/javascripts/discourse/components/global-notice.js.es6 index 553b13699f9..8a213ae8a4b 100644 --- a/app/assets/javascripts/discourse/components/global-notice.js.es6 +++ b/app/assets/javascripts/discourse/components/global-notice.js.es6 @@ -4,7 +4,7 @@ export default Ember.Component.extend(StringBuffer, { rerenderTriggers: ['site.isReadOnly'], renderString: function(buffer) { - var notices = []; + let notices = []; if (this.site.get("isReadOnly")) { notices.push([I18n.t("read_only_mode.enabled"), 'alert-read-only']); @@ -14,8 +14,12 @@ export default Ember.Component.extend(StringBuffer, { notices.push([I18n.t("emails_are_disabled"), 'alert-emails-disabled']); } + if (this.siteSettings.enable_s3_uploads) { + notices.push([I18n.t("s3_deprecation_warning"), 'alert-s3-deprecation']); + } + if (Discourse.User.currentProp('admin') && this.siteSettings.show_create_topics_notice) { - var topic_count = 0, + let topic_count = 0, post_count = 0; _.each(this.site.get('categories'), function(c) { if (!c.get('read_restricted')) { @@ -24,7 +28,7 @@ export default Ember.Component.extend(StringBuffer, { } }); if (topic_count < 5 || post_count < this.siteSettings.tl1_requires_read_posts) { - notices.push([I18n.t("too_few_topics_notice", {posts: this.siteSettings.tl1_requires_read_posts}), 'alert-too-few-topics']); + notices.push([I18n.t("too_few_topics_notice", { posts: this.siteSettings.tl1_requires_read_posts }), 'alert-too-few-topics']); } } @@ -33,9 +37,7 @@ export default Ember.Component.extend(StringBuffer, { } if (notices.length > 0) { - buffer.push(_.map(notices, function(arr) { - return "
" + arr[0] + "
"; - }).join("")); + buffer.push(_.map(notices, n => "
" + n[0] + "
").join("")); } } }); diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 453000fa4c6..1da857d0dc9 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -105,6 +105,8 @@ en: emails_are_disabled: "All outgoing email has been globally disabled by an administrator. No email notifications of any kind will be sent." + s3_deprecation_warning: "WARNING! Amazon S3 will soon be deprecated for image/attachment storage. Please, follow the instructions to migrate to local storage." + edit: 'edit the title and category of this topic' not_implemented: "That feature hasn't been implemented yet, sorry!" no_value: "No" diff --git a/config/site_settings.yml b/config/site_settings.yml index bf05e249b4f..dc5b03839e9 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -484,7 +484,9 @@ files: prevent_anons_from_downloading_files: default: false client: true - enable_s3_uploads: false + enable_s3_uploads: + default: false + client: true s3_use_iam_profile: false s3_access_key_id: '' s3_secret_access_key: ''