Skip to content

Commit

Permalink
Add accent colors
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed Oct 30, 2024
1 parent a839454 commit a4cd1fe
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions backend/src/kitconcept/intranet/behaviors/theming.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class ITheming(model.Schema):
"theming",
fields=[
"logo",
"accent_color",
"accent_foreground_color",
"theme_color",
"theme_foreground_color",
"theme_high_contrast_color",
Expand All @@ -31,6 +33,20 @@ class ITheming(model.Schema):
required=False,
)

directives.widget("accent_color", frontendOptions={"widget": "themingColorPicker"})
accent_color = TextLine(
title=_("label_accent_color", default="Accent Color"),
required=False,
)

directives.widget(
"accent_foreground_color", frontendOptions={"widget": "themingColorPicker"}
)
accent_foreground_color = TextLine(
title=_("label_accent_foreground_color", default="Accent Foreground Color"),
required=False,
)

directives.widget("theme_color", frontendOptions={"widget": "themingColorPicker"})
theme_color = TextLine(
title=_("label_theme_color", default="Primary Color"),
Expand Down

0 comments on commit a4cd1fe

Please sign in to comment.