show topbar in more situations

This commit is contained in:
2023-01-22 23:16:36 -05:00
parent 0c95fa88f4
commit 5f214ab7f9
3 changed files with 7 additions and 1 deletions

View File

@ -48,6 +48,8 @@ Alpine.start()
topbar.config({ barColors: { 0: '#29d' }, shadowColor: 'rgba(0, 0, 0, .3)' })
window.addEventListener('phx:page-loading-start', info => topbar.show())
window.addEventListener('phx:page-loading-stop', info => topbar.hide())
window.addEventListener('submit', info => topbar.show())
window.addEventListener('beforeunload', info => topbar.show())
// connect if there are any LiveViews on the page
liveSocket.connect()