From a83b518a7a16d93f207bab8ec5c54c14c9493e23 Mon Sep 17 00:00:00 2001 From: transtrike Date: Sun, 20 Dec 2020 10:44:58 +0200 Subject: Removed Razor, added Angular --- src/DevHive.Blazor/Pages/Counter.razor | 16 ----------- src/DevHive.Blazor/Pages/Error.cshtml | 42 ----------------------------- src/DevHive.Blazor/Pages/Error.cshtml.cs | 32 ---------------------- src/DevHive.Blazor/Pages/FetchData.razor | 46 -------------------------------- src/DevHive.Blazor/Pages/Index.razor | 7 ----- src/DevHive.Blazor/Pages/_Host.cshtml | 35 ------------------------ 6 files changed, 178 deletions(-) delete mode 100644 src/DevHive.Blazor/Pages/Counter.razor delete mode 100644 src/DevHive.Blazor/Pages/Error.cshtml delete mode 100644 src/DevHive.Blazor/Pages/Error.cshtml.cs delete mode 100644 src/DevHive.Blazor/Pages/FetchData.razor delete mode 100644 src/DevHive.Blazor/Pages/Index.razor delete mode 100644 src/DevHive.Blazor/Pages/_Host.cshtml (limited to 'src/DevHive.Blazor/Pages') diff --git a/src/DevHive.Blazor/Pages/Counter.razor b/src/DevHive.Blazor/Pages/Counter.razor deleted file mode 100644 index ea07ff3..0000000 --- a/src/DevHive.Blazor/Pages/Counter.razor +++ /dev/null @@ -1,16 +0,0 @@ -@page "/counter" - -

Counter

- -

Current count: @currentCount

- - - -@code { - private int currentCount = 0; - - private void IncrementCount() - { - currentCount++; - } -} diff --git a/src/DevHive.Blazor/Pages/Error.cshtml b/src/DevHive.Blazor/Pages/Error.cshtml deleted file mode 100644 index 9e1d3fa..0000000 --- a/src/DevHive.Blazor/Pages/Error.cshtml +++ /dev/null @@ -1,42 +0,0 @@ -@page -@model DevHive.Blazor.Pages.ErrorModel - - - - - - - - Error - - - - - -
-
-

Error.

-

An error occurred while processing your request.

- - @if (Model.ShowRequestId) - { -

- Request ID: @Model.RequestId -

- } - -

Development Mode

-

- Swapping to the Development environment displays detailed information about the error that occurred. -

-

- The Development environment shouldn't be enabled for deployed applications. - It can result in displaying sensitive information from exceptions to end users. - For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development - and restarting the app. -

-
-
- - - diff --git a/src/DevHive.Blazor/Pages/Error.cshtml.cs b/src/DevHive.Blazor/Pages/Error.cshtml.cs deleted file mode 100644 index b18c4a6..0000000 --- a/src/DevHive.Blazor/Pages/Error.cshtml.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.RazorPages; -using Microsoft.Extensions.Logging; - -namespace DevHive.Blazor.Pages -{ - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] - [IgnoreAntiforgeryToken] - public class ErrorModel : PageModel - { - public string RequestId { get; set; } - - public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - - private readonly ILogger _logger; - - public ErrorModel(ILogger logger) - { - _logger = logger; - } - - public void OnGet() - { - RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; - } - } -} diff --git a/src/DevHive.Blazor/Pages/FetchData.razor b/src/DevHive.Blazor/Pages/FetchData.razor deleted file mode 100644 index a496d0d..0000000 --- a/src/DevHive.Blazor/Pages/FetchData.razor +++ /dev/null @@ -1,46 +0,0 @@ -@page "/fetchdata" - -@using DevHive.Blazor.Data -@inject WeatherForecastService ForecastService - -

Weather forecast

- -

This component demonstrates fetching data from a service.

- -@if (forecasts == null) -{ -

Loading...

-} -else -{ - - - - - - - - - - - @foreach (var forecast in forecasts) - { - - - - - - - } - -
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
-} - -@code { - private WeatherForecast[] forecasts; - - protected override async Task OnInitializedAsync() - { - forecasts = await ForecastService.GetForecastAsync(DateTime.Now); - } -} diff --git a/src/DevHive.Blazor/Pages/Index.razor b/src/DevHive.Blazor/Pages/Index.razor deleted file mode 100644 index a4c47de..0000000 --- a/src/DevHive.Blazor/Pages/Index.razor +++ /dev/null @@ -1,7 +0,0 @@ -@page "/" - -

Hello, world!

- -Welcome to your new app. - - diff --git a/src/DevHive.Blazor/Pages/_Host.cshtml b/src/DevHive.Blazor/Pages/_Host.cshtml deleted file mode 100644 index 9c03a62..0000000 --- a/src/DevHive.Blazor/Pages/_Host.cshtml +++ /dev/null @@ -1,35 +0,0 @@ -@page "/" -@namespace DevHive.Blazor.Pages -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -@{ - Layout = null; -} - - - - - - - DevHive.Blazor - - - - - - - - -
- - An error has occurred. This application may no longer respond until reloaded. - - - An unhandled exception has occurred. See browser dev tools for details. - - Reload - 🗙 -
- - - - -- cgit v1.2.3