From 168de3c31674048856399faf549fcadbe7b4bf02 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 9 May 2019 23:27:34 +0900 Subject: [PATCH] Resolve #4870 --- locales/ja-JP.yml | 9 --- src/client/app/admin/views/users.user.vue | 2 - src/client/app/admin/views/users.vue | 61 +------------------ .../common/views/components/note-header.vue | 5 -- src/client/app/common/views/pages/explore.vue | 9 --- src/models/entities/user.ts | 5 -- src/models/repositories/user.ts | 5 -- src/server/api/endpoints/admin/show-users.ts | 2 - .../api/endpoints/admin/unverify-user.ts | 38 ------------ src/server/api/endpoints/admin/verify-user.ts | 38 ------------ src/server/api/endpoints/users.ts | 2 - 11 files changed, 2 insertions(+), 174 deletions(-) delete mode 100644 src/server/api/endpoints/admin/unverify-user.ts delete mode 100644 src/server/api/endpoints/admin/verify-user.ts diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index c9f7436a9e..f1cfec046a 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -263,7 +263,6 @@ common: update-available-title: "更新があります" update-available: "Misskeyの新しいバージョンがあります({newer}。現在{current}を利用中)。ページを再度読み込みすると更新が適用されます。" my-token-regenerated: "あなたのトークンが更新されたのでサインアウトします。" - verified-user: "公式アカウント" hide-password: "パスワードを隠す" show-password: "パスワードを表示する" @@ -339,7 +338,6 @@ auth/views/index.vue: sign-in: "サインインしてください" common/views/pages/explore.vue: - verified-users: "公式アカウント" popular-users: "人気のユーザー" recently-updated-users: "最近投稿したユーザー" recently-registered-users: "新規ユーザー" @@ -1351,12 +1349,6 @@ admin/views/users.vue: silence-confirm: "サイレンスしますか?" unmake-silence: "サイレンスの解除" unsilence-confirm: "サイレンスを解除しますか?" - verify: "公式アカウントにする" - verify-confirm: "公式アカウントにしますか?" - verified: "公式アカウントにしました" - unverify: "公式アカウントを解除する" - unverify-confirm: "公式アカウントを解除しますか?" - unverified: "公式アカウントを解除しました" update-remote-user: "リモートユーザー情報の更新" remote-user-updated: "リモートユーザー情報を更新しました" users: @@ -1373,7 +1365,6 @@ admin/views/users.vue: admin: "管理者" moderator: "モデレーター" adminOrModerator: "管理者+モデレーター" - verified: "公式アカウント" silenced: "サイレンス済み" suspended: "凍結済み" origin: diff --git a/src/client/app/admin/views/users.user.vue b/src/client/app/admin/views/users.user.vue index 096e017e6a..929fc8f4b3 100644 --- a/src/client/app/admin/views/users.user.vue +++ b/src/client/app/admin/views/users.user.vue @@ -11,7 +11,6 @@ @{{ user | acct }} admin moderator - @@ -77,7 +76,6 @@ export default Vue.extend({ background var(--noteHeaderAdminBg) color var(--noteHeaderAdminFg) - > .is-verified > .is-silenced > .is-suspended margin 0 0 0 .5em diff --git a/src/client/app/admin/views/users.vue b/src/client/app/admin/views/users.vue index 2d6aef3371..cc38108532 100644 --- a/src/client/app/admin/views/users.vue +++ b/src/client/app/admin/views/users.vue @@ -12,10 +12,6 @@
{{ $t('reset-password') }} - - {{ $t('verify') }} - {{ $t('unverify') }} - {{ $t('make-silence') }} {{ $t('unmake-silence') }} @@ -47,7 +43,6 @@ - @@ -71,7 +66,7 @@ import Vue from 'vue'; import i18n from '../../i18n'; import parseAcct from "../../../../misc/acct/parse"; -import { faCertificate, faUsers, faTerminal, faSearch, faKey, faSync, faMicrophoneSlash } from '@fortawesome/free-solid-svg-icons'; +import { faUsers, faTerminal, faSearch, faKey, faSync, faMicrophoneSlash } from '@fortawesome/free-solid-svg-icons'; import { faSnowflake } from '@fortawesome/free-regular-svg-icons'; import XUser from './users.user.vue'; @@ -84,8 +79,6 @@ export default Vue.extend({ return { user: null, target: null, - verifying: false, - unverifying: false, suspending: false, unsuspending: false, sort: '+createdAt', @@ -95,7 +88,7 @@ export default Vue.extend({ offset: 0, users: [], existMore: false, - faTerminal, faCertificate, faUsers, faSnowflake, faSearch, faKey, faSync, faMicrophoneSlash + faTerminal, faUsers, faSnowflake, faSearch, faKey, faSync, faMicrophoneSlash }; }, @@ -181,56 +174,6 @@ export default Vue.extend({ }); }, - async verifyUser() { - if (!await this.getConfirmed(this.$t('verify-confirm'))) return; - - this.verifying = true; - - const process = async () => { - await this.$root.api('admin/verify-user', { userId: this.user.id }); - this.$root.dialog({ - type: 'success', - text: this.$t('verified') - }); - }; - - await process().catch(e => { - this.$root.dialog({ - type: 'error', - text: e.toString() - }); - }); - - this.verifying = false; - - this.refreshUser(); - }, - - async unverifyUser() { - if (!await this.getConfirmed(this.$t('unverify-confirm'))) return; - - this.unverifying = true; - - const process = async () => { - await this.$root.api('admin/unverify-user', { userId: this.user.id }); - this.$root.dialog({ - type: 'success', - text: this.$t('unverified') - }); - }; - - await process().catch(e => { - this.$root.dialog({ - type: 'error', - text: e.toString() - }); - }); - - this.unverifying = false; - - this.refreshUser(); - }, - async silenceUser() { if (!await this.getConfirmed(this.$t('silence-confirm'))) return; diff --git a/src/client/app/common/views/components/note-header.vue b/src/client/app/common/views/components/note-header.vue index 26c9c7b7d8..a72863e1dd 100644 --- a/src/client/app/common/views/components/note-header.vue +++ b/src/client/app/common/views/components/note-header.vue @@ -8,7 +8,6 @@ bot cat -
via {{ note.app.name }} @@ -95,10 +94,6 @@ export default Vue.extend({ color var(--noteHeaderAcct) flex-shrink 2147483647 - > .is-verified - margin 0 .5em 0 0 - color #4dabf7 - > .info margin-left auto font-size 0.9em diff --git a/src/client/app/common/views/pages/explore.vue b/src/client/app/common/views/pages/explore.vue index de31ca36c4..107603d69e 100644 --- a/src/client/app/common/views/pages/explore.vue +++ b/src/client/app/common/views/pages/explore.vue @@ -26,9 +26,6 @@