Skip to content

Commit

Permalink
Upgrade from .net7 to .net8
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Brown committed Dec 16, 2023
1 parent 65e5076 commit 605847a
Show file tree
Hide file tree
Showing 17 changed files with 75 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/azure-webapps-dotnet-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Build and deploy ASP.Net Core app to an Azure Web App
env:
AZURE_WEBAPP_NAME: PropertyPortfolioManager-dev # set this to the name of your Azure Web App
AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
DOTNET_VERSION: '7.0' # set this to the .NET Core version to use
DOTNET_VERSION: '8.0' # set this to the .NET Core version to use

on:
push:
Expand Down
9 changes: 6 additions & 3 deletions src/PropertyPortfolioManager.Client/Pages/AccountEdit.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
<section class="">
@if (AccountModel.Id == 0)
{
<h1 class="page-title">New Account</h1>
<SectionContent SectionName="top-bar">
<div>New Account</div>
</SectionContent>
}
else
{
<h1 class="page-title">Details for @AccountModel.AccountName</h1>

<SectionContent SectionName="top-bar">
<div>Details for @AccountModel.AccountName</div>
</SectionContent>
}
<EditForm Model="@AccountModel" OnValidSubmit="@HandleValidSubmit" OnInvalidSubmit="@HandleInvalidSubmit">

Expand Down
5 changes: 4 additions & 1 deletion src/PropertyPortfolioManager.Client/Pages/AccountList.razor
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
@page "/account"

<h3>Accounts</h3>

<SectionContent SectionName="top-bar">
<div>Accounts</div>
</SectionContent>

@if (accounts == null)
{
Expand Down
22 changes: 16 additions & 6 deletions src/PropertyPortfolioManager.Client/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,23 @@

<PageTitle>Index</PageTitle>

<h1>Welcome to Property Portfolio Manager</h1>

<AuthorizeView>
<Authorized>
<h2>Hello, @context.User.Identity?.Name!</h2>
<SectionContent SectionName="top-bar">
<div>Dashdoard</div>
</SectionContent>
</Authorized>
<NotAuthorized>
<p>Select <a href="authentication/login">Log in</a> to access the system</p>
</NotAuthorized>
</AuthorizeView>

<div class="page-content">
<h1>Welcome to Property Portfolio Manager</h1>

<AuthorizeView>
<Authorized>
<h2>Hello, @context.User.Identity?.Name!</h2>
</Authorized>
<NotAuthorized>
<p>Select <a href="authentication/login">Log in</a> to access the system</p>
</NotAuthorized>
</AuthorizeView>
</div>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>0f87e837-0514-4f80-9edd-b385291f277d</UserSecretsId>
Expand All @@ -12,10 +12,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.11" PrivateAssets="all" />
<PackageReference Include="Microsoft.Authentication.WebAssembly.Msal" Version="7.0.11" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.Authentication.WebAssembly.Msal" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
7 changes: 5 additions & 2 deletions src/PropertyPortfolioManager.Client/Shared/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
<header>
<NavMenu />
</header>
<div class="container">
<div class="page-banner container-fluid px-4">
<SectionOutlet SectionName="top-bar" />
</div>
<div class="container-fluid mx-2">
<main role="main" class="pb-3">
@Body
</main>
</div>

<footer class="border-top footer text-muted bg-primary">
<div class="container">
<div class="container-fluid">
&copy; 2023 - Property Portfolio Manager
</div>
</footer>
4 changes: 2 additions & 2 deletions src/PropertyPortfolioManager.Client/Shared/NavMenu.razor
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<nav class="navbar navbar-expand-lg navbar-toggleable-lg navbar-dark bg-primary border-bottom box-shadow mb-3">
<div class="container">
<nav class="navbar navbar-expand-lg navbar-toggleable-lg navbar-dark bg-primary border-bottom box-shadow py-1">
<div class="container-fluid">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
Expand Down
1 change: 1 addition & 0 deletions src/PropertyPortfolioManager.Client/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
@using PropertyPortfolioManager.Client
@using PropertyPortfolioManager.Client.Shared
@using PropertyPortfolioManager.Client.Components
@using Microsoft.AspNetCore.Components.Sections
21 changes: 20 additions & 1 deletion src/PropertyPortfolioManager.Client/wwwroot/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

html, body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
height: 100%;
}
body {
background-color:#f5f9ff;
}

ul.dropdown-menu .nav-link {
ul .dropdown-menu .nav-link {
color: #000;
}

Expand All @@ -13,6 +17,21 @@ ul.dropdown-menu .nav-link.active {
font-weight: 600;
}

.page-banner {
padding-top: 1rem;
padding-bottom: 1rem;
background-color: #fff;
margin-bottom: 1.5rem;
font-size: 1.25rem;
font-weight: 600;
}

.page-content {
background-color: #fff;
border-radius: 1rem;
padding: 1rem;
}

.footer {
position: absolute;
bottom: 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>PropertyPortfolioManager.Server-fa468200-2d16-4f0b-8298-417d2482165c</UserSecretsId>
<WebProject_DirectoryAccessLevelKey>0</WebProject_DirectoryAccessLevelKey>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.0" />
<PackageReference Include="Microsoft.Identity.Web.GraphServiceClient" Version="2.15.3" />
<PackageReference Include="NLog.Database" Version="5.2.7" />
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.7" />
Expand All @@ -25,12 +25,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.13" NoWarn="NU1605" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="7.0.13" NoWarn="NU1605" />
<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.3" />
<PackageReference Include="Microsoft.Identity.Web.UI" Version="2.15.3" />
<!--<PackageReference Include="Microsoft.Identity.Web" Version="1.16.0" />
<PackageReference Include="Microsoft.Identity.Web.UI" Version="1.16.0" />-->
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.0" />
</ItemGroup>

</Project>

0 comments on commit 605847a

Please sign in to comment.