feat: add tertiary color configuration field to CMS settings and API response
This commit is contained in:
parent
c9f25b4dae
commit
0a02b71202
@ -141,7 +141,8 @@ class AppNotificationController(http.Controller):
|
|||||||
config = request.env['mapan.app.config'].sudo().create({
|
config = request.env['mapan.app.config'].sudo().create({
|
||||||
'name': 'App Configuration',
|
'name': 'App Configuration',
|
||||||
'primary_color': '#C62828',
|
'primary_color': '#C62828',
|
||||||
'secondary_color': '#FF8F00'
|
'secondary_color': '#FF8F00',
|
||||||
|
'tertiary_color': '#4A7C59',
|
||||||
})
|
})
|
||||||
|
|
||||||
brand_logo = config.brand_logo
|
brand_logo = config.brand_logo
|
||||||
@ -155,6 +156,7 @@ class AppNotificationController(http.Controller):
|
|||||||
'brand_logo': brand_logo or '',
|
'brand_logo': brand_logo or '',
|
||||||
'primary_color': config.primary_color or '#C62828',
|
'primary_color': config.primary_color or '#C62828',
|
||||||
'secondary_color': config.secondary_color or '#FF8F00',
|
'secondary_color': config.secondary_color or '#FF8F00',
|
||||||
|
'tertiary_color': config.tertiary_color or '#4A7C59',
|
||||||
'background_color': config.background_color or '#FAF6EE',
|
'background_color': config.background_color or '#FAF6EE',
|
||||||
'background_gradient_color': config.background_gradient_color or '#F3EAD3',
|
'background_gradient_color': config.background_gradient_color or '#F3EAD3',
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,6 +32,11 @@ class AppCmsConfig(models.Model):
|
|||||||
default='#FF8F00',
|
default='#FF8F00',
|
||||||
help='Hex color code for secondary theme color, e.g. #FF8F00'
|
help='Hex color code for secondary theme color, e.g. #FF8F00'
|
||||||
)
|
)
|
||||||
|
tertiary_color = fields.Char(
|
||||||
|
string='Tertiary Color (Hex)',
|
||||||
|
default='#4A7C59',
|
||||||
|
help='Hex color code for tertiary theme color (e.g. accent for tags/chips), e.g. #4A7C59'
|
||||||
|
)
|
||||||
background_color = fields.Char(
|
background_color = fields.Char(
|
||||||
string='Background Color (Hex)',
|
string='Background Color (Hex)',
|
||||||
default='#FAF6EE',
|
default='#FAF6EE',
|
||||||
@ -52,6 +57,7 @@ class AppCmsConfig(models.Model):
|
|||||||
'name': 'App Configuration',
|
'name': 'App Configuration',
|
||||||
'primary_color': '#C62828',
|
'primary_color': '#C62828',
|
||||||
'secondary_color': '#FF8F00',
|
'secondary_color': '#FF8F00',
|
||||||
|
'tertiary_color': '#4A7C59',
|
||||||
'background_color': '#FAF6EE',
|
'background_color': '#FAF6EE',
|
||||||
'background_gradient_color': '#F3EAD3',
|
'background_gradient_color': '#F3EAD3',
|
||||||
})
|
})
|
||||||
|
|||||||
@ -18,6 +18,8 @@
|
|||||||
help="Primary theme color in Hex (e.g. #C62828)"/>
|
help="Primary theme color in Hex (e.g. #C62828)"/>
|
||||||
<field name="secondary_color" placeholder="#FF8F00"
|
<field name="secondary_color" placeholder="#FF8F00"
|
||||||
help="Secondary theme color in Hex (e.g. #FF8F00)"/>
|
help="Secondary theme color in Hex (e.g. #FF8F00)"/>
|
||||||
|
<field name="tertiary_color" placeholder="#4A7C59"
|
||||||
|
help="Tertiary theme color in Hex (e.g. #4A7C59 for sage green)"/>
|
||||||
<field name="background_color" placeholder="#FAF6EE"
|
<field name="background_color" placeholder="#FAF6EE"
|
||||||
help="Primary background color in Hex (e.g. #FAF6EE)"/>
|
help="Primary background color in Hex (e.g. #FAF6EE)"/>
|
||||||
<field name="background_gradient_color" placeholder="#F3EAD3"
|
<field name="background_gradient_color" placeholder="#F3EAD3"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user