mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:17:32 +00:00
fix: label policy (#1828)
* fix: font color * fix: assets from iam when policy is default * fix: remove multiple files * fix mock storage * doc: add asset api * build assets docs * fix operator test * docs * fix remove assets from org label policy and not default * fix remove label policy assets and feature downgrade correctly * fix storage mock * Update docs/docs/apis/apis.md Co-authored-by: fabi <fabienne.gerschwiler@gmail.com> Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>
This commit is contained in:
@@ -174,6 +174,12 @@ func (m *Styling) writeFile(policy *iam_model.LabelPolicyView) (io.Reader, int64
|
||||
cssContent += fmt.Sprintf("--zitadel-color-warn-%v: %s;", i, color)
|
||||
}
|
||||
}
|
||||
if policy.FontColor != "" {
|
||||
palette := m.generateColorPaletteRGBA255(policy.FontColor)
|
||||
for i, color := range palette {
|
||||
cssContent += fmt.Sprintf("--zitadel-color-text-%v: %s;", i, color)
|
||||
}
|
||||
}
|
||||
var fontname string
|
||||
if policy.FontURL != "" {
|
||||
split := strings.Split(policy.FontURL, "/")
|
||||
@@ -206,7 +212,7 @@ func (m *Styling) writeFile(policy *iam_model.LabelPolicyView) (io.Reader, int64
|
||||
if policy.FontColorDark != "" {
|
||||
palette := m.generateColorPaletteRGBA255(policy.FontColorDark)
|
||||
for i, color := range palette {
|
||||
cssContent += fmt.Sprintf("--zitadel-color-font-%v: %s;", i, color)
|
||||
cssContent += fmt.Sprintf("--zitadel-color-text-%v: %s;", i, color)
|
||||
}
|
||||
}
|
||||
cssContent += fmt.Sprint("}")
|
||||
|
Reference in New Issue
Block a user