+
-
+
diff --git a/umap/static/umap/js/components/alerts/alert.js b/umap/static/umap/js/components/alerts/alert.js
index 6aff696e..5daf4cce 100644
--- a/umap/static/umap/js/components/alerts/alert.js
+++ b/umap/static/umap/js/components/alerts/alert.js
@@ -119,29 +119,29 @@ class uMapAlertCreation extends uMapAlert {
}
}
-class uMapAlertChoice extends uMapAlert {
+class uMapAlertConflict extends uMapAlert {
static error(
message,
// biome-ignore lint/style/useNumberNamespace: Number.Infinity returns undefined by default
duration = Infinity
) {
- uMapAlertChoice.emit('alertChoice', { level: 'error', message, duration })
+ uMapAlertConflict.emit('alertConflict', { level: 'error', message, duration })
}
constructor() {
super()
- this.choiceWrapper = this.container.querySelector('#choice-wrapper')
+ this.conflictWrapper = this.container.querySelector('#conflict-wrapper')
}
- onAlertChoice(event) {
+ onAlertConflict(event) {
const { level = 'info', duration = 5000, message = '' } = event.detail
uMapAlert.prototype.onAlert.call(this, { detail: { level, duration, message } })
- const form = this.choiceWrapper.querySelector('form')
+ const form = this.conflictWrapper.querySelector('form')
form.addEventListener('submit', (event) => {
event.preventDefault()
switch (event.submitter.id) {
case 'your-changes':
- uMapAlertChoice.emit('alertChoiceOverride')
+ uMapAlertConflict.emit('alertConflictOverride')
break
case 'their-changes':
window.location.reload()
@@ -153,8 +153,8 @@ class uMapAlertChoice extends uMapAlert {
connectedCallback() {
this._handleClose()
- this.listen('alertChoice')
+ this.listen('alertConflict')
}
}
-export { uMapAlert, uMapAlertCreation, uMapAlertChoice }
+export { uMapAlert, uMapAlertCreation, uMapAlertConflict }
diff --git a/umap/static/umap/js/modules/global.js b/umap/static/umap/js/modules/global.js
index 31081ebf..f42ce016 100644
--- a/umap/static/umap/js/modules/global.js
+++ b/umap/static/umap/js/modules/global.js
@@ -16,7 +16,7 @@ import { SyncEngine } from './sync/engine.js'
import {
uMapAlert as Alert,
uMapAlertCreation as AlertCreation,
- uMapAlertChoice as AlertChoice,
+ uMapAlertConflict as AlertConflict,
} from '../components/alerts/alert.js'
// Import modules and export them to the global scope.
@@ -26,7 +26,7 @@ import {
window.U = {
Alert,
AlertCreation,
- AlertChoice,
+ AlertConflict,
AjaxAutocomplete,
AjaxAutocompleteMultiple,
Browser,
diff --git a/umap/static/umap/js/umap.layer.js b/umap/static/umap/js/umap.layer.js
index 741a57c5..3982c4a8 100644
--- a/umap/static/umap/js/umap.layer.js
+++ b/umap/static/umap/js/umap.layer.js
@@ -1707,13 +1707,13 @@ U.DataLayer = L.Evented.extend({
const [data, response, error] = await this.map.server.post(url, headers, formData)
if (error) {
if (response && response.status === 412) {
- U.AlertChoice.error(
+ U.AlertConflict.error(
L._(
'Whoops! Other contributor(s) changed some of the same map elements as you. ' +
'This situation is tricky, you have to choose carefully which version is pertinent.'
)
)
- document.addEventListener('alertChoiceOverride', async (event) => {
+ document.addEventListener('alertConflictOverride', async (event) => {
await this._trySave(url, {}, formData)
})
}
diff --git a/umap/static/umap/vars.css b/umap/static/umap/vars.css
index 185aa514..f2023841 100644
--- a/umap/static/umap/vars.css
+++ b/umap/static/umap/vars.css
@@ -8,6 +8,7 @@
--color-limeGreen: #b9f5d2;
--color-brightCyan: #46ece6;
--color-lightCyan: #d4fbf9;
+ --color-red: #c60f13;
--background-color: var(--color-light);
--color-accent: var(--color-brightCyan);