mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 19:24:51 +00:00
[Blazor] Set up settings on startup.
This commit is contained in:
@@ -4,6 +4,7 @@ using Microsoft.FluentUI.AspNetCore.Components;
|
|||||||
using RomRepoMgr.Blazor;
|
using RomRepoMgr.Blazor;
|
||||||
using RomRepoMgr.Blazor.Components;
|
using RomRepoMgr.Blazor.Components;
|
||||||
using RomRepoMgr.Database;
|
using RomRepoMgr.Database;
|
||||||
|
using RomRepoMgr.Settings;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
|
||||||
Log.Logger = new LoggerConfiguration()
|
Log.Logger = new LoggerConfiguration()
|
||||||
@@ -69,6 +70,17 @@ builder.Services.AddDbContextFactory<Context>(options =>
|
|||||||
#endif
|
#endif
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Log.Debug("Setting the settings...");
|
||||||
|
|
||||||
|
Settings.Current = new SetSettings
|
||||||
|
{
|
||||||
|
DatabasePath = Path.Combine(Environment.CurrentDirectory, Consts.DbFolder, "database.db"),
|
||||||
|
TemporaryFolder = Path.Combine(Environment.CurrentDirectory, Consts.TemporaryFolder),
|
||||||
|
RepositoryPath = Path.Combine(Environment.CurrentDirectory, Consts.RepositoryFolder),
|
||||||
|
UseInternalDecompressor = true,
|
||||||
|
Compression = CompressionType.Zstd // Todo: Read from configuration
|
||||||
|
};
|
||||||
|
|
||||||
Log.Debug("Building the application...");
|
Log.Debug("Building the application...");
|
||||||
WebApplication app = builder.Build();
|
WebApplication app = builder.Build();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user