summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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
-rw-r--r--src/client/app/desktop/views/components/drive.folder.vue5
-rw-r--r--src/client/app/desktop/views/components/drive.vue5
-rw-r--r--src/client/app/desktop/views/components/post-form.vue11
-rw-r--r--src/client/app/desktop/views/home/home.vue5
-rw-r--r--src/client/app/desktop/views/pages/drive.vue2
-rw-r--r--src/client/app/mios.ts4
-rw-r--r--src/client/app/mobile/views/components/drive.file-detail.vue7
-rw-r--r--src/client/app/mobile/views/components/post-form.vue11
-rw-r--r--src/client/app/mobile/views/pages/favorites.vue2
-rw-r--r--src/client/app/mobile/views/pages/games/reversi.vue2
-rw-r--r--src/client/app/mobile/views/pages/search.vue2
-rw-r--r--src/client/app/mobile/views/pages/widgets.vue8
20 files changed, 76 insertions, 28 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(() => {
diff --git a/src/client/app/desktop/views/components/drive.folder.vue b/src/client/app/desktop/views/components/drive.folder.vue
index 02f219a98e..fd6de5a05e 100644
--- a/src/client/app/desktop/views/components/drive.folder.vue
+++ b/src/client/app/desktop/views/components/drive.folder.vue
@@ -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')
+ });
}
});
}
diff --git a/src/client/app/desktop/views/components/drive.vue b/src/client/app/desktop/views/components/drive.vue
index fcabb4b8eb..48443669ac 100644
--- a/src/client/app/desktop/views/components/drive.vue
+++ b/src/client/app/desktop/views/components/drive.vue
@@ -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')
+ });
}
});
}
diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue
index fe39a17e67..7d3593d9c9 100644
--- a/src/client/app/desktop/views/components/post-form.vue
+++ b/src/client/app/desktop/views/components/post-form.vue
@@ -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
});
diff --git a/src/client/app/desktop/views/home/home.vue b/src/client/app/desktop/views/home/home.vue
index d0b2fc10bc..d4677df842 100644
--- a/src/client/app/desktop/views/home/home.vue
+++ b/src/client/app/desktop/views/home/home.vue
@@ -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"
>
diff --git a/src/client/app/desktop/views/pages/drive.vue b/src/client/app/desktop/views/pages/drive.vue
index 2916569a5f..b389392ec8 100644
--- a/src/client/app/desktop/views/pages/drive.vue
+++ b/src/client/app/desktop/views/pages/drive.vue
@@ -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}`);
diff --git a/src/client/app/mios.ts b/src/client/app/mios.ts
index a3525ed319..b69c340528 100644
--- a/src/client/app/mios.ts
+++ b/src/client/app/mios.ts
@@ -4,7 +4,7 @@ import { EventEmitter } from 'eventemitter3';
import * as uuid from 'uuid';
import initStore from './store';
-import { apiUrl, version } from './config';
+import { apiUrl, version, locale } from './config';
import Progress from './common/scripts/loading';
import Err from './common/views/components/connect-failed.vue';
@@ -281,7 +281,7 @@ export default class MiOS extends EventEmitter {
// トークンが再生成されたとき
// このままではMisskeyが利用できないので強制的にサインアウトさせる
main.on('myTokenRegenerated', () => {
- alert('%i18n:common.my-token-regenerated%');
+ alert(locale['common']['my-token-regenerated'])
this.signout();
});
}
diff --git a/src/client/app/mobile/views/components/drive.file-detail.vue b/src/client/app/mobile/views/components/drive.file-detail.vue
index 98124354ed..b9960e5433 100644
--- a/src/client/app/mobile/views/components/drive.file-detail.vue
+++ b/src/client/app/mobile/views/components/drive.file-detail.vue
@@ -136,7 +136,10 @@ export default Vue.extend({
},
showCreatedAt() {
- alert(new Date(this.file.createdAt).toLocaleString());
+ this.$root.dialog({
+ type: 'info',
+ text: (new Date(this.file.createdAt)).toLocaleString()
+ });
}
}
});
@@ -150,11 +153,13 @@ export default Vue.extend({
> .preview
width fit-content
+ width -moz-fit-content
max-width 100%
margin 0 auto
box-shadow 1px 1px 4px rgba(#000, 0.2)
overflow hidden
color var(--driveFileIcon)
+ justify-content center
> footer
padding 8px 8px 0 8px
diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue
index 6b26cdf890..82cbdcc547 100644
--- a/src/client/app/mobile/views/components/post-form.vue
+++ b/src/client/app/mobile/views/components/post-form.vue
@@ -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
});
diff --git a/src/client/app/mobile/views/pages/favorites.vue b/src/client/app/mobile/views/pages/favorites.vue
index 6f175a0053..92823db7cc 100644
--- a/src/client/app/mobile/views/pages/favorites.vue
+++ b/src/client/app/mobile/views/pages/favorites.vue
@@ -32,7 +32,7 @@ export default Vue.extend({
this.fetch();
},
mounted() {
- document.title = `${this.$root.instanceName} | %i18n:@notifications%`;
+ document.title = `${this.$root.instanceName} | ${this.$t('@.favorites')}`;
},
methods: {
fetch() {
diff --git a/src/client/app/mobile/views/pages/games/reversi.vue b/src/client/app/mobile/views/pages/games/reversi.vue
index c67e3fadd1..69b7bdffb4 100644
--- a/src/client/app/mobile/views/pages/games/reversi.vue
+++ b/src/client/app/mobile/views/pages/games/reversi.vue
@@ -15,7 +15,7 @@ export default Vue.extend({
XReversi: () => import('../../../../common/views/components/games/reversi/reversi.vue').then(m => m.default)
},
mounted() {
- document.title = `${this.$root.instanceName} %i18n:@reversi%`;
+ document.title = `${this.$root.instanceName} | ${this.$t('reversi')}`;
},
methods: {
nav(game, actualNav) {
diff --git a/src/client/app/mobile/views/pages/search.vue b/src/client/app/mobile/views/pages/search.vue
index f4b2512809..0225dd9e9f 100644
--- a/src/client/app/mobile/views/pages/search.vue
+++ b/src/client/app/mobile/views/pages/search.vue
@@ -50,7 +50,7 @@ export default Vue.extend({
}
},
mounted() {
- document.title = `%i18n:@search%: ${this.q} | ${this.$root.instanceName}`;
+ document.title = `${this.$t('search')}: ${this.q} | ${this.$root.instanceName}`;
},
methods: {
inited() {
diff --git a/src/client/app/mobile/views/pages/widgets.vue b/src/client/app/mobile/views/pages/widgets.vue
index 2647f96de2..33166825cb 100644
--- a/src/client/app/mobile/views/pages/widgets.vue
+++ b/src/client/app/mobile/views/pages/widgets.vue
@@ -29,7 +29,8 @@
</header>
<x-draggable
:list="widgets"
- :options="{ handle: '.handle', animation: 150 }"
+ handle=".handle"
+ animation="150"
@sort="onWidgetSort"
>
<div v-for="widget in widgets" class="customize-container" :key="widget.id">
@@ -106,7 +107,10 @@ export default Vue.extend({
methods: {
hint() {
- alert(this.$t('widgets-hints'));
+ this.$root.dialog({
+ type: 'info',
+ text: this.$t('widgets-hints')
+ });
},
widgetFunc(id) {