Skip to content

Commit

Permalink
fix: add default saved message
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yohanboniface committed Dec 13, 2024
1 parent cbab6e0 commit 45a0ec5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions umap/static/umap/js/modules/umap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}

Expand Down

0 comments on commit 45a0ec5

Please sign in to comment.