Skip to content

Commit 3a86b5c

Browse files
committed
Fix color picker data type installation task
1 parent ab46964 commit 3a86b5c

File tree

3 files changed

+12
-49
lines changed

3 files changed

+12
-49
lines changed

src/Umbraco.Commerce.Checkout/UmbracoCommerceCheckoutConstants.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ public static class System
1414
#pragma warning disable IDE1006 // Naming Styles
1515
public static IReadOnlyDictionary<string, string> ColorMap = new Dictionary<string, string>
1616
{
17-
{ "#000000", "black" },
18-
{ "#ef4444", "red-500" },
19-
{ "#f97316", "orange-500" },
20-
{ "#eab308", "yellow-500" },
21-
{ "#22c55e", "green-500" },
22-
{ "#14b8a6", "teal-500" },
23-
{ "#3b82f6", "blue-500" },
24-
{ "#6366f1", "indigo-500" },
25-
{ "#a855f7", "purple-500" },
26-
{ "#ec4899", "pink-500" }
17+
{ "000000", "black" },
18+
{ "ef4444", "red-500" },
19+
{ "f97316", "orange-500" },
20+
{ "eab308", "yellow-500" },
21+
{ "22c55e", "green-500" },
22+
{ "14b8a6", "teal-500" },
23+
{ "3b82f6", "blue-500" },
24+
{ "6366f1", "indigo-500" },
25+
{ "a855f7", "purple-500" },
26+
{ "ec4899", "pink-500" }
2727
};
2828
#pragma warning restore IDE1006 // Naming Styles
2929

src/Umbraco.Commerce.Checkout/UmbracoCommerceCheckoutManifestFilter.cs

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/Umbraco.Commerce.Checkout/Web/PublishedContentExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ public static IPublishedContent GetCheckoutPage(this IPublishedContent content)
1919

2020
public static IPublishedContent GetCheckoutBackPage(this IPublishedContent content)
2121
{
22-
return GetCheckoutPage(content).Value<IPublishedContent>("uccBackPage");
22+
return GetCheckoutPage(content).Value<IPublishedContent>("uccBackPage")!;
2323
}
2424

2525
public static string GetThemeColor(this IPublishedContent content)
2626
{
27-
string themeColor = GetCheckoutPage(content).Value("uccThemeColor", defaultValue: "000000")!;
27+
string themeColor = GetCheckoutPage(content).Value("uccThemeColor", defaultValue: "#000000")!.TrimStart('#');
2828

2929
if (UmbracoCommerceCheckoutConstants.ColorMap.TryGetValue(themeColor, out string? value))
3030
{

0 commit comments

Comments
 (0)