Skip to content

Commit a42ed1f

Browse files
author
Hoang Nguyen
authored
add a setting to config.json that allows users to set theme (apache#5584)
1 parent 59a615c commit a42ed1f

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

ui/public/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,6 @@
5757
"plugins": [],
5858
"basicZoneEnabled": true,
5959
"multipleServer": false,
60+
"allowSettingTheme": true,
6061
"docHelpMappings": {}
6162
}

ui/src/components/page/GlobalLayout.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
</a-drawer>
6666
</template>
6767

68-
<template v-if="isDevelopmentMode">
68+
<template v-if="isDevelopmentMode || allowSettingTheme">
6969
<drawer :visible="showSetting" placement="right">
7070
<div slot="handler">
7171
<a-button type="primary" size="large">
@@ -146,6 +146,9 @@ export default {
146146
isDevelopmentMode () {
147147
return process.env.NODE_ENV === 'development'
148148
},
149+
allowSettingTheme () {
150+
return this.$config.allowSettingTheme
151+
},
149152
contentPaddingLeft () {
150153
if (!this.fixSidebar || this.isMobile()) {
151154
return '0'

0 commit comments

Comments
 (0)