web/satellite/vuetify-poc: hide nav sidebar by default for screens less than 1280px
On screen sizes where the sidebar overlaps with the content of the page, the sidebar should be collapsed by default. Issue: https://github.com/storj/storj/issues/6229 Change-Id: Ia0a91acd95519de27f9ff8f1ee90c6b8e7932266
This commit is contained in:
parent
f9ab2f0de7
commit
2cf233ac23
@ -86,6 +86,10 @@ watch(() => route.params.projectId, async newId => {
|
||||
* Pre-fetches user`s and project information.
|
||||
*/
|
||||
onBeforeMount(async () => {
|
||||
if (document.body.clientWidth < 1280) {
|
||||
appStore.toggleNavigationDrawer(false);
|
||||
}
|
||||
|
||||
isLoading.value = true;
|
||||
|
||||
try {
|
||||
|
@ -12,8 +12,8 @@ class AppState {
|
||||
export const useAppStore = defineStore('vuetifyApp', () => {
|
||||
const state = reactive<AppState>(new AppState());
|
||||
|
||||
function toggleNavigationDrawer(): void {
|
||||
state.isNavigationDrawerShown = !state.isNavigationDrawerShown;
|
||||
function toggleNavigationDrawer(isShown?: boolean): void {
|
||||
state.isNavigationDrawerShown = isShown ?? !state.isNavigationDrawerShown;
|
||||
}
|
||||
|
||||
function setPathBeforeAccountPage(path: string) {
|
||||
|
Loading…
Reference in New Issue
Block a user