Hastic standalone https://hastic.io
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
651 B

3 years ago
import { auth } from "./auth.module";
3 years ago
import { createStore } from 'vuex'
import { getStatusGenerator } from "@/services/analytics.service";
const SET_ANALYTICS_STATUS = 'setAnalyticsStatus';
3 years ago
export default createStore({
state: {
analyticStatus: 'loading...'
3 years ago
},
mutations: {
[SET_ANALYTICS_STATUS](state, status: string) {
state.analyticStatus = status;
}
3 years ago
},
actions: {
async runStatusGenerator({commit}) {
const g = getStatusGenerator();
for await (const data of g) {
// this.status = data.toLowerCase();
commit(SET_ANALYTICS_STATUS, data);
}
}
3 years ago
},
modules: {
3 years ago
auth
3 years ago
}
})