Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ obj/

# VS Code user-specific settings (keep launch.json and tasks.json)
.vscode/settings.json

*.code-workspace
24 changes: 0 additions & 24 deletions 2-Nine.Application/Nine.Application.sln

This file was deleted.

10 changes: 5 additions & 5 deletions 4-Nine/Shared/Layout/NavMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@
// Available brand themes - add new themes here
private readonly List<string> AvailableBrandThemes = new()
{
"bootstrap",
"obsidian",
"bootstrap",
"teal"
};

Expand All @@ -203,7 +203,7 @@
var domTheme = await JSRuntime.InvokeAsync<string>("eval",
"document.documentElement.getAttribute('data-bs-theme') || localStorage.getItem('theme') || 'light'");
var domBrandTheme = await JSRuntime.InvokeAsync<string>("eval",
"document.documentElement.getAttribute('data-brand-theme') || localStorage.getItem('brandTheme') || 'bootstrap'");
"document.documentElement.getAttribute('data-brand-theme') || localStorage.getItem('brandTheme') || 'obsidian'");

Comment on lines 203 to 207
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says the default brand theme should be Obsidian, but this change only updates NavMenu’s fallback. theme.js still initializes data-brand-theme from localStorage with a default of bootstrap, and ThemeService also defaults _currentBrandTheme to bootstrap, so first-time users will still land on Bootstrap. To actually change the default, update the default in 3-Nine.Shared.UI/wwwroot/js/theme.js (and any other initialization paths) and consider aligning ThemeService’s initial _currentBrandTheme with the new default as well.

Copilot uses AI. Check for mistakes.
// Sync the service with the DOM state (which was set by theme.js)
if (ThemeService.CurrentTheme != domTheme)
Expand All @@ -228,9 +228,9 @@
Console.WriteLine($"Error loading themes: {ex.Message}");
// Fallback if localStorage not available
ThemeService.SetTheme("light");
ThemeService.SetBrandTheme("bootstrap");
ThemeService.SetBrandTheme("obsidian");
await JSRuntime.InvokeVoidAsync("themeManager.setTheme", "light");
await JSRuntime.InvokeVoidAsync("themeManager.setBrandTheme", "bootstrap");
await JSRuntime.InvokeVoidAsync("themeManager.setBrandTheme", "obsidian");
}
}
}
Expand Down Expand Up @@ -293,8 +293,8 @@
{
return theme switch
{
"bootstrap" => "Bootstrap",
"obsidian" => "Obsidian",
"bootstrap" => "Bootstrap",
"teal" => "Teal",
_ => theme.Substring(0, 1).ToUpper() + theme.Substring(1)
};
Expand Down
16 changes: 0 additions & 16 deletions Nine.code-workspace

This file was deleted.