mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-24 16:26:44 -06:00
Adminページのユーザー一覧フィルターに利用可能アカウントを追加 (#5430)
* Adminページのユーザー一覧フィルターにアクティブアカウントを追加 * validator update * availableに
This commit is contained in:
parent
1b7454ca77
commit
61642539b1
3 changed files with 4 additions and 0 deletions
|
@ -1547,6 +1547,7 @@ admin/views/users.vue:
|
|||
state:
|
||||
title: "状態"
|
||||
all: "すべて"
|
||||
available: "利用可能"
|
||||
admin: "管理者"
|
||||
moderator: "モデレーター"
|
||||
adminOrModerator: "管理者+モデレーター"
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
<ui-select v-model="state">
|
||||
<template #label>{{ $t('users.state.title') }}</template>
|
||||
<option value="all">{{ $t('users.state.all') }}</option>
|
||||
<option value="available">{{ $t('users.state.available') }}</option>
|
||||
<option value="admin">{{ $t('users.state.admin') }}</option>
|
||||
<option value="moderator">{{ $t('users.state.moderator') }}</option>
|
||||
<option value="silenced">{{ $t('users.state.silenced') }}</option>
|
||||
|
|
|
@ -33,6 +33,7 @@ export const meta = {
|
|||
state: {
|
||||
validator: $.optional.str.or([
|
||||
'all',
|
||||
'available',
|
||||
'admin',
|
||||
'moderator',
|
||||
'adminOrModerator',
|
||||
|
@ -67,6 +68,7 @@ export default define(meta, async (ps, me) => {
|
|||
const query = Users.createQueryBuilder('user');
|
||||
|
||||
switch (ps.state) {
|
||||
case 'available': query.where('user.isSuspended = FALSE'); break;
|
||||
case 'admin': query.where('user.isAdmin = TRUE'); break;
|
||||
case 'moderator': query.where('user.isModerator = TRUE'); break;
|
||||
case 'adminOrModerator': query.where('user.isAdmin = TRUE OR isModerator = TRUE'); break;
|
||||
|
|
Loading…
Reference in a new issue