* Fix a la carte 1 * use dialog instead of alert() etc
This commit is contained in:
parent
ba3879a95a
commit
f966d0b32c
21 changed files with 79 additions and 29 deletions
|
|
@ -161,7 +161,10 @@ export default Vue.extend({
|
|||
});
|
||||
break;
|
||||
default:
|
||||
alert(this.$t('unhandled-error'));
|
||||
this.$root.dialog({
|
||||
type: 'error',
|
||||
text: this.$t('unhandled-error')
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -320,7 +320,10 @@ export default Vue.extend({
|
|||
});
|
||||
break;
|
||||
default:
|
||||
alert(this.$t('unhandled-error'));
|
||||
this.$root.dialog({
|
||||
type: 'error',
|
||||
text: this.$t('unhandled-error')
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -364,7 +364,10 @@ export default Vue.extend({
|
|||
|
||||
setGeo() {
|
||||
if (navigator.geolocation == null) {
|
||||
alert(this.$t('geolocation-alert'));
|
||||
this.$root.dialog({
|
||||
type: 'warning',
|
||||
text: this.$t('geolocation-alert')
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -372,7 +375,11 @@ export default Vue.extend({
|
|||
this.geo = pos.coords;
|
||||
this.$emit('geo-attached', this.geo);
|
||||
}, err => {
|
||||
alert(`%i18n:@error%: ${err.message}`);
|
||||
this.$root.dialog({
|
||||
type: 'error',
|
||||
title: this.$t('error')
|
||||
text: err.message
|
||||
});
|
||||
}, {
|
||||
enableHighAccuracy: true
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue