This is an automated email from the ASF dual-hosted git repository.

sureshanaparti pushed a commit to branch 4.16
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.16 by this push:
     new a42ed1f  add a setting to config.json that allows users to set theme 
(#5584)
a42ed1f is described below

commit a42ed1fb89e49e75159f370ce33d01516869ccc7
Author: Hoang Nguyen <[email protected]>
AuthorDate: Mon Jan 17 13:00:56 2022 +0700

    add a setting to config.json that allows users to set theme (#5584)
---
 ui/public/config.json                   | 1 +
 ui/src/components/page/GlobalLayout.vue | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ui/public/config.json b/ui/public/config.json
index e999480..859f15d 100644
--- a/ui/public/config.json
+++ b/ui/public/config.json
@@ -57,5 +57,6 @@
   "plugins": [],
   "basicZoneEnabled": true,
   "multipleServer": false,
+  "allowSettingTheme": true,
   "docHelpMappings": {}
 }
diff --git a/ui/src/components/page/GlobalLayout.vue 
b/ui/src/components/page/GlobalLayout.vue
index 87c5ef8..d31123f 100644
--- a/ui/src/components/page/GlobalLayout.vue
+++ b/ui/src/components/page/GlobalLayout.vue
@@ -65,7 +65,7 @@
         </a-drawer>
       </template>
 
-      <template v-if="isDevelopmentMode">
+      <template v-if="isDevelopmentMode || allowSettingTheme">
         <drawer :visible="showSetting" placement="right">
           <div slot="handler">
             <a-button type="primary" size="large">
@@ -146,6 +146,9 @@ export default {
     isDevelopmentMode () {
       return process.env.NODE_ENV === 'development'
     },
+    allowSettingTheme () {
+      return this.$config.allowSettingTheme
+    },
     contentPaddingLeft () {
       if (!this.fixSidebar || this.isMobile()) {
         return '0'

Reply via email to