update the cookie consent control.

This commit is contained in:
Ben
2025-02-25 11:36:47 +08:00
parent bf308dd13d
commit b47bf40e8f
9 changed files with 134 additions and 32 deletions

View File

@@ -22,7 +22,7 @@
</div>
</div>
</div>
<Pane Name="Top Full Width" />
<Pane Name="Top Full Width" />
<div class="container">
<div class="row">
<div class="col-md-12">
@@ -107,18 +107,19 @@
{
<Pane Name="Footer" />
}
<CookieConsent />
</div>
<CookieConsent Enabled="@_displayCookieConsent" />
</div>
</main>
@code {
public override string Name => "Default Theme";
public override string Panes => PaneNames.Default + ",Top Full Width,Top 100%,Left 50%,Right 50%,Left 33%,Center 33%,Right 33%,Left Outer 25%,Left Inner 25%,Right Inner 25%,Right Outer 25%,Left 25%,Center 50%,Right 25%,Left Sidebar 66%,Right Sidebar 33%,Left Sidebar 33%,Right Sidebar 66%,Bottom 100%,Bottom Full Width,Footer";
public override string Panes => PaneNames.Default + ",Top Full Width,Top 100%,Left 50%,Right 50%,Left 33%,Center 33%,Right 33%,Left Outer 25%,Left Inner 25%,Right Inner 25%,Right Outer 25%,Left 25%,Center 50%,Right 25%,Left Sidebar 66%,Right Sidebar 33%,Left Sidebar 33%,Right Sidebar 66%,Bottom 100%,Bottom Full Width,Footer";
private bool _login = true;
private bool _register = true;
private bool _footer = false;
private bool _displayCookieConsent = false;
protected override void OnParametersSet()
{
@@ -128,6 +129,7 @@
_login = bool.Parse(SettingService.GetSetting(settings, GetType().Namespace + ":Login", "true"));
_register = bool.Parse(SettingService.GetSetting(settings, GetType().Namespace + ":Register", "true"));
_footer = bool.Parse(SettingService.GetSetting(settings, GetType().Namespace + ":Footer", "false"));
_displayCookieConsent = bool.Parse(SettingService.GetSetting(settings, GetType().Namespace + ":DisplayCookieConsent", "false"));
}
catch
{