Cleanup before refactor
This commit is contained in:
@@ -48,6 +48,24 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="appsettings.json" />
|
||||||
|
<None Remove="appsettings.Development.json" />
|
||||||
|
|
||||||
|
<Content Include="appsettings.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||||
|
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||||
|
</Content>
|
||||||
|
|
||||||
|
<Content Include="appsettings.Development.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||||
|
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||||
|
<DependentUpon>appsettings.json</DependentUpon>
|
||||||
|
</Content>
|
||||||
|
</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"/>
|
||||||
@@ -71,6 +89,10 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.9"/>
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.9"/>
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.9"/>
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.9"/>
|
||||||
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)"/>
|
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)"/>
|
||||||
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)"/>
|
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)"/>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)"/>
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)"/>
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
using Bimix.UI.Mobile.Services;
|
using System.Reflection;
|
||||||
|
using Bimix.UI.Mobile.Services;
|
||||||
using Bimix.UI.Shared.Extensions;
|
using Bimix.UI.Shared.Extensions;
|
||||||
using Bimix.UI.Shared.Interfaces;
|
using Bimix.UI.Shared.Interfaces;
|
||||||
|
using Bimix.UI.Shared.Services;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.Maui.Controls.Hosting;
|
||||||
|
using Microsoft.Maui.Devices;
|
||||||
|
using Microsoft.Maui.Hosting;
|
||||||
using MudBlazor.Services;
|
using MudBlazor.Services;
|
||||||
using ZXing.Net.Maui.Controls;
|
using ZXing.Net.Maui.Controls;
|
||||||
|
|
||||||
@@ -17,6 +24,11 @@ public static class MauiProgram
|
|||||||
.UseBarcodeReader()
|
.UseBarcodeReader()
|
||||||
.ConfigureFonts(fonts => { fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); });
|
.ConfigureFonts(fonts => { fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); });
|
||||||
|
|
||||||
|
builder.Configuration
|
||||||
|
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: false)
|
||||||
|
.AddJsonFile($"appsettings.Development.json", optional: true, reloadOnChange: false)
|
||||||
|
.AddEnvironmentVariables();
|
||||||
|
|
||||||
builder.Services.AddMauiBlazorWebView();
|
builder.Services.AddMauiBlazorWebView();
|
||||||
builder.Services.AddMudServices();
|
builder.Services.AddMudServices();
|
||||||
|
|
||||||
@@ -29,6 +41,8 @@ public static class MauiProgram
|
|||||||
builder.Services.AddSingleton<IScannerService, NoOpScannerService>();
|
builder.Services.AddSingleton<IScannerService, NoOpScannerService>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
builder.Services.AddScoped<AuthService>();
|
||||||
|
|
||||||
var baseUrl = GetApiBaseUrl();
|
var baseUrl = GetApiBaseUrl();
|
||||||
builder.Services.AddSharedServices(baseUrl);
|
builder.Services.AddSharedServices(baseUrl);
|
||||||
|
|
||||||
@@ -36,6 +50,7 @@ public static class MauiProgram
|
|||||||
#if DEBUG
|
#if DEBUG
|
||||||
builder.Services.AddBlazorWebViewDeveloperTools();
|
builder.Services.AddBlazorWebViewDeveloperTools();
|
||||||
builder.Logging.AddDebug();
|
builder.Logging.AddDebug();
|
||||||
|
builder.Logging.SetMinimumLevel(LogLevel.Debug);
|
||||||
#endif
|
#endif
|
||||||
return builder.Build();
|
return builder.Build();
|
||||||
}
|
}
|
||||||
@@ -43,11 +58,10 @@ public static class MauiProgram
|
|||||||
private static string GetApiBaseUrl()
|
private static string GetApiBaseUrl()
|
||||||
{
|
{
|
||||||
#if IOS
|
#if IOS
|
||||||
// iOS symulator - użyj swojego IP
|
// iOS symulator
|
||||||
return "http://192.168.13.44:7142/"; // Zastąp swoim IP
|
return "http://192.168.29.140:7142/";
|
||||||
#else
|
#else
|
||||||
return "https://localhost:7142/";
|
return "https://localhost:7142/";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
5
Bimix.UI.Mobile/appsettings.Development.json
Normal file
5
Bimix.UI.Mobile/appsettings.Development.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"GoogleAuth": {
|
||||||
|
"ClientId": "1037727384847-t1l2au6du34kdckamro81guklk17cjah.apps.googleusercontent.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
5
Bimix.UI.Mobile/appsettings.json
Normal file
5
Bimix.UI.Mobile/appsettings.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"GoogleAuth": {
|
||||||
|
"ClientId": "1037727384847-t1l2au6du34kdckamro81guklk17cjah.apps.googleusercontent.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user