* 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
|
|
@ -283,14 +283,21 @@ export default Vue.extend({
|
|||
|
||||
setGeo() {
|
||||
if (navigator.geolocation == null) {
|
||||
alert(this.$t('location-alert'));
|
||||
this.$root.dialog({
|
||||
type: 'warning',
|
||||
text: this.$t('geolocation-alert')
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
navigator.geolocation.getCurrentPosition(pos => {
|
||||
this.geo = pos.coords;
|
||||
}, 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