迁移分镜与脚本页签:看板/分镜表双视图 + 常驻检查器(文案/资产/提示词/产物)+ 脚本导入与预检;修正 FormRow 非 tight 行缺列间距
parent
8d5e1b59af
commit
5e641ffe46
|
|
@ -78,11 +78,13 @@ export function Req() {
|
|||
}
|
||||
|
||||
/** 长字段(标签在上):抽屉/对话框里的多行文本、上传区用这个 */
|
||||
export function FieldBlock({ label, required, children, className }: {
|
||||
export function FieldBlock({ label, required, children, className, title }: {
|
||||
label?: ReactNode; required?: boolean; children: ReactNode; className?: string
|
||||
/** 标签的含义/后果说明(分镜的检查器里几乎每个长字段都要一句),与 Field 保持一致 */
|
||||
title?: string
|
||||
}) {
|
||||
return (
|
||||
<label className={cn('flex flex-col gap-[5px] mb-[10px] min-w-0', className)}>
|
||||
<label title={title} className={cn('flex flex-col gap-[5px] mb-[10px] min-w-0', className)}>
|
||||
<span className="flex items-center gap-1 text-muted text-tiny tracking-[.3px] flex-wrap whitespace-nowrap">
|
||||
{label}{required && <Req />}
|
||||
</span>
|
||||
|
|
@ -104,12 +106,15 @@ export function FormRow({ children, cols, tight, stack, className }: {
|
|||
: `repeat(${cols},minmax(0,1fr))`
|
||||
return (
|
||||
<div className={cn('grid mb-[10px] min-w-0 [&>*]:min-w-0',
|
||||
// 间距照旧站 .frow(gap: 8px 10px):列间 10px 是「标签在左」不贴到上一格控件的地板,
|
||||
// 之前这里只在 tight 时给 gap,非 tight 档位间距为 0,窄屏上「镜号」几乎贴着上一格的输入框。
|
||||
tight ? 'gap-[8px]' : 'gap-x-[10px] gap-y-[8px]',
|
||||
cols === undefined && 'max-mid:grid-cols-2',
|
||||
(cols === 3 || cols === 4) && 'max-mid:grid-cols-2',
|
||||
(cols === 4 || cols === 6) && 'max-nav:grid-cols-2',
|
||||
stack && 'gap-y-[10px] [&>*]:flex-col [&>*]:items-stretch [&>*]:gap-[5px] [&>*]:flex-none [&>*]:w-auto [&>*:not(span)]:w-full',
|
||||
className)}
|
||||
style={{ gridTemplateColumns: tracks, gap: tight ? 8 : undefined }}>
|
||||
style={{ gridTemplateColumns: tracks }}>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
|
|
@ -215,8 +220,14 @@ export function FilePick({ label, accept, multiple, onFiles, className, title }:
|
|||
+ 'rounded-chip border border-line-strong bg-hover px-[9px] text-tiny leading-[1.2] text-ink-2 '
|
||||
+ 'whitespace-nowrap shrink-0 hover:bg-raise hover:text-ink', className)}>
|
||||
{label}
|
||||
{/* 选完就把 input 清空:否则连着两次选同一个文件,input.value 没变,
|
||||
onChange 不再触发,用户以为「没选上」(分镜导入要反复试同一份脚本)。 */}
|
||||
<input type="file" className="hidden" accept={accept} multiple={multiple}
|
||||
onChange={(e) => onFiles(Array.from(e.currentTarget.files || []))} />
|
||||
onChange={(e) => {
|
||||
const files = Array.from(e.currentTarget.files || [])
|
||||
e.currentTarget.value = ''
|
||||
onFiles(files)
|
||||
}} />
|
||||
</label>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue