色々な修正; 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

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

View File

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

View File

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

View File

@ -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"
>

View File

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