WIP: account management menu can be toggled by head button now.

This commit is contained in:
Cindy Chang
2024-06-18 16:38:02 +08:00
parent 5d33b6481c
commit 341fd61d07
11 changed files with 129 additions and 10 deletions

26
src/stores/acctMgmt.js Normal file
View File

@@ -0,0 +1,26 @@
import { defineStore } from "pinia";
export default defineStore('acctMgmtStore', {
state: () => ({
isAcctMenuOpen: false,
}),
getters: {
},
actions: {
/**
* Set related boolean to true
*/
openAcctMenu(){
this.isAcctMenuOpen = true;
},
/**
* Set related boolean to false
*/
closeAcctMenu(){
this.isAcctMenuOpen = false;
},
toggleIsAcctMenuOpen() {
this.isAcctMenuOpen = !this.isAcctMenuOpen;
},
},
})