diff --git a/PersonaForge.Blazor/Pages/Sikms2Craft.razor b/PersonaForge.Blazor/Pages/Sikms2Craft.razor new file mode 100644 index 0000000..4dd93b6 --- /dev/null +++ b/PersonaForge.Blazor/Pages/Sikms2Craft.razor @@ -0,0 +1,57 @@ +@page "/craft" +@inject HttpClient Http + +Sims2Craft + +

Craft

+ +

This component demonstrates fetching data from the server.

+ +@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 Http.GetFromJsonAsync("sample-data/weather.json"); + } + + public class WeatherForecast + { + public DateOnly Date { get; set; } + + public int TemperatureC { get; set; } + + public string? Summary { get; set; } + + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + } +} diff --git a/PersonaForge.Blazor/_Imports.razor b/PersonaForge.Blazor/_Imports.razor index c0e73c5..db9f92b 100644 --- a/PersonaForge.Blazor/_Imports.razor +++ b/PersonaForge.Blazor/_Imports.razor @@ -1,4 +1,4 @@ -@using System.Net.Http +@using System.Net.Http @using System.Net.Http.Json @using Microsoft.AspNetCore.Components.Forms @using Microsoft.AspNetCore.Components.Routing @@ -8,3 +8,4 @@ @using Microsoft.JSInterop @using PersonaForge.Blazor @using PersonaForge.Blazor.Layout +@using PersonaForge diff --git a/.config/dotnet-tools.json b/PersonaForge.Console/.config/dotnet-tools.json similarity index 100% rename from .config/dotnet-tools.json rename to PersonaForge.Console/.config/dotnet-tools.json diff --git a/PersonaForge.Console/GlobalUsing.cs b/PersonaForge.Console/GlobalUsing.cs deleted file mode 100644 index 4b8d20b..0000000 --- a/PersonaForge.Console/GlobalUsing.cs +++ /dev/null @@ -1,2 +0,0 @@ -global using System.Text.Json; -global using System.CommandLine; diff --git a/PersonaForge.sln b/PersonaForge.sln index 8ba3cfa..bd2e917 100644 --- a/PersonaForge.sln +++ b/PersonaForge.sln @@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PersonaForge.Console", "Per EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PersonaForge", "PersonaForge\PersonaForge.csproj", "{316741E2-8BE3-4FBF-A10D-F8FF2AD6979E}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PersonaForge.Blazor", "PersonaForge.Blazor\PersonaForge.Blazor.csproj", "{381CCDD1-BB1A-45F0-8501-77769AB4578F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -24,5 +26,9 @@ Global {316741E2-8BE3-4FBF-A10D-F8FF2AD6979E}.Debug|Any CPU.Build.0 = Debug|Any CPU {316741E2-8BE3-4FBF-A10D-F8FF2AD6979E}.Release|Any CPU.ActiveCfg = Release|Any CPU {316741E2-8BE3-4FBF-A10D-F8FF2AD6979E}.Release|Any CPU.Build.0 = Release|Any CPU + {381CCDD1-BB1A-45F0-8501-77769AB4578F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {381CCDD1-BB1A-45F0-8501-77769AB4578F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {381CCDD1-BB1A-45F0-8501-77769AB4578F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {381CCDD1-BB1A-45F0-8501-77769AB4578F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/PersonaForge/GlobalUsing.cs b/PersonaForge/GlobalUsing.cs index 4b8d20b..a32a4f6 100644 --- a/PersonaForge/GlobalUsing.cs +++ b/PersonaForge/GlobalUsing.cs @@ -1,2 +1 @@ global using System.Text.Json; -global using System.CommandLine;