Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
web/satellite/vuetify-poc: allow navigation drawer to be toggled
This change allows the navigation drawer to be toggled by clicking the the hamburger menu in the navigation bar. The hamburger menu has been hidden in pages not containing a navigation drawer. Resolves #6034 Change-Id: I48cfee1f48964c500c07f09f188c7077442261ab
- Loading branch information
Showing
4 changed files
with
44 additions
and
7 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (C) 2023 Storj Labs, Inc. | ||
// See LICENSE for copying information. | ||
|
||
import { defineStore } from 'pinia'; | ||
import { reactive } from 'vue'; | ||
|
||
class AppState { | ||
public isNavigationDrawerShown = true; | ||
} | ||
|
||
export const useAppStore = defineStore('app', () => { | ||
const state = reactive<AppState>(new AppState()); | ||
|
||
function toggleNavigationDrawer(): void { | ||
state.isNavigationDrawerShown = !state.isNavigationDrawerShown; | ||
} | ||
|
||
return { | ||
state, | ||
toggleNavigationDrawer, | ||
}; | ||
}); |