From e938bb34f14fb88cd27433f18a8686a8d26b256f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Thu, 16 Mar 2023 16:58:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=B3=BB=E7=BB=9F=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=A1=B5=E9=9D=A2=E8=83=8C=E6=99=AF=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/systemconfigs/theme_config.go | 25 +++++++++++++++++++++++++ pkg/systemconfigs/user_ui_config.go | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 pkg/systemconfigs/theme_config.go diff --git a/pkg/systemconfigs/theme_config.go b/pkg/systemconfigs/theme_config.go new file mode 100644 index 0000000..15a0193 --- /dev/null +++ b/pkg/systemconfigs/theme_config.go @@ -0,0 +1,25 @@ +// Copyright 2023 Liuxiangchao iwind.liu@gmail.com. All rights reserved. Official site: https://goedge.cn . + +package systemconfigs + +func DefaultThemeBackgroundColors() []string { + return []string{ + "14539A", + "276AC6", + "0081AF", + "473BF0", + "ACADBC", + "9B9ECE", + "C96480", + "B47978", + "B1AE91", + "49A078", + "46237A", + "000500", + } +} + +// ThemeConfig 风格模板设置 +type ThemeConfig struct { + BackgroundColor string `yaml:"backgroundColor" json:"backgroundColor"` // 背景色,16进制,不需要带井号(#) +} diff --git a/pkg/systemconfigs/user_ui_config.go b/pkg/systemconfigs/user_ui_config.go index e69d502..61708dd 100644 --- a/pkg/systemconfigs/user_ui_config.go +++ b/pkg/systemconfigs/user_ui_config.go @@ -29,6 +29,8 @@ type UserUIConfig struct { DefaultBandwidthDateRange string `json:"defaultBandwidthDateRange"` // 默认带宽周期 BandwidthAlgo BandwidthAlgo `json:"bandwidthAlgo"` // 带宽算法 } `json:"trafficStats"` // 流量统计相关设置 + + Theme ThemeConfig `yaml:"theme" json:"theme"` // 风格模板 } func DefaultUserUIConfig() *UserUIConfig {