feat: add theme setting
This commit is contained in:
parent
309c33e190
commit
aec30b89e0
@ -45,6 +45,22 @@ pub struct VergeConfig {
|
|||||||
|
|
||||||
/// proxy guard duration
|
/// proxy guard duration
|
||||||
pub proxy_guard_duration: Option<u64>,
|
pub proxy_guard_duration: Option<u64>,
|
||||||
|
|
||||||
|
/// theme setting
|
||||||
|
pub theme_setting: Option<VergeTheme>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Default, Debug, Clone, Deserialize, Serialize)]
|
||||||
|
pub struct VergeTheme {
|
||||||
|
pub primary_color: Option<String>,
|
||||||
|
pub secondary_color: Option<String>,
|
||||||
|
pub info_color: Option<String>,
|
||||||
|
pub error_color: Option<String>,
|
||||||
|
pub warning_color: Option<String>,
|
||||||
|
pub success_color: Option<String>,
|
||||||
|
|
||||||
|
pub font_family: Option<String>,
|
||||||
|
pub font_face: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl VergeConfig {
|
impl VergeConfig {
|
||||||
@ -203,6 +219,9 @@ impl Verge {
|
|||||||
if patch.enable_silent_start.is_some() {
|
if patch.enable_silent_start.is_some() {
|
||||||
self.config.enable_silent_start = patch.enable_silent_start;
|
self.config.enable_silent_start = patch.enable_silent_start;
|
||||||
}
|
}
|
||||||
|
if patch.theme_setting.is_some() {
|
||||||
|
self.config.theme_setting = patch.theme_setting;
|
||||||
|
}
|
||||||
|
|
||||||
// should update system startup
|
// should update system startup
|
||||||
if patch.enable_auto_launch.is_some() {
|
if patch.enable_auto_launch.is_some() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user