Apply formatting to remaining unformatted files
This commit is contained in:
parent
57953fd509
commit
c53d7b8ce3
|
@ -4,7 +4,7 @@ root = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
max_line_length = 100
|
max_line_length = 100
|
||||||
|
|
||||||
[*.{cs,cshtml,html,xml,js,css,csproj}]
|
[*.{cs,cshtml,html,xml,js,css,csproj,json}]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
tab_width = 4
|
tab_width = 4
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
Binary file not shown.
|
@ -6,7 +6,8 @@
|
||||||
|
|
||||||
@{
|
@{
|
||||||
var returnUrl = "/";
|
var returnUrl = "/";
|
||||||
if (Context.Request.Query.TryGetValue("returnUrl", out var existingUrl)) {
|
if (Context.Request.Query.TryGetValue("returnUrl", out var existingUrl))
|
||||||
|
{
|
||||||
returnUrl = existingUrl;
|
returnUrl = existingUrl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,10 +16,14 @@
|
||||||
@if (SignInManager.IsSignedIn(User))
|
@if (SignInManager.IsSignedIn(User))
|
||||||
{
|
{
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @User.Identity?.Name!</a>
|
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index"
|
||||||
|
title="Manage">
|
||||||
|
Hello @User.Identity?.Name!
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="/" method="post">
|
<form class="form-inline" asp-area="Identity" asp-page="/Account/Logout"
|
||||||
|
asp-route-returnUrl="/" method="post">
|
||||||
<button type="submit" class="nav-link btn btn-link text-dark">Logout</button>
|
<button type="submit" class="nav-link btn btn-link text-dark">Logout</button>
|
||||||
</form>
|
</form>
|
||||||
</li>
|
</li>
|
||||||
|
@ -26,10 +31,16 @@
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Register" asp-route-returnUrl="@returnUrl">Register</a>
|
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Register"
|
||||||
|
asp-route-returnUrl="@returnUrl">
|
||||||
|
Register
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Login" asp-route-returnUrl="@returnUrl">Login</a>
|
<a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Login"
|
||||||
|
asp-route-returnUrl="@returnUrl">
|
||||||
|
Login
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -2,14 +2,13 @@ using Microsoft.AspNetCore.ApiAuthorization.IdentityServer;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace Start.Server.Controllers
|
namespace Start.Server.Controllers {
|
||||||
{
|
public class OidcConfigurationController : Controller {
|
||||||
public class OidcConfigurationController : Controller
|
|
||||||
{
|
|
||||||
private readonly ILogger<OidcConfigurationController> _logger;
|
private readonly ILogger<OidcConfigurationController> _logger;
|
||||||
|
|
||||||
public OidcConfigurationController(IClientRequestParametersProvider clientRequestParametersProvider, ILogger<OidcConfigurationController> logger)
|
public OidcConfigurationController(
|
||||||
{
|
IClientRequestParametersProvider clientRequestParametersProvider,
|
||||||
|
ILogger<OidcConfigurationController> logger) {
|
||||||
ClientRequestParametersProvider = clientRequestParametersProvider;
|
ClientRequestParametersProvider = clientRequestParametersProvider;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
@ -17,8 +16,7 @@ namespace Start.Server.Controllers
|
||||||
public IClientRequestParametersProvider ClientRequestParametersProvider { get; }
|
public IClientRequestParametersProvider ClientRequestParametersProvider { get; }
|
||||||
|
|
||||||
[HttpGet("_configuration/{clientId}")]
|
[HttpGet("_configuration/{clientId}")]
|
||||||
public IActionResult GetClientRequestParameters([FromRoute] string clientId)
|
public IActionResult GetClientRequestParameters([FromRoute] string clientId) {
|
||||||
{
|
|
||||||
var parameters = ClientRequestParametersProvider.GetClientParameters(HttpContext, clientId);
|
var parameters = ClientRequestParametersProvider.GetClientParameters(HttpContext, clientId);
|
||||||
return Ok(parameters);
|
return Ok(parameters);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,13 +7,11 @@ using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Start.Shared;
|
using Start.Shared;
|
||||||
|
|
||||||
namespace Start.Server.Controllers
|
namespace Start.Server.Controllers {
|
||||||
{
|
|
||||||
[Authorize]
|
[Authorize]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[Route("[controller]")]
|
[Route("[controller]")]
|
||||||
public class WeatherForecastController : ControllerBase
|
public class WeatherForecastController : ControllerBase {
|
||||||
{
|
|
||||||
private static readonly string[] Summaries = new[]
|
private static readonly string[] Summaries = new[]
|
||||||
{
|
{
|
||||||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||||
|
@ -21,17 +19,14 @@ namespace Start.Server.Controllers
|
||||||
|
|
||||||
private readonly ILogger<WeatherForecastController> _logger;
|
private readonly ILogger<WeatherForecastController> _logger;
|
||||||
|
|
||||||
public WeatherForecastController(ILogger<WeatherForecastController> logger)
|
public WeatherForecastController(ILogger<WeatherForecastController> logger) {
|
||||||
{
|
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<WeatherForecast> Get()
|
public IEnumerable<WeatherForecast> Get() {
|
||||||
{
|
|
||||||
var rng = new Random();
|
var rng = new Random();
|
||||||
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
|
return Enumerable.Range(1, 5).Select(index => new WeatherForecast {
|
||||||
{
|
|
||||||
Date = DateTime.Now.AddDays(index),
|
Date = DateTime.Now.AddDays(index),
|
||||||
TemperatureC = rng.Next(-20, 55),
|
TemperatureC = rng.Next(-20, 55),
|
||||||
Summary = Summaries[rng.Next(Summaries.Length)]
|
Summary = Summaries[rng.Next(Summaries.Length)]
|
||||||
|
|
|
@ -4,10 +4,8 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Start.Server.Models
|
namespace Start.Server.Models {
|
||||||
{
|
public class ApplicationUser : IdentityUser {
|
||||||
public class ApplicationUser : IdentityUser
|
|
||||||
{
|
|
||||||
/// <summary>The <see cref="BookmarkContainer"/>s that belong to this user</summary>
|
/// <summary>The <see cref="BookmarkContainer"/>s that belong to this user</summary>
|
||||||
public List<BookmarkContainer>? BookmarkContainers { get; set; }
|
public List<BookmarkContainer>? BookmarkContainers { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,19 +7,15 @@ using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace Start.Server
|
namespace Start.Server {
|
||||||
{
|
public class Program {
|
||||||
public class Program
|
public static void Main(string[] args) {
|
||||||
{
|
|
||||||
public static void Main(string[] args)
|
|
||||||
{
|
|
||||||
CreateHostBuilder(args).Build().Run();
|
CreateHostBuilder(args).Build().Run();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||||
Host.CreateDefaultBuilder(args)
|
Host.CreateDefaultBuilder(args)
|
||||||
.ConfigureWebHostDefaults(webBuilder =>
|
.ConfigureWebHostDefaults(webBuilder => {
|
||||||
{
|
|
||||||
webBuilder.UseStartup<Startup>();
|
webBuilder.UseStartup<Startup>();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue