このコミットが含まれているのは:
@@ -148,7 +148,8 @@ class PostsController < ApplicationController
|
||||
original_created_from: params[:original_created_from],
|
||||
original_created_before: params[:original_created_before],
|
||||
parent_post_ids: parse_parent_post_ids,
|
||||
video_ms: params[:video_ms] }).create!
|
||||
video_ms: params[:video_ms],
|
||||
duration: params[:duration] }).create!
|
||||
|
||||
post.reload
|
||||
render json: PostRepr.base(post), status: :created
|
||||
|
||||
@@ -18,7 +18,7 @@ import type { FC, MouseEvent } from 'react'
|
||||
|
||||
import type { Material, Menu, MenuVisibleItem, Tag, User } from '@/types'
|
||||
|
||||
type Props = { user: User | null }
|
||||
type Props = { user: User | null, }
|
||||
|
||||
|
||||
export const menuOutline = (
|
||||
|
||||
@@ -4,6 +4,7 @@ import PostOriginalCreatedTimeField from '@/components/PostOriginalCreatedTimeFi
|
||||
import FieldError from '@/components/common/FieldError'
|
||||
import FieldWarning from '@/components/common/FieldWarning'
|
||||
import FormField from '@/components/common/FormField'
|
||||
import TextArea from '@/components/common/TextArea'
|
||||
import ThumbnailPreview from '@/components/posts/import/ThumbnailPreview'
|
||||
import { inputClass } from '@/lib/utils'
|
||||
|
||||
@@ -259,13 +260,13 @@ const PostImportAreaField = (
|
||||
<FormField label={label} messages={errors}>
|
||||
{({ describedBy, invalid }) => (
|
||||
<>
|
||||
<textarea
|
||||
<TextArea
|
||||
value={value}
|
||||
rows={4}
|
||||
onChange={ev => onChange (ev.target.value)}
|
||||
aria-describedby={describedBy}
|
||||
aria-invalid={invalid}
|
||||
className={inputClass (invalid)}/>
|
||||
invalid={invalid}
|
||||
className="h-auto"/>
|
||||
<FieldWarning messages={warnings}/>
|
||||
</>)}
|
||||
</FormField>)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import { Helmet } from 'react-helmet-async'
|
||||
import { useNavigate,
|
||||
useParams } from 'react-router-dom'
|
||||
import { useNavigate, useParams } from 'react-router-dom'
|
||||
|
||||
import FieldError from '@/components/common/FieldError'
|
||||
import PageTitle from '@/components/common/PageTitle'
|
||||
@@ -26,9 +25,8 @@ import Forbidden from '@/pages/Forbidden'
|
||||
|
||||
import type { FC } from 'react'
|
||||
|
||||
import type { PostImportResultRow,
|
||||
PostImportRow,
|
||||
PostImportSession } from '@/lib/postImportSession'
|
||||
import type { PostImportResultRow, PostImportRow } from '@/lib/postImportSession'
|
||||
import type { PostImportSession } from '@/lib/postImportSession'
|
||||
import type { User } from '@/types'
|
||||
|
||||
type Props = { user: User | null }
|
||||
@@ -248,14 +246,12 @@ const PostImportResultPage: FC<Props> = ({ user }) => {
|
||||
編輯
|
||||
</Button>)}
|
||||
{canRetry && (
|
||||
<>
|
||||
<Button
|
||||
type="button"
|
||||
onClick={() => retry (row.sourceRow)}
|
||||
disabled={loadingRow === row.sourceRow}>
|
||||
再試行
|
||||
</Button>
|
||||
</>)}
|
||||
</Button>)}
|
||||
</div>
|
||||
</div>
|
||||
</div>)})}
|
||||
|
||||
@@ -6,13 +6,13 @@ import FieldError from '@/components/common/FieldError'
|
||||
import Form from '@/components/common/Form'
|
||||
import FormField from '@/components/common/FormField'
|
||||
import PageTitle from '@/components/common/PageTitle'
|
||||
import TextArea from '@/components/common/TextArea'
|
||||
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 { apiPost, isApiError } from '@/lib/api'
|
||||
import { canEditContent } from '@/lib/users'
|
||||
import { inputClass } from '@/lib/utils'
|
||||
import { countImportSourceLines,
|
||||
cleanupExpiredPostImportSessions,
|
||||
createPostImportSessionId,
|
||||
@@ -158,14 +158,12 @@ const PostImportSourcePage: FC<Props> = ({ user }) => {
|
||||
<PageTitle>投稿インポート</PageTitle>
|
||||
<FormField label="URL リスト">
|
||||
{() => (
|
||||
<textarea
|
||||
<TextArea
|
||||
value={source}
|
||||
rows={14}
|
||||
aria-invalid={messages.length > 0 || sourceIssues.length > 0}
|
||||
invalid={messages.length > 0 || sourceIssues.length > 0}
|
||||
aria-describedby={sourceDescribedBy || undefined}
|
||||
className={inputClass (
|
||||
messages.length > 0 || sourceIssues.length > 0,
|
||||
'font-mono text-sm')}
|
||||
className="h-80 font-mono text-sm"
|
||||
onBlur={() => {
|
||||
savePostImportSourceDraft (source, message =>
|
||||
toast ({ title: '入力内容を保存できませんでした',
|
||||
|
||||
新しい課題から参照
ユーザをブロックする