Compare commits
7
Commits
0cc5b8935d
..
1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98eefa89b4 | ||
|
|
216f4978d7 | ||
|
|
3b632a5bc7 | ||
|
|
0ce43a4779 | ||
|
|
f19eaa75ae | ||
|
|
847fccfdea | ||
|
|
db160e9b96 |
+1
-1
@@ -3,7 +3,7 @@ FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY ["nuget.config", "./"]
|
COPY ["nuget.config", "./"]
|
||||||
COPY ["ShopAdmin/ShopAdmin.csproj", "Shop/"]
|
COPY ["ShopAdmin/ShopAdmin.csproj", "ShopAdmin/"]
|
||||||
RUN dotnet restore "ShopAdmin/ShopAdmin.csproj" --configfile nuget.config
|
RUN dotnet restore "ShopAdmin/ShopAdmin.csproj" --configfile nuget.config
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN dotnet publish "ShopAdmin/ShopAdmin.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
RUN dotnet publish "ShopAdmin/ShopAdmin.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
<Solution>
|
<Solution>
|
||||||
|
<Folder Name="/Solution Items/">
|
||||||
|
<File Path=".drone.yml" />
|
||||||
|
<File Path=".editorconfig" />
|
||||||
|
<File Path="Dockerfile" />
|
||||||
|
<File Path="litecharms-shopadmin-uat.yml" />
|
||||||
|
</Folder>
|
||||||
<Project Path="ShopAdmin/ShopAdmin.csproj" />
|
<Project Path="ShopAdmin/ShopAdmin.csproj" />
|
||||||
</Solution>
|
</Solution>
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
@page "/"
|
|
||||||
|
|
||||||
<PageTitle>Home</PageTitle>
|
|
||||||
|
|
||||||
<h1>Hello, world!</h1>
|
|
||||||
|
|
||||||
Welcome to your new app.
|
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
@layout MainLayout
|
@layout MainLayout
|
||||||
|
|
||||||
<h3>Not Found</h3>
|
<h3>Not Found</h3>
|
||||||
<p>Sorry, the content you are looking for does not exist.</p>
|
<p>Sorry, the content you are looking for does not exist</p>
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
@page "/weather"
|
|
||||||
@attribute [StreamRendering]
|
|
||||||
|
|
||||||
<PageTitle>Weather</PageTitle>
|
|
||||||
|
|
||||||
<h1>Weather</h1>
|
|
||||||
|
|
||||||
<p>This component demonstrates showing data.</p>
|
|
||||||
|
|
||||||
@if (forecasts == null)
|
|
||||||
{
|
|
||||||
<p><em>Loading...</em></p>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<table class="table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Date</th>
|
|
||||||
<th aria-label="Temperature in Celsius">Temp. (C)</th>
|
|
||||||
<th aria-label="Temperature in Fahrenheit">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()
|
|
||||||
{
|
|
||||||
// Simulate asynchronous loading to demonstrate streaming rendering
|
|
||||||
await Task.Delay(500);
|
|
||||||
|
|
||||||
var startDate = DateOnly.FromDateTime(DateTime.Now);
|
|
||||||
var summaries = new[] { "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" };
|
|
||||||
forecasts = Enumerable.Range(1, 5).Select(index => new WeatherForecast
|
|
||||||
{
|
|
||||||
Date = startDate.AddDays(index),
|
|
||||||
TemperatureC = Random.Shared.Next(-20, 55),
|
|
||||||
Summary = summaries[Random.Shared.Next(summaries.Length)]
|
|
||||||
}).ToArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
private 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user