Skip to content

Commit

Permalink
Amend labels
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed Nov 13, 2024
1 parent 39c295c commit ea29a41
Showing 1 changed file with 8 additions and 35 deletions.
43 changes: 8 additions & 35 deletions backend/src/kitconcept/intranet/behaviors/theming.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,22 @@

messages = {
"accent_color": {
"default": "Fat menu background",
"description": (
"This is also the color used as accent color in buttons font text "
"and for the breadcumbs background"
),
"default": "Fat Menu Background Color",
},
"accent_foreground_color": {
"default": "Fat menu font color",
"description": "This is also the color used in ...",
"default": "Fat Menu / Breadcrumbs Text Color",
},
"primary_color": {
"default": "Header background color (for dark themes)",
"description": "If not set, the default color is used.",
},
"primary_foreground_color": {
"default": "Navigation menu font color",
"description": "This is also the color used in ...",
"default": "Navigation Text Color",
},
"secondary_color": {
"default": "Footer background color",
"description": "This is also the color used in ...",
"default": "Footer Background Color",
},
"secondary_foreground_color": {
"default": "Footer font color",
"description": "This is also the color used in ...",
"default": "Footer Font Color",
},
}

Expand All @@ -49,12 +40,12 @@ class ITheming(model.Schema):
title="Theming",
fields=[
"logo",
"accent_color",
"primary_foreground_color",
"accent_foreground_color",
"accent_color",
# "primary_color", # Not used in PiK
"primary_foreground_color",
"secondary_color",
"secondary_foreground_color",
"secondary_color",
],
)

Expand All @@ -70,9 +61,6 @@ class ITheming(model.Schema):
directives.widget("accent_color", frontendOptions={"widget": "themingColorPicker"})
accent_color = TextLine(
title=_("label_accent_color", default=messages["accent_color"]["default"]),
description=_(
"help_accent_color", default=messages["accent_color"]["description"]
),
required=False,
)

Expand All @@ -84,10 +72,6 @@ class ITheming(model.Schema):
"label_accent_foreground_color",
default=messages["accent_foreground_color"]["default"],
),
description=_(
"help_accent_foreground_color",
default=messages["accent_foreground_color"]["description"],
),
required=False,
)

Expand All @@ -99,10 +83,6 @@ class ITheming(model.Schema):
"label_primary_foreground_color",
default=messages["primary_foreground_color"]["default"],
),
description=_(
"help_primary_foreground_color",
default=messages["primary_foreground_color"]["description"],
),
required=False,
)

Expand All @@ -113,9 +93,6 @@ class ITheming(model.Schema):
title=_(
"label_secondary_color", default=messages["secondary_color"]["default"]
),
description=_(
"help_secondary_color", default=messages["secondary_color"]["description"]
),
required=False,
)

Expand All @@ -128,9 +105,5 @@ class ITheming(model.Schema):
"label_secondary_foreground_color",
default=messages["secondary_foreground_color"]["default"],
),
description=_(
"help_secondary_foreground_color",
default=messages["secondary_foreground_color"]["description"],
),
required=False,
)

0 comments on commit ea29a41

Please sign in to comment.