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