Skip to content

Commit 0977198

Browse files
committed
ui -> product_ui
1 parent f5f31c4 commit 0977198

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

packages/notifications-library/src/notifications_library/_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ class ProductData:
2626
vendor_display_inline: str
2727
support_email: str
2828
homepage_url: str
29-
ui: ProductUIData
29+
product_ui: ProductUIData

packages/notifications-library/src/notifications_library/templates/base.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
}
4141
.strong-button {
4242
cursor: pointer;
43-
background-color: {{ product.ui.strong_color }};
43+
background-color: {{ product.product_ui.strong_color }};
4444
color: white;
4545
padding: 10px;
4646
border: none;
@@ -82,7 +82,7 @@
8282
<div class="email-container">
8383
<div class="header">
8484
<a href="{{ product.homepage_url }}" target="_blank" rel="noopener noreferrer">
85-
<img src="{{ product.ui.logo_url }}" alt="Logo" class="logo">
85+
<img src="{{ product.product_ui.logo_url }}" alt="Logo" class="logo">
8686
</a>
8787
</div>
8888

packages/notifications-library/tests/conftest.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import notifications_library
1111
import pytest
1212
from models_library.products import ProductName
13-
from notifications_library._models import ProductData, UserData, ProductUIData
13+
from notifications_library._models import ProductData, ProductUIData, UserData
1414
from notifications_library.payments import PaymentData
1515
from pydantic import EmailStr
1616
from pytest_simcore.helpers.typing_env import EnvVarsDict
@@ -56,17 +56,20 @@ def product_data(
5656
vendor: Vendor = product["vendor"]
5757

5858
product_ui = ProductUIData(
59-
logo_url=vendor.get('logo','https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/static-webserver/client/source/resource/osparc/osparc-black.svg'),
60-
strong_color=vendor.get('strong_color','rgb(131, 0, 191)'),
59+
logo_url=vendor.get(
60+
"logo",
61+
"https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/static-webserver/client/source/resource/osparc/osparc-black.svg",
62+
),
63+
strong_color=vendor.get("strong_color", "rgb(131, 0, 191)"),
6164
)
6265

6366
return ProductData( # type: ignore
6467
product_name=product_name,
6568
display_name=product["display_name"],
6669
vendor_display_inline=f"{vendor.get('name','')}, {vendor.get('address','')}",
6770
support_email=product["support_email"],
68-
homepage_url=vendor.get('url','https://osparc.io/'),
69-
ui=product_ui,
71+
homepage_url=vendor.get("url", "https://osparc.io/"),
72+
product_ui=product_ui,
7073
)
7174

7275

0 commit comments

Comments
 (0)