Query all bot-states to jump headers immediately

This commit is contained in:
Matthias 2021-09-18 15:54:01 +02:00
parent 542d453f0b
commit 6b41f8fa8e
2 changed files with 7 additions and 2 deletions

View File

@ -133,7 +133,7 @@ export default class NavBar extends Vue {
@ftbot.Action pingAll; @ftbot.Action pingAll;
@ftbot.Action getState; @ftbot.Action allGetState;
@ftbot.Action logout; @ftbot.Action logout;
@ -170,7 +170,7 @@ export default class NavBar extends Vue {
if (this.hasBots) { if (this.hasBots) {
// Query botstate - this will enable / disable certain modes // Query botstate - this will enable / disable certain modes
this.getState(); this.allGetState();
} }
} }

View File

@ -260,6 +260,11 @@ export default function createBotStore(store) {
dispatch(`${e}/ping`); dispatch(`${e}/ping`);
}); });
}, },
allGetState({ getters, dispatch }) {
getters.allAvailableBotsList.forEach((e) => {
dispatch(`${e}/getState`);
});
},
}; };
// Autocreate Actions from botstores // Autocreate Actions from botstores
Object.keys(BotStoreActions).forEach((e) => { Object.keys(BotStoreActions).forEach((e) => {