From c9b22d346be99a2bd04b7b5520c1a7201ee5a4ed Mon Sep 17 00:00:00 2001 From: miteruzo Date: Sun, 28 Jun 2026 06:35:07 +0900 Subject: [PATCH] #306 --- .../pages/materials/MaterialListPage.test.tsx | 4 ---- .../src/pages/materials/MaterialListPage.tsx | 3 ++- .../MaterialSyncSuppressionsPage.tsx | 19 ++++++++++++------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/frontend/src/pages/materials/MaterialListPage.test.tsx b/frontend/src/pages/materials/MaterialListPage.test.tsx index cd80f73..663921d 100644 --- a/frontend/src/pages/materials/MaterialListPage.test.tsx +++ b/frontend/src/pages/materials/MaterialListPage.test.tsx @@ -34,10 +34,6 @@ describe ('MaterialListPage', () => { ) }) expect (await screen.findByText ('素材はありません。')).toBeInTheDocument () - expect (screen.getByRole ('link', { name: '新規素材を追加' })).toHaveAttribute ( - 'href', - '/materials/new', - ) }) it ('shows materials in the default card view', async () => { diff --git a/frontend/src/pages/materials/MaterialListPage.tsx b/frontend/src/pages/materials/MaterialListPage.tsx index 8560d3d..9629733 100644 --- a/frontend/src/pages/materials/MaterialListPage.tsx +++ b/frontend/src/pages/materials/MaterialListPage.tsx @@ -10,7 +10,7 @@ import FormField from '@/components/common/FormField' import PageTitle from '@/components/common/PageTitle' import Pagination from '@/components/common/Pagination' import MainArea from '@/components/layout/MainArea' -import { API_BASE_URL, SITE_TITLE } from '@/config' +import { SITE_TITLE } from '@/config' import { fetchMaterials, parseMaterialFilter } from '@/lib/materials' import { materialsKeys } from '@/lib/queryKeys' import { dateString, inputClass } from '@/lib/utils' @@ -409,6 +409,7 @@ const MaterialListPage: FC = () => {
素材管理
+ {/* TODO: 局所出力を可能にする */} {/* = { ['copyright_high_risk']: '著作権への懸念', ['copyright_takedown']: '著作者からの申出', ['adult_or_sensitive']: '成人向け', @@ -43,7 +44,11 @@ const REASON_NAMES = { ['malware_or_dangerous_file']: '危険なソフトウェア', ['duplicate_or_low_quality']: '重複', ['source_owner_request']: '同期元管理者からの申出', - ['other']: 'その他' } + ['other']: 'その他' } as const + + +const reasonName = (reason: string): string => + REASON_NAMES[reason as MaterialSyncSuppressionReason] ?? reason const MaterialSyncSuppressionsPage: FC = () => { @@ -53,7 +58,7 @@ const MaterialSyncSuppressionsPage: FC = () => { const [sourceUri, setSourceUri] = useState ('') const [drivePath, setDrivePath] = useState ('') const [driveFileId, setDriveFileId] = useState ('') - const [reason, setReason] = useState (REASONS[0]) + const [reason, setReason] = useState (REASONS[0]) const { data, isError, isLoading } = useQuery ({ queryKey: materialsKeys.suppressions (), @@ -146,7 +151,7 @@ const MaterialSyncSuppressionsPage: FC = () => { {({ invalid }) => (