|
|
|
@ -204,6 +204,8 @@ public abstract class AppTemplateBase : TemplateInfo |
|
|
|
steps.Add(new ChangeThemeStyleStep()); |
|
|
|
} |
|
|
|
|
|
|
|
RemoveThemeLogoFolders(context, steps); |
|
|
|
|
|
|
|
if (IsDefaultThemeForTemplate(context.BuildArgs.Theme.Value)) |
|
|
|
{ |
|
|
|
return; |
|
|
|
@ -213,6 +215,28 @@ public abstract class AppTemplateBase : TemplateInfo |
|
|
|
RemoveLeptonXThemePackagesFromPackageJsonFiles(steps, isProTemplate: IsPro(), uiFramework: context.BuildArgs.UiFramework); |
|
|
|
} |
|
|
|
|
|
|
|
private void RemoveThemeLogoFolders(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps) |
|
|
|
{ |
|
|
|
if (context.BuildArgs.Theme is not Theme.Lepton && IsPro()) |
|
|
|
{ |
|
|
|
RemoveThemeFolders(folderPath: "/wwwroot/images/logo/lepton"); |
|
|
|
} |
|
|
|
|
|
|
|
if (context.BuildArgs.Theme is not Theme.LeptonX or Theme.LeptonXLite) |
|
|
|
{ |
|
|
|
RemoveThemeFolders(folderPath: "/wwwroot/images/logo/leptonx"); |
|
|
|
} |
|
|
|
|
|
|
|
void RemoveThemeFolders(string folderPath) |
|
|
|
{ |
|
|
|
var logoPaths = context.Files.Where(x => x.Name.Contains(folderPath) && x.IsDirectory); |
|
|
|
foreach (var logoPath in logoPaths) |
|
|
|
{ |
|
|
|
steps.Add(new RemoveFolderStep(logoPath.Name)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private static bool IsDefaultThemeForTemplate(Theme theme) |
|
|
|
{ |
|
|
|
var defaultThemesForTemplates = new[] |
|
|
|
|