このコミットが含まれているのは:
2026-06-28 05:59:44 +09:00
コミット 283c20b9da
4個のファイルの変更36行の追加53行の削除
+1
ファイルの表示
@@ -58,6 +58,7 @@ export const menuOutline = (
{ name: '素材', to: '/materials', visible: true, subMenu: [
{ name: '一覧', to: '/materials' },
{ name: '追加', to: '/materials/new' },
{ name: '抑止', to: '/materials/suppressions' },
{ name: '全体履歴', to: '/materials/changes' },
{ name: 'ヘルプ', to: '/wiki/ヘルプ:素材管理' },
{ component: <Separator/>, visible: materialFlg },
+4 -9
ファイルの表示
@@ -127,17 +127,12 @@ const MaterialDetailPage: FC = () => {
<audio src={material.file} controls/>)))}
<TabGroup>
<Tab name="Wiki">
{material.tag
? (
{material.tag && (
<Tab name="Wiki">
<WikiBody
title={material.tag.name}
body={material.wikiPageBody ?? undefined}/>)
: (
<p className="text-stone-700 dark:text-stone-300">
</p>)}
</Tab>
body={material.wikiPageBody ?? undefined}/>
</Tab>)}
<Tab name="編輯">
<div className="max-w-wl space-y-4 pt-2">
+6 -20
ファイルの表示
@@ -41,16 +41,16 @@ const MEDIA_FILTER_LABELS: Record<MaterialIndexMediaKind, string> = {
video: '動画',
audio: '音声',
file_other: 'その他ファイル',
url_only: 'URL のみ'}
url_only: '外部リンクのみ'}
const SORT_LABELS: Record<MaterialIndexSort, string> = {
created_at: '作成日時',
updated_at: '更新日時',
tag_name: 'タグ名',
media_kind: '種類',
file_byte_size: 'ファイルサイズ',
version_no: 'バージョン',
id: 'ID'}
file_byte_size: '容量',
version_no: '',
id: 'Id.'}
const setIf = (qs: URLSearchParams, key: string, value: string | null) => {
@@ -409,21 +409,7 @@ const MaterialListPage: FC = () => {
<div className="flex flex-wrap items-center justify-between gap-3">
<PageTitle className="my-auto"></PageTitle>
<div className="flex flex-wrap gap-2">
<PrefetchLink
to="/materials/new"
className="rounded-full border border-stone-300 bg-white px-4 py-2 text-sm
text-stone-900 hover:bg-stone-100 dark:border-stone-700
dark:bg-stone-900 dark:text-stone-100 dark:hover:bg-stone-800">
</PrefetchLink>
<PrefetchLink
to="/materials/suppressions"
className="rounded-full border border-stone-300 bg-white px-4 py-2 text-sm
text-stone-900 hover:bg-stone-100 dark:border-stone-700
dark:bg-stone-900 dark:text-stone-100 dark:hover:bg-stone-800">
</PrefetchLink>
<a
{/* <a
href={`${ API_BASE_URL }/materials/download.zip?profile=legacy_drive`}
target="_blank"
rel="noopener noreferrer"
@@ -431,7 +417,7 @@ const MaterialListPage: FC = () => {
text-stone-900 hover:bg-stone-100 dark:border-stone-700
dark:bg-stone-900 dark:text-stone-100 dark:hover:bg-stone-800">
ZIP をダウンロード
</a>
</a> */}
</div>
</div>
+25 -24
ファイルの表示
@@ -9,10 +9,7 @@ import MainArea from '@/components/layout/MainArea'
import { Button } from '@/components/ui/button'
import { toast } from '@/components/ui/use-toast'
import { SITE_TITLE } from '@/config'
import {
createMaterialSyncSuppression,
fetchMaterialSyncSuppressions,
} from '@/lib/materials'
import { createMaterialSyncSuppression, fetchMaterialSyncSuppressions } from '@/lib/materials'
import { materialsKeys } from '@/lib/queryKeys'
import { dateString, inputClass } from '@/lib/utils'
@@ -22,11 +19,11 @@ import type { MaterialSyncSuppressionSourceKind } from '@/types'
const SOURCE_KIND_LABELS: Record<MaterialSyncSuppressionSourceKind, string> = {
uri: 'URI',
google_drive_path: 'Google Drive path',
google_drive_path_prefix: 'Google Drive path prefix',
google_drive_file: 'Google Drive file ID',
legacy_drive_path: 'Legacy Drive path',
legacy_drive_path_prefix: 'Legacy Drive path prefix'}
google_drive_path: 'Google Drive ファイル',
google_drive_path_prefix: 'Google Drive フォルダ',
google_drive_file: 'Google Drive ファイル Id.',
legacy_drive_path: '汎用ファイル',
legacy_drive_path_prefix: '汎用フォルダ' }
const REASONS = [
'copyright_high_risk',
@@ -38,6 +35,16 @@ const REASONS = [
'source_owner_request',
'other']
const REASON_NAMES = {
['copyright_high_risk']: '著作権への懸念',
['copyright_takedown']: '著作者からの申出',
['adult_or_sensitive']: '成人向け',
['personal_information']: '個人情報',
['malware_or_dangerous_file']: '危険なソフトウェア',
['duplicate_or_low_quality']: '重複',
['source_owner_request']: '同期元管理者からの申出',
['other']: 'その他' }
const MaterialSyncSuppressionsPage: FC = () => {
const qc = useQueryClient ()
@@ -82,18 +89,11 @@ const MaterialSyncSuppressionsPage: FC = () => {
return (
<MainArea>
<Helmet>
<title>{`同期抑止 | ${ SITE_TITLE }`}</title>
<title>{`素材同期抑止 | ${ SITE_TITLE }`}</title>
</Helmet>
<div className="space-y-5">
<div className="flex flex-wrap items-center justify-between gap-3">
<PageTitle></PageTitle>
<PrefetchLink
to="/materials"
className="text-sm text-sky-700 underline underline-offset-2 dark:text-sky-300">
</PrefetchLink>
</div>
<PageTitle></PageTitle>
<form
onSubmit={handleSubmit}
@@ -115,7 +115,7 @@ const MaterialSyncSuppressionsPage: FC = () => {
</select>)}
</FormField>
<FormField label="Source URI">
<FormField label="同期元 URI">
{({ invalid }) => (
<input
type="text"
@@ -124,7 +124,7 @@ const MaterialSyncSuppressionsPage: FC = () => {
className={inputClass (invalid)}/>)}
</FormField>
<FormField label="Drive path">
<FormField label="Google Drive パス">
{({ invalid }) => (
<input
type="text"
@@ -133,7 +133,7 @@ const MaterialSyncSuppressionsPage: FC = () => {
className={inputClass (invalid)}/>)}
</FormField>
<FormField label="Drive file ID">
<FormField label="Google Drive ファイル Id.">
{({ invalid }) => (
<input
type="text"
@@ -142,7 +142,7 @@ const MaterialSyncSuppressionsPage: FC = () => {
className={inputClass (invalid)}/>)}
</FormField>
<FormField label="由">
<FormField label="由">
{({ invalid }) => (
<select
value={reason}
@@ -150,7 +150,7 @@ const MaterialSyncSuppressionsPage: FC = () => {
className={inputClass (invalid)}>
{REASONS.map (value => (
<option key={value} value={value}>
{value}
{REASON_NAMES[value]}
</option>))}
</select>)}
</FormField>
@@ -185,7 +185,8 @@ const MaterialSyncSuppressionsPage: FC = () => {
{suppression.normalizedSourceKey}
</div>
<div className="mt-2 text-sm text-stone-600 dark:text-stone-400">
: {suppression.reason} / : {dateString (suppression.createdAt)}
: {REASON_NAMES[suppression.reason]} /
: {dateString (suppression.createdAt)}
</div>
</article>))}
</div>