Compare commits

..

No commits in common. "main" and "dev" have entirely different histories.
main ... dev

5 changed files with 7 additions and 19 deletions

View file

@ -61,9 +61,6 @@ class AdminMenuRegistry
'dashboard' => [ 'dashboard' => [
'standalone' => true, 'standalone' => true,
], ],
'agents' => [
'standalone' => true,
],
'workspaces' => [ 'workspaces' => [
'label' => 'Workspaces', 'label' => 'Workspaces',
'icon' => 'layer-group', 'icon' => 'layer-group',

View file

@ -18,12 +18,12 @@
<title>{{ $title }}</title> <title>{{ $title }}</title>
{{-- Critical CSS: Prevents white flash during page load/navigation --}} {{-- Critical CSS: Prevents white flash during page load/navigation --}}
<style @cspnonce> <style>
html { background-color: #f3f4f6; } html { background-color: #f3f4f6; }
html.dark { background-color: #111827; } html.dark { background-color: #111827; }
</style> </style>
<script @cspnonce> <script>
(function () { (function () {
var darkMode = localStorage.getItem('dark-mode'); var darkMode = localStorage.getItem('dark-mode');
if (darkMode === 'true') { if (darkMode === 'true') {
@ -56,7 +56,7 @@
x-init="$watch('sidebarExpanded', value => localStorage.setItem('sidebar-expanded', value))" x-init="$watch('sidebarExpanded', value => localStorage.setItem('sidebar-expanded', value))"
> >
<script @cspnonce> <script>
if (localStorage.getItem('sidebar-expanded') == 'true') { if (localStorage.getItem('sidebar-expanded') == 'true') {
document.querySelector('body').classList.add('sidebar-expanded'); document.querySelector('body').classList.add('sidebar-expanded');
} else { } else {
@ -91,7 +91,7 @@
{{ $scripts ?? '' }} {{ $scripts ?? '' }}
<script @cspnonce> <script>
// Light/Dark mode toggle (guarded for Livewire navigation) // Light/Dark mode toggle (guarded for Livewire navigation)
(function() { (function() {
if (window.__lightSwitchInitialized) return; if (window.__lightSwitchInitialized) return;

View file

@ -1,5 +1,5 @@
{{-- Self-hosted Inter variable font --}} {{-- Self-hosted Inter variable font --}}
<style @cspnonce> <style>
@font-face { @font-face {
font-family: 'Inter'; font-family: 'Inter';
src: url('/fonts/InterVariable.woff2') format('woff2-variations'); src: url('/fonts/InterVariable.woff2') format('woff2-variations');

View file

@ -16,7 +16,7 @@
<title>{{ $title }}</title> <title>{{ $title }}</title>
{{-- Critical CSS: Prevents white flash during page load/navigation --}} {{-- Critical CSS: Prevents white flash during page load/navigation --}}
<style @cspnonce> <style>
html { background-color: #ffffff; } html { background-color: #ffffff; }
html.dark { background-color: #111827; } html.dark { background-color: #111827; }
</style> </style>

View file

@ -11,8 +11,6 @@ declare(strict_types=1);
namespace Core\Headers; namespace Core\Headers;
use Illuminate\Support\Facades\Vite;
/** /**
* Service for generating and managing CSP nonces. * Service for generating and managing CSP nonces.
* *
@ -86,17 +84,10 @@ class CspNonceService
/** /**
* Generate a cryptographically secure nonce. * Generate a cryptographically secure nonce.
*
* Also registers it with Vite so Livewire and Vite-generated tags
* automatically include the nonce attribute.
*/ */
protected function generateNonce(): string protected function generateNonce(): string
{ {
$nonce = base64_encode(random_bytes($this->nonceLength)); return base64_encode(random_bytes($this->nonceLength));
Vite::useCspNonce($nonce);
return $nonce;
} }
/** /**