Remove sample files, change main index to dashboard page
This commit is contained in:
parent
24d6169027
commit
03656e6284
@ -1,18 +0,0 @@
|
|||||||
@page "/counter"
|
|
||||||
|
|
||||||
<PageTitle>Counter</PageTitle>
|
|
||||||
|
|
||||||
<MudText Typo="Typo.h3" GutterBottom="true">Counter</MudText>
|
|
||||||
<MudText Class="mb-4">Current count: @currentCount</MudText>
|
|
||||||
<MudButton Color="Color.Primary" Variant="Variant.Filled" @onclick="IncrementCount">Click me</MudButton>
|
|
||||||
|
|
||||||
|
|
||||||
@code {
|
|
||||||
private int currentCount = 0;
|
|
||||||
|
|
||||||
private void IncrementCount()
|
|
||||||
{
|
|
||||||
currentCount++;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -5,7 +5,7 @@
|
|||||||
@inject NavigationManager UriHelper
|
@inject NavigationManager UriHelper
|
||||||
@inject IDialogService DialogService
|
@inject IDialogService DialogService
|
||||||
|
|
||||||
@page "/Dashboard"
|
@page "/"
|
||||||
|
|
||||||
<h1>Dashboard</h1>
|
<h1>Dashboard</h1>
|
||||||
|
|
||||||
|
@ -1,62 +0,0 @@
|
|||||||
@page "/fetchdata"
|
|
||||||
@inject HttpClient Http
|
|
||||||
@using TaikoWebUI.Shared
|
|
||||||
|
|
||||||
<PageTitle>Weather forecast</PageTitle>
|
|
||||||
|
|
||||||
<MudText Typo="Typo.h3" GutterBottom="true">Weather forecast</MudText>
|
|
||||||
<MudText Class="mb-8">This component demonstrates fetching data from the server.</MudText>
|
|
||||||
@if (forecasts == null)
|
|
||||||
{
|
|
||||||
<MudProgressCircular Color="Color.Default" Indeterminate="true"/>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<MudTable Items="forecasts" Hover="true" SortLabel="Sort By" Elevation="0">
|
|
||||||
<HeaderContent>
|
|
||||||
<MudTh>
|
|
||||||
<MudTableSortLabel InitialDirection="SortDirection.Ascending" SortBy="new Func<WeatherForecast, object>(x=>x.Date)">Date</MudTableSortLabel>
|
|
||||||
</MudTh>
|
|
||||||
<MudTh>
|
|
||||||
<MudTableSortLabel SortBy="new Func<WeatherForecast, object>(x=>x.TemperatureC)">Temp. (C)</MudTableSortLabel>
|
|
||||||
</MudTh>
|
|
||||||
<MudTh>
|
|
||||||
<MudTableSortLabel SortBy="new Func<WeatherForecast, object>(x=>x.TemperatureF)">Temp. (F)</MudTableSortLabel>
|
|
||||||
</MudTh>
|
|
||||||
<MudTh>
|
|
||||||
<MudTableSortLabel SortBy="new Func<WeatherForecast, object>(x=>x.Summary!)">Summary</MudTableSortLabel>
|
|
||||||
</MudTh>
|
|
||||||
</HeaderContent>
|
|
||||||
<RowTemplate>
|
|
||||||
<MudTd DataLabel="Date">@context.Date</MudTd>
|
|
||||||
<MudTd DataLabel="Temp. (C)">@context.TemperatureC</MudTd>
|
|
||||||
<MudTd DataLabel="Temp. (F)">@context.TemperatureF</MudTd>
|
|
||||||
<MudTd DataLabel="Summary">@context.Summary</MudTd>
|
|
||||||
</RowTemplate>
|
|
||||||
<PagerContent>
|
|
||||||
<MudTablePager PageSizeOptions="new int[]{50, 100}"/>
|
|
||||||
</PagerContent>
|
|
||||||
</MudTable>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@code {
|
|
||||||
private WeatherForecast[]? forecasts;
|
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
|
||||||
{
|
|
||||||
forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("sample-data/weather.json");
|
|
||||||
}
|
|
||||||
|
|
||||||
public class WeatherForecast
|
|
||||||
{
|
|
||||||
public DateTime Date { get; set; }
|
|
||||||
|
|
||||||
public int TemperatureC { get; set; }
|
|
||||||
|
|
||||||
public string? Summary { get; set; }
|
|
||||||
|
|
||||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
@page "/"
|
|
||||||
|
|
||||||
<PageTitle>Index</PageTitle>
|
|
||||||
|
|
||||||
<MudText Typo="Typo.h3" GutterBottom="true">Hello, world!</MudText>
|
|
||||||
<MudText Class="mb-8">Welcome to your new app, powered by MudBlazor!</MudText>
|
|
||||||
<MudAlert Severity="Severity.Normal">
|
|
||||||
You can find documentation and examples on our website here:
|
|
||||||
<MudLink Href="https://mudblazor.com" Typo="Typo.body2" Color="Color.Inherit">
|
|
||||||
<b>www.mudblazor.com</b>
|
|
||||||
</MudLink>
|
|
||||||
</MudAlert>
|
|
@ -1,6 +1,3 @@
|
|||||||
<MudNavMenu>
|
<MudNavMenu>
|
||||||
@* <MudNavLink Href="" Match="NavLinkMatch.All" Icon="@Icons.Material.Filled.Home">Home</MudNavLink>
|
<MudNavLink Href="" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.Dashboard">Dashboard</MudNavLink>
|
||||||
<MudNavLink Href="counter" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.Add">Counter</MudNavLink>
|
|
||||||
<MudNavLink Href="fetchdata" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.List">Fetch data</MudNavLink>*@
|
|
||||||
<MudNavLink Href="Dashboard" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.Dashboard">Dashboard</MudNavLink>
|
|
||||||
</MudNavMenu>
|
</MudNavMenu>
|
@ -1,27 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"date": "2018-05-06",
|
|
||||||
"temperatureC": 1,
|
|
||||||
"summary": "Freezing"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"date": "2018-05-07",
|
|
||||||
"temperatureC": 14,
|
|
||||||
"summary": "Bracing"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"date": "2018-05-08",
|
|
||||||
"temperatureC": -13,
|
|
||||||
"summary": "Freezing"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"date": "2018-05-09",
|
|
||||||
"temperatureC": -16,
|
|
||||||
"summary": "Balmy"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"date": "2018-05-10",
|
|
||||||
"temperatureC": -2,
|
|
||||||
"summary": "Chilly"
|
|
||||||
}
|
|
||||||
]
|
|
Loading…
x
Reference in New Issue
Block a user