From 23c0b6fbf87f13b0d7cba0c8f852221f70224d15 Mon Sep 17 00:00:00 2001 From: enkodellc Date: Thu, 25 Jul 2019 20:33:44 -0700 Subject: [PATCH] Preview 7 & minor changes --- README.md | 19 ++++------- .../BlazorBoilerplate.Client.csproj | 21 +++++++----- .../wwwroot/css/site.css | 12 +++++++ .../BlazorBoilerplate.Server.csproj | 34 ++++++++++++------- .../Controllers/SampleDataController.cs | 12 +++---- .../Helpers/Templates/TestEmail.template | 6 +++- .../Services/EmailService.cs | 6 ++-- src/BlazorBoilerplate.Server/Startup.cs | 9 +++++ .../BlazorBoilerplate.Shared.csproj | 11 +++++- 9 files changed, 83 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index bb37a33c0..8cc9a3aac 100644 --- a/README.md +++ b/README.md @@ -17,18 +17,16 @@ A repository that is not controlled by a corporation but by a community. Javascr [Blazor Boilerplate](https://blazorboilerplate.com) - Kick the tires. The functionality grows every week. ## Prerequisites - Don't know what Blazor is? Read [here](https://docs.microsoft.com/en-us/aspnet/core/blazor/?view=aspnetcore-3.0) Complete all Blazor dependencies. -- .NET Core 3.0 Preview 6 SDK (3.0.100-preview6-012264) +- .NET Core 3.0 Preview 7 SDK 3.0.100-preview7-012821 - Visual Studio 2019 Preview with the ASP.NET and web development workload selected. -- The latest Blazor extension from the Visual Studio Marketplace. -- The Blazor templates on the command-line: **Install-Package Microsoft.AspNetCore.Blazor.Templates -Version 3.0.0-preview6.19307.2** +- The Blazor templates on the command-line: **dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.0.0-preview7.19365.7** ### How to run -1. Install **dotnet-sdk-3.0.100-preview6-012264** and the latest **Visual Studio 2019 Preview**. +1. Install **dotnet-sdk 3.0.100-preview7-012821** and the latest **Visual Studio 2019 Preview**. 2. Clone or download. 3. Open the solution in Visual Studio and press F5. 4. Create a user using the `Create Account` button in the login page or login if you have already created a user. @@ -48,8 +46,7 @@ Complete all Blazor dependencies. Please star, watch and fork! We'd greatly appreciate any contribution you make. I am very open to updates and features, though most feature requests will be depending on how much community support for it is. -## Completed - +## Completed - Basic Login / User Creation - Admin Theme using Material Design / MatBlazor - Free to use. - Log Files @@ -58,7 +55,6 @@ will be depending on how much community support for it is. - Forgot Password Functionality ## Road map - - User [rofile & settings management. - User, role, permission and organization unit management. - Real time chat and notification system. Slack Communication clone? @@ -66,15 +62,14 @@ will be depending on how much community support for it is. - Audit log report UI. ## License - This project is licensed under the terms of the [MIT license](LICENSE). ## News -### 0.1.7 - In Progress +### 0.1.7 - User Profile Management - Refactor Email Settings and API -- Error Handling Middleware to Propagating Errors properly to Toasts - +- MatBlazor 1.3.0 +- Migrate to .NET Core 3.0 ### 0.1.6 - Email confirmation on Registration diff --git a/src/BlazorBoilerplate.Client/BlazorBoilerplate.Client.csproj b/src/BlazorBoilerplate.Client/BlazorBoilerplate.Client.csproj index 49e5e7f30..7ebbd2955 100644 --- a/src/BlazorBoilerplate.Client/BlazorBoilerplate.Client.csproj +++ b/src/BlazorBoilerplate.Client/BlazorBoilerplate.Client.csproj @@ -9,13 +9,22 @@ 7.3 3.0 + 0.1.7 + Keith Fimreite + EnkodeLLC + Blazor Boilerplate Client + Blazor Boilerplate is starter kit / SPA Admin Template for Blazor + https://blazorboilerplate.com/ + https://blazorboilerplate.com/ + git + https://github.com/enkodellc/blazorboilerplate - - + + - + @@ -27,10 +36,4 @@ - - - wwwroot\MatBlazor\MatBlazor.dll - - - diff --git a/src/BlazorBoilerplate.Client/wwwroot/css/site.css b/src/BlazorBoilerplate.Client/wwwroot/css/site.css index 4e65a7181..2ea14c957 100644 --- a/src/BlazorBoilerplate.Client/wwwroot/css/site.css +++ b/src/BlazorBoilerplate.Client/wwwroot/css/site.css @@ -490,3 +490,15 @@ ul.breadcrumb { /* Large devices (desktops, less than 1200px) */ @media (max-width: 1199.98px) { } + + +/* MatBlazor temp */ +.mat-toast-body{ + padding: 8px 5px; +} +.mat-toast-icon{ + padding-left: 5px; +} +.mat-toast-close-button .material-icons{ + color: white; +} diff --git a/src/BlazorBoilerplate.Server/BlazorBoilerplate.Server.csproj b/src/BlazorBoilerplate.Server/BlazorBoilerplate.Server.csproj index 7c8108841..51c03c2df 100644 --- a/src/BlazorBoilerplate.Server/BlazorBoilerplate.Server.csproj +++ b/src/BlazorBoilerplate.Server/BlazorBoilerplate.Server.csproj @@ -7,29 +7,37 @@ https://dotnet.myget.org/F/blazor-dev/api/v3/index.json; 7.3 - 1.1.5 + 0.1.7 + Keith Fimreite + EnkodeLLC + Blazor Boilerplate Server + Blazor Boilerplate is starter kit / SPA Admin Template for Blazor + https://blazorboilerplate.com/ + https://blazorboilerplate.com/ + git + https://github.com/enkodellc/blazorboilerplate - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + - + diff --git a/src/BlazorBoilerplate.Server/Controllers/SampleDataController.cs b/src/BlazorBoilerplate.Server/Controllers/SampleDataController.cs index 813eadb09..272c9493e 100644 --- a/src/BlazorBoilerplate.Server/Controllers/SampleDataController.cs +++ b/src/BlazorBoilerplate.Server/Controllers/SampleDataController.cs @@ -1,15 +1,13 @@ -using BlazorBoilerplate.Shared; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using System; +using System; using System.Collections.Generic; using System.Linq; +using System.Net.Http; using System.Threading.Tasks; -using BlazorBoilerplate.Server.Models; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; -using BlazorBoilerplate.Server.Services; using Newtonsoft.Json; -using System.Net.Http; +using BlazorBoilerplate.Shared; namespace BlazorBoilerplate.Server.Controllers { diff --git a/src/BlazorBoilerplate.Server/Helpers/Templates/TestEmail.template b/src/BlazorBoilerplate.Server/Helpers/Templates/TestEmail.template index fe8e4e5ba..243006767 100644 --- a/src/BlazorBoilerplate.Server/Helpers/Templates/TestEmail.template +++ b/src/BlazorBoilerplate.Server/Helpers/Templates/TestEmail.template @@ -4,7 +4,11 @@

Hello {user},

- This is a TEST email. + This is a TEST email. If you are using Blazor Boilerplate please star the repo on Github. + We are looking for more contributors to grow the project. There are several areas of improvement needed and if you are using the repo in your project please submit your PR's or suggestions. +

+

+ Join our chat on Gitter to disucss future project features, timelines and to get involved.

The email was on {testDate}.

diff --git a/src/BlazorBoilerplate.Server/Services/EmailService.cs b/src/BlazorBoilerplate.Server/Services/EmailService.cs index 0ade3fd63..79b0d7bfe 100644 --- a/src/BlazorBoilerplate.Server/Services/EmailService.cs +++ b/src/BlazorBoilerplate.Server/Services/EmailService.cs @@ -4,15 +4,13 @@ using System.Net.Security; using System.Security.Cryptography.X509Certificates; using System.Threading.Tasks; -using BlazorBoilerplate.Server.Models; -using MailKit.Net.Smtp; using Microsoft.Extensions.Logging; using MimeKit; -using MimeKit.Text; +using MailKit.Net.Smtp; +using BlazorBoilerplate.Server.Models; namespace BlazorBoilerplate.Server.Services { - public interface IEmailService { Task<(bool success, string errorMsg)> SendEmailAsync(EmailMessage emailMessage); diff --git a/src/BlazorBoilerplate.Server/Startup.cs b/src/BlazorBoilerplate.Server/Startup.cs index bf576dc53..933e637db 100644 --- a/src/BlazorBoilerplate.Server/Startup.cs +++ b/src/BlazorBoilerplate.Server/Startup.cs @@ -19,6 +19,7 @@ using Microsoft.AspNetCore.Authentication.Cookies; using System.Net; using BlazorBoilerplate.Server.Helpers; +//using BlazorBoilerplate.Server.Middleware; namespace BlazorBoilerplate.Server { @@ -138,15 +139,23 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) } app.UseResponseCompression(); + //app.UseMiddleware(typeof(ErrorHandlingMiddleware)); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseBlazorDebugging(); } +// else +// { +// // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. +// app.UseHsts(); //HSTS Middleware (UseHsts) to send HTTP Strict Transport Security Protocol (HSTS) headers to clients. +// } + app.UseClientSideBlazorFiles(); + //app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthentication(); app.UseAuthorization(); diff --git a/src/BlazorBoilerplate.Shared/BlazorBoilerplate.Shared.csproj b/src/BlazorBoilerplate.Shared/BlazorBoilerplate.Shared.csproj index cebb74a95..cd1c5f104 100644 --- a/src/BlazorBoilerplate.Shared/BlazorBoilerplate.Shared.csproj +++ b/src/BlazorBoilerplate.Shared/BlazorBoilerplate.Shared.csproj @@ -3,11 +3,20 @@ netstandard2.0 7.3 + 0.1.7 + Keith Fimreite + EnkodeLLC + Blazor Boilerplate Shared + Blazor Boilerplate is starter kit / SPA Admin Template for Blazor + https://blazorboilerplate.com/ + https://blazorboilerplate.com/ + git + https://github.com/enkodellc/blazorboilerplate - +