Base mobile is working
This commit is contained in:
@@ -13,16 +13,27 @@ public static class MauiProgram
|
||||
.ConfigureFonts(fonts => { fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); });
|
||||
|
||||
builder.Services.AddMauiBlazorWebView();
|
||||
|
||||
builder.Services.AddMudServices();
|
||||
|
||||
var baseUrl = GetApiBaseUrl();
|
||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(baseUrl) });
|
||||
|
||||
#if DEBUG
|
||||
builder.Services.AddBlazorWebViewDeveloperTools();
|
||||
builder.Logging.AddDebug();
|
||||
#endif
|
||||
|
||||
builder.Services.AddMudBlazorDialog();
|
||||
builder.Services.AddMudBlazorSnackbar();
|
||||
builder.Services.AddMudBlazorResizeListener();
|
||||
|
||||
return builder.Build();
|
||||
}
|
||||
|
||||
private static string GetApiBaseUrl()
|
||||
{
|
||||
#if IOS
|
||||
// iOS symulator - użyj swojego IP
|
||||
return "http://192.168.1.100:5015/"; // Zastąp swoim IP
|
||||
#else
|
||||
return "https://localhost:7015/";
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user