Skip to content

Commit

Permalink
📦 Update package versions and refactor variable names
Browse files Browse the repository at this point in the history
This commit accomplishes two main tasks. Firstly, it updates the versions for several packages in the .csproj files of TimesheetGPT.WebUI, TimesheetGPT.Core, and TimesheetGPT.WebAPI for better performance, latest features, and security improvements. Secondly, it refactors some variable names in the MainLayout.razor file of TimesheetGPT.WebUI to follow naming conventions, improving code readability.
  • Loading branch information
bradystroud committed Nov 23, 2023
1 parent b5770b1 commit fa760e9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 23 deletions.
12 changes: 6 additions & 6 deletions src/TimesheetGPT.Core/TimesheetGPT.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.10.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0-rc.2.23479.6" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0-rc.2.23479.6" />
<PackageReference Include="Microsoft.Graph" Version="5.34.0" />
<PackageReference Include="Azure.Identity" Version="1.10.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Graph" Version="5.36.0" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.57.0" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.0.0-beta5" />
<PackageReference Include="Microsoft.SemanticKernel.Plugins.MsGraph" Version="1.0.0-beta5" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.0.0-beta8" />
<PackageReference Include="Microsoft.SemanticKernel.Plugins.MsGraph" Version="1.0.0-beta8" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/TimesheetGPT.WebAPI/TimesheetGPT.WebAPI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0-rc.2.23480.2" />
<PackageReference Include="Microsoft.Identity.Web" Version="2.15.3" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0" />
<PackageReference Include="Microsoft.Identity.Web" Version="2.15.5" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>

Expand Down
17 changes: 9 additions & 8 deletions src/TimesheetGPT.WebUI/Shared/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</MudStack>
</MudText>
<MudSpacer/>
@switch (themePreference)
@switch (_themePreference)
{
case ThemePreference.Light:
<MudTooltip Duration="1000" Text="Switch to Dark Theme">
Expand Down Expand Up @@ -52,24 +52,24 @@

@code {
private MudThemeProvider? _mudThemeProvider;
ThemePreference themePreference;
ThemePreference _themePreference;
private bool _isDarkMode;
private bool systemIsDarkMode;
private bool _systemIsDarkMode;

protected async override Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
systemIsDarkMode = await _mudThemeProvider.GetSystemPreference();
_systemIsDarkMode = await _mudThemeProvider.GetSystemPreference();
await _mudThemeProvider.WatchSystemPreference(OnSystemPreferenceChanged);
StateHasChanged();
}
}

private async Task OnSystemPreferenceChanged(bool newValue)
{
systemIsDarkMode = newValue;
SetThemePreference(themePreference);
_systemIsDarkMode = newValue;
SetThemePreference(_themePreference);
StateHasChanged();
}

Expand Down Expand Up @@ -111,15 +111,16 @@
}
};


private void SetThemePreference(ThemePreference preference)
{
themePreference = preference;
_themePreference = preference;

_isDarkMode = preference switch
{
ThemePreference.Light => false,
ThemePreference.Dark => true,
ThemePreference.System => systemIsDarkMode,
ThemePreference.System => _systemIsDarkMode,
_ => true
};

Expand Down
14 changes: 7 additions & 7 deletions src/TimesheetGPT.WebUI/TimesheetGPT.WebUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@


<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0-rc.2.23480.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0-rc.2.23480.2" NoWarn="NU1605" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.0-rc.2.23480.2" NoWarn="NU1605" />
<PackageReference Include="Microsoft.Identity.Web" Version="2.15.3" />
<PackageReference Include="Microsoft.Identity.Web.GraphServiceClient" Version="2.15.3" />
<PackageReference Include="Microsoft.Identity.Web.UI" Version="2.15.3" />
<PackageReference Include="MudBlazor" Version="6.11.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0" NoWarn="NU1605" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.0" NoWarn="NU1605" />
<PackageReference Include="Microsoft.Identity.Web" Version="2.15.5" />
<PackageReference Include="Microsoft.Identity.Web.GraphServiceClient" Version="2.15.5" />
<PackageReference Include="Microsoft.Identity.Web.UI" Version="2.15.5" />
<PackageReference Include="MudBlazor" Version="6.11.1" />
<PackageReference Include="MudBlazor.Markdown" Version="0.1.2" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
</ItemGroup>
Expand Down

0 comments on commit fa760e9

Please sign in to comment.