-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from Muetze42/development
Add fix for scrollbar overflow (Nova 4.5.2)
- Loading branch information
Showing
3 changed files
with
71 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
} | ||
}, | ||
"require": { | ||
"laravel/nova": "^4.3.0" | ||
"laravel/nova": "^4.5.2" | ||
}, | ||
"extra": { | ||
"laravel": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<!-- Fixed Navbar Scroll --> | ||
<template> | ||
<div id="nova"> | ||
<MainHeader /> | ||
|
||
<!-- Content --> | ||
<div class="content" data-testid="content"> | ||
<div | ||
class="content hidden lg:block lg:absolute left-0 bottom-0 overflow-x-hidden overflow-y-auto lg:top-[56px] w-60 px-3 py-5" | ||
> | ||
<MainMenu /> | ||
</div> | ||
|
||
<div class="p-4 md:py-8 md:px-12 lg:ml-60"> | ||
<FadeTransition> | ||
<slot /> | ||
</FadeTransition> | ||
|
||
<Footer /> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import MainHeader from '@/layouts/MainHeader' | ||
import Footer from '@/layouts/Footer' | ||
|
||
export default { | ||
components: { | ||
MainHeader, | ||
Footer, | ||
}, | ||
|
||
mounted() { | ||
Nova.$on('error', this.handleError) | ||
Nova.$on('token-expired', this.handleTokenExpired) | ||
}, | ||
|
||
beforeUnmount() { | ||
Nova.$off('error', this.handleError) | ||
Nova.$off('token-expired', this.handleTokenExpired) | ||
}, | ||
|
||
methods: { | ||
handleError(message) { | ||
Nova.error(message) | ||
}, | ||
|
||
handleTokenExpired() { | ||
// @TODO require Nova._createToast() to support action with link. | ||
Nova.$toasted.show(this.__('Sorry, your session has expired.'), { | ||
action: { | ||
onClick: () => Nova.redirectToLogin(), | ||
text: this.__('Reload'), | ||
}, | ||
duration: null, | ||
type: 'error', | ||
}) | ||
|
||
setTimeout(() => { | ||
Nova.redirectToLogin() | ||
}, 5000) | ||
}, | ||
}, | ||
} | ||
</script> |