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 }) {
|
toggleMenu({ grimoire }) {
|
||||||
grimoire.isMenuOpen = !grimoire.isMenuOpen;
|
grimoire.isMenuOpen = !grimoire.isMenuOpen;
|
||||||
},
|
},
|
||||||
toggleGrimoire({ grimoire }) {
|
toggleGrimoire({ grimoire }, isPublic) {
|
||||||
grimoire.isPublic = !grimoire.isPublic;
|
if (isPublic === true || isPublic === false) {
|
||||||
grimoire.isControlOpen = !grimoire.isPublic;
|
|
||||||
},
|
|
||||||
showGrimoire({ grimoire }, isPublic = false) {
|
|
||||||
grimoire.isPublic = isPublic;
|
grimoire.isPublic = isPublic;
|
||||||
|
} else {
|
||||||
|
grimoire.isPublic = !grimoire.isPublic;
|
||||||
|
}
|
||||||
|
document.title = `Blood on the Clocktower ${
|
||||||
|
grimoire.isPublic ? "Town Square" : "Grimoire"
|
||||||
|
}`;
|
||||||
},
|
},
|
||||||
toggleNightOrder({ grimoire }) {
|
toggleNightOrder({ grimoire }) {
|
||||||
grimoire.isNightOrder = !grimoire.isNightOrder;
|
grimoire.isNightOrder = !grimoire.isNightOrder;
|
||||||
|
|
|
@ -4,7 +4,7 @@ module.exports = store => {
|
||||||
store.commit("setBackground", localStorage.background);
|
store.commit("setBackground", localStorage.background);
|
||||||
}
|
}
|
||||||
if (localStorage.isPublic !== undefined) {
|
if (localStorage.isPublic !== undefined) {
|
||||||
store.commit("showGrimoire", JSON.parse(localStorage.isPublic));
|
store.commit("toggleGrimoire", JSON.parse(localStorage.isPublic));
|
||||||
}
|
}
|
||||||
if (localStorage.edition !== undefined) {
|
if (localStorage.edition !== undefined) {
|
||||||
// this will initialize state.roles!
|
// this will initialize state.roles!
|
||||||
|
|
Loading…
Reference in New Issue