feat: add background color and gradient color fields to App CMS configuration
This commit is contained in:
parent
57a84dde4c
commit
369c1a92e3
@ -154,6 +154,8 @@ 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',
|
||||||
|
'background_color': config.background_color or '#FAF6EE',
|
||||||
|
'background_gradient_color': config.background_gradient_color or '#F3EAD3',
|
||||||
}
|
}
|
||||||
|
|
||||||
@http.route('/api/loyalty/order_history', type='jsonrpc', auth='user', methods=['POST'], csrf=False)
|
@http.route('/api/loyalty/order_history', type='jsonrpc', auth='user', methods=['POST'], csrf=False)
|
||||||
|
|||||||
@ -32,6 +32,16 @@ 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'
|
||||||
)
|
)
|
||||||
|
background_color = fields.Char(
|
||||||
|
string='Background Color (Hex)',
|
||||||
|
default='#FAF6EE',
|
||||||
|
help='Hex color code for background color, e.g. #FAF6EE'
|
||||||
|
)
|
||||||
|
background_gradient_color = fields.Char(
|
||||||
|
string='Background Gradient Color (Hex)',
|
||||||
|
default='#F3EAD3',
|
||||||
|
help='Hex color code for bottom of background gradient, e.g. #F3EAD3'
|
||||||
|
)
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def get_config(self):
|
def get_config(self):
|
||||||
@ -41,7 +51,9 @@ class AppCmsConfig(models.Model):
|
|||||||
config = self.create({
|
config = self.create({
|
||||||
'name': 'App Configuration',
|
'name': 'App Configuration',
|
||||||
'primary_color': '#C62828',
|
'primary_color': '#C62828',
|
||||||
'secondary_color': '#FF8F00'
|
'secondary_color': '#FF8F00',
|
||||||
|
'background_color': '#FAF6EE',
|
||||||
|
'background_gradient_color': '#F3EAD3',
|
||||||
})
|
})
|
||||||
return config
|
return config
|
||||||
@api.model
|
@api.model
|
||||||
|
|||||||
@ -18,6 +18,10 @@
|
|||||||
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="background_color" placeholder="#FAF6EE"
|
||||||
|
help="Primary background color in Hex (e.g. #FAF6EE)"/>
|
||||||
|
<field name="background_gradient_color" placeholder="#F3EAD3"
|
||||||
|
help="Bottom color for background gradient in Hex (e.g. #F3EAD3)"/>
|
||||||
</group>
|
</group>
|
||||||
<group string="Account Menu Links">
|
<group string="Account Menu Links">
|
||||||
<field name="about_us_url"
|
<field name="about_us_url"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user