mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 11:52:38 +02:00
fix(sync): deactivate cancel and hide button when sync is active
cf #2265 Let's reactivate when we have a proper undo-redo (cf #1107)
This commit is contained in:
parent
eb50d8adf4
commit
ddeebd758c
2 changed files with 4 additions and 1 deletions
|
@ -145,7 +145,9 @@ export class TopBar extends WithTemplate {
|
||||||
}
|
}
|
||||||
|
|
||||||
redraw() {
|
redraw() {
|
||||||
this.elements.peers.hidden = !this._umap.getProperty('syncEnabled')
|
const syncEnabled = this._umap.getProperty('syncEnabled')
|
||||||
|
this.elements.peers.hidden = !syncEnabled
|
||||||
|
this.elements.cancel.hidden = syncEnabled
|
||||||
this.elements.saveLabel.hidden = this._umap.permissions.isDraft()
|
this.elements.saveLabel.hidden = this._umap.permissions.isDraft()
|
||||||
this.elements.saveDraftLabel.hidden = !this._umap.permissions.isDraft()
|
this.elements.saveDraftLabel.hidden = !this._umap.permissions.isDraft()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1259,6 +1259,7 @@ export default class Umap extends ServerStored {
|
||||||
}
|
}
|
||||||
|
|
||||||
askForReset(e) {
|
askForReset(e) {
|
||||||
|
if (this.getProperty('syncEnabled')) return
|
||||||
this.dialog
|
this.dialog
|
||||||
.confirm(translate('Are you sure you want to cancel your changes?'))
|
.confirm(translate('Are you sure you want to cancel your changes?'))
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
Loading…
Reference in a new issue