mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
feat(bot): add toggle for color codes on cv2 cards
Some checks failed
Build dashboard Docker image / dashboard docker build (push) Has been cancelled
Build and push Docker image / .net docker build (push) Has been cancelled
Build and push Rust service Docker images / rust docker build (push) Has been cancelled
rust checks / cargo fmt (push) Has been cancelled
Some checks failed
Build dashboard Docker image / dashboard docker build (push) Has been cancelled
Build and push Docker image / .net docker build (push) Has been cancelled
Build and push Rust service Docker images / rust docker build (push) Has been cancelled
rust checks / cargo fmt (push) Has been cancelled
This commit is contained in:
parent
da42ba9d21
commit
ac845d7b5a
7 changed files with 50 additions and 3 deletions
|
|
@ -22,6 +22,7 @@ public class SystemConfigPatch: PatchObject
|
|||
public Partial<bool> ProxyErrorMessageEnabled { get; set; }
|
||||
public Partial<bool> HidDisplaySplit { get; set; }
|
||||
public Partial<bool> HidDisplayCaps { get; set; }
|
||||
public Partial<bool> CardShowColorHex { get; set; }
|
||||
public Partial<string?> NameFormat { get; set; }
|
||||
public Partial<SystemConfig.HidPadFormat> HidListPadding { get; set; }
|
||||
public Partial<SystemConfig.ProxySwitchAction> ProxySwitch { get; set; }
|
||||
|
|
@ -41,6 +42,7 @@ public class SystemConfigPatch: PatchObject
|
|||
.With("hid_display_split", HidDisplaySplit)
|
||||
.With("hid_display_caps", HidDisplayCaps)
|
||||
.With("hid_list_padding", HidListPadding)
|
||||
.With("card_show_color_hex", CardShowColorHex)
|
||||
.With("proxy_switch", ProxySwitch)
|
||||
.With("name_format", NameFormat)
|
||||
);
|
||||
|
|
@ -107,6 +109,9 @@ public class SystemConfigPatch: PatchObject
|
|||
if (HidListPadding.IsPresent)
|
||||
o.Add("hid_list_padding", HidListPadding.Value.ToUserString());
|
||||
|
||||
if (CardShowColorHex.IsPresent)
|
||||
o.Add("card_show_color_hex", CardShowColorHex.Value);
|
||||
|
||||
if (ProxySwitch.IsPresent)
|
||||
o.Add("proxy_switch", ProxySwitch.Value.ToUserString());
|
||||
|
||||
|
|
@ -150,6 +155,9 @@ public class SystemConfigPatch: PatchObject
|
|||
if (o.ContainsKey("hid_display_caps"))
|
||||
patch.HidDisplayCaps = o.Value<bool>("hid_display_caps");
|
||||
|
||||
if (o.ContainsKey("card_show_color_hex"))
|
||||
patch.CardShowColorHex = o.Value<bool>("card_show_color_hex");
|
||||
|
||||
if (o.ContainsKey("proxy_switch"))
|
||||
patch.ProxySwitch = o.Value<string>("proxy_switch") switch
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ public class SystemConfig
|
|||
public bool ProxyErrorMessageEnabled { get; }
|
||||
public bool HidDisplaySplit { get; }
|
||||
public bool HidDisplayCaps { get; }
|
||||
public bool CardShowColorHex { get; }
|
||||
public HidPadFormat HidListPadding { get; }
|
||||
public ProxySwitchAction ProxySwitch { get; }
|
||||
public string NameFormat { get; }
|
||||
|
|
@ -60,6 +61,7 @@ public static class SystemConfigExt
|
|||
o.Add("hid_display_split", cfg.HidDisplaySplit);
|
||||
o.Add("hid_display_caps", cfg.HidDisplayCaps);
|
||||
o.Add("hid_list_padding", cfg.HidListPadding.ToUserString());
|
||||
o.Add("card_show_color_hex", cfg.CardShowColorHex);
|
||||
o.Add("proxy_switch", cfg.ProxySwitch.ToUserString());
|
||||
o.Add("name_format", cfg.NameFormat);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue