diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-12-02 15:28:52 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-12-02 15:28:52 +0900 |
| commit | c9ac9923dfc68478a6f01675757104d98b9435d0 (patch) | |
| tree | 09599bca4e01bb4f3e4b05c435da2b9d8de7faa6 /src/client/app/admin | |
| parent | [Client] Resolve #2225 (diff) | |
| download | misskey-c9ac9923dfc68478a6f01675757104d98b9435d0.tar.gz misskey-c9ac9923dfc68478a6f01675757104d98b9435d0.tar.bz2 misskey-c9ac9923dfc68478a6f01675757104d98b9435d0.zip | |
Refactor: rename alert to dialog
Diffstat (limited to 'src/client/app/admin')
| -rw-r--r-- | src/client/app/admin/views/announcements.vue | 8 | ||||
| -rw-r--r-- | src/client/app/admin/views/emoji.vue | 14 | ||||
| -rw-r--r-- | src/client/app/admin/views/instance.vue | 6 | ||||
| -rw-r--r-- | src/client/app/admin/views/moderators.vue | 4 | ||||
| -rw-r--r-- | src/client/app/admin/views/users.vue | 22 |
5 files changed, 27 insertions, 27 deletions
diff --git a/src/client/app/admin/views/announcements.vue b/src/client/app/admin/views/announcements.vue index 42e926af4d..8fc8ad4ceb 100644 --- a/src/client/app/admin/views/announcements.vue +++ b/src/client/app/admin/views/announcements.vue @@ -48,7 +48,7 @@ export default Vue.extend({ }, remove(i) { - this.$root.alert({ + this.$root.dialog({ type: 'warning', text: this.$t('_remove.are-you-sure').replace('$1', this.announcements.find((_, j) => j == i).title), showCancelButton: true @@ -56,7 +56,7 @@ export default Vue.extend({ if (!res) return; this.announcements = this.announcements.filter((_, j) => j !== i); this.save(true); - this.$root.alert({ + this.$root.dialog({ type: 'success', text: this.$t('_remove.removed') }); @@ -68,13 +68,13 @@ export default Vue.extend({ broadcasts: this.announcements }).then(() => { if (!silent) { - this.$root.alert({ + this.$root.dialog({ type: 'success', text: this.$t('saved') }); } }).catch(e => { - this.$root.alert({ + this.$root.dialog({ type: 'error', text: e }); diff --git a/src/client/app/admin/views/emoji.vue b/src/client/app/admin/views/emoji.vue index 31c6b0ebfc..0dcc421613 100644 --- a/src/client/app/admin/views/emoji.vue +++ b/src/client/app/admin/views/emoji.vue @@ -75,13 +75,13 @@ export default Vue.extend({ url: this.url, aliases: this.aliases.split(' ').filter(x => x.length > 0) }).then(() => { - this.$root.alert({ + this.$root.dialog({ type: 'success', text: this.$t('add-emoji.added') }); this.fetchEmojis(); }).catch(e => { - this.$root.alert({ + this.$root.dialog({ type: 'error', text: e }); @@ -103,12 +103,12 @@ export default Vue.extend({ url: emoji.url, aliases: emoji.aliases.split(' ').filter(x => x.length > 0) }).then(() => { - this.$root.alert({ + this.$root.dialog({ type: 'success', text: this.$t('updated') }); }).catch(e => { - this.$root.alert({ + this.$root.dialog({ type: 'error', text: e }); @@ -116,7 +116,7 @@ export default Vue.extend({ }, removeEmoji(emoji) { - this.$root.alert({ + this.$root.dialog({ type: 'warning', text: this.$t('remove-emoji.are-you-sure').replace('$1', emoji.name), showCancelButton: true @@ -126,13 +126,13 @@ export default Vue.extend({ this.$root.api('admin/emoji/remove', { id: emoji.id }).then(() => { - this.$root.alert({ + this.$root.dialog({ type: 'success', text: this.$t('remove-emoji.removed') }); this.fetchEmojis(); }).catch(e => { - this.$root.alert({ + this.$root.dialog({ type: 'error', text: e }); diff --git a/src/client/app/admin/views/instance.vue b/src/client/app/admin/views/instance.vue index 05de9b1c06..cf9b018208 100644 --- a/src/client/app/admin/views/instance.vue +++ b/src/client/app/admin/views/instance.vue @@ -212,7 +212,7 @@ export default Vue.extend({ this.$root.api('admin/invite').then(x => { this.inviteCode = x.code; }).catch(e => { - this.$root.alert({ + this.$root.dialog({ type: 'error', text: e }); @@ -258,12 +258,12 @@ export default Vue.extend({ smtpUser: this.smtpUser, smtpPass: this.smtpPass }).then(() => { - this.$root.alert({ + this.$root.dialog({ type: 'success', text: this.$t('saved') }); }).catch(e => { - this.$root.alert({ + this.$root.dialog({ type: 'error', text: e }); diff --git a/src/client/app/admin/views/moderators.vue b/src/client/app/admin/views/moderators.vue index ba9417d969..296c553bb7 100644 --- a/src/client/app/admin/views/moderators.vue +++ b/src/client/app/admin/views/moderators.vue @@ -34,14 +34,14 @@ export default Vue.extend({ const process = async () => { const user = await this.$root.api('users/show', parseAcct(this.username)); await this.$root.api('admin/moderators/add', { userId: user.id }); - this.$root.alert({ + this.$root.dialog({ type: 'success', text: this.$t('add-moderator.added') }); }; await process().catch(e => { - this.$root.alert({ + this.$root.dialog({ type: 'error', text: e.toString() }); diff --git a/src/client/app/admin/views/users.vue b/src/client/app/admin/views/users.vue index 40daed7b04..ac2991c519 100644 --- a/src/client/app/admin/views/users.vue +++ b/src/client/app/admin/views/users.vue @@ -115,12 +115,12 @@ export default Vue.extend({ return await this.$root.api('users/show', this.target.startsWith('@') ? parseAcct(this.target) : { userId: this.target }); } catch (e) { if (e == 'user not found') { - this.$root.alert({ + this.$root.dialog({ type: 'error', text: this.$t('user-not-found') }); } else { - this.$root.alert({ + this.$root.dialog({ type: 'error', text: e.toString() }); @@ -138,7 +138,7 @@ export default Vue.extend({ async resetPassword() { const user = await this.fetchUser(); this.$root.api('admin/reset-password', { userId: user.id }).then(res => { - this.$root.alert({ + this.$root.dialog({ type: 'success', text: this.$t('password-updated', { password: res.password }) }); @@ -151,14 +151,14 @@ export default Vue.extend({ const process = async () => { const user = await this.fetchUser(); await this.$root.api('admin/verify-user', { userId: user.id }); - this.$root.alert({ + this.$root.dialog({ type: 'success', text: this.$t('verified') }); }; await process().catch(e => { - this.$root.alert({ + this.$root.dialog({ type: 'error', text: e.toString() }); @@ -173,14 +173,14 @@ export default Vue.extend({ const process = async () => { const user = await this.fetchUser(); await this.$root.api('admin/unverify-user', { userId: user.id }); - this.$root.alert({ + this.$root.dialog({ type: 'success', text: this.$t('unverified') }); }; await process().catch(e => { - this.$root.alert({ + this.$root.dialog({ type: 'error', text: e.toString() }); @@ -195,14 +195,14 @@ export default Vue.extend({ const process = async () => { const user = await this.fetchUser(); await this.$root.api('admin/suspend-user', { userId: user.id }); - this.$root.alert({ + this.$root.dialog({ type: 'success', text: this.$t('suspended') }); }; await process().catch(e => { - this.$root.alert({ + this.$root.dialog({ type: 'error', text: e.toString() }); @@ -217,14 +217,14 @@ export default Vue.extend({ const process = async () => { const user = await this.fetchUser(); await this.$root.api('admin/unsuspend-user', { userId: user.id }); - this.$root.alert({ + this.$root.dialog({ type: 'success', text: this.$t('unsuspended') }); }; await process().catch(e => { - this.$root.alert({ + this.$root.dialog({ type: 'error', text: e.toString() }); |