@* /admin/manage-themes/ *@ @using Lumina.Presentation.Web.Common.DTO.Themes @using Lumina.Presentation.Web.Common.Services @using Microsoft.AspNetCore.Mvc.Localization @using System.Linq @{ var themes = ViewData["themes"] as IReadOnlyList; var currentThemeId = ViewData["currentThemeId"] as string; // Generate a unique id for the scripts section of this view, so it can be dynamically loaded/unloaded by the global AJAX navigator handler. var scriptId = ScriptIdentifierHelper.GenerateScriptId(); int bundledThemeCount = 0; if (themes is not null) foreach (ThemeInfoDto theme in themes) if (theme.IsBundled && !theme.IsDeleted) bundledThemeCount++; } @inject IViewLocalizer _localizer @inject IUrlService _urlService @Html.AntiForgeryToken()

@_localizer["Themes"]

@_localizer["ThemeTrustWarning"]
@if (themes is null || themes.Count == 0) {

@_localizer["NoThemes"]

} else { @foreach (ThemeInfoDto theme in themes) { bool isCurrent = theme.Id == currentThemeId; bool isLastRemaining = themes.Count(theme => !theme.IsDeleted) <= 1 || (theme.IsBundled && bundledThemeCount == 1); }
@_localizer["Preview"] @_localizer["Name"] @_localizer["Version"] @_localizer["Author"] @_localizer["Source"] @_localizer["Actions"]
@theme.Name @theme.Version @theme.Author @(theme.IsBundled ? _localizer["Bundled"] : _localizer["UserProvided"])
@if (theme.IsDeleted) { } else { }
}
@section Scripts { }