Integrata libreria Integry e libreria BlazorBootstrap

This commit is contained in:
2024-10-03 11:56:03 +02:00
parent d91e085b8a
commit 26776841a5
16 changed files with 195 additions and 68 deletions

View File

@@ -21,6 +21,7 @@ namespace MauiBlazorWeb.Maui
}); });
builder.Services.AddMauiBlazorWebView(); builder.Services.AddMauiBlazorWebView();
builder.Services.AddBlazorBootstrap();
#if DEBUG #if DEBUG
builder.Services.AddBlazorWebViewDeveloperTools(); builder.Services.AddBlazorWebViewDeveloperTools();

View File

@@ -1,7 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Razor"> <Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks> <TargetFrameworks>$(TargetFrameworks);net8.0-android</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);net8.0-ios</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks> <TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET --> <!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> --> <!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
@@ -32,18 +34,62 @@
<ApplicationVersion>1</ApplicationVersion> <ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion> <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
14.0
</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">24.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">24.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion> <TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion> <!--slower build, faster runtime in DEBUG-->
<!-- <_MauiForceXamlCForDebug Condition="'$(Configuration)' == 'Debug'">true</_MauiForceXamlCForDebug> -->
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='net8.0-ios'"> <PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
<CodesignKey>Apple Development: Giuseppe Scorrano (43565W8XCS)</CodesignKey> <DefineConstants>$(DefineConstants);PLATFORM</DefineConstants>
<CodesignProvision>VS: WildCard Development</CodesignProvision> <SupportedOSPlatformVersion>26.0</SupportedOSPlatformVersion>
<TargetPlatformVersion>34</TargetPlatformVersion>
<!--<EmbedAssembliesIntoApk Condition="'$(Configuration)' == 'Debug'">true</EmbedAssembliesIntoApk>
<AndroidPackageFormats Condition="'$(Configuration)' == 'Release'">aab</AndroidPackageFormats>
<AndroidLinkTool>r8</AndroidLinkTool>
<AndroidLinkTool>proguard</AndroidLinkTool>-->
</PropertyGroup> </PropertyGroup>
<PropertyGroup
Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' AND '$(Configuration)' == 'Debug'">
<!--these help speed up android builds-->
<!--
<RuntimeIdentifier>android-arm64</RuntimeIdentifier>
<AndroidEnableProfiler>true</AndroidEnableProfiler>
<AndroidPackageFormat>aab</AndroidPackageFormat>
-->
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' AND '$(Configuration)' == 'Debug'">
<!--forces the simulator to pickup entitlements-->
<EnableCodeSigning>true</EnableCodeSigning>
<CodesignRequireProvisioningProfile>true</CodesignRequireProvisioningProfile>
<DisableCodesignVerification>true</DisableCodesignVerification>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
<SupportedOSPlatformVersion>14.2</SupportedOSPlatformVersion>
<DefineConstants>$(DefineConstants);APPLE;PLATFORM</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
<!--
<BundleResource Include="Platforms\iOS\PrivacyInfo.xcprivacy" LogicalName="PrivacyInfo.xcprivacy" />
<CustomEntitlements Include="keychain-access-groups" Type="StringArray" Value="%24(AppIdentifierPrefix)$(ApplicationId)" Visible="false" />
<CustomEntitlements Include="aps-environment" Type="string" Value="development" Condition="'$(Configuration)' == 'Debug'" Visible="false" />
<CustomEntitlements Include="aps-environment" Type="string" Value="production" Condition="'$(Configuration)' == 'Release'" Visible="false" />
-->
</ItemGroup>
<ItemGroup> <ItemGroup>
<!-- App Icon --> <!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" /> <MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
@@ -63,9 +109,10 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.82" /> <PackageReference Include="IntegryApiClient.MAUI" Version="1.0.2" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.82" /> <PackageReference Include="Microsoft.Maui.Controls" Version="8.0.91" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.82" /> <PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.91" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.91" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
</ItemGroup> </ItemGroup>

View File

@@ -10,7 +10,11 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <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="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 rel="stylesheet" href="_content/MyWorkout.Shared/css/bootstrap/bootstrap.min.css" />
<link href="_content/MyWorkout.Shared/css/bootstrap/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link href="_content/MyWorkout.Shared/css/bootstrap/bootstrap-icons.min.css" rel="stylesheet" />
<link href="_content/Blazor.Bootstrap/blazor.bootstrap.css" rel="stylesheet" />
<link rel="stylesheet" href="_content/MyWorkout.Shared/css/remixicon/remixicon.css" /> <link rel="stylesheet" href="_content/MyWorkout.Shared/css/remixicon/remixicon.css" />
<link rel="stylesheet" href="_content/MyWorkout.Shared/css/app.css" /> <link rel="stylesheet" href="_content/MyWorkout.Shared/css/app.css" />
<link rel="stylesheet" href="_content/MyWorkout.Shared/css/default-theme.css" /> <link rel="stylesheet" href="_content/MyWorkout.Shared/css/default-theme.css" />
@@ -31,6 +35,14 @@
</div> </div>
<script src="_framework/blazor.webview.js" autostart="false"></script> <script src="_framework/blazor.webview.js" autostart="false"></script>
<script src="_content/MyWorkout.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/MyWorkout.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/MyWorkout.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/MyWorkout.Shared/js/bootstrap/Sortable.min.js"></script>-->
<script src="_content/Blazor.Bootstrap/blazor.bootstrap.js"></script>
</body> </body>

View File

@@ -11,7 +11,13 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Blazor.Bootstrap" Version="3.0.0" />
<PackageReference Include="IntegryApiClient.Core" Version="1.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.8" /> <PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.8" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\js\bootstrap\" />
</ItemGroup>
</Project> </Project>

View File

@@ -7,4 +7,5 @@
@using Microsoft.JSInterop @using Microsoft.JSInterop
@using MyWorkout.Shared @using MyWorkout.Shared
@using MyWorkout.Shared.Components @using MyWorkout.Shared.Components
@using BlazorBootstrap;
@using static InteractiveRenderSettings @using static InteractiveRenderSettings

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -10,17 +10,30 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <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="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 rel="stylesheet" href="_content/MyWorkout.Shared/css/bootstrap/bootstrap.min.css" /> <link href="_content/MyWorkout.Shared/css/bootstrap/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link href="_content/MyWorkout.Shared/css/bootstrap/bootstrap-icons.min.css" rel="stylesheet" />
<link href="_content/Blazor.Bootstrap/blazor.bootstrap.css" rel="stylesheet" />
<link rel="stylesheet" href="_content/MyWorkout.Shared/css/remixicon/remixicon.css" /> <link rel="stylesheet" href="_content/MyWorkout.Shared/css/remixicon/remixicon.css" />
<link rel="stylesheet" href="_content/MyWorkout.Shared/css/app.css" /> <link rel="stylesheet" href="_content/MyWorkout.Shared/css/app.css" />
<link rel="stylesheet" href="_content/MyWorkout.Shared/css/default-theme.css" /> <link rel="stylesheet" href="_content/MyWorkout.Shared/css/default-theme.css" />
<link rel="stylesheet" href="MyWorkout.Web.styles.css" /> <link rel="stylesheet" href="MyWorkout.Web.styles.css" />
<HeadOutlet @rendermode="InteractiveServer" /> <HeadOutlet @rendermode="InteractiveServer" />
</head> </head>
<body> <body>
<Routes @rendermode="InteractiveServer" /> <Routes @rendermode="InteractiveServer" />
<script src="_framework/blazor.web.js"></script> <script src="_framework/blazor.web.js"></script>
<script src="_content/MyWorkout.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/MyWorkout.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/MyWorkout.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/MyWorkout.Shared/js/bootstrap/Sortable.min.js"></script>-->
<script src="_content/Blazor.Bootstrap/blazor.bootstrap.js"></script>
</body> </body>
</html> </html>

View File

@@ -6,6 +6,10 @@
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="IntegryApiClient.Blazor" Version="1.0.9" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\MyWorkout.Shared\MyWorkout.Shared.csproj" /> <ProjectReference Include="..\MyWorkout.Shared\MyWorkout.Shared.csproj" />
</ItemGroup> </ItemGroup>

View File

@@ -8,6 +8,8 @@ var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRazorComponents() builder.Services.AddRazorComponents()
.AddInteractiveServerComponents(); .AddInteractiveServerComponents();
builder.Services.AddBlazorBootstrap();
builder.Services.AddScoped<IFormFactor, FormFactor>(); builder.Services.AddScoped<IFormFactor, FormFactor>();
var app = builder.Build(); var app = builder.Build();

7
NuGet.Config Normal file
View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="integry" value="https://nuget.studioml.it/repository/nuget-group/index.json" />
</packageSources>
</configuration>