summaryrefslogtreecommitdiff
path: root/src/client/app/common
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2019-04-16 13:05:10 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-04-16 13:05:10 +0900
commitf966d0b32c9cd45b531a4d76f01bf008e5136bd0 (patch)
tree295f1971d10a94ae8e7a5230d94276e78be8afcd /src/client/app/common
parentFix: admin/driveのアイコンがずれてる (#4710) (diff)
downloadmisskey-f966d0b32c9cd45b531a4d76f01bf008e5136bd0.tar.gz
misskey-f966d0b32c9cd45b531a4d76f01bf008e5136bd0.tar.bz2
misskey-f966d0b32c9cd45b531a4d76f01bf008e5136bd0.zip
色々な修正; Fix #4709 (#4714)
* Fix a la carte 1 * use dialog instead of alert() etc
Diffstat (limited to 'src/client/app/common')
-rw-r--r--src/client/app/common/views/components/messaging-room.form.vue10
-rw-r--r--src/client/app/common/views/components/messaging-room.vue5
-rw-r--r--src/client/app/common/views/components/post-form-attaches.vue2
-rw-r--r--src/client/app/common/views/components/settings/settings.vue4
-rw-r--r--src/client/app/common/views/components/signin.vue5
-rw-r--r--src/client/app/common/views/components/signup.vue5
-rw-r--r--src/client/app/common/views/deck/deck.widgets-column.vue4
-rw-r--r--src/client/app/common/views/widgets/post-form.vue5
8 files changed, 29 insertions, 11 deletions
diff --git a/src/client/app/common/views/components/messaging-room.form.vue b/src/client/app/common/views/components/messaging-room.form.vue
index 6c8b09c244..ee6c312bce 100644
--- a/src/client/app/common/views/components/messaging-room.form.vue
+++ b/src/client/app/common/views/components/messaging-room.form.vue
@@ -85,7 +85,10 @@ export default Vue.extend({
}
} else {
if (items[0].kind == 'file') {
- alert(this.$t('only-one-file-attached'));
+ this.$root.dialog({
+ type: 'error',
+ text: this.$t('only-one-file-attached')
+ });
}
}
},
@@ -107,7 +110,10 @@ export default Vue.extend({
return;
} else if (e.dataTransfer.files.length > 1) {
e.preventDefault();
- alert(this.$t('only-one-file-attached'));
+ this.$root.dialog({
+ type: 'error',
+ text: this.$t('only-one-file-attached')
+ });
return;
}
diff --git a/src/client/app/common/views/components/messaging-room.vue b/src/client/app/common/views/components/messaging-room.vue
index 6f13d50c1e..83a0c463e0 100644
--- a/src/client/app/common/views/components/messaging-room.vue
+++ b/src/client/app/common/views/components/messaging-room.vue
@@ -125,7 +125,10 @@ export default Vue.extend({
this.form.upload(e.dataTransfer.files[0]);
return;
} else if (e.dataTransfer.files.length > 1) {
- alert(this.$t('only-one-file-attached'));
+ this.$root.dialog({
+ type: 'error',
+ text: this.$t('only-one-file-attached')
+ });
return;
}
diff --git a/src/client/app/common/views/components/post-form-attaches.vue b/src/client/app/common/views/components/post-form-attaches.vue
index 467e430ccf..1fe476be77 100644
--- a/src/client/app/common/views/components/post-form-attaches.vue
+++ b/src/client/app/common/views/components/post-form-attaches.vue
@@ -1,6 +1,6 @@
<template>
<div class="skeikyzd" v-show="files.length != 0">
- <x-draggable class="files" :list="files" :options="{ animation: 150 }">
+ <x-draggable class="files" :list="files" animation="150">
<div v-for="file in files" :key="file.id" @click="showFileMenu(file, $event)" @contextmenu.prevent="showFileMenu(file, $event)">
<x-file-thumbnail :data-id="file.id" class="thumbnail" :file="file" fit="cover"/>
<img class="remove" @click.stop="detachMedia(file.id)" src="/assets/desktop/remove.png" :title="$t('attach-cancel')" alt=""/>
diff --git a/src/client/app/common/views/components/settings/settings.vue b/src/client/app/common/views/components/settings/settings.vue
index c81a0e0cd5..001b692551 100644
--- a/src/client/app/common/views/components/settings/settings.vue
+++ b/src/client/app/common/views/components/settings/settings.vue
@@ -542,8 +542,8 @@ export default Vue.extend({
this.latestVersion = newer;
if (newer == null) {
this.$root.dialog({
- title: this.$t('no-updates'),
- text: this.$t('no-updates-desc')
+ title: this.$t('@._settings.no-updates'),
+ text: this.$t('@._settings.no-updates-desc')
});
} else {
this.$root.dialog({
diff --git a/src/client/app/common/views/components/signin.vue b/src/client/app/common/views/components/signin.vue
index 477f25680e..e05085cdbf 100644
--- a/src/client/app/common/views/components/signin.vue
+++ b/src/client/app/common/views/components/signin.vue
@@ -79,7 +79,10 @@ export default Vue.extend({
localStorage.setItem('i', res.i);
location.reload();
}).catch(() => {
- alert(this.$t('login-failed'));
+ this.$root.dialog({
+ type: 'error',
+ text: this.$t('login-failed')
+ });
this.signing = false;
});
}
diff --git a/src/client/app/common/views/components/signup.vue b/src/client/app/common/views/components/signup.vue
index 45c2eabd45..9b1df79771 100644
--- a/src/client/app/common/views/components/signup.vue
+++ b/src/client/app/common/views/components/signup.vue
@@ -153,7 +153,10 @@ export default Vue.extend({
location.href = '/';
});
}).catch(() => {
- alert(this.$t('some-error'));
+ this.$root.dialog({
+ type: 'error',
+ text: this.$t('some-error')
+ });
if (this.meta.enableRecaptcha) {
(window as any).grecaptcha.reset();
diff --git a/src/client/app/common/views/deck/deck.widgets-column.vue b/src/client/app/common/views/deck/deck.widgets-column.vue
index fcf3afd3f7..f2385c8a48 100644
--- a/src/client/app/common/views/deck/deck.widgets-column.vue
+++ b/src/client/app/common/views/deck/deck.widgets-column.vue
@@ -21,7 +21,7 @@
<option value="users">{{ $t('@.widgets.users') }}</option>
<option value="polls">{{ $t('@.widgets.polls') }}</option>
<option value="post-form">{{ $t('@.widgets.post-form') }}</option>
- <option value="messaging">{{ $t('@.widgets.messaging') }}</option>
+ <option value="messaging">{{ $t('@.messaging') }}</option>
<option value="memo">{{ $t('@.widgets.memo') }}</option>
<option value="hashtags">{{ $t('@.widgets.hashtags') }}</option>
<option value="posts-monitor">{{ $t('@.widgets.posts-monitor') }}</option>
@@ -33,7 +33,7 @@
</header>
<x-draggable
:list="column.widgets"
- :options="{ animation: 150 }"
+ animation="150"
@sort="onWidgetSort"
>
<div v-for="widget in column.widgets" class="customize-container" :key="widget.id" @contextmenu.stop.prevent="widgetFunc(widget.id)">
diff --git a/src/client/app/common/views/widgets/post-form.vue b/src/client/app/common/views/widgets/post-form.vue
index b30168b879..120de0f17b 100644
--- a/src/client/app/common/views/widgets/post-form.vue
+++ b/src/client/app/common/views/widgets/post-form.vue
@@ -188,7 +188,10 @@ export default define({
}).then(data => {
this.clear();
}).catch(err => {
- alert('Something happened');
+ this.$root.dialog({
+ type: 'error',
+ text: this.$t('something-happened')
+ });
}).then(() => {
this.posting = false;
this.$nextTick(() => {