diff --git a/.idea/.idea.RBLNews/.idea/deploymentTargetSelector.xml b/.idea/.idea.RBLNews/.idea/deploymentTargetSelector.xml index ae67e8f..214e5b9 100644 --- a/.idea/.idea.RBLNews/.idea/deploymentTargetSelector.xml +++ b/.idea/.idea.RBLNews/.idea/deploymentTargetSelector.xml @@ -4,6 +4,14 @@ diff --git a/RBLNews.Maui/App.xaml.cs b/RBLNews.Maui/App.xaml.cs index 90e3f64..7ea2a02 100644 --- a/RBLNews.Maui/App.xaml.cs +++ b/RBLNews.Maui/App.xaml.cs @@ -1,4 +1,6 @@ -using Microsoft.Maui.Controls.PlatformConfiguration; +using Microsoft.Maui; +using Microsoft.Maui.Controls; + using RBLNews.Shared.Services; namespace RBLNews.Maui diff --git a/RBLNews.Maui/MainPage.xaml.cs b/RBLNews.Maui/MainPage.xaml.cs index 0e4e1ba..c8d7337 100644 --- a/RBLNews.Maui/MainPage.xaml.cs +++ b/RBLNews.Maui/MainPage.xaml.cs @@ -1,4 +1,8 @@ -using RBLNews.Shared.Components.Pages; +using System; + +using Microsoft.Maui.Controls; + +using RBLNews.Shared.Components.Pages; namespace RBLNews.Maui { diff --git a/RBLNews.Maui/MauiProgram.cs b/RBLNews.Maui/MauiProgram.cs index c676649..dda7c91 100644 --- a/RBLNews.Maui/MauiProgram.cs +++ b/RBLNews.Maui/MauiProgram.cs @@ -2,7 +2,10 @@ using CommunityToolkit.Maui.Markup; using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; +using Microsoft.Maui.Controls.Hosting; +using Microsoft.Maui.Hosting; using RBLNews.Maui.Services; using RBLNews.Shared.Models; @@ -18,8 +21,8 @@ namespace RBLNews.Maui var builder = MauiApp.CreateBuilder(); builder .UseMauiApp() - .UseMauiCommunityToolkit() - .UseMauiCommunityToolkitMarkup() + .UseMauiCommunityToolkit() + .UseMauiCommunityToolkitMarkup() .ConfigureFonts(fonts => { //fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); @@ -33,19 +36,19 @@ namespace RBLNews.Maui builder.Services.AddSingleton(); #if DEBUG - builder.Services.AddBlazorWebViewDeveloperTools(); + builder.Services.AddBlazorWebViewDeveloperTools(); builder.Logging.AddDebug(); #endif - + MauiApp app = builder.Build(); - AppSettingsModel? appSettings = app.Configuration.GetSection("App").Get(); + AppSettingsModel? appSettings = app.Configuration.GetSection("Logging").Get(); if (string.IsNullOrEmpty(appSettings?.BackendApiUrl)) { - throw new Exception($"can't instantiate services, due to paramters are null. backendApiUrl: '{appSettings?.BackendApiUrl}'"); + throw new Exception($"can't instantiate services, due to parameters are null. backendApiUrl: '{appSettings?.BackendApiUrl}'"); } - + return app; } } diff --git a/RBLNews.Maui/RBLNews.Maui.csproj b/RBLNews.Maui/RBLNews.Maui.csproj index 9e9fc0d..6f9f35c 100644 --- a/RBLNews.Maui/RBLNews.Maui.csproj +++ b/RBLNews.Maui/RBLNews.Maui.csproj @@ -68,17 +68,39 @@ + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + - - - + + + @@ -87,22 +109,7 @@ - - - - - - wwwroot\appsettings.Development.json - - - wwwroot\appsettings.json - - - wwwroot\appsettings.Production.json - - - wwwroot\appsettings.Test.json - + diff --git a/RBLNews.Maui/appsettings.Development.json b/RBLNews.Maui/appsettings.Development.json new file mode 100644 index 0000000..7a608cd --- /dev/null +++ b/RBLNews.Maui/appsettings.Development.json @@ -0,0 +1,11 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "App": { + "BackendApiUrl": "https://localhost:5147" + } +} diff --git a/RBLNews.Maui/appsettings.Production.json b/RBLNews.Maui/appsettings.Production.json new file mode 100644 index 0000000..0c2c7dc --- /dev/null +++ b/RBLNews.Maui/appsettings.Production.json @@ -0,0 +1,12 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "App": { + "BackendApiUrl": "https://rblnews.de" + } +} diff --git a/RBLNews.Maui/appsettings.Test.json b/RBLNews.Maui/appsettings.Test.json new file mode 100644 index 0000000..8ceaf0e --- /dev/null +++ b/RBLNews.Maui/appsettings.Test.json @@ -0,0 +1,12 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "App": { + "BackendApiUrl": "https://rbl.wohlleben.dev" + } +} diff --git a/RBLNews.Maui/appsettings.json b/RBLNews.Maui/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/RBLNews.Maui/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/RBLNews.Shared/Component1.razor b/RBLNews.Shared/Component1.razor deleted file mode 100644 index eb0ab3d..0000000 --- a/RBLNews.Shared/Component1.razor +++ /dev/null @@ -1,3 +0,0 @@ -
- This component is defined in the RBLNews.Shared library. -
diff --git a/RBLNews.Shared/Component1.razor.css b/RBLNews.Shared/Component1.razor.css deleted file mode 100644 index c6afca4..0000000 --- a/RBLNews.Shared/Component1.razor.css +++ /dev/null @@ -1,6 +0,0 @@ -.my-component { - border: 2px dashed red; - padding: 1em; - margin: 1em 0; - background-image: url('background.png'); -} diff --git a/RBLNews.Shared/RBLNews.Shared.csproj b/RBLNews.Shared/RBLNews.Shared.csproj index ea85a54..15359dd 100644 --- a/RBLNews.Shared/RBLNews.Shared.csproj +++ b/RBLNews.Shared/RBLNews.Shared.csproj @@ -6,6 +6,22 @@ enable + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + @@ -21,18 +37,19 @@ - + + + + + PreserveNewest - - + + + + + PreserveNewest - - - PreserveNewest - - - PreserveNewest - + diff --git a/RBLNews.Shared/RBLNews.Shared.csproj.orig b/RBLNews.Shared/RBLNews.Shared.csproj.orig deleted file mode 100644 index 751c394..0000000 --- a/RBLNews.Shared/RBLNews.Shared.csproj.orig +++ /dev/null @@ -1,26 +0,0 @@ - - - - net8.0 - enable - enable - - - - - - - - -<<<<<<< HEAD -======= - - - ->>>>>>> css_bootstrap_blazor - - - - - - diff --git a/RBLNews.Shared/Services/FeedDataService.cs b/RBLNews.Shared/Services/FeedDataService.cs index baa645b..e38cdf8 100644 --- a/RBLNews.Shared/Services/FeedDataService.cs +++ b/RBLNews.Shared/Services/FeedDataService.cs @@ -29,7 +29,7 @@ namespace RBLNews.Shared.Services { this._configService = configService; } - + public async Task LoadFeeds() { Feeds = await httpClient.GetFromJsonAsync($"{this._configService.AppSettings.BackendApiUrl}/api/feeds") ?? new RssVM(); diff --git a/RBLNews.Shared/_Imports.razor.BASE b/RBLNews.Shared/_Imports.razor.BASE deleted file mode 100644 index 954960d..0000000 --- a/RBLNews.Shared/_Imports.razor.BASE +++ /dev/null @@ -1,4 +0,0 @@ -@* ANT CSS DESIGN IMPORT -------------------- *@ -@using AntDesign - -@using Microsoft.AspNetCore.Components.Web diff --git a/RBLNews.Shared/_Imports.razor.LOCAL b/RBLNews.Shared/_Imports.razor.LOCAL deleted file mode 100644 index 7728512..0000000 --- a/RBLNews.Shared/_Imports.razor.LOCAL +++ /dev/null @@ -1 +0,0 @@ -@using Microsoft.AspNetCore.Components.Web diff --git a/RBLNews.Shared/_Imports.razor.REMOTE b/RBLNews.Shared/_Imports.razor.REMOTE deleted file mode 100644 index f1f2ce8..0000000 --- a/RBLNews.Shared/_Imports.razor.REMOTE +++ /dev/null @@ -1,4 +0,0 @@ -@* ANT CSS DESIGN IMPORT -------------------- *@ -@using BlazorBootstrap; - -@using Microsoft.AspNetCore.Components.Web diff --git a/RBLNews.Shared/_Imports.razor.orig b/RBLNews.Shared/_Imports.razor.orig deleted file mode 100644 index dc53ee4..0000000 --- a/RBLNews.Shared/_Imports.razor.orig +++ /dev/null @@ -1,8 +0,0 @@ -<<<<<<< HEAD -@using Microsoft.AspNetCore.Components.Web -======= -@* ANT CSS DESIGN IMPORT -------------------- *@ -@using BlazorBootstrap; - -@using Microsoft.AspNetCore.Components.Web ->>>>>>> css_bootstrap_blazor diff --git a/RBLNews.Web/RBLNews.Web.csproj b/RBLNews.Web/RBLNews.Web.csproj index baee8a5..c36bac3 100644 --- a/RBLNews.Web/RBLNews.Web.csproj +++ b/RBLNews.Web/RBLNews.Web.csproj @@ -33,4 +33,8 @@ + + + +