-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add additional fields for customization (#623)
* add additional fields for customization * add button background color * add color for button text * update migration
- Loading branch information
Showing
4 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
api/account/migrations/0032_customization_body_display_info_tooltip_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Generated by Django 4.2.6 on 2024-07-02 17:11 | ||
|
||
import account.models | ||
import django.core.validators | ||
from django.db import migrations, models | ||
import re | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("account", "0031_alter_allowlist_customization"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="customization", | ||
name="body_display_info_tooltip", | ||
field=models.BooleanField(default=False), | ||
), | ||
migrations.AddField( | ||
model_name="customization", | ||
name="body_info_tooltip_text", | ||
field=account.models.ReactNodeField( | ||
blank=True, help_text="The info tooltip text", null=True | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="customization", | ||
name="button_action_type", | ||
field=models.CharField( | ||
choices=[ | ||
("Simple Link", "Simple Link"), | ||
("Onchain Push", "Onchain Push"), | ||
], | ||
default="Simple Link", | ||
max_length=25, | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="customization", | ||
name="customization_background_3", | ||
field=account.models.RGBHexColorField( | ||
blank=True, | ||
help_text="Action button background color. RGB hex value expected, for example `#aaff66`", | ||
max_length=7, | ||
null=True, | ||
validators=[ | ||
django.core.validators.RegexValidator( | ||
re.compile("^#[A-Fa-f0-9]{6}$"), | ||
"Enter a valid RGBA color as hex string ", | ||
"invalid", | ||
) | ||
], | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="customization", | ||
name="customization_foreground_2", | ||
field=account.models.RGBHexColorField( | ||
blank=True, | ||
help_text="Action button text color. RGB hex value expected, for example `#aaff66`", | ||
max_length=7, | ||
null=True, | ||
validators=[ | ||
django.core.validators.RegexValidator( | ||
re.compile("^#[A-Fa-f0-9]{6}$"), | ||
"Enter a valid RGBA color as hex string ", | ||
"invalid", | ||
) | ||
], | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters