fix: add default saved message
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run

Now that we do not always do a save on the map itself, we may have
no feedback message in case we only save layers.
This commit is contained in:
Yohan Boniface 2024-12-13 10:05:20 +01:00
parent cbab6e03f8
commit 45a0ec5d42

View file

@ -643,6 +643,12 @@ export default class Umap extends ServerStored {
// have changed, we'll be more subtil when we'll remove the
// save action
this.render(['name', 'user', 'permissions'])
if (!this._leafletMap.listens('saved')) {
// When we save only layers, we don't have the map feedback message
this._leafletMap.on('saved', () => {
Alert.success(translate('Map has been saved!'))
})
}
this.fire('saved')
}