From 8a545a79589886b2cbf4685538741f7dce4fe03e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 4 Aug 2024 22:42:09 +0200 Subject: [PATCH 1/7] Move GoogleTag to HE, it was inappropriate and not reliable here. --- .../ViewModels/GoogleTagViewModel.cs | 10 ----- Lombiq.BaseTheme/Views/GoogleTag.cshtml | 38 ------------------- 2 files changed, 48 deletions(-) delete mode 100644 Lombiq.BaseTheme/ViewModels/GoogleTagViewModel.cs delete mode 100644 Lombiq.BaseTheme/Views/GoogleTag.cshtml diff --git a/Lombiq.BaseTheme/ViewModels/GoogleTagViewModel.cs b/Lombiq.BaseTheme/ViewModels/GoogleTagViewModel.cs deleted file mode 100644 index ba746d7..0000000 --- a/Lombiq.BaseTheme/ViewModels/GoogleTagViewModel.cs +++ /dev/null @@ -1,10 +0,0 @@ -using OrchardCore.DisplayManagement.Views; - -namespace Lombiq.BaseTheme.ViewModels; - -public class GoogleTagViewModel : ShapeViewModel -{ - public string GoogleTagPropertyId { get; set; } - public string CookieDomain { get; set; } - public GoogleTagViewModel() => Metadata.Type = "GoogleTag"; -} diff --git a/Lombiq.BaseTheme/Views/GoogleTag.cshtml b/Lombiq.BaseTheme/Views/GoogleTag.cshtml deleted file mode 100644 index 38b5c5e..0000000 --- a/Lombiq.BaseTheme/Views/GoogleTag.cshtml +++ /dev/null @@ -1,38 +0,0 @@ -@model dynamic - -@using Lombiq.HelpfulLibraries.OrchardCore.Security -@using Microsoft.AspNetCore.Http.Features; -@using Microsoft.Extensions.Hosting; -@using Lombiq.BaseTheme.ViewModels - -@inject IHostEnvironment HostEnvironment - -@{ - var trackingConsentFeature = ViewContext.HttpContext.Features.Get(); -} - -@if (HostEnvironment.IsProduction() && (trackingConsentFeature is null || trackingConsentFeature.CanTrack)) -{ - GoogleAnalyticsContentSecurityPolicyProvider.EnableForCurrentRequest(Context); - - var viewModel = Model as GoogleTagViewModel ?? new GoogleTagViewModel - { - GoogleTagPropertyId = Model.GoogleTagPropertyId, - CookieDomain = Model.CookieDomain, - }; - var cookieDomain = string.Empty; - - if (!string.IsNullOrEmpty(viewModel.CookieDomain)) - { - cookieDomain = $", {{'cookie_domain': '{viewModel.CookieDomain}' }}"; - } - - - -} From 81cdd02bc3202c0b90ff9c7b62d967c5172988cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 13 Aug 2024 11:27:19 +0200 Subject: [PATCH 2/7] Update OC previews. --- .../Lombiq.BaseTheme.Samples.csproj | 4 ++-- Lombiq.BaseTheme/Lombiq.BaseTheme.csproj | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj b/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj index 7d76a28..8d52e0f 100644 --- a/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj +++ b/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj @@ -26,8 +26,8 @@ - - + + diff --git a/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj b/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj index 4334982..7d67689 100644 --- a/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj +++ b/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj @@ -42,12 +42,12 @@ - - - - - - + + + + + + From f5466242000fecc53fadff4b5cb6912c294b061e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Sun, 18 Aug 2024 01:38:44 +0200 Subject: [PATCH 3/7] Update OC preview version. --- .../Lombiq.BaseTheme.Samples.csproj | 4 ++-- Lombiq.BaseTheme/Lombiq.BaseTheme.csproj | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj b/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj index 8d52e0f..9666f5a 100644 --- a/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj +++ b/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj @@ -26,8 +26,8 @@ - - + + diff --git a/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj b/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj index 0546623..cda4a56 100644 --- a/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj +++ b/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj @@ -42,12 +42,12 @@ - - - - - - + + + + + + From b9cac9a0de95bb9ce3da3a05746b0b9f3b7eb97e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Tue, 20 Aug 2024 12:32:19 +0200 Subject: [PATCH 4/7] Update OC preview version. --- .../Lombiq.BaseTheme.Samples.csproj | 4 ++-- Lombiq.BaseTheme/Lombiq.BaseTheme.csproj | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj b/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj index 9666f5a..f7e1c31 100644 --- a/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj +++ b/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj @@ -26,8 +26,8 @@ - - + + diff --git a/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj b/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj index cda4a56..9fb75c3 100644 --- a/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj +++ b/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj @@ -42,12 +42,12 @@ - - - - - - + + + + + + From 1f4e7c1778436e6f3b1e5919b450edd63c36f10d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Wed, 21 Aug 2024 17:58:00 +0200 Subject: [PATCH 5/7] Update OC preview version. --- .../Lombiq.BaseTheme.Samples.csproj | 4 ++-- Lombiq.BaseTheme/Lombiq.BaseTheme.csproj | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj b/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj index f7e1c31..cf0738f 100644 --- a/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj +++ b/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj @@ -26,8 +26,8 @@ - - + + diff --git a/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj b/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj index 9fb75c3..df0be34 100644 --- a/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj +++ b/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj @@ -42,12 +42,12 @@ - - - - - - + + + + + + From f6bea78f09b6bd5d5ed6c1e532995bd6ab9c118c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Fri, 23 Aug 2024 10:26:27 +0200 Subject: [PATCH 6/7] Update OC preview version. --- .../Lombiq.BaseTheme.Samples.csproj | 4 ++-- Lombiq.BaseTheme/Lombiq.BaseTheme.csproj | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj b/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj index cf0738f..1e8f7af 100644 --- a/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj +++ b/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj @@ -26,8 +26,8 @@ - - + + diff --git a/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj b/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj index df0be34..7baec38 100644 --- a/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj +++ b/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj @@ -42,12 +42,12 @@ - - - - - - + + + + + + From 17c5d2fa7b8be62bea0d7827f6779debb0acb90d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ra=20El-Saig?= Date: Fri, 23 Aug 2024 11:11:11 +0200 Subject: [PATCH 7/7] Update OC preview version. --- .../Lombiq.BaseTheme.Samples.csproj | 4 ++-- Lombiq.BaseTheme/Lombiq.BaseTheme.csproj | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj b/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj index cf0738f..1e8f7af 100644 --- a/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj +++ b/Lombiq.BaseTheme.Samples/Lombiq.BaseTheme.Samples.csproj @@ -26,8 +26,8 @@ - - + + diff --git a/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj b/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj index df0be34..7baec38 100644 --- a/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj +++ b/Lombiq.BaseTheme/Lombiq.BaseTheme.csproj @@ -42,12 +42,12 @@ - - - - - - + + + + + +