mirror of https://github.com/bra1n/townsquare.git
update window title depending on grimoire mode (closes #2)
This commit is contained in:
parent
8bdc2d64eb
commit
46ce385781
|
@ -48,12 +48,15 @@ export default new Vuex.Store({
|
|||
toggleMenu({ grimoire }) {
|
||||
grimoire.isMenuOpen = !grimoire.isMenuOpen;
|
||||
},
|
||||
toggleGrimoire({ grimoire }) {
|
||||
grimoire.isPublic = !grimoire.isPublic;
|
||||
grimoire.isControlOpen = !grimoire.isPublic;
|
||||
},
|
||||
showGrimoire({ grimoire }, isPublic = false) {
|
||||
toggleGrimoire({ grimoire }, isPublic) {
|
||||
if (isPublic === true || isPublic === false) {
|
||||
grimoire.isPublic = isPublic;
|
||||
} else {
|
||||
grimoire.isPublic = !grimoire.isPublic;
|
||||
}
|
||||
document.title = `Blood on the Clocktower ${
|
||||
grimoire.isPublic ? "Town Square" : "Grimoire"
|
||||
}`;
|
||||
},
|
||||
toggleNightOrder({ grimoire }) {
|
||||
grimoire.isNightOrder = !grimoire.isNightOrder;
|
||||
|
|
|
@ -4,7 +4,7 @@ module.exports = store => {
|
|||
store.commit("setBackground", localStorage.background);
|
||||
}
|
||||
if (localStorage.isPublic !== undefined) {
|
||||
store.commit("showGrimoire", JSON.parse(localStorage.isPublic));
|
||||
store.commit("toggleGrimoire", JSON.parse(localStorage.isPublic));
|
||||
}
|
||||
if (localStorage.edition !== undefined) {
|
||||
// this will initialize state.roles!
|
||||
|
|
Loading…
Reference in New Issue