diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/DiagnosticModal.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/DiagnosticModal.razor index 9e5a944203..dd9d60454b 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/DiagnosticModal.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/DiagnosticModal.razor @@ -1,7 +1,7 @@ @inherits AppComponentBase
- + Diagnostic @@ -13,6 +13,22 @@ IconName="@BitIconName.ChromeClose" /> + + + + + @foreach (var (key, value) in telemetryContext.ToDictionary()) + { + @key: @value + } + + + + Nothing to show! - + @($"{logIndex.index + 1}. [{logIndex.item.CreatedOn.ToString("HH:mm:ss")}]") $"{c.Key}: {c.Value}"))); + } + private async Task CopyException(DiagnosticLog log) { var stateToCopy = string.Join(Environment.NewLine, log.State?.Select(i => $"{i.Key}: {i.Value}") ?? []); diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/DiagnosticModal.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/DiagnosticModal.razor.scss index f135d108e8..1d1a732cc7 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/DiagnosticModal.razor.scss +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/DiagnosticModal.razor.scss @@ -6,6 +6,14 @@ section { } ::deep { + .modal { + width: unset; + top: var(--app-inset-top); + left: var(--app-inset-left); + right: var(--app-inset-right); + bottom: var(--app-inset-bottom); + } + .container { padding: 1rem; } diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/RootLayout.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/RootLayout.razor.cs index 2cdf2012ec..75d0e9c9d8 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/RootLayout.razor.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/RootLayout.razor.cs @@ -57,7 +57,6 @@ protected override async Task OnInitializedAsync() SetCurrentUrl(); currentTheme = await themeService.GetCurrentTheme(); - await keyboard.Add(ButilKeyCodes.KeyX, OpenDiagnosticModal, ButilModifiers.Ctrl | ButilModifiers.Shift); await base.OnInitializedAsync(); } catch (Exception exp) @@ -75,6 +74,16 @@ protected override void OnParametersSet() base.OnParametersSet(); } + protected override async Task OnAfterRenderAsync(bool firstRender) + { + if (firstRender) + { + await keyboard.Add(ButilKeyCodes.KeyX, OpenDiagnosticModal, ButilModifiers.Ctrl | ButilModifiers.Shift); + } + + await base.OnAfterRenderAsync(firstRender); + } + private async void AuthenticationStateChanged(Task task) { diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/SnackBar.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/SnackBar.razor index 61040d15b8..8b06dcce83 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/SnackBar.razor +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/SnackBar.razor @@ -1,5 +1,7 @@ @inherits AppComponentBase - \ No newline at end of file + \ No newline at end of file diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/SnackBar.razor.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/SnackBar.razor.scss new file mode 100644 index 0000000000..2d6c5aa7f5 --- /dev/null +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/SnackBar.razor.scss @@ -0,0 +1,3 @@ +.snackbar { + bottom: calc(var(--app-inset-bottom) + var(--bit-spa-scaling-factor)); +} diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AppTelemetryContext.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AppTelemetryContext.cs index 2ed22276d9..24ed0c9ace 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AppTelemetryContext.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AppTelemetryContext.cs @@ -23,6 +23,8 @@ public class AppTelemetryContext : ITelemetryContext public string? Culture { get; set; } = CultureInfo.CurrentCulture.Name; + public string? Environment { get; set; } = AppEnvironment.Current; + //#if (signalr == true) public bool IsOnline { get; set; } //#endif diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/Contracts/ITelemetryContext.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/Contracts/ITelemetryContext.cs index ebbfdc9da5..fc70c6c103 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/Contracts/ITelemetryContext.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/Contracts/ITelemetryContext.cs @@ -42,6 +42,8 @@ public static ITelemetryContext? Current public string? TimeZone { get; set; } public string? Culture { get; set; } + public string? Environment { get; set; } + //#if (signalr == true) public bool IsOnline { get; set; } //#endif @@ -58,6 +60,7 @@ public static ITelemetryContext? Current { nameof(UserAgent), UserAgent }, { nameof(TimeZone), TimeZone }, { nameof(Culture), Culture }, + { nameof(Environment), Environment }, //#if (signalr == true) { nameof(IsOnline), IsOnline } //#endif diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Styles/app.scss b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Styles/app.scss index 1430a522c7..b850fa2043 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Styles/app.scss +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Styles/app.scss @@ -1,5 +1,10 @@ @import '../Styles/abstracts/_media-queries.scss'; +:root[bit-theme="dark"] { + //--bit-clr-bg-pri: #010409; + // In case you need to change the background color, make sure to also update ThemeColors.cs's PrimaryDarkBgColor accordingly. +} + :root { --app-inset-top: env(safe-area-inset-top); --app-inset-left: env(safe-area-inset-left); @@ -22,11 +27,6 @@ } } -:root[bit-theme="dark"] { - //--bit-clr-bg-pri: #010409; - // In case you need to change the background color, make sure to also update ThemeColors.cs's PrimaryDarkBgColor accordingly. -} - * { box-sizing: border-box; font-family: "Segoe UI";