Skip to content

Commit

Permalink
chore: add missing confguration "NEXT_PUBLIC_THEME_INITIAL_COLOR_MODE"
Browse files Browse the repository at this point in the history
  • Loading branch information
sushiAlii committed Dec 19, 2024
1 parent 1766460 commit 9c4a1e1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions configs/app/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const defaultColorTheme = (() => {

const UI = Object.freeze({
theme: {
initialColorMode: (getEnvValue('NEXT_PUBLIC_THEME_INITIAL_COLOR_MODE') as ('system' | 'light' | 'dark' | undefined)) || 'system',
statisticBgColor: getEnvValue('NEXT_PUBLIC_THEME_STATISTIC_BG_COLOR'),
statisticBgDarkColor: getEnvValue('NEXT_PUBLIC_THEME_STATISTIC_BG_DARK_COLOR'),
statisticTextColor: getEnvValue('NEXT_PUBLIC_THEME_STATISTIC_TEXT_COLOR'),
Expand Down
1 change: 1 addition & 0 deletions deploy/tools/envs-validator/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,7 @@ const schema = yup
NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN: yup.string(),

// 7. Theme configuraton
NEXT_PUBLIC_THEME_INITIAL_COLOR_MODE: yup.string().oneOf([ 'system', 'light', 'dark' ]).optional(),
NEXT_PUBLIC_THEME_STATISTIC_BG_COLOR: yup.string().optional(),
NEXT_PUBLIC_THEME_STATISTIC_TEXT_COLOR: yup.string().optional(),
NEXT_PUBLIC_THEME_LINK_COLOR: yup.string().optional(),
Expand Down
1 change: 1 addition & 0 deletions docs/ENVS.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Please be aware that all environment variables prefixed with `NEXT_PUBLIC_` will

| Variable | Type| Description | Compulsoriness | Default value | Example value |
| --- | --- | --- | --- | --- | --- |
| NEXT_PUBLIC_THEME_INITIAL_COLOR_MODE | `system \| light \| dark` | initial code mode | - | `light` | `light` |
| NEXT_PUBLIC_THEME_STATISTIC_BG_COLOR | - | - | - | | |
| NEXT_PUBLIC_THEME_STATISTIC_BG_DARK_COLOR | - | - | - | | |
| NEXT_PUBLIC_THEME_STATISTIC_TEXT_COLOR | - | - | - | | |
Expand Down

0 comments on commit 9c4a1e1

Please sign in to comment.