mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-29 03:28:29 +01:00
Improve usability
This commit is contained in:
parent
b2f8003602
commit
562a5f66fc
2 changed files with 16 additions and 31 deletions
|
@ -1148,13 +1148,11 @@ admin/views/users.vue:
|
||||||
suspend-user: "ユーザーの凍結"
|
suspend-user: "ユーザーの凍結"
|
||||||
suspend: "凍結"
|
suspend: "凍結"
|
||||||
suspended: "凍結しました"
|
suspended: "凍結しました"
|
||||||
unsuspend-user: "ユーザーの凍結の解除"
|
|
||||||
unsuspend: "凍結の解除"
|
unsuspend: "凍結の解除"
|
||||||
unsuspended: "凍結を解除しました"
|
unsuspended: "凍結を解除しました"
|
||||||
verify-user: "ユーザーの公式アカウント設定"
|
verify-user: "ユーザーの公式アカウント設定"
|
||||||
verify: "公式アカウントにする"
|
verify: "公式アカウントにする"
|
||||||
verified: "公式アカウントにしました"
|
verified: "公式アカウントにしました"
|
||||||
unverify-user: "ユーザーの公式アカウント解除"
|
|
||||||
unverify: "公式アカウントを解除する"
|
unverify: "公式アカウントを解除する"
|
||||||
unverified: "公式アカウントを解除しました"
|
unverified: "公式アカウントを解除しました"
|
||||||
|
|
||||||
|
|
|
@ -1,42 +1,28 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="ucnffhbtogqgscfmqcymwmmupoknpfsw">
|
<div class="ucnffhbtogqgscfmqcymwmmupoknpfsw">
|
||||||
<ui-card>
|
<ui-card>
|
||||||
<div slot="title">{{ $t('verify-user') }}</div>
|
<div slot="title"><fa :icon="faCertificate"/> {{ $t('verify-user') }}</div>
|
||||||
<section class="fit-top">
|
<section class="fit-top">
|
||||||
<ui-input v-model="verifyUsername" type="text">
|
<ui-input v-model="verifyUsername" type="text">
|
||||||
<span slot="prefix">@</span>
|
<span slot="prefix">@</span>
|
||||||
</ui-input>
|
</ui-input>
|
||||||
<ui-button @click="verifyUser" :disabled="verifying">{{ $t('verify') }}</ui-button>
|
<ui-horizon-group>
|
||||||
|
<ui-button @click="verifyUser" :disabled="verifying">{{ $t('verify') }}</ui-button>
|
||||||
|
<ui-button @click="unverifyUser" :disabled="unverifying">{{ $t('unverify') }}</ui-button>
|
||||||
|
</ui-horizon-group>
|
||||||
</section>
|
</section>
|
||||||
</ui-card>
|
</ui-card>
|
||||||
|
|
||||||
<ui-card>
|
<ui-card>
|
||||||
<div slot="title">{{ $t('unverify-user') }}</div>
|
<div slot="title"><fa :icon="faSnowflake"/> {{ $t('suspend-user') }}</div>
|
||||||
<section class="fit-top">
|
|
||||||
<ui-input v-model="unverifyUsername" type="text">
|
|
||||||
<span slot="prefix">@</span>
|
|
||||||
</ui-input>
|
|
||||||
<ui-button @click="unverifyUser" :disabled="unverifying">{{ $t('unverify') }}</ui-button>
|
|
||||||
</section>
|
|
||||||
</ui-card>
|
|
||||||
|
|
||||||
<ui-card>
|
|
||||||
<div slot="title">{{ $t('suspend-user') }}</div>
|
|
||||||
<section class="fit-top">
|
<section class="fit-top">
|
||||||
<ui-input v-model="suspendUsername" type="text">
|
<ui-input v-model="suspendUsername" type="text">
|
||||||
<span slot="prefix">@</span>
|
<span slot="prefix">@</span>
|
||||||
</ui-input>
|
</ui-input>
|
||||||
<ui-button @click="suspendUser" :disabled="suspending">{{ $t('suspend') }}</ui-button>
|
<ui-horizon-group>
|
||||||
</section>
|
<ui-button @click="suspendUser" :disabled="suspending">{{ $t('suspend') }}</ui-button>
|
||||||
</ui-card>
|
<ui-button @click="unsuspendUser" :disabled="unsuspending">{{ $t('unsuspend') }}</ui-button>
|
||||||
|
</ui-horizon-group>
|
||||||
<ui-card>
|
|
||||||
<div slot="title">{{ $t('unsuspend-user') }}</div>
|
|
||||||
<section class="fit-top">
|
|
||||||
<ui-input v-model="unsuspendUsername" type="text">
|
|
||||||
<span slot="prefix">@</span>
|
|
||||||
</ui-input>
|
|
||||||
<ui-button @click="unsuspendUser" :disabled="unsuspending">{{ $t('unsuspend') }}</ui-button>
|
|
||||||
</section>
|
</section>
|
||||||
</ui-card>
|
</ui-card>
|
||||||
</div>
|
</div>
|
||||||
|
@ -46,6 +32,8 @@
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import i18n from '../../i18n';
|
import i18n from '../../i18n';
|
||||||
import parseAcct from "../../../../misc/acct/parse";
|
import parseAcct from "../../../../misc/acct/parse";
|
||||||
|
import { faCertificate } from '@fortawesome/free-solid-svg-icons';
|
||||||
|
import { faSnowflake } from '@fortawesome/free-regular-svg-icons';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
i18n: i18n('admin/views/users.vue'),
|
i18n: i18n('admin/views/users.vue'),
|
||||||
|
@ -54,12 +42,11 @@ export default Vue.extend({
|
||||||
return {
|
return {
|
||||||
verifyUsername: null,
|
verifyUsername: null,
|
||||||
verifying: false,
|
verifying: false,
|
||||||
unverifyUsername: null,
|
|
||||||
unverifying: false,
|
unverifying: false,
|
||||||
suspendUsername: null,
|
suspendUsername: null,
|
||||||
suspending: false,
|
suspending: false,
|
||||||
unsuspendUsername: null,
|
unsuspending: false,
|
||||||
unsuspending: false
|
faCertificate, faSnowflake
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -90,7 +77,7 @@ export default Vue.extend({
|
||||||
this.unverifying = true;
|
this.unverifying = true;
|
||||||
|
|
||||||
const process = async () => {
|
const process = async () => {
|
||||||
const user = await this.$root.api('users/show', parseAcct(this.unverifyUsername));
|
const user = await this.$root.api('users/show', parseAcct(this.verifyUsername));
|
||||||
await this.$root.api('admin/unverify-user', { userId: user.id });
|
await this.$root.api('admin/unverify-user', { userId: user.id });
|
||||||
this.$root.alert({
|
this.$root.alert({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
@ -134,7 +121,7 @@ export default Vue.extend({
|
||||||
this.unsuspending = true;
|
this.unsuspending = true;
|
||||||
|
|
||||||
const process = async () => {
|
const process = async () => {
|
||||||
const user = await this.$root.api('users/show', parseAcct(this.unsuspendUsername));
|
const user = await this.$root.api('users/show', parseAcct(this.suspendUsername));
|
||||||
await this.$root.api('admin/unsuspend-user', { userId: user.id });
|
await this.$root.api('admin/unsuspend-user', { userId: user.id });
|
||||||
this.$root.alert({
|
this.$root.alert({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
|
Loading…
Reference in a new issue