6cfd7d3836
* feat: Autogenerate push notification keys * add vapid service class and remove pushkey model * add spec for vapid service * unset vapid env keys * Unset VAPID_PRIVATE_KEY env variable Co-authored-by: Sojan Jose <sojan@chatwoot.com> Co-authored-by: Vishnu Narayanan <vishnu@chatwoot.com>
29 lines
409 B
JavaScript
29 lines
409 B
JavaScript
import events from 'widget/api/events';
|
|
|
|
const state = {
|
|
isOpen: false,
|
|
};
|
|
|
|
const actions = {
|
|
create: async (_, { name }) => {
|
|
try {
|
|
await events.create(name);
|
|
} catch (error) {
|
|
// Ignore error
|
|
}
|
|
},
|
|
};
|
|
|
|
const mutations = {
|
|
toggleOpen($state) {
|
|
$state.isOpen = !$state.isOpen;
|
|
},
|
|
};
|
|
|
|
export default {
|
|
namespaced: true,
|
|
state,
|
|
getters: {},
|
|
actions,
|
|
mutations,
|
|
};
|