From 69d74ae508d69fef124356da18e7d5f8ca953b93 Mon Sep 17 00:00:00 2001 From: Daniel Waterworth Date: Mon, 26 Sep 2022 13:16:29 -0500 Subject: [PATCH] DEV: Differentiate staff-writes-only banner (#18364) --- .../discourse/app/components/global-notice.js | 11 ++++++++++- config/locales/client.en.yml | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/components/global-notice.js b/app/assets/javascripts/discourse/app/components/global-notice.js index 170421cb13..c0bd0bcd54 100644 --- a/app/assets/javascripts/discourse/app/components/global-notice.js +++ b/app/assets/javascripts/discourse/app/components/global-notice.js @@ -77,6 +77,7 @@ export default Component.extend({ @discourseComputed( "site.isReadOnly", + "site.isStaffWritesOnly", "siteSettings.login_required", "siteSettings.disable_emails", "siteSettings.global_notice", @@ -85,6 +86,7 @@ export default Component.extend({ ) notices( isReadOnly, + isStaffWritesOnly, loginRequired, disableEmails, globalNotice, @@ -111,7 +113,14 @@ export default Component.extend({ ); } - if (isReadOnly) { + if (isStaffWritesOnly) { + notices.push( + Notice.create({ + text: I18n.t("staff_writes_only_mode.enabled"), + id: "alert-staff-writes-only", + }) + ); + } else if (isReadOnly) { notices.push( Notice.create({ text: I18n.t("read_only_mode.enabled"), diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 300e3234ad..12cc1ac97c 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -1838,6 +1838,8 @@ en: enabled: "This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now." login_disabled: "Login is disabled while the site is in read only mode." logout_disabled: "Logout is disabled while the site is in read only mode." + staff_writes_only_mode: + enabled: "This site is in staff only mode. Please continue to browse, but replying, likes, and other actions are limited to staff members only." too_few_topics_and_posts_notice_MF: >- Let's start the discussion! There {currentTopics, plural, one {is # topic} other {are # topics}} and