From a53c23f04b9f7fdf349b650fbd62eeebfcab243a Mon Sep 17 00:00:00 2001 From: Vlad Dlogush Date: Mon, 15 Nov 2021 13:38:39 +0200 Subject: [PATCH] fix(storefront): BCTHEME-912 Admin Bar displays regardless of setting --- CHANGELOG.md | 1 + assets/js/theme/global.js | 6 ++---- config.json | 1 - schema.json | 9 --------- schemaTranslations.json | 6 ------ templates/layout/base.html | 1 - 6 files changed, 3 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03e3fe77a4..f34473d2de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Draft +- Admin Bar displays regardless of setting. [#2144](https://github.com/bigcommerce/cornerstone/pull/2144) - Cannot see currency dropdown in storefront. [#2141](https://github.com/bigcommerce/cornerstone/pull/2141) ## 6.1.2 (11-05-2021) diff --git a/assets/js/theme/global.js b/assets/js/theme/global.js index b030eae56e..43681b25a5 100644 --- a/assets/js/theme/global.js +++ b/assets/js/theme/global.js @@ -19,7 +19,7 @@ import svgInjector from './global/svg-injector'; export default class Global extends PageManager { onReady() { const { - channelId, cartId, productId, categoryId, secureBaseUrl, maintenanceModeSettings, adminBarLanguage, showAdminBar, + channelId, cartId, productId, categoryId, secureBaseUrl, maintenanceModeSettings, adminBarLanguage, } = this.context; cartPreview(secureBaseUrl, cartId); quickSearch(); @@ -30,9 +30,7 @@ export default class Global extends PageManager { menu(); mobileMenuToggle(); privacyCookieNotification(); - if (showAdminBar) { - adminBar(secureBaseUrl, channelId, maintenanceModeSettings, JSON.parse(adminBarLanguage), productId, categoryId); - } + adminBar(secureBaseUrl, channelId, maintenanceModeSettings, JSON.parse(adminBarLanguage), productId, categoryId); loadingProgressBar(); svgInjector(); } diff --git a/config.json b/config.json index 34320598dc..c31ef8186b 100644 --- a/config.json +++ b/config.json @@ -348,7 +348,6 @@ "paypal" ], "lazyload_mode": "lazyload+lqip", - "show-admin-bar": true, "checkout-paymentbuttons-paypal-color": "black", "checkout-paymentbuttons-paypal-shape": "rect", "checkout-paymentbuttons-paypal-size": "large", diff --git a/schema.json b/schema.json index 5f467d7d23..b75fc60736 100644 --- a/schema.json +++ b/schema.json @@ -516,15 +516,6 @@ "type": "color", "label": "i18n.FieldBorderActive", "id": "input-border-color-active" - }, - { - "type": "heading", - "content": "i18n.AdminBar" - }, - { - "type": "checkbox", - "label": "i18n.ShowAdminBar", - "id": "show-admin-bar" } ] }, diff --git a/schemaTranslations.json b/schemaTranslations.json index d53ae808e7..f31cd16bfa 100644 --- a/schemaTranslations.json +++ b/schemaTranslations.json @@ -510,12 +510,6 @@ "uk": "Кордон поля активний", "zh": "字段边框启用" }, - "i18n.AdminBar": { - "default": "Admin Bar" - }, - "i18n.ShowAdminBar": { - "default": "Show persistent admin bar when viewing storefront from your control panel" - }, "i18n.HeaderAndFooter": { "default": "Header & Footer", "fr": "En-tête & pied de page", diff --git a/templates/layout/base.html b/templates/layout/base.html index 1141ed7ce8..9ce3d896f1 100644 --- a/templates/layout/base.html +++ b/templates/layout/base.html @@ -44,7 +44,6 @@ {{~inject 'zoomSize' theme_settings.zoom_size}} {{~inject 'productSize' theme_settings.product_size}} - {{~inject 'showAdminBar' theme_settings.show-admin-bar}} {{~inject 'genericError' (lang 'common.generic_error')}} {{~inject 'maintenanceModeSettings' settings.maintenance}} {{~inject 'adminBarLanguage' (langJson 'admin')}}