From 868ab26fb3fd9be83c7925d96b500896a0065835 Mon Sep 17 00:00:00 2001 From: Jordan Vidrine <30537603+jordanvidrine@users.noreply.github.com> Date: Mon, 17 Oct 2022 16:44:30 -0500 Subject: [PATCH] UX: Simplify bootstrap mode visuals (#18626) --- .../discourse/app/components/d-navigation.js | 5 +++++ .../components/bootstrap-mode-notice.hbs | 10 +--------- .../app/templates/components/d-navigation.hbs | 13 ++++++++++++ .../acceptance/bootstrap-mode-notice-test.js | 20 +------------------ 4 files changed, 20 insertions(+), 28 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/d-navigation.js b/app/assets/javascripts/discourse/app/components/d-navigation.js index 2153fc5f9ce..34c4c75321d 100644 --- a/app/assets/javascripts/discourse/app/components/d-navigation.js +++ b/app/assets/javascripts/discourse/app/components/d-navigation.js @@ -5,6 +5,7 @@ import discourseComputed from "discourse-common/utils/decorators"; import { NotificationLevels } from "discourse/lib/notification-levels"; import { getOwner } from "discourse-common/lib/get-owner"; import { inject as service } from "@ember/service"; +import showModal from "discourse/lib/show-modal"; export default Component.extend(FilterModeMixin, { router: service(), @@ -162,5 +163,9 @@ export default Component.extend(FilterModeMixin, { this.createTopic(); } }, + + inviteUsers() { + showModal("create-invite"); + }, }, }); diff --git a/app/assets/javascripts/discourse/app/templates/components/bootstrap-mode-notice.hbs b/app/assets/javascripts/discourse/app/templates/components/bootstrap-mode-notice.hbs index aa9fb8b0b4c..66b0a9e8b72 100644 --- a/app/assets/javascripts/discourse/app/templates/components/bootstrap-mode-notice.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/bootstrap-mode-notice.hbs @@ -1,13 +1,5 @@
-
- {{this.message}} -
-
-
- {{#if this.site.wizard_required}} - - {{/if}} -
+ {{this.message}}
diff --git a/app/assets/javascripts/discourse/app/templates/components/d-navigation.hbs b/app/assets/javascripts/discourse/app/templates/components/d-navigation.hbs index 2e793cfaa8b..d4efd2c880d 100644 --- a/app/assets/javascripts/discourse/app/templates/components/d-navigation.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/d-navigation.hbs @@ -39,6 +39,19 @@ category=this.category tag=this.tag}} /> + {{#if (and (or this.site.siteSettings.invite_only this.site.siteSettings.bootstrap_mode_enabled) this.currentUser.admin)}} + + {{/if}} + + {{#if (and this.site.siteSettings.wizard_required this.currentUser.admin)}} + {{#unless this.site.mobileView}} + + {{d-icon "pencil-alt"}} + {{i18n "bootstrap_wizard_link_title"}} + + {{/unless}} + {{/if}} +