add a setting to config.json that allows users to set theme (#5584)

This commit is contained in:
Hoang Nguyen 2022-01-17 13:00:56 +07:00 committed by GitHub
parent 59a615cf21
commit a42ed1fb89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -57,5 +57,6 @@
"plugins": [],
"basicZoneEnabled": true,
"multipleServer": false,
"allowSettingTheme": true,
"docHelpMappings": {}
}

View File

@ -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'