diff --git a/CHANGELOG.md b/CHANGELOG.md index f064e81..d9aa96f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 configured image — honouring `class`, `width` and `height`, and omitting each attribute when its config value is empty — above the text `logo`. With `auth_logo.enabled` left at its `false` default the auth pages are unchanged. +- **The user-menu config keys did nothing.** `usermenu_header`, + `usermenu_header_class`, `usermenu_image` and `usermenu_desc` have shipped + since 1.0 but the partial ignored all four and hardcoded the header, the + avatar and the "member since" line. They are now honoured. Note the defaults + are all `false`, so the dropdown header is hidden unless you turn it on — + set `usermenu_header` and `usermenu_image` to `true` to keep the previous + appearance. The bundled demo pages do exactly that for themselves via the new + `DemoUserMenu` middleware, so the showcase keeps the coloured header and the + 90px avatar without changing what a fresh install ships. + `usermenu_header_class` default corrected to `text-bg-primary`; `bg-primary` + alone sets no contrasting foreground color. +- **`usermenu_profile_url => false` now hides the "Profile" link** as the docs + have always claimed. It previously fell back to `/admin/profile` — a path + nothing in the package serves; the `profile` scaffold registers `/profile`. + With the link hidden, "Sign out" fills the footer. +- **The lockscreen rendered unstyled.** It extended the auth card layout, which + produced `.lockscreen-page` / `.lockscreen-box` — neither exists in AdminLTE + 4. The page's real styles are all scoped under a `.lockscreen` body class, so + none of them applied. It is now a standalone layout carrying that class, and + posts to the `password.confirm` route (falling back to the bare path when + auth hasn't been scaffolded) instead of to `login`, which could never have + succeeded from a password-only form. Reported by + [@ruanpepe](https://github.com/ruanpepe). ## [1.2.0] - 2026-08-11 diff --git a/config/adminlte.php b/config/adminlte.php index 2951245..9bb4475 100644 --- a/config/adminlte.php +++ b/config/adminlte.php @@ -80,11 +80,16 @@ |-------------------------------------------------------------------------- | User menu (topbar dropdown) |-------------------------------------------------------------------------- + | + | `usermenu_profile_url` is passed through `url()`, so set it to a path + | ('profile') or an absolute URL — not a route name. `false` hides the + | "Profile" button and lets "Sign out" fill the footer. + | */ 'usermenu_enabled' => true, 'usermenu_header' => false, - 'usermenu_header_class' => 'bg-primary', + 'usermenu_header_class' => 'text-bg-primary', 'usermenu_image' => false, 'usermenu_desc' => false, 'usermenu_profile_url' => false, diff --git a/docs/authentication.md b/docs/authentication.md index af3adbc..c4f4b40 100644 --- a/docs/authentication.md +++ b/docs/authentication.md @@ -109,7 +109,13 @@ wired into Breeze/Fortify. To customize them, publish with | `adminlte::auth.passwords.email` | `auth/passwords/email.blade.php` | | `adminlte::auth.passwords.reset` | `auth/passwords/reset.blade.php` | -(`auth/auth-master.blade.php` is the shared layout these views extend.) +(`auth/auth-master.blade.php` is the shared layout these views extend. The +lockscreen is the exception — AdminLTE styles it as a full-page `.lockscreen` +layout rather than a centred auth card, so it stands alone.) + +The lockscreen posts to the `password.confirm` route registered by +`adminlte:make-auth` (Breeze and Fortify register it too), which redirects to +the intended URL on success. --- diff --git a/docs/configuration.md b/docs/configuration.md index a89368d..3d3da96 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -158,10 +158,15 @@ block in the published `resources/css/adminlte.css`. | --- | --- | --- | | `usermenu_enabled` | `true` | Show the user dropdown menu in the topbar. | | `usermenu_header` | `false` | Show a colored header block inside the user dropdown. | -| `usermenu_header_class` | `'bg-primary'` | Background class for the user dropdown header. | -| `usermenu_image` | `false` | Show the user's avatar in the dropdown. | -| `usermenu_desc` | `false` | Show a description/subtitle under the user's name. | -| `usermenu_profile_url` | `false` | URL for the dropdown's "Profile" link (false to hide). | +| `usermenu_header_class` | `'text-bg-primary'` | Background class for the user dropdown header. | +| `usermenu_image` | `false` | Show the user's avatar in the dropdown header. | +| `usermenu_desc` | `false` | Show the "member since" subtitle under the user's name. | +| `usermenu_profile_url` | `false` | URL or path for the dropdown's "Profile" link. `false` hides the link. | + +`usermenu_profile_url` is passed through `url()`, so give it a path +(`'profile'`) or an absolute URL — not a route name. The `profile` scaffold +section registers its page at `/profile`, so `'profile'` is the value to use +after `php artisan adminlte:scaffold profile`. --- diff --git a/docs/demo-pages.md b/docs/demo-pages.md index a8729a2..53f1ee3 100644 --- a/docs/demo-pages.md +++ b/docs/demo-pages.md @@ -16,6 +16,13 @@ components. - **Plain view routes.** Each URI maps to a Blade view via `Route::view(...)`, named `adminlte.{dotted-uri}` (e.g. `demo/widgets/cards` → route name `adminlte.demo.widgets.cards`). +- **Rendered with the full user dropdown.** `DemoUserMenu` turns + `usermenu_header`, `usermenu_image` and `usermenu_desc` on for these routes + only, so the showcase keeps the coloured header block and the 90px avatar. + Those keys ship `false`, so a fresh install gets the plain dropdown until it + opts in — see [`configuration.md`](configuration.md). `usermenu_profile_url` + is left alone: nothing serves a profile page until + `adminlte:scaffold profile` runs. ```php if (! config('adminlte.demo', true)) { @@ -23,6 +30,7 @@ if (! config('adminlte.demo', true)) { } $middleware = config('adminlte.demo_middleware', ['web', 'auth']); +$middleware[] = DemoUserMenu::class; Route::middleware($middleware)->group(function () use ($pages) { foreach ($pages as $uri => $view) { diff --git a/resources/views/auth/lockscreen.blade.php b/resources/views/auth/lockscreen.blade.php index c1f3688..f06f973 100644 --- a/resources/views/auth/lockscreen.blade.php +++ b/resources/views/auth/lockscreen.blade.php @@ -1,38 +1,98 @@ -@extends('adminlte::auth.auth-master', ['authType' => 'lockscreen']) - -@section('auth_body') -
{{ $user->name }}
- @endif -