mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 13:11:10 +00:00
Hard deletes user themes, restores damaged bundled themes and fixes the web theme service DI lifetime
This commit is contained in:
1 parent
bf8faba24d
commit
45dc3f5706
7 files changed
+126
-10
No files matched your search
@@ -105,6 +105,17 @@ public sealed class ThemeService : IThemeService
|
||||
return [.. Directory.EnumerateFiles(_bundledRoot, "*.zip").OrderBy(path => path, StringComparer.OrdinalIgnoreCase)];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether the stored pack files of a theme still exist.
|
||||
/// </summary>
|
||||
/// <param name="themeId">The manifest id of the theme.</param>
|
||||
/// <returns><see langword="true"/> when the theme pack files exist, <see langword="false"/> otherwise.</returns>
|
||||
public bool HasThemePack(string themeId)
|
||||
{
|
||||
string themePath = ResolveThemePath(themeId);
|
||||
return Directory.Exists(themePath) && File.Exists(Path.Combine(themePath, MANIFEST_FILE_NAME));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Installs a theme pack from the provided archive, replacing the files of an existing theme with the same manifest id.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user