色々な修正; Fix #4709 (#4714)

* Fix a la carte 1

* use dialog instead of alert() etc
This commit is contained in:
tamaina 2019-04-16 13:05:10 +09:00 committed by syuilo
parent ba3879a95a
commit f966d0b32c
21 changed files with 79 additions and 29 deletions

View file

@ -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
});