diff --git a/Modules/Helpdesk/Resources/assets/css/app.css b/Modules/Helpdesk/Resources/assets/css/app.css index d6f870b..6f83519 100644 --- a/Modules/Helpdesk/Resources/assets/css/app.css +++ b/Modules/Helpdesk/Resources/assets/css/app.css @@ -1392,3 +1392,50 @@ span.flatpickr-weekday { flex: 1 1 8rem; } } + + +/* Complete light-mode counterpart to the module's dark control rules. */ +html:not(.dark) .hd-helpdesk-surface .hd-select, +html:not(.dark) .hd-select, +html:not(.dark) .helpdesk-ticket-form input, +html:not(.dark) .helpdesk-ticket-form textarea, +html:not(.dark) .helpdesk-ticket-form select, +html:not(.dark) .helpdesk-ticket-form .select2-container--default .select2-selection--single, +html:not(.dark) .helpdesk-ticket-form .select2-container--default .select2-selection--multiple, +html:not(.dark) .helpdesk-ticket-form .select2-container--default .select2-selection__rendered, +html:not(.dark) .helpdesk-ticket-form .select2-container--default .select2-selection__choice { + background: #ffffff !important; + background-color: #ffffff !important; + color: #1f2937 !important; + border-color: #c9d1dc !important; + caret-color: #1f2937 !important; +} + +html:not(.dark) .helpdesk-ticket-form input:disabled, +html:not(.dark) .helpdesk-ticket-form textarea:disabled, +html:not(.dark) .helpdesk-ticket-form select:disabled, +html:not(.dark) .helpdesk-ticket-form .select2-container--disabled .select2-selection--single, +html:not(.dark) .helpdesk-ticket-form .select2-container--disabled .select2-selection--multiple, +html:not(.dark) .helpdesk-ticket-form [disabled], +html:not(.dark) .helpdesk-ticket-form [aria-disabled="true"] { + background: #eef2f7 !important; + background-color: #eef2f7 !important; + color: #667085 !important; +} + +html:not(.dark) .helpdesk-ticket-form input:-webkit-autofill, +html:not(.dark) .helpdesk-ticket-form input:-webkit-autofill:hover, +html:not(.dark) .helpdesk-ticket-form input:-webkit-autofill:focus, +html:not(.dark) .helpdesk-ticket-form textarea:-webkit-autofill, +html:not(.dark) .helpdesk-ticket-form textarea:-webkit-autofill:hover, +html:not(.dark) .helpdesk-ticket-form textarea:-webkit-autofill:focus, +html:not(.dark) .helpdesk-ticket-form select:-webkit-autofill, +html:not(.dark) .helpdesk-ticket-form select:-webkit-autofill:hover, +html:not(.dark) .helpdesk-ticket-form select:-webkit-autofill:focus { + -webkit-text-fill-color: #1f2937 !important; + box-shadow: 0 0 0 1000px #ffffff inset !important; +} + +html:not(.dark) .hd-helpdesk-surface { + color: #1f2937; +} diff --git a/resources/themes/backend/assets/css/helpdesk.css b/resources/themes/backend/assets/css/helpdesk.css index d8f3d6e..b7a7d1c 100644 --- a/resources/themes/backend/assets/css/helpdesk.css +++ b/resources/themes/backend/assets/css/helpdesk.css @@ -1586,3 +1586,220 @@ span.flatpickr-weekday { .hd-account-settings [data-flux-text] { color: #9ca3af !important; } + + +/* ============================================================ + COMPLETE APPEARANCE SUPPORT + Flux owns the root .dark class through @fluxAppearance. + Light/System-light is therefore html:not(.dark). + ============================================================ */ + +html { + color-scheme: light; +} + +html.dark { + color-scheme: dark; +} + +html:not(.dark) .hd-app-body { + background: #f4f6f8 !important; + color: #1f2937 !important; +} + +html:not(.dark) .hd-topbar { + background: linear-gradient(90deg, #ffffff, #f8fafc) !important; + border-bottom-color: #d8dee7 !important; + box-shadow: 0 8px 24px rgba(15, 23, 42, .08) !important; +} + +html:not(.dark) .hd-topbar-brand { + border-right-color: #d8dee7 !important; +} + +html:not(.dark) .hd-brand-name, +html:not(.dark) .hd-account-button, +html:not(.dark) .hd-account-copy strong { + color: #1f2937 !important; +} + +html:not(.dark) .hd-account-copy small, +html:not(.dark) .hd-top-search, +html:not(.dark) .hd-top-search i { + color: #667085 !important; +} + +html:not(.dark) .hd-top-search { + background: #f8fafc !important; + border-color: #d8dee7 !important; +} + +html:not(.dark) .hd-top-search input { + color: #1f2937 !important; +} + +html:not(.dark) .hd-shell-sidebar { + background: linear-gradient(180deg, #ffffff, #f7f9fc) !important; + border-right-color: #d8dee7 !important; +} + +html:not(.dark) .hd-nav-heading { + color: #7a8492 !important; +} + +html:not(.dark) .hd-nav-link { + color: #596579 !important; +} + +html:not(.dark) .hd-nav-link i { + color: #7a8492 !important; +} + +html:not(.dark) .hd-nav-link:hover { + background: #eef2f7 !important; + color: #111827 !important; +} + +html:not(.dark) .hd-nav-link.is-active { + background: linear-gradient(90deg, #e7edf6, #eef2f7) !important; + color: #111827 !important; +} + +html:not(.dark) .hd-nav-link.is-active i { + color: #2563eb !important; +} + +html:not(.dark) .hd-shell-main { + background: + radial-gradient(circle at 75% 0, rgba(37, 99, 235, .055), transparent 35%), + #f4f6f8 !important; + color: #1f2937 !important; +} + +html:not(.dark) .hd-account-menu[open] .hd-account-button, +html:not(.dark) .hd-account-button:hover { + background: #eef2f7 !important; + border-color: #d8dee7 !important; +} + +html:not(.dark) .hd-account-dropdown { + background: #ffffff !important; + border-color: #d8dee7 !important; + color: #1f2937 !important; + box-shadow: 0 24px 60px rgba(15, 23, 42, .16) !important; +} + +html:not(.dark) .hd-account-dropdown-user { + background: #f8fafc !important; +} + +html:not(.dark) .hd-account-dropdown-copy strong, +html:not(.dark) .hd-account-dropdown-nav a, +html:not(.dark) .hd-account-logout { + color: #1f2937 !important; +} + +html:not(.dark) .hd-account-dropdown-copy span, +html:not(.dark) .hd-account-dropdown-copy small, +html:not(.dark) .hd-account-dropdown-nav a i, +html:not(.dark) .hd-account-logout i { + color: #667085 !important; +} + +html:not(.dark) .hd-account-dropdown-divider { + background: #e2e8f0 !important; +} + +html:not(.dark) .hd-account-dropdown-nav a:hover, +html:not(.dark) .hd-account-dropdown-nav a:focus-visible { + background: #eef2f7 !important; + border-color: #d8dee7 !important; +} + +/* Backend forms, settings and auth controls */ +html:not(.dark) .hd-select, +html:not(.dark) .helpdesk-ticket-form input, +html:not(.dark) .helpdesk-ticket-form textarea, +html:not(.dark) .helpdesk-ticket-form select, +html:not(.dark) .hd-account-settings input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]), +html:not(.dark) .hd-account-settings textarea, +html:not(.dark) .hd-account-settings select, +html:not(.dark) .hd-auth-surface input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]), +html:not(.dark) .hd-auth-surface textarea, +html:not(.dark) .hd-auth-surface select { + background: #ffffff !important; + background-color: #ffffff !important; + color: #1f2937 !important; + border-color: #c9d1dc !important; + caret-color: #1f2937 !important; +} + +html:not(.dark) .helpdesk-ticket-form input:disabled, +html:not(.dark) .helpdesk-ticket-form textarea:disabled, +html:not(.dark) .helpdesk-ticket-form select:disabled { + background: #eef2f7 !important; + color: #667085 !important; +} + +html:not(.dark) .helpdesk-ticket-form input:-webkit-autofill, +html:not(.dark) .helpdesk-ticket-form textarea:-webkit-autofill, +html:not(.dark) .helpdesk-ticket-form select:-webkit-autofill { + -webkit-text-fill-color: #1f2937 !important; + box-shadow: 0 0 0 1000px #ffffff inset !important; +} + +/* Select2 / popovers */ +html:not(.dark) .select2-dropdown, +html:not(.dark) .flatpickr-calendar { + background: #ffffff !important; + color: #1f2937 !important; + border-color: #cfd6e1 !important; +} + +html:not(.dark) .select2-container--default .select2-results__option { + color: #1f2937 !important; +} + +/* Catch legacy Helpdesk views that still contain dark-only utility classes. */ +html:not(.dark) .bg-zinc-950, +html:not(.dark) .bg-zinc-950\/80, +html:not(.dark) .bg-zinc-950\/70, +html:not(.dark) .bg-zinc-950\/60, +html:not(.dark) .bg-zinc-950\/55, +html:not(.dark) .bg-zinc-900, +html:not(.dark) .bg-zinc-900\/80, +html:not(.dark) .bg-zinc-900\/70, +html:not(.dark) .bg-zinc-800 { + background-color: #ffffff !important; +} + +html:not(.dark) .border-zinc-800, +html:not(.dark) .border-zinc-700, +html:not(.dark) .border-zinc-600 { + border-color: #d8dee7 !important; +} + +html:not(.dark) .text-zinc-100, +html:not(.dark) .text-zinc-200 { + color: #1f2937 !important; +} + +html:not(.dark) .text-zinc-300 { + color: #374151 !important; +} + +html:not(.dark) .text-zinc-400, +html:not(.dark) .text-zinc-500 { + color: #667085 !important; +} + +/* Do not wash out coloured action buttons/hero areas. */ +html:not(.dark) .hd-btn, +html:not(.dark) [class*="bg-blue-"], +html:not(.dark) [class*="bg-green-"], +html:not(.dark) [class*="bg-emerald-"], +html:not(.dark) [class*="bg-red-"], +html:not(.dark) [class*="bg-amber-"], +html:not(.dark) [class*="bg-violet-"] { + /* their own utility/button colour remains authoritative */ +} diff --git a/resources/themes/backend/views/components/helpdesk/layouts/app.blade.php b/resources/themes/backend/views/components/helpdesk/layouts/app.blade.php new file mode 100644 index 0000000..2ee2e24 --- /dev/null +++ b/resources/themes/backend/views/components/helpdesk/layouts/app.blade.php @@ -0,0 +1,158 @@ +@props([ + 'title' => null, +]) + + + + + @include('partials.head') + @if(!empty($title)) + {{ $title }} ยท {{ config('app.name', 'Laravel') }} + @endif + + +@php + $user = auth()->user(); + $isAdmin = $user !== null && ( + (bool) ($user->helpdesk_admin ?? false) + || (method_exists($user, 'isHelpdeskAdmin') && $user->isHelpdeskAdmin()) + ); + $roleLabel = $isAdmin ? 'Administrator' : ((method_exists($user, 'isHelpdeskAgent') && $user->isHelpdeskAgent()) || (bool) ($user->helpdesk_agent ?? false) ? 'Agent' : 'User'); +@endphp +
+
+ +
+ @if(Route::has('helpdesk.tickets.index')) + + @endif +
+ +
+
+ + + + +
{{ $slot }}
+
+ +@persist('toast')@endpersist +@fluxScripts + + diff --git a/resources/themes/backend/views/components/layouts/app.blade.php b/resources/themes/backend/views/components/layouts/app.blade.php index 112cddf..2ee2e24 100644 --- a/resources/themes/backend/views/components/layouts/app.blade.php +++ b/resources/themes/backend/views/components/layouts/app.blade.php @@ -3,7 +3,7 @@ ]) - + @include('partials.head') @if(!empty($title)) diff --git a/resources/themes/backend/views/layouts/app.blade.php b/resources/themes/backend/views/layouts/app.blade.php index a114ae5..5bde94f 100644 --- a/resources/themes/backend/views/layouts/app.blade.php +++ b/resources/themes/backend/views/layouts/app.blade.php @@ -3,7 +3,7 @@ @endphp - + @include('partials.head') @if(!empty($title)) diff --git a/resources/themes/backend/views/layouts/app/header.blade.php b/resources/themes/backend/views/layouts/app/header.blade.php index 989b8e4..fa2a6d4 100644 --- a/resources/themes/backend/views/layouts/app/header.blade.php +++ b/resources/themes/backend/views/layouts/app/header.blade.php @@ -1,5 +1,5 @@ - + @include('partials.head') diff --git a/resources/themes/backend/views/layouts/auth/card.blade.php b/resources/themes/backend/views/layouts/auth/card.blade.php index c5cf75a..d7c1741 100644 --- a/resources/themes/backend/views/layouts/auth/card.blade.php +++ b/resources/themes/backend/views/layouts/auth/card.blade.php @@ -1,5 +1,5 @@ - + @include('partials.head') diff --git a/resources/themes/backend/views/layouts/auth/simple.blade.php b/resources/themes/backend/views/layouts/auth/simple.blade.php index 17d3f42..1c6ae02 100644 --- a/resources/themes/backend/views/layouts/auth/simple.blade.php +++ b/resources/themes/backend/views/layouts/auth/simple.blade.php @@ -1,5 +1,5 @@ - + @include('partials.head') diff --git a/resources/themes/backend/views/layouts/auth/split.blade.php b/resources/themes/backend/views/layouts/auth/split.blade.php index a25d1d6..f8dcce9 100644 --- a/resources/themes/backend/views/layouts/auth/split.blade.php +++ b/resources/themes/backend/views/layouts/auth/split.blade.php @@ -1,5 +1,5 @@ - + @include('partials.head')