Skip to content

Commit

Permalink
Revert "retrieve dirty status and send it via postMessage (project-ch…
Browse files Browse the repository at this point in the history
…ip#1495)"

This reverts commit 5d60f45.
  • Loading branch information
paulr34 committed Dec 13, 2024
1 parent c3d6a4c commit 6c5d374
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ export default defineComponent({
}
)

this.$onWebSocket(dbEnum.wsCategory.dirtyFlag, () => {
this.$store.dispatch('zap/setDirtyState')
this.$onWebSocket(dbEnum.wsCategory.dirtyFlag, (resp) => {
this.$store.dispatch('zap/setDirtyState', resp)
})
},
addClassToBody() {
Expand Down
7 changes: 3 additions & 4 deletions src/store/zap/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1281,11 +1281,10 @@ export function updateSelectedUcComponentState(context, projectInfo) {
/**
* Set the dirty state for ZAP config when there are unsaved changes.
* @param {*} context
* @param {*} isDirty
*/
export function setDirtyState(context) {
axiosRequests.$serverGet(restApi.ide.isDirty).then((resp) => {
context.commit('setDirtyState', resp.data.DIRTY)
})
export function setDirtyState(context, isDirty) {
context.commit('setDirtyState', isDirty)
}

/**
Expand Down

0 comments on commit 6c5d374

Please sign in to comment.