feat: enhance keyboard shortcuts and background image handling

- Added `GlobalKeyboardShortcuts` component to manage global keyboard shortcuts.
- Introduced new keyboard shortcut (Shift + B) for changing the background.
- Updated `BackgroundImageSelector` to preserve custom background URLs and allow restoration of previously set backgrounds.
- Improved local storage handling for custom backgrounds to enhance user experience.
This commit is contained in:
Julien Froidefond
2025-10-02 13:52:18 +02:00
parent d4e8dc144b
commit 9094aca1ff
6 changed files with 169 additions and 9 deletions

View File

@@ -8,6 +8,7 @@ import { UserPreferencesProvider } from "@/contexts/UserPreferencesContext";
import { KeyboardShortcutsProvider } from "@/contexts/KeyboardShortcutsContext";
import { userPreferencesService } from "@/services/core/user-preferences";
import { KeyboardShortcuts } from "@/components/KeyboardShortcuts";
import { GlobalKeyboardShortcuts } from "@/components/GlobalKeyboardShortcuts";
import { AuthProvider } from "../components/AuthProvider";
import { getServerSession } from 'next-auth';
import { authOptions } from '@/lib/auth';
@@ -55,6 +56,7 @@ export default async function RootLayout({
<KeyboardShortcuts />
<JiraConfigProvider config={initialPreferences?.jiraConfig || { enabled: false }}>
<UserPreferencesProvider initialPreferences={initialPreferences}>
<GlobalKeyboardShortcuts />
<BackgroundProvider>
{children}
</BackgroundProvider>