広場投稿追加画面の刷新 (#399) #413

マージ済み
みてるぞ が 103 個のコミットを feature/399 から main へマージ 2026-07-19 00:03:11 +09:00
3個のファイルの変更52行の追加24行の削除
コミット 34f81325d2 の変更だけを表示してゐます - すべてのコミットを表示
+36 -10
ファイルの表示
@@ -153,6 +153,15 @@ const DialogueProvider: FC<Props> = ({ children }) => {
[closeRequest, pendingIds])
const active = queue[0]
const startActions =
active?.kind === 'form'
? (formActions[active.id] ?? []).filter (action => action.placement === 'start')
: []
const endActions =
active?.kind === 'form'
? (formActions[active.id] ?? []).filter (action =>
action.placement == null || action.placement === 'end')
: []
return (
<DialogueContext.Provider value={api}>
@@ -204,16 +213,9 @@ const DialogueProvider: FC<Props> = ({ children }) => {
confirm: options => openNestedConfirm (active.id, options) })}
</div>
<DialogFooter className="shrink-0 pt-4">
<Button
variant="outline"
onClick={() => closeRequest (active.id)}
disabled={pendingIds.includes (active.id)
|| nestedConfirm?.parentId === active.id}>
{active.options.cancelText ?? '取消'}
</Button>
{(formActions[active.id] ?? []).map (action => (
<DialogFooter className="shrink-0 pt-4 sm:justify-between">
<div className="flex flex-wrap gap-2">
{startActions.map (action => (
<Button
key={action.label}
variant={action.variant === 'danger'
@@ -225,6 +227,30 @@ const DialogueProvider: FC<Props> = ({ children }) => {
|| action.disabled}>
{action.label}
</Button>))}
</div>
<div className="flex flex-wrap justify-end gap-2">
<Button
variant="outline"
onClick={() => closeRequest (active.id)}
disabled={pendingIds.includes (active.id)
|| nestedConfirm?.parentId === active.id}>
{active.options.cancelText ?? '取消'}
</Button>
{endActions.map (action => (
<Button
key={action.label}
variant={action.variant === 'danger'
? 'destructive'
: 'default'}
onClick={() => void handleFormAction (active.id, action)}
disabled={pendingIds.includes (active.id)
|| nestedConfirm?.parentId === active.id
|| action.disabled}>
{action.label}
</Button>))}
</div>
</DialogFooter>
</>)
: (
+1
ファイルの表示
@@ -137,6 +137,7 @@ const PostImportRowForm: FC<Props> = (
useEffect (() => {
controls.setActions ([{
label: '変更をリセット',
placement: 'start',
variant: 'danger',
disabled: resetDisabled,
onSelect: reset },
+1
ファイルの表示
@@ -25,6 +25,7 @@ type ChoiceOptions<T extends string> = { title: string
type DialogueFormAction = {
label: string
placement?: 'start' | 'end'
variant?: DialogueVariant
disabled?: boolean
onSelect: () => Promise<boolean | void> | boolean | void }