From 5246d8c1ba17baf52b14a7b29f274bc48045e704 Mon Sep 17 00:00:00 2001 From: masoodafar-web Date: Sat, 3 Oct 2026 22:18:44 +0330 Subject: [PATCH 1/3] feat(index): add TwentyCard credit promo section and integrate portal link - Introduced a new promotional section for TwentyCard credit on the landing page, featuring details about the service and a button to access the TwentyCard portal. - Updated the Index.razor.cs file to retrieve the portal URL from configuration and implemented the logic to open the portal in a new tab. - Enhanced site.css with styling specific to the TwentyCard promo box. These changes enhance user engagement by promoting the TwentyCard credit option and providing easy access to its portal. --- src/FrontOffice.Main/Pages/Index.razor | 36 +++++++++++++++++++++++ src/FrontOffice.Main/Pages/Index.razor.cs | 10 +++++++ src/FrontOffice.Main/wwwroot/css/site.css | 6 ++++ 3 files changed, 52 insertions(+) diff --git a/src/FrontOffice.Main/Pages/Index.razor b/src/FrontOffice.Main/Pages/Index.razor index ed08e12..bab8233 100644 --- a/src/FrontOffice.Main/Pages/Index.razor +++ b/src/FrontOffice.Main/Pages/Index.razor @@ -93,6 +93,42 @@ } +@* ═══════════════════════════════════════════════ + 1c. TWENTYCARD CREDIT — promo box + ═══════════════════════════════════════════════ *@ +
+ + + + + + + + تأمین اعتبار ۲۰کارت + + با تأمین اعتبار از طریق ۲۰کارت می‌توانید بدون پرداخت نقدی کامل، هزینه خرید پکیج و محصولات در کارا بازار را پوشش دهید. + فرایند درخواست و تأیید اعتبار در پنل ۲۰کارت انجام می‌شود و پس از آن پرداخت از همان مسیر در دسترس است. + این روش برای کسانی مناسب است که می‌خواهند سریع‌تر وارد مسیر عضویت و خرید شوند. + + + بعد از دریافت وام، می‌توانید در کارا بازار از باشگاه مشتریان استفاده کنید و با فروش و دعوت، توسعه سرمایه داشته باشید. + +
+ + ورود به سایت ۲۰کارت + +
+
+
+
+
+
+ @* ═══════════════════════════════════════════════ 2. HOW IT WORKS — 3 numbered steps ═══════════════════════════════════════════════ *@ diff --git a/src/FrontOffice.Main/Pages/Index.razor.cs b/src/FrontOffice.Main/Pages/Index.razor.cs index d019edc..4062577 100644 --- a/src/FrontOffice.Main/Pages/Index.razor.cs +++ b/src/FrontOffice.Main/Pages/Index.razor.cs @@ -1,5 +1,6 @@ using FrontOffice.Main.Utilities; using Microsoft.AspNetCore.Components; +using Microsoft.Extensions.Configuration; using Microsoft.JSInterop; using MudBlazor; @@ -16,8 +17,10 @@ public partial class Index : IDisposable [Inject] private DiscountCartService DiscountCart { get; set; } = default!; [Inject] private GuestActionGate GuestGate { get; set; } = default!; [Inject] private VATService VAT { get; set; } = default!; + [Inject] private IConfiguration Configuration { get; set; } = default!; private bool _isAuthenticated; + private string _twentyCardPortalUrl = string.Empty; // ── CMS page data ── private PageSettingsDto? _pageData; @@ -49,6 +52,7 @@ public partial class Index : IDisposable { MainService.OnChangeHandler += OnStateChanged; _isAuthenticated = await AuthService.IsAuthenticatedAsync(); + _twentyCardPortalUrl = Configuration["TwentyCard:CreditPortalUrl"] ?? string.Empty; // Load landing page settings from CMS try @@ -298,6 +302,12 @@ public partial class Index : IDisposable Navigation.NavigateTo(RouteConstants.Registration.Wizard); } + private async Task OpenTwentyCardPortal() + { + if (string.IsNullOrWhiteSpace(_twentyCardPortalUrl)) return; + await JS.InvokeVoidAsync("open", _twentyCardPortalUrl, "_blank"); + } + private void NavigateToPost(string slug) { Navigation.NavigateTo($"/blog/{slug}"); diff --git a/src/FrontOffice.Main/wwwroot/css/site.css b/src/FrontOffice.Main/wwwroot/css/site.css index b027e46..d5e5e02 100644 --- a/src/FrontOffice.Main/wwwroot/css/site.css +++ b/src/FrontOffice.Main/wwwroot/css/site.css @@ -1617,6 +1617,12 @@ html, body { overflow: hidden; } +/* ── Landing TwentyCard credit promo ── */ +.landing-twentycard-box { + background: var(--ds-info-soft); + border: 1px solid rgba(59, 130, 246, 0.22); +} + /* ── Register Wizard Unified ── */ .wizard-section { min-height: 80vh; From d7f25efce294b0defea6a4d0419817e77d18194b Mon Sep 17 00:00:00 2001 From: masoodafar-web Date: Sat, 3 Oct 2026 22:43:53 +0330 Subject: [PATCH 2/3] fix(index): remove unnecessary fade-in effect from TwentyCard promo section - Eliminated the fade-in effect from the MudPaper component in the TwentyCard credit promo section on the landing page, streamlining the visual presentation. This change enhances the user experience by simplifying the design of the promotional section. --- src/FrontOffice.Main/Pages/Index.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FrontOffice.Main/Pages/Index.razor b/src/FrontOffice.Main/Pages/Index.razor index bab8233..a652f1b 100644 --- a/src/FrontOffice.Main/Pages/Index.razor +++ b/src/FrontOffice.Main/Pages/Index.razor @@ -98,7 +98,7 @@ ═══════════════════════════════════════════════ *@
- + From 392e038913f9398baf297307aa4521a50baa433a Mon Sep 17 00:00:00 2001 From: masoodafar-web Date: Sat, 3 Oct 2026 23:53:02 +0330 Subject: [PATCH 3/3] chore(k8s): update kub-deploy workflow and frontoffice deployment configuration - Modified the kub-deploy.yml to remove cached images using containerd's ctr command, ensuring that both IfNotPresent and Always image pull policies work correctly. - Updated frontoffice-deployment.yaml to set imagePullPolicy to Always, preventing stale node cache issues with the :latest tag. These changes improve the deployment process and ensure that the latest images are always used in the staging environment. --- .gitea/workflows/kub-deploy.yml | 6 +++++- k8s/staging/frontoffice-deployment.yaml | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/kub-deploy.yml b/.gitea/workflows/kub-deploy.yml index 7d393c6..c343677 100644 --- a/.gitea/workflows/kub-deploy.yml +++ b/.gitea/workflows/kub-deploy.yml @@ -74,7 +74,11 @@ jobs: # Apply manifests and restart sshpass -e ssh -o StrictHostKeyChecking=no root@${{ env.K8S_SERVER }} " kubectl apply -n kbs-stage -f /tmp/frontoffice-deployment.yaml && - crictl rmi ${REGISTRY}/${IMAGE_NAME}:latest 2>/dev/null || true && + # Drop cached :latest so IfNotPresent/Always both pick the new digest + # (crictl is broken on this host — use containerd ctr) + ctr -n k8s.io images ls -q | grep -E 'frontoffice(:latest|@)' | while read -r ref; do + ctr -n k8s.io images rm \"\$ref\" 2>/dev/null || true + done kubectl -n kbs-stage rollout restart deployment/frontoffice && kubectl -n kbs-stage rollout status deployment/frontoffice --timeout=180s && rm -f /tmp/frontoffice-deployment.yaml diff --git a/k8s/staging/frontoffice-deployment.yaml b/k8s/staging/frontoffice-deployment.yaml index 22d2154..57235cf 100644 --- a/k8s/staging/frontoffice-deployment.yaml +++ b/k8s/staging/frontoffice-deployment.yaml @@ -21,7 +21,8 @@ spec: containers: - name: frontoffice image: 185.252.31.44:30080/admin/frontoffice:latest - imagePullPolicy: IfNotPresent + # Staging uses :latest — Always avoids stale node cache after registry retag + imagePullPolicy: Always ports: - containerPort: 80 name: http