From d72f8783526c512234fbe10ea42f42c027d3d198 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Mon, 30 Dec 2024 02:12:43 +0800 Subject: [PATCH] feat: add filter for usage in admin --- server/admin/src/client/resources/file.tsx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/server/admin/src/client/resources/file.tsx b/server/admin/src/client/resources/file.tsx index a4e8de180be..afe7604e48c 100644 --- a/server/admin/src/client/resources/file.tsx +++ b/server/admin/src/client/resources/file.tsx @@ -2,6 +2,7 @@ import filesize from 'filesize'; import React, { useState } from 'react'; import { createTextField, + createSelectField, ListTable, useAsync, useTranslation, @@ -48,6 +49,26 @@ export const FileList: React.FC = React.memo(() => { createTextField('q', { label: 'Search', }), + createSelectField('usage', { + label: 'Usage', + items: [ + { + value: 'chat', + }, + { + value: 'group', + }, + { + value: 'user', + }, + { + value: 'server', + }, + { + value: 'unknown', + }, + ], + }), ]} tableProps={{ scroll: {