use common/utils/singleton class for the stores

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2020-07-03 16:57:31 +03:00
1 parent d7cffeb7a8
commit 776fc4462c
14 files changed
+263 -307

No files matched your search

+1 -1
View File
@@ -217,7 +217,7 @@ const actions: ActionTree<ClusterState, any> = {
})
},
storeCluster({commit}, cluster: ClusterInfo) {
clusterStore.storeCluster(cluster);
clusterStore.saveCluster(cluster);
commit("updateCluster", cluster)
promiseIpc.send("clusterStored", cluster.id)
}
@@ -27,11 +27,11 @@ const mutations: MutationTree<WorkspaceState> = {
state.currentWorkspace = workspace
},
addWorkspace(state, workspace: WorkspaceData) {
workspaceStore.storeWorkspace(workspace)
workspaceStore.saveWorkspace(workspace)
state.workspaces = workspaceStore.getAllWorkspaces()
},
updateWorkspace(state, workspace: WorkspaceData) {
workspaceStore.storeWorkspace(workspace)
workspaceStore.saveWorkspace(workspace)
state.workspaces = workspaceStore.getAllWorkspaces()
},
removeWorkspace(state, workspace: Workspace) {