feat: merge title library selection and manual input into single AutoComplete
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 45s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 48s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 51s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 53s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m40s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 1m42s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m45s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 1m11s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 1m30s
AI Code Review / AI Code Review (pull_request) Failing after 2m29s
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 4m20s
CI/CD Pipeline / CI Gate (pull_request) Successful in 6s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 962h58m40s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 962h58m41s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 962h58m41s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 962h58m41s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 962h58m41s
CI/CD Pipeline / PR Build Worker Image (pull_request) Failing after 963h2m13s
CI/CD Pipeline / PR Build API Image (pull_request) Failing after 963h2m15s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 963h2m16s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 963h2m54s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 963h2m58s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 963h3m2s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 963h3m2s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 963h2m56s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 963h31m58s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 963h31m59s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 963h36m14s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 963h36m20s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 45s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 48s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 51s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 53s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m40s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 1m42s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m45s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 1m11s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 1m30s
AI Code Review / AI Code Review (pull_request) Failing after 2m29s
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 4m20s
CI/CD Pipeline / CI Gate (pull_request) Successful in 6s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 962h58m40s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 962h58m41s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 962h58m41s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 962h58m41s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 962h58m41s
CI/CD Pipeline / PR Build Worker Image (pull_request) Failing after 963h2m13s
CI/CD Pipeline / PR Build API Image (pull_request) Failing after 963h2m15s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 963h2m16s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 963h2m54s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 963h2m58s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 963h3m2s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 963h3m2s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 963h2m56s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 963h31m58s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 963h31m59s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 963h36m14s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 963h36m20s
- Replace separate Select (title library) + input (manual) with unified AutoComplete - Remove '或手动选择' divider line - AutoComplete supports both typing custom titles and selecting from library - Maintains filtering, clear, and empty state functionality - Saves vertical space in Step4 UI
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* Step 4 标题设置组件
|
||||
*/
|
||||
import React from "react"
|
||||
import { Select } from "antd"
|
||||
import { AutoComplete } from "antd"
|
||||
import { POSITION_OPTIONS, FONT_OPTIONS } from "../constants"
|
||||
import type { TitleSettings } from "../types"
|
||||
import { useStep4Title } from "../hooks/useStep4Title"
|
||||
@@ -75,10 +75,6 @@ const Step4TitleSettings: React.FC<Step4TitleSettingsProps> = (props) => {
|
||||
onRefresh={t.handleRefreshAiTitles}
|
||||
/>
|
||||
|
||||
<div className="xx-divider">
|
||||
<span>或手动选择</span>
|
||||
</div>
|
||||
|
||||
<div className="xx-title-ai-toggle">
|
||||
<span className="xx-toggle-label">AI 自动选择标题</span>
|
||||
<div className="xx-switch" onClick={t.toggleAiAutoSelect}>
|
||||
@@ -87,21 +83,22 @@ const Step4TitleSettings: React.FC<Step4TitleSettingsProps> = (props) => {
|
||||
</div>
|
||||
|
||||
<div className="xx-form-field">
|
||||
<label>从标题库选择</label>
|
||||
<Select
|
||||
placeholder="请选择标题…"
|
||||
<label>标题</label>
|
||||
<AutoComplete
|
||||
placeholder="输入或从标题库选择…"
|
||||
allowClear
|
||||
showSearch
|
||||
style={{ width: "100%" }}
|
||||
value={t.titleSettings.title || undefined}
|
||||
onSelect={(val) => t.updateTitle(val || "")}
|
||||
onChange={(val) => t.updateTitle(val || "")}
|
||||
options={t.userTitles.map((ut) => ({
|
||||
label: ut.content,
|
||||
value: ut.content,
|
||||
}))}
|
||||
filterOption={(input, option) =>
|
||||
((option?.label as string) || "").toLowerCase().includes(input.toLowerCase())
|
||||
}
|
||||
filterOption={(inputValue, option) => {
|
||||
const title = (option?.label || option?.value || "") as string
|
||||
return title.toLowerCase().includes((inputValue || "").toLowerCase())
|
||||
}}
|
||||
notFoundContent={
|
||||
t.userTitles.length === 0 ? (
|
||||
<span style={{ color: "var(--text-tertiary)", fontSize: 13 }}>
|
||||
@@ -111,15 +108,6 @@ const Step4TitleSettings: React.FC<Step4TitleSettingsProps> = (props) => {
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<div className="xx-form-field" style={{ marginTop: 14 }}>
|
||||
<label>或手动输入</label>
|
||||
<input
|
||||
placeholder="输入自定义标题…"
|
||||
value={t.titleSettings.title}
|
||||
onChange={(e) => t.updateTitle(e.target.value)}
|
||||
maxLength={50}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user