Merge remote-tracking branch 'origin/main' into next

This commit is contained in:
github-actions[bot]
2026-10-30 16:29:43 +00:00
15 changed files with 42 additions and 21 deletions
+3 -2
View File
@@ -4760,11 +4760,12 @@ function wireNavigate(): string
* Registers a resource menu that the main sidebar and the mobile drawer show in place of their main menu
* (see components/navbar.blade.php). The menu teleports itself into #main-nav-context-{depth}.
* Back on a menu shows the menu one depth lower, and Back at depth 0 shows the main menu.
* The main menu then shows a row (labelled with $name) that opens the deepest resource menu again.
*/
function registerMainNavContext(int $depth, string $label, string $backTitle): void
function registerMainNavContext(int $depth, string $label, string $backTitle, ?string $name = null): void
{
$levels = request()->attributes->get('mainNavContext', []);
$levels[$depth] = ['label' => $label, 'backTitle' => $backTitle];
$levels[$depth] = ['label' => $label, 'backTitle' => $backTitle, 'name' => $name];
ksort($levels);
request()->attributes->set('mainNavContext', $levels);