Prima configurazione e struttura

This commit is contained in:
2026-02-04 17:31:00 +01:00
parent 1a949051ca
commit ecafebae7f
66 changed files with 1153 additions and 645 deletions

View File

@@ -10,14 +10,14 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<link href="_content/Template.Shared/css/bootstrap/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link href="_content/Template.Shared/css/bootstrap/bootstrap-icons.min.css" rel="stylesheet" />
<link href="_content/SteUp.Shared/css/bootstrap/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link href="_content/SteUp.Shared/css/bootstrap/bootstrap-icons.min.css" rel="stylesheet" />
<link href="_content/Blazor.Bootstrap/blazor.bootstrap.css" rel="stylesheet" />
<link rel="stylesheet" href="_content/Template.Shared/css/remixicon/remixicon.css" />
<link rel="stylesheet" href="_content/Template.Shared/css/app.css" />
<link rel="stylesheet" href="_content/Template.Shared/css/default-theme.css" />
<link rel="stylesheet" href="Template.Web.styles.css" />
<link rel="stylesheet" href="_content/SteUp.Shared/css/remixicon/remixicon.css" />
<link rel="stylesheet" href="_content/SteUp.Shared/css/app.css" />
<link rel="stylesheet" href="_content/SteUp.Shared/css/default-theme.css" />
<link rel="stylesheet" href="SteUp.Web.styles.css" />
<HeadOutlet @rendermode="InteractiveServer" />
</head>
@@ -26,13 +26,13 @@
<Routes @rendermode="InteractiveServer" />
<script src="_framework/blazor.web.js"></script>
<script src="_content/Template.Shared/js/bootstrap/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
<script src="_content/SteUp.Shared/js/bootstrap/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
<!-- Add chart.js reference if chart components are used in your application. -->
<!--<script src="_content/Template.Shared/js/bootstrap/chart.umd.js" integrity="sha512-gQhCDsnnnUfaRzD8k1L5llCCV6O9HN09zClIzzeJ8OJ9MpGmIlCxm+pdCkqTwqJ4JcjbojFr79rl2F1mzcoLMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>-->
<!--<script src="_content/SteUp.Shared/js/bootstrap/chart.umd.js" integrity="sha512-gQhCDsnnnUfaRzD8k1L5llCCV6O9HN09zClIzzeJ8OJ9MpGmIlCxm+pdCkqTwqJ4JcjbojFr79rl2F1mzcoLMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>-->
<!-- Add chartjs-plugin-datalabels.min.js reference if chart components with data label feature is used in your application. -->
<!--<script src="_content/Template.Shared/js/bootstrap/chartjs-plugin-datalabels.min.js" integrity="sha512-JPcRR8yFa8mmCsfrw4TNte1ZvF1e3+1SdGMslZvmrzDYxS69J7J49vkFL8u6u8PlPJK+H3voElBtUCzaXj+6ig==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>-->
<!--<script src="_content/SteUp.Shared/js/bootstrap/chartjs-plugin-datalabels.min.js" integrity="sha512-JPcRR8yFa8mmCsfrw4TNte1ZvF1e3+1SdGMslZvmrzDYxS69J7J49vkFL8u6u8PlPJK+H3voElBtUCzaXj+6ig==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>-->
<!-- Add sortable.js reference if SortableList component is used in your application. -->
<!--<script src="_content/Template.Shared/js/bootstrap/Sortable.min.js"></script>-->
<!--<script src="_content/SteUp.Shared/js/bootstrap/Sortable.min.js"></script>-->
<script src="_content/Blazor.Bootstrap/blazor.bootstrap.js"></script>
</body>

View File

@@ -1,5 +1,4 @@
@page "/Error"
@using System.Diagnostics
<PageTitle>Error</PageTitle>
@@ -24,13 +23,12 @@
and restarting the app.
</p>
@code{
[CascadingParameter]
private HttpContext? HttpContext { get; set; }
@code {
private string? RequestId { get; set; }
private bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
protected override void OnInitialized() =>
RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier;
}
protected override void OnInitialized()
{
RequestId = Guid.NewGuid().ToString();
}
}

View File

@@ -6,6 +6,6 @@
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using Template.Web
@using Template.Shared.Components
@using Template.Shared
@using SteUp.Web
@using SteUp.Shared.Components
@using SteUp.Shared

View File

@@ -1,43 +1,30 @@
using IntegryApiClient.Blazor;
using Template.Web.Components;
using Template.Shared.Interfaces;
using Template.Web.Services;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using MudBlazor.Services;
using SteUp.Shared.Components;
using SteUp.Shared.Core.Interface;
using SteUp.Shared.Core.Services;
using SteUp.Web.Services;
#if DEBUG
const string BaseRestServicesEndpoint = "https://devservices.studioml.it/ems-api/";
//const string BaseRestServicesEndpoint = "http://192.168.2.23:8080/ems-api/";
#else
const string BaseRestServicesEndpoint = "https://services.studioml.it/ems-api/";
#endif
var builder = WebAssemblyHostBuilder.CreateDefault(args);
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddMudServices();
builder.Services.AddAuthorizationCore();
// Add services to the container.
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents();
builder.Services.AddBlazorBootstrap();
builder.Services.UseIntegry(BaseRestServicesEndpoint);
const string appToken = "4fef1843-793d-499b-a7ed-1edd8cac465c";
builder.Services.UseIntegry(appToken: appToken, useLoginAzienda: true);
builder.Services.AddScoped<IFormFactor, FormFactor>();
var app = builder.Build();
builder.Services.AddScoped<AppAuthenticationStateProvider>();
builder.Services.AddScoped<AuthenticationStateProvider>(provider => provider.GetRequiredService<AppAuthenticationStateProvider>());
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error", createScopeForErrors: true);
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
builder.RootComponents.Add<Routes>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");
app.UseHttpsRedirection();
builder.Services.AddScoped(_ => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
app.UseStaticFiles();
app.UseAntiforgery();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddAdditionalAssemblies(typeof(Template.Shared._Imports).Assembly);
app.Run();
var host = builder.Build();
await host.RunAsync();

View File

@@ -1,6 +1,6 @@
using Template.Shared.Interfaces;
using SteUp.Shared.Core.Interface;
namespace Template.Web.Services;
namespace SteUp.Web.Services;
public class FormFactor : IFormFactor
{

View File

@@ -1,17 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="IntegryApiClient.Blazor" Version="1.0.9" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="IntegryApiClient.Blazor" Version="1.2.3"/>
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.12"/>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.12"/>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.12"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SteUp.Shared\SteUp.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SteUp.Shared\SteUp.Shared.csproj"/>
</ItemGroup>
</Project>