Compare commits
2
Commits
8a66cf6f63
...
f65c816464
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f65c816464 | ||
|
|
d60851bb53 |
@@ -13,6 +13,16 @@ return Application::configure(basePath: dirname(__DIR__))
|
||||
health: '/up',
|
||||
)
|
||||
->withMiddleware(function (Middleware $middleware): void {
|
||||
// CPM/Caddy terminates TLS; trust forwarded proto/host so asset() URLs stay https.
|
||||
$middleware->trustProxies(
|
||||
at: '*',
|
||||
headers: Request::HEADER_X_FORWARDED_FOR
|
||||
| Request::HEADER_X_FORWARDED_HOST
|
||||
| Request::HEADER_X_FORWARDED_PORT
|
||||
| Request::HEADER_X_FORWARDED_PROTO
|
||||
| Request::HEADER_X_FORWARDED_PREFIX,
|
||||
);
|
||||
|
||||
$middleware->redirectGuestsTo(fn () => route('login'));
|
||||
$middleware->redirectUsersTo(fn () => route('recordings.index'));
|
||||
})
|
||||
|
||||
@@ -11,4 +11,36 @@
|
||||
<link href="https://fonts.bunny.net/css?family=inter:400,500,600&display=swap" rel="stylesheet" />
|
||||
|
||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||
@fluxAppearance
|
||||
{{-- Flux appearance with dark as the default (Flux ships with "system"). --}}
|
||||
<style>
|
||||
:root.dark {
|
||||
color-scheme: dark;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
window.Flux = {
|
||||
applyAppearance (appearance) {
|
||||
let applyDark = () => document.documentElement.classList.add('dark')
|
||||
let applyLight = () => document.documentElement.classList.remove('dark')
|
||||
|
||||
if (appearance === 'system') {
|
||||
let media = window.matchMedia('(prefers-color-scheme: dark)')
|
||||
|
||||
// Persist "system" explicitly so a missing key can mean "use app default (dark)".
|
||||
window.localStorage.setItem('flux.appearance', 'system')
|
||||
|
||||
media.matches ? applyDark() : applyLight()
|
||||
} else if (appearance === 'dark') {
|
||||
window.localStorage.setItem('flux.appearance', 'dark')
|
||||
|
||||
applyDark()
|
||||
} else if (appearance === 'light') {
|
||||
window.localStorage.setItem('flux.appearance', 'light')
|
||||
|
||||
applyLight()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
window.Flux.applyAppearance(window.localStorage.getItem('flux.appearance') || 'dark')
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user