diff --git a/lib/www/client/source/src/views/ProjectSettings.vue b/lib/www/client/source/src/views/ProjectSettings.vue index c26175e..1b530ee 100644 --- a/lib/www/client/source/src/views/ProjectSettings.vue +++ b/lib/www/client/source/src/views/ProjectSettings.vue @@ -440,6 +440,8 @@ export default { } ], + dirty: false, + fileLoadDialog: false, viewMode: 0, @@ -451,6 +453,18 @@ export default { }, watch: { + + configuration: { + handler (cur, prev) { + if (cur && prev) { + this.dirty = true; + } else { + this.dirty = false; + } + }, + deep: true + }, + active (cur, prev) { if (cur == prev) { return; @@ -548,6 +562,7 @@ export default { } }; this.configuration = await this.api([url, init]); + this.dirty = false; }, makeTree (obj, id=0) { @@ -605,7 +620,12 @@ export default { if (res && res.id == this.configuration.id) { // In case the server decided to apply any changes this.showSnack(["Configuration uploaded to server", "success"]); - this.$nextTick( () => this.configuration = res ); + this.$nextTick( () => { + this.configuration = res; + this.$nextTick( () => { + this.dirty = false; + }); + }); } },