implemented Discord OAuth2

This commit is contained in:
t.ruspekhofer 2022-02-13 20:40:15 +01:00
parent 9365e22874
commit dbf1be4c5d
18 changed files with 195 additions and 133 deletions

View file

@ -1,18 +0,0 @@
@page "/counter"
<PageTitle>Counter</PageTitle>
<h1>Counter</h1>
<p role="status">Current count: @currentCount</p>
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
@code {
private int currentCount = 0;
private void IncrementCount()
{
currentCount++;
}
}

View file

@ -1,48 +0,0 @@
@page "/fetchdata"
<PageTitle>Weather forecast</PageTitle>
@using Lieb.Data
@inject WeatherForecastService ForecastService
<h1>Weather forecast</h1>
<p>This component demonstrates fetching data from a service.</p>
@if (forecasts == null)
{
<p><em>Loading...</em></p>
}
else
{
<table class="table">
<thead>
<tr>
<th>Date</th>
<th>Temp. (C)</th>
<th>Temp. (F)</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
@foreach (var forecast in forecasts)
{
<tr>
<td>@forecast.Date.ToShortDateString()</td>
<td>@forecast.TemperatureC</td>
<td>@forecast.TemperatureF</td>
<td>@forecast.Summary</td>
</tr>
}
</tbody>
</table>
}
@code {
private WeatherForecast[]? forecasts;
protected override async Task OnInitializedAsync()
{
forecasts = await ForecastService.GetForecastAsync(DateTime.Now);
}
}

View file

@ -0,0 +1,11 @@
@using Microsoft.AspNetCore.Components
@inject NavigationManager Navigation
@code
{
protected override void OnInitialized()
{
//This auto redirects a user to the login page
Navigation.NavigateTo("Account/Login", true);
}
}

View file

@ -5,4 +5,5 @@
Layout = "_Layout";
}
<component type="typeof(App)" render-mode="ServerPrerendered" />
@(await Html.RenderComponentAsync<App>(RenderMode.Server))
<!--<component type="typeof(App)" render-mode="ServerPrerendered" />-->