* Fix a la carte 1 * use dialog instead of alert() etc
This commit is contained in:
@ -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
|
||||
});
|
||||
|
@ -34,7 +34,7 @@
|
||||
<button @click="addWidget">{{ $t('add') }}</button>
|
||||
</div>
|
||||
<div class="trash">
|
||||
<x-draggable v-model="trash" :options="{ group: 'x' }" @add="onTrash"></x-draggable>
|
||||
<x-draggable v-model="trash" group="x" @add="onTrash"></x-draggable>
|
||||
<p>{{ $t('@.trash') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -45,7 +45,8 @@
|
||||
:list="widgets[place]"
|
||||
:class="place"
|
||||
:data-place="place"
|
||||
:options="{ group: 'x', animation: 150 }"
|
||||
group="x"
|
||||
animation="150"
|
||||
@sort="onWidgetSort"
|
||||
:key="place"
|
||||
>
|
||||
|
@ -34,7 +34,7 @@ export default Vue.extend({
|
||||
document.title = title;
|
||||
},
|
||||
onOpenFolder(folder) {
|
||||
const title = folder.name + ' | %i18n:@title%';
|
||||
const title = `${folder.name} | ${this.$t('title')}`;
|
||||
|
||||
// Rewrite URL
|
||||
history.pushState(null, title, `/i/drive/folder/${folder.id}`);
|
||||
|
Reference in New Issue
Block a user