Compare commits
No commits in common. "development" and "master" have entirely different histories.
developmen
...
master
22
.github/workflows/deploy.prod-env.yml
vendored
22
.github/workflows/deploy.prod-env.yml
vendored
@ -15,16 +15,22 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
registry: git.wohlleben.dev
|
registry: git.wohlleben.dev
|
||||||
username: ${{ gitea.actor }}
|
username: ${{ gitea.actor }}
|
||||||
password: ${{ vars.REGISTRY_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
- name: Restart all Docker Container on Production
|
- name: Restart all Docker Container on Production
|
||||||
uses: appleboy/ssh-action@v1.0.3
|
uses: appleboy/ssh-action@v1.0.3
|
||||||
with:
|
with:
|
||||||
host: ${{ vars.STRATO_VPS_HOST_ADDRESS }}
|
host: ${{ secrets.STRATO_VPS_HOST_ADDRESS }}
|
||||||
username: ${{ vars.STRATO_VPS_USER_NAME }}
|
username: ${{ secrets.STRATO_VPS_USER_NAME }}
|
||||||
key: ${{ vars.STRATO_VPS_ROOT_USER_SSH_KEY }}
|
key: ${{ secrets.STRATO_VPS_ROOT_USER_SSH_KEY }}
|
||||||
script: |
|
script: |
|
||||||
docker pull git.wohlleben.dev/itob/rbl-news-webapp:latest
|
docker pull git.wohlleben.dev/itob/rbl-feeder-app:latest
|
||||||
docker stop rbl-news-webapp
|
docker pull git.wohlleben.dev/itob/rbl-feeder-api:latest
|
||||||
docker rm rbl-news-webapp
|
docker pull git.wohlleben.dev/itob/rbl-feeder-worker:latest
|
||||||
docker run --init -d --name rbl-news-webapp -p 8000:8080 -e ASPNETCORE_ENVIRONMENT=Production --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest
|
docker pull git.wohlleben.dev/itob/rbl-feeder-monitoring:latest
|
||||||
|
docker stop rbl-feeder-app rbl-feeder-api rbl-feeder-worker rbl-feeder-monitoring
|
||||||
|
docker rm rbl-feeder-app rbl-feeder-api rbl-feeder-worker rbl-feeder-monitoring
|
||||||
|
docker run --init -d --name rbl-feeder-app -p 8000:80 --restart=always git.wohlleben.dev/itob/rbl-feeder-app:latest
|
||||||
|
docker run --init -d --name rbl-feeder-api -p 8001:8080 -e DatabaseName=rblfeeder -e ConnectionUri=${{ secrets.DB_CONNECTION_URI_PROD_ENV }} --restart=always git.wohlleben.dev/itob/rbl-feeder-api:latest
|
||||||
|
docker run --init -d --name rbl-feeder-monitoring -p 8002:8080 -e HostAddress=https://rbl.wohlleben.dev -e DatabaseName=rblfeeder -e ConnectionUri=${{ secrets.DB_CONNECTION_URI_PROD_ENV }} git.wohlleben.dev/itob/rbl-feeder-monitoring:latest
|
||||||
|
docker run --init -d --name rbl-feeder-worker -e HostAddress=https://rblnews.de -e DatabaseName=rblfeeder -e ConnectionUri=${{ secrets.DB_CONNECTION_URI_PROD_ENV }} --restart=always git.wohlleben.dev/itob/rbl-feeder-worker:latest
|
||||||
docker system prune -af
|
docker system prune -af
|
||||||
10
.github/workflows/deploy.test-env.yml
vendored
10
.github/workflows/deploy.test-env.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
registry: git.wohlleben.dev
|
registry: git.wohlleben.dev
|
||||||
username: ${{ gitea.actor }}
|
username: ${{ gitea.actor }}
|
||||||
password: ${{ vars.REGISTRY_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
- name: Build and push WebApp container image
|
- name: Build and push WebApp container image
|
||||||
run: |
|
run: |
|
||||||
TODAY=$(date +'%Y-%m-%d')
|
TODAY=$(date +'%Y-%m-%d')
|
||||||
@ -32,12 +32,12 @@ jobs:
|
|||||||
- name: Restart all Docker Container on Test Environment
|
- name: Restart all Docker Container on Test Environment
|
||||||
uses: appleboy/ssh-action@v1.0.3
|
uses: appleboy/ssh-action@v1.0.3
|
||||||
with:
|
with:
|
||||||
host: ${{ vars.SRV02_DOCKER_VM_HOST_ADDRESS }}
|
host: ${{ secrets.DOCKER_VM_HOST_ADDRESS }}
|
||||||
username: ${{ vars.SRV02_DOCKER_VM_USER_NAME }}
|
username: ${{ secrets.DOCKER_VM_HOST_ROOT_USERNAME }}
|
||||||
key: ${{ vars.SRV02_DOCKER_VM_ROOT_USER_SSH_KEY }}
|
key: ${{ secrets.DOCKER_VM_SSH_USER_ROOT }}
|
||||||
script: |
|
script: |
|
||||||
docker pull git.wohlleben.dev/itob/rbl-news-webapp:latest
|
docker pull git.wohlleben.dev/itob/rbl-news-webapp:latest
|
||||||
docker stop rbl-news-webapp
|
docker stop rbl-news-webapp
|
||||||
docker rm rbl-news-webapp
|
docker rm rbl-news-webapp
|
||||||
docker run --init -d --name rbl-news-webapp -p 8000:8080 -e ASPNETCORE_ENVIRONMENT=Test --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest
|
docker run --init -d --name rbl-news-webapp -p 8000:80 --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest
|
||||||
docker system prune -af
|
docker system prune -af
|
||||||
@ -4,14 +4,6 @@
|
|||||||
<selectionStates>
|
<selectionStates>
|
||||||
<SelectionState runConfigName="RBLNews.Maui">
|
<SelectionState runConfigName="RBLNews.Maui">
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
<DropdownSelection timestamp="2024-09-25T07:14:40.138909900Z">
|
|
||||||
<Target type="DEFAULT_BOOT">
|
|
||||||
<handle>
|
|
||||||
<DeviceId pluginId="LocalEmulator" identifier="path=C:\Users\tobia\.android\avd\pixel_5_-_api_34.avd" />
|
|
||||||
</handle>
|
|
||||||
</Target>
|
|
||||||
</DropdownSelection>
|
|
||||||
<DialogSelection />
|
|
||||||
</SelectionState>
|
</SelectionState>
|
||||||
</selectionStates>
|
</selectionStates>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@ -3,13 +3,12 @@ WORKDIR /app
|
|||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
EXPOSE 443
|
EXPOSE 443
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||||
ARG BUILD_CONFIGURATION=Release
|
ARG BUILD_CONFIGURATION=Release
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY ["../../RBLNews.Web/RBLNews.Web.csproj", "RBLNews.Web/"]
|
COPY ["../../RBLNews.Web/RBLNews.Shared.csproj", "RBLNews.Shared/"]
|
||||||
COPY ["../../RBLNews.Shared/RBLNews.Shared.csproj", "RBLNews.Shared/"]
|
RUN dotnet restore "RBLFeeder/RBLNews.Web.csproj"
|
||||||
RUN dotnet nuget add source --name itob https://git.wohlleben.dev/api/packages/itob/nuget/index.json
|
|
||||||
RUN dotnet restore "RBLNews.Web/RBLNews.Web.csproj"
|
|
||||||
COPY . .
|
COPY . .
|
||||||
WORKDIR "/src/RBLNews.Web"
|
WORKDIR "/src/RBLNews.Web"
|
||||||
RUN dotnet build "RBLNews.Web.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
RUN dotnet build "RBLNews.Web.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
||||||
|
|||||||
@ -1,7 +1,2 @@
|
|||||||
$location = Get-Location
|
cd..
|
||||||
if(!$location.Path.Contains("RBLNews.Web"))
|
|
||||||
{
|
|
||||||
cd ../RBLNews.Maui
|
|
||||||
}
|
|
||||||
|
|
||||||
dotnet publish -c Release -r android-arm64 -p:PackageFormat=Apk -f net8.0-android34.0 --sc true
|
dotnet publish -c Release -r android-arm64 -p:PackageFormat=Apk -f net8.0-android34.0 --sc true
|
||||||
@ -1,6 +1,4 @@
|
|||||||
using Microsoft.Maui;
|
using Microsoft.Maui.Controls.PlatformConfiguration;
|
||||||
using Microsoft.Maui.Controls;
|
|
||||||
|
|
||||||
using RBLNews.Shared.Services;
|
using RBLNews.Shared.Services;
|
||||||
|
|
||||||
namespace RBLNews.Maui
|
namespace RBLNews.Maui
|
||||||
|
|||||||
@ -1,8 +1,4 @@
|
|||||||
using System;
|
using RBLNews.Shared.Components.Pages;
|
||||||
|
|
||||||
using Microsoft.Maui.Controls;
|
|
||||||
|
|
||||||
using RBLNews.Shared.Components.Pages;
|
|
||||||
|
|
||||||
namespace RBLNews.Maui
|
namespace RBLNews.Maui
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,17 +1,7 @@
|
|||||||
using System.Reflection;
|
using CommunityToolkit.Maui;
|
||||||
using CommunityToolkit.Maui;
|
|
||||||
using CommunityToolkit.Maui.Markup;
|
using CommunityToolkit.Maui.Markup;
|
||||||
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Maui.Controls.Hosting;
|
|
||||||
using Microsoft.Maui.Hosting;
|
|
||||||
|
|
||||||
using RBLNews.Maui.Services;
|
|
||||||
using RBLNews.Shared.Models;
|
|
||||||
using RBLNews.Shared.Services;
|
using RBLNews.Shared.Services;
|
||||||
using RBLNews.Shared.Services.Contracts;
|
|
||||||
|
|
||||||
namespace RBLNews.Maui
|
namespace RBLNews.Maui
|
||||||
{
|
{
|
||||||
@ -22,8 +12,8 @@ namespace RBLNews.Maui
|
|||||||
var builder = MauiApp.CreateBuilder();
|
var builder = MauiApp.CreateBuilder();
|
||||||
builder
|
builder
|
||||||
.UseMauiApp<App>()
|
.UseMauiApp<App>()
|
||||||
.UseMauiCommunityToolkit()
|
.UseMauiCommunityToolkit()
|
||||||
.UseMauiCommunityToolkitMarkup()
|
.UseMauiCommunityToolkitMarkup()
|
||||||
.ConfigureFonts(fonts =>
|
.ConfigureFonts(fonts =>
|
||||||
{
|
{
|
||||||
//fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
|
//fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
|
||||||
@ -32,32 +22,16 @@ namespace RBLNews.Maui
|
|||||||
|
|
||||||
builder.Services.AddMauiBlazorWebView();
|
builder.Services.AddMauiBlazorWebView();
|
||||||
builder.Services.AddBlazorBootstrap();
|
builder.Services.AddBlazorBootstrap();
|
||||||
builder.Services.AddSingleton<IConfigService, ConfigService>();
|
|
||||||
builder.Services.AddSingleton<IFeedDataService, FeedDataService>();
|
builder.Services.AddSingleton<IFeedDataService, FeedDataService>();
|
||||||
builder.Services.AddSingleton<AppLifecycleService>();
|
builder.Services.AddSingleton<AppLifecycleService>();
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
builder.Services.AddBlazorWebViewDeveloperTools();
|
builder.Services.AddBlazorWebViewDeveloperTools();
|
||||||
builder.Logging.AddDebug();
|
builder.Logging.AddDebug();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Stream? appSettingFile = Assembly.GetExecutingAssembly().GetManifestResourceStream($"appsettings.json");
|
return builder.Build();
|
||||||
if (appSettingFile != null)
|
|
||||||
{
|
|
||||||
IConfiguration configuration = new ConfigurationManager().AddJsonStream(appSettingFile).Build();
|
|
||||||
builder.Configuration.AddConfiguration(configuration);
|
|
||||||
}
|
|
||||||
|
|
||||||
MauiApp app = builder.Build();
|
|
||||||
|
|
||||||
AppSettingsModel? appSettings = app.Configuration.GetSection("App").Get<AppSettingsModel>();
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(appSettings?.BackendApiUrl))
|
|
||||||
{
|
|
||||||
throw new Exception($"can't instantiate services, due to parameters are null. backendApiUrl: '{appSettings?.BackendApiUrl}'");
|
|
||||||
}
|
|
||||||
|
|
||||||
return app;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
44
RBLNews.Maui/MauiProgram.cs.orig
Normal file
44
RBLNews.Maui/MauiProgram.cs.orig
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
using CommunityToolkit.Maui;
|
||||||
|
using CommunityToolkit.Maui.Markup;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using RBLNews.Shared.Services;
|
||||||
|
|
||||||
|
namespace RBLNews.Maui
|
||||||
|
{
|
||||||
|
public static class MauiProgram
|
||||||
|
{
|
||||||
|
public static MauiApp CreateMauiApp()
|
||||||
|
{
|
||||||
|
var builder = MauiApp.CreateBuilder();
|
||||||
|
builder
|
||||||
|
.UseMauiApp<App>()
|
||||||
|
.UseMauiCommunityToolkit()
|
||||||
|
.UseMauiCommunityToolkitMarkup()
|
||||||
|
.ConfigureFonts(fonts =>
|
||||||
|
{
|
||||||
|
//fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
|
||||||
|
fonts.AddFont("NanumMyeongjo-Regular.ttf", "NanumMyeongjoRegular");
|
||||||
|
});
|
||||||
|
|
||||||
|
builder.Services.AddMauiBlazorWebView();
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
builder.Services.AddBlazorWebViewDeveloperTools();
|
||||||
|
builder.Logging.AddDebug();
|
||||||
|
=======
|
||||||
|
builder.Services.AddBlazorBootstrap();
|
||||||
|
|
||||||
|
builder.Services.AddSingleton<IFeedDataService, FeedDataService>();
|
||||||
|
builder.Services.AddSingleton<AppLifecycleService>();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
builder.Services.AddBlazorWebViewDeveloperTools();
|
||||||
|
builder.Logging.AddDebug();
|
||||||
|
>>>>>>> css_bootstrap_blazor
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return builder.Build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,10 +2,7 @@
|
|||||||
"profiles": {
|
"profiles": {
|
||||||
"Windows Machine": {
|
"Windows Machine": {
|
||||||
"commandName": "MsixPackage",
|
"commandName": "MsixPackage",
|
||||||
"nativeDebugging": false,
|
"nativeDebugging": false
|
||||||
"environmentVariables": {
|
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<TargetFrameworks>net8.0-maccatalyst;net8.0-android34.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> -->
|
||||||
|
|
||||||
@ -30,6 +31,7 @@
|
|||||||
<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)')) == 'android'">31.0</SupportedOSPlatformVersion>
|
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">31.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>
|
||||||
@ -66,39 +68,17 @@
|
|||||||
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
|
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Remove="appsettings.Development.json" />
|
|
||||||
<Content Remove="appsettings.json" />
|
|
||||||
<Content Remove="appsettings.Production.json" />
|
|
||||||
<Content Remove="appsettings.Test.json" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="Resources\Fonts\NanumMyeongjo-Regular.ttf" />
|
<None Remove="Resources\Fonts\NanumMyeongjo-Regular.ttf" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="appsettings.Development.json">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="appsettings.json">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="appsettings.Production.json" />
|
|
||||||
<EmbeddedResource Include="appsettings.Test.json">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</EmbeddedResource>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Blazor.Bootstrap" Version="3.0.0" />
|
<PackageReference Include="Blazor.Bootstrap" Version="3.0.0" />
|
||||||
<PackageReference Include="CommunityToolkit.Maui" Version="9.0.3" />
|
<PackageReference Include="CommunityToolkit.Maui" Version="9.0.3" />
|
||||||
<PackageReference Include="CommunityToolkit.Maui.Markup" Version="4.1.0" />
|
<PackageReference Include="CommunityToolkit.Maui.Markup" Version="4.1.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
|
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
|
||||||
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.90" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
|
||||||
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.90" />
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.90" />
|
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
@ -107,7 +87,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="obj\" />
|
<Folder Include="IaC\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ProjectExtensions><VisualStudio><UserProperties XamarinHotReloadDebuggerTimeoutExceptionRBLNewsMauiHideInfoBar="True" /></VisualStudio></ProjectExtensions>
|
<ProjectExtensions><VisualStudio><UserProperties XamarinHotReloadDebuggerTimeoutExceptionRBLNewsMauiHideInfoBar="True" /></VisualStudio></ProjectExtensions>
|
||||||
|
|||||||
@ -1,20 +0,0 @@
|
|||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
|
|
||||||
using RBLNews.Shared.Models;
|
|
||||||
using RBLNews.Shared.Services.Contracts;
|
|
||||||
|
|
||||||
namespace RBLNews.Maui.Services;
|
|
||||||
|
|
||||||
public class ConfigService : IConfigService
|
|
||||||
{
|
|
||||||
public AppSettingsModel? AppSettings { get; }
|
|
||||||
|
|
||||||
public ConfigService(IConfiguration configuration)
|
|
||||||
{
|
|
||||||
this.AppSettings = configuration.GetSection("App").Get<AppSettingsModel>();
|
|
||||||
if(this.AppSettings == null)
|
|
||||||
{
|
|
||||||
throw new NullReferenceException("App settings not found");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.AspNetCore": "Warning"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"App": {
|
|
||||||
"BackendApiUrl": "https://localhost:5147"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.AspNetCore": "Warning"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"AllowedHosts": "*",
|
|
||||||
"App": {
|
|
||||||
"BackendApiUrl": "https://rblnews.de"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.AspNetCore": "Warning"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"AllowedHosts": "*",
|
|
||||||
"App": {
|
|
||||||
"BackendApiUrl": "https://rbl.wohlleben.dev"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.AspNetCore": "Warning"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"AllowedHosts": "*"
|
|
||||||
}
|
|
||||||
3
RBLNews.Shared/Component1.razor
Normal file
3
RBLNews.Shared/Component1.razor
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<div class="my-component">
|
||||||
|
This component is defined in the <strong>RBLNews.Shared</strong> library.
|
||||||
|
</div>
|
||||||
6
RBLNews.Shared/Component1.razor.css
Normal file
6
RBLNews.Shared/Component1.razor.css
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
.my-component {
|
||||||
|
border: 2px dashed red;
|
||||||
|
padding: 1em;
|
||||||
|
margin: 1em 0;
|
||||||
|
background-image: url('background.png');
|
||||||
|
}
|
||||||
@ -1,40 +1,39 @@
|
|||||||
@using RBLFeederCommon.Enums
|
@using RBLFeederCommon.Enums
|
||||||
@using RBLNews.Shared.Models
|
@using RBLNews.Shared.Models
|
||||||
|
|
||||||
<div class="swb-container">
|
<Switch Class="mt-2" Value="this._filter" Label="@this.Text" ValueExpression="() => this._filter" ValueChanged="SwitchChanged" />
|
||||||
<Switch Class="mt-2" Value="this._filter" Label="@this.Text" ValueExpression="() => this._filter" ValueChanged="SwitchChanged"/>
|
|
||||||
<span class="swb-badge">@(this.Count)</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|
||||||
private bool _filter = true;
|
private bool _filter = true;
|
||||||
|
|
||||||
[Parameter] public RssFeedSources Source { get; set; }
|
[Parameter]
|
||||||
|
public RssFeedSources Source { get; set; }
|
||||||
[Parameter] public string Text { get; set; } = "";
|
|
||||||
|
[Parameter]
|
||||||
[Parameter] public bool ShowCount { get; set; }
|
public string Text { get; set; } = "";
|
||||||
|
|
||||||
[Parameter] public int Count { get; set; }
|
[Parameter]
|
||||||
|
public bool ShowCount { get; set; }
|
||||||
[Parameter] public EventCallback<FilterFeedEventArg> OnFilterChanged { get; set; }
|
|
||||||
|
[Parameter]
|
||||||
|
public int Count { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public EventCallback<FilterFeedEventArg> OnFilterChanged { get; set; }
|
||||||
|
|
||||||
Task SwitchChanged(bool value)
|
Task SwitchChanged(bool value)
|
||||||
{
|
{
|
||||||
this._filter = value;
|
this._filter = value;
|
||||||
|
|
||||||
OnFilterChanged.InvokeAsync(
|
OnFilterChanged.InvokeAsync(new FilterFeedEventArg
|
||||||
new FilterFeedEventArg
|
{
|
||||||
{
|
Source = this.Source,
|
||||||
Source = this.Source,
|
Value = value
|
||||||
Value = value
|
});
|
||||||
});
|
|
||||||
|
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -37,9 +37,9 @@ else
|
|||||||
<section id="feeds-list">
|
<section id="feeds-list">
|
||||||
@foreach (FeedGroupVM feedGrp in FeedGroups)
|
@foreach (FeedGroupVM feedGrp in FeedGroups)
|
||||||
{
|
{
|
||||||
<h2>
|
<h1>
|
||||||
<Icon Name="IconName.Calendar2Event"/> @feedGrp.PublishDate.ToLocalTime().ToString("dd.MM.yyyy")
|
<Icon Name="IconName.Calendar2Event"/> @feedGrp.PublishDate.ToLocalTime().ToString("dd.MM.yyyy")
|
||||||
</h2>
|
</h1>
|
||||||
@foreach (FeedVM feed in feedGrp.Feeds)
|
@foreach (FeedVM feed in feedGrp.Feeds)
|
||||||
{
|
{
|
||||||
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-7 col-xl-5">
|
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-7 col-xl-5">
|
||||||
@ -60,7 +60,7 @@ else
|
|||||||
@* </ul> *@
|
@* </ul> *@
|
||||||
<CardFooter>
|
<CardFooter>
|
||||||
|
|
||||||
@GetRssSourceName((RssFeedSources)@feed.Source) | @feed.PubDate?.ToLocalTime().ToString("dd.MM.yyyy HH:mm")
|
@GetRssSourceName((RssFeedSources)@feed.Source) | @feed.PubDate?.ToLocalTime()
|
||||||
|
|
||||||
</CardFooter>
|
</CardFooter>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@ -1,6 +0,0 @@
|
|||||||
namespace RBLNews.Shared.Models;
|
|
||||||
|
|
||||||
public class AppSettingsModel
|
|
||||||
{
|
|
||||||
public string BackendApiUrl { get; set; }
|
|
||||||
}
|
|
||||||
@ -6,22 +6,6 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Remove="wwwroot\appsettings.Development.json" />
|
|
||||||
<Content Remove="wwwroot\appsettings.json" />
|
|
||||||
<Content Remove="wwwroot\appsettings.Production.json" />
|
|
||||||
<Content Remove="wwwroot\appsettings.Test.json" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="wwwroot\appsettings.Development.json">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="wwwroot\appsettings.Test.json">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</EmbeddedResource>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<SupportedPlatform Include="browser" />
|
<SupportedPlatform Include="browser" />
|
||||||
@ -36,20 +20,4 @@
|
|||||||
<PackageReference Include="RBLFeederCommon" Version="1.0.0" />
|
<PackageReference Include="RBLFeederCommon" Version="1.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="obj\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="wwwroot\appsettings.json">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</EmbeddedResource>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="wwwroot\appsettings.Production.json">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</EmbeddedResource>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
26
RBLNews.Shared/RBLNews.Shared.csproj.orig
Normal file
26
RBLNews.Shared/RBLNews.Shared.csproj.orig
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<SupportedPlatform Include="browser" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<PackageReference Include="Blazor.Bootstrap" Version="3.0.0" />
|
||||||
|
<PackageReference Include="CommunityToolkit.Maui" Version="9.0.3" />
|
||||||
|
<PackageReference Include="CommunityToolkit.Maui.Markup" Version="4.1.0" />
|
||||||
|
>>>>>>> css_bootstrap_blazor
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.8" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
|
<PackageReference Include="RBLFeederCommon" Version="1.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@ -1,8 +0,0 @@
|
|||||||
using RBLNews.Shared.Models;
|
|
||||||
|
|
||||||
namespace RBLNews.Shared.Services.Contracts;
|
|
||||||
|
|
||||||
public interface IConfigService
|
|
||||||
{
|
|
||||||
AppSettingsModel? AppSettings { get; }
|
|
||||||
}
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
namespace RBLNews.Shared.Services;
|
|
||||||
|
|
||||||
public class EnvironmentVariablesService
|
|
||||||
{
|
|
||||||
public string? RblApiUrl => Environment.GetEnvironmentVariable("RblApiUrl");
|
|
||||||
}
|
|
||||||
@ -2,8 +2,6 @@
|
|||||||
using System.Net.Http.Json;
|
using System.Net.Http.Json;
|
||||||
using RBLFeederCommon.Models.RssFeed;
|
using RBLFeederCommon.Models.RssFeed;
|
||||||
|
|
||||||
using RBLNews.Shared.Services.Contracts;
|
|
||||||
|
|
||||||
namespace RBLNews.Shared.Services
|
namespace RBLNews.Shared.Services
|
||||||
{
|
{
|
||||||
public interface IFeedDataService
|
public interface IFeedDataService
|
||||||
@ -17,22 +15,15 @@ namespace RBLNews.Shared.Services
|
|||||||
|
|
||||||
public class FeedDataService : IFeedDataService
|
public class FeedDataService : IFeedDataService
|
||||||
{
|
{
|
||||||
private readonly IConfigService _configService;
|
|
||||||
|
|
||||||
private static readonly HttpClient httpClient = new();
|
private static readonly HttpClient httpClient = new();
|
||||||
|
|
||||||
public RssVM Feeds { get; private set; }
|
public RssVM Feeds { get; private set; }
|
||||||
|
|
||||||
public Action DataChanged { get; set; }
|
public Action DataChanged { get; set; }
|
||||||
|
|
||||||
public FeedDataService(IConfigService configService)
|
|
||||||
{
|
|
||||||
this._configService = configService;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task LoadFeeds()
|
public async Task LoadFeeds()
|
||||||
{
|
{
|
||||||
Feeds = await httpClient.GetFromJsonAsync<RssVM>($"{this._configService.AppSettings.BackendApiUrl}/feeds") ?? new RssVM();
|
Feeds = await httpClient.GetFromJsonAsync<RssVM>("https://rblnews.de/api/feeds") ?? new RssVM();
|
||||||
DataChanged.Invoke();
|
DataChanged.Invoke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
4
RBLNews.Shared/_Imports.razor.BASE
Normal file
4
RBLNews.Shared/_Imports.razor.BASE
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
@* ANT CSS DESIGN IMPORT -------------------- *@
|
||||||
|
@using AntDesign
|
||||||
|
|
||||||
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
1
RBLNews.Shared/_Imports.razor.LOCAL
Normal file
1
RBLNews.Shared/_Imports.razor.LOCAL
Normal file
@ -0,0 +1 @@
|
|||||||
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
4
RBLNews.Shared/_Imports.razor.REMOTE
Normal file
4
RBLNews.Shared/_Imports.razor.REMOTE
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
@* ANT CSS DESIGN IMPORT -------------------- *@
|
||||||
|
@using BlazorBootstrap;
|
||||||
|
|
||||||
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
8
RBLNews.Shared/_Imports.razor.orig
Normal file
8
RBLNews.Shared/_Imports.razor.orig
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
|
=======
|
||||||
|
@* ANT CSS DESIGN IMPORT -------------------- *@
|
||||||
|
@using BlazorBootstrap;
|
||||||
|
|
||||||
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
|
>>>>>>> css_bootstrap_blazor
|
||||||
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.AspNetCore": "Warning"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"App": {
|
|
||||||
"BackendApiUrl": "https://localhost:5147"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.AspNetCore": "Warning"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"AllowedHosts": "*",
|
|
||||||
"App": {
|
|
||||||
"BackendApiUrl": "https://rblnews.de"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.AspNetCore": "Warning"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"AllowedHosts": "*",
|
|
||||||
"App": {
|
|
||||||
"BackendApiUrl": "https://rbl.wohlleben.dev"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.AspNetCore": "Warning"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"AllowedHosts": "*"
|
|
||||||
}
|
|
||||||
@ -3,10 +3,6 @@ rot: #DD0741
|
|||||||
schrift: #4b4b4b
|
schrift: #4b4b4b
|
||||||
*/
|
*/
|
||||||
|
|
||||||
body {
|
|
||||||
color: #4b4b4b;
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Nanum Myeongjo", serif !important;
|
font-family: "Nanum Myeongjo", serif !important;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@ -17,13 +13,6 @@ body {
|
|||||||
#feeds-page {
|
#feeds-page {
|
||||||
color: #4b4b4b;
|
color: #4b4b4b;
|
||||||
}
|
}
|
||||||
#feeds-list {
|
|
||||||
margin-top: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#filter {
|
|
||||||
margin-top: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
color: #4b4b4b;
|
color: #4b4b4b;
|
||||||
@ -42,21 +31,20 @@ body {
|
|||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container-fluid {
|
nav .container-fluid {
|
||||||
padding-right: 0 !important;
|
padding-right: 0 !important;
|
||||||
padding-left: 0 !important;
|
padding-left: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
nav .top-row {
|
nav .top-row {
|
||||||
height: 1.8rem;
|
height: 1.8rem;
|
||||||
background-color: rgb(221, 7, 65);
|
background-color: rgb(221, 7, 65);
|
||||||
color: #eee;
|
color: #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*nav .top-row h1, h2, h3, h4, h5 {*/
|
/*nav .top-row h1, h2, h3, h4, h5 {*/
|
||||||
/* color: #eee;*/
|
/* color: #eee;*/
|
||||||
/*}*/
|
/*}*/
|
||||||
|
|
||||||
|
|
||||||
#filter button {
|
#filter button {
|
||||||
@ -71,20 +59,21 @@ nav .top-row {
|
|||||||
/*}*/
|
/*}*/
|
||||||
|
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
color: #eee;
|
color: #fff;
|
||||||
background-color: #f75581;
|
background-color: #f75581;
|
||||||
border-color: #DD0741;
|
border-color: #DD0741;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary:hover {
|
.btn-primary:hover {
|
||||||
|
color: inherit;
|
||||||
background-color: inherit;
|
background-color: inherit;
|
||||||
border-color: #4b4b4b;
|
border-color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-outline-primary {
|
.btn-outline-primary {
|
||||||
color: #4b4b4b;
|
color: #f75581;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-color: #4b4b4b;
|
border-color: #DD0741;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-outline-primary:hover {
|
.btn-outline-primary:hover {
|
||||||
@ -113,9 +102,10 @@ nav .top-row {
|
|||||||
background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
|
background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-toggler:checked {
|
.navbar-toggler:checked {
|
||||||
background-color: rgba(255, 255, 255, 0.5);
|
background-color: rgba(255, 255, 255, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.navbar-brand {
|
.navbar-brand {
|
||||||
@ -149,32 +139,32 @@ nav .top-row {
|
|||||||
padding-bottom: 0.6rem;
|
padding-bottom: 0.6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-item:first-of-type {
|
.nav-item:first-of-type {
|
||||||
padding-top: 1rem;
|
padding-top: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-item:last-of-type {
|
.nav-item:last-of-type {
|
||||||
padding-bottom: 1rem;
|
padding-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-item ::deep a {
|
.nav-item ::deep a {
|
||||||
color: #d7d7d7;
|
color: #d7d7d7;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
height: 3rem;
|
height: 3rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
line-height: 3rem;
|
line-height: 3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-item ::deep a.active {
|
.nav-item ::deep a.active {
|
||||||
background-color: rgba(255, 255, 255, 0.37);
|
background-color: rgba(255,255,255,0.37);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-item ::deep a:hover {
|
.nav-item ::deep a:hover {
|
||||||
background-color: rgba(255, 255, 255, 0.1);
|
background-color: rgba(255,255,255,0.1);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-scrollable {
|
.nav-scrollable {
|
||||||
display: none;
|
display: none;
|
||||||
@ -199,6 +189,8 @@ nav .top-row {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.loading {
|
.loading {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 45%;
|
top: 45%;
|
||||||
@ -234,12 +226,12 @@ nav .top-row {
|
|||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#blazor-error-ui .dismiss {
|
#blazor-error-ui .dismiss {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0.75rem;
|
right: 0.75rem;
|
||||||
top: 0.5rem;
|
top: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blazor-error-boundary {
|
.blazor-error-boundary {
|
||||||
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
|
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
|
||||||
@ -247,9 +239,9 @@ nav .top-row {
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blazor-error-boundary::after {
|
.blazor-error-boundary::after {
|
||||||
content: "An error has occurred."
|
content: "An error has occurred."
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-bar-safe-area {
|
.status-bar-safe-area {
|
||||||
display: none;
|
display: none;
|
||||||
@ -271,26 +263,6 @@ nav .top-row {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.swb-container {
|
|
||||||
position: relative;
|
|
||||||
padding-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.swb-badge {
|
|
||||||
position: absolute;
|
|
||||||
top: -5px;
|
|
||||||
/*height:20px;*/
|
|
||||||
min-width: 20px;
|
|
||||||
z-index: 999;
|
|
||||||
background-color: #DD0741;
|
|
||||||
display: inline-block;
|
|
||||||
margin: 8px 2px;
|
|
||||||
border-radius: 18px;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 0.7em;
|
|
||||||
color: #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*html, body {
|
/*html, body {
|
||||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||||
|
|||||||
33
RBLNews.Web/Components/App.razor.orig
Normal file
33
RBLNews.Web/Components/App.razor.orig
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<base href="/" />
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet" />
|
||||||
|
@* <link href="_content/RBLNews.Shared/blazor.bootstrap.css" rel="stylesheet" /> *@
|
||||||
|
|
||||||
|
@* <link rel="stylesheet" href="_content/RBLNews.Shared/css/bootstrap/bootstrap.min.css" /> *@
|
||||||
|
@* <link rel="stylesheet" href="RBLNews.Web.styles.css" /> *@
|
||||||
|
<link rel="stylesheet" href="_content/RBLNews.Shared/css/app.css" />
|
||||||
|
<HeadOutlet @rendermode="InteractiveServer" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<Routes @rendermode="InteractiveServer" />
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/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="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.0.1/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="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-datalabels/2.2.0/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="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script>
|
||||||
|
>>>>>>> css_bootstrap_blazor
|
||||||
|
<script src="_framework/blazor.web.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@ -1,39 +1,24 @@
|
|||||||
using RBLNews.Shared.Models;
|
|
||||||
using RBLNews.Shared.Services;
|
using RBLNews.Shared.Services;
|
||||||
using RBLNews.Shared.Services.Contracts;
|
|
||||||
using RBLNews.Web.Components;
|
using RBLNews.Web.Components;
|
||||||
using RBLNews.Web.Services;
|
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
// Add services to the container.
|
// Add services to the container.
|
||||||
builder.Services.AddRazorComponents()
|
builder.Services.AddRazorComponents()
|
||||||
.AddInteractiveServerComponents();
|
.AddInteractiveServerComponents();
|
||||||
builder.Services.AddBlazorBootstrap();
|
builder.Services.AddBlazorBootstrap();
|
||||||
|
|
||||||
builder.Services.AddSingleton<IConfigService, ConfigService>();
|
|
||||||
builder.Services.AddSingleton<IFeedDataService, FeedDataService>();
|
builder.Services.AddSingleton<IFeedDataService, FeedDataService>();
|
||||||
builder.Services.AddSingleton<AppLifecycleService>();
|
builder.Services.AddSingleton<AppLifecycleService>();
|
||||||
|
|
||||||
// required for production
|
|
||||||
builder.WebHost.UseStaticWebAssets();
|
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
// Configure the HTTP request pipeline.
|
// Configure the HTTP request pipeline.
|
||||||
if (!app.Environment.IsDevelopment())
|
if (!app.Environment.IsDevelopment())
|
||||||
{
|
{
|
||||||
app.UseExceptionHandler("/Error", createScopeForErrors: true);
|
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.
|
||||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
app.UseHsts();
|
||||||
app.UseHsts();
|
|
||||||
}
|
|
||||||
|
|
||||||
AppSettingsModel? appSettings = app.Configuration.GetSection("App").Get<AppSettingsModel>();
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(appSettings?.BackendApiUrl))
|
|
||||||
{
|
|
||||||
throw new Exception($"can't instantiate services, due to paramters are null. backendApiUrl: '{appSettings?.BackendApiUrl}'");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
@ -42,7 +27,7 @@ app.UseStaticFiles();
|
|||||||
app.UseAntiforgery();
|
app.UseAntiforgery();
|
||||||
|
|
||||||
app.MapRazorComponents<App>()
|
app.MapRazorComponents<App>()
|
||||||
.AddInteractiveServerRenderMode()
|
.AddInteractiveServerRenderMode()
|
||||||
.AddAdditionalAssemblies(typeof( RBLNews.Shared._Imports ).Assembly);
|
.AddAdditionalAssemblies(typeof(RBLNews.Shared._Imports).Assembly);
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
|
|||||||
36
RBLNews.Web/Program.cs.orig
Normal file
36
RBLNews.Web/Program.cs.orig
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using RBLNews.Shared.Services;
|
||||||
|
using RBLNews.Web.Components;
|
||||||
|
|
||||||
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
|
// Add services to the container.
|
||||||
|
builder.Services.AddRazorComponents()
|
||||||
|
.AddInteractiveServerComponents();
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
builder.Services.AddBlazorBootstrap();
|
||||||
|
|
||||||
|
builder.Services.AddSingleton<IFeedDataService, FeedDataService>();
|
||||||
|
builder.Services.AddSingleton<AppLifecycleService>();
|
||||||
|
>>>>>>> css_bootstrap_blazor
|
||||||
|
|
||||||
|
var app = builder.Build();
|
||||||
|
|
||||||
|
// 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();
|
||||||
|
}
|
||||||
|
|
||||||
|
app.UseHttpsRedirection();
|
||||||
|
|
||||||
|
app.UseStaticFiles();
|
||||||
|
app.UseAntiforgery();
|
||||||
|
|
||||||
|
app.MapRazorComponents<App>()
|
||||||
|
.AddInteractiveServerRenderMode()
|
||||||
|
.AddAdditionalAssemblies(typeof(RBLNews.Shared._Imports).Assembly);
|
||||||
|
|
||||||
|
app.Run();
|
||||||
@ -18,33 +18,15 @@
|
|||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"https (DEV)": {
|
"https": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"dotnetRunMessages": true,
|
"dotnetRunMessages": true,
|
||||||
"launchBrowser": false,
|
"launchBrowser": true,
|
||||||
"applicationUrl": "https://localhost:7158;http://localhost:5289",
|
"applicationUrl": "https://localhost:7158;http://localhost:5289",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"https (TEST)": {
|
|
||||||
"commandName": "Project",
|
|
||||||
"dotnetRunMessages": true,
|
|
||||||
"launchBrowser": false,
|
|
||||||
"applicationUrl": "https://localhost:7158;http://localhost:5289",
|
|
||||||
"environmentVariables": {
|
|
||||||
"ASPNETCORE_ENVIRONMENT": "Test"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"https (PROD)": {
|
|
||||||
"commandName": "Project",
|
|
||||||
"dotnetRunMessages": true,
|
|
||||||
"launchBrowser": false,
|
|
||||||
"applicationUrl": "https://localhost:7158;http://localhost:5289",
|
|
||||||
"environmentVariables": {
|
|
||||||
"ASPNETCORE_ENVIRONMENT": "Production"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"IIS Express": {
|
"IIS Express": {
|
||||||
"commandName": "IISExpress",
|
"commandName": "IISExpress",
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
|
|||||||
@ -7,28 +7,6 @@
|
|||||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Remove="appsettings.Development.json" />
|
|
||||||
<Content Remove="appsettings.json" />
|
|
||||||
<Content Remove="appsettings.Production.json" />
|
|
||||||
<Content Remove="appsettings.Test.json" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="appsettings.Development.json">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="appsettings.json">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="appsettings.Production.json">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="appsettings.Test.json">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\RBLNews.Shared\RBLNews.Shared.csproj" />
|
<ProjectReference Include="..\RBLNews.Shared\RBLNews.Shared.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@ -43,8 +21,4 @@
|
|||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="obj\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -1,16 +0,0 @@
|
|||||||
using RBLNews.Shared.Models;
|
|
||||||
using RBLNews.Shared.Services.Contracts;
|
|
||||||
|
|
||||||
namespace RBLNews.Web.Services;
|
|
||||||
|
|
||||||
public class ConfigService : IConfigService
|
|
||||||
{
|
|
||||||
public AppSettingsModel? AppSettings { get; }
|
|
||||||
|
|
||||||
public ConfigService(IConfiguration configuration)
|
|
||||||
{
|
|
||||||
AppSettings = configuration.GetSection("App").Get<AppSettingsModel>();
|
|
||||||
if(this.AppSettings == null)
|
|
||||||
throw new NullReferenceException("App settings not found");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -4,8 +4,5 @@
|
|||||||
"Default": "Information",
|
"Default": "Information",
|
||||||
"Microsoft.AspNetCore": "Warning"
|
"Microsoft.AspNetCore": "Warning"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"App": {
|
|
||||||
"BackendApiUrl": "https://localhost:7127"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.AspNetCore": "Warning"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"AllowedHosts": "*",
|
|
||||||
"App": {
|
|
||||||
"BackendApiUrl": "https://rblnews.de/api"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.AspNetCore": "Warning"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"AllowedHosts": "*",
|
|
||||||
"App": {
|
|
||||||
"BackendApiUrl": "https://rbl.wohlleben.dev/api"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user