Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ and notification icon to be moved to the bottom left side, you can manually disa
'section_title' => true,
'collapse_on_select' => true,
'collapse_on_refresh' => false,
'collapse_on_navigate' => false,
]
]
```
Expand Down
1 change: 1 addition & 0 deletions config/nova.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
'section_title' => true,
'collapse_on_select' => false,
'collapse_on_refresh' => false,
'collapse_on_navigate' => false,
];
2 changes: 1 addition & 1 deletion dist/js/tool.js

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion resources/js/tool.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Menu from './components/Menu.vue'
import Noop from './components/Noop.vue'
import { createVNode, render, nextTick } from 'vue'
import { router } from '@inertiajs/vue3'

function getNovaVersion() {
const [ version ] = Nova.config('version').replaceAll('.', '').trim().match(/^\d+/)
Expand All @@ -16,7 +17,15 @@ const settings = {
ThemeDropdown: config.move_theme_switcher,
}

Nova.booting(app => {
Nova.booting((app, store) => {

router.on('before', () => {
;(async () => {
if (config.collapse_on_navigate) {
store.state.mainMenuShown = false
}
})()
})

const components = {
NotificationCenter: null,
Expand Down