32a95d09f0
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 1m49s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 2m10s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Successful in 2m40s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 2m48s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 1m17s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 5m1s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 5m10s
CI/CD Pipeline / Unit Tests (push) Failing after 5m58s
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Integration Tests (push) Successful in 2m33s
CI/CD Pipeline / Build Staging API Image (push) Successful in 17m18s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
import React from "react"
|
|
import { Modal as AntModal, Select as AntSelect } from "antd"
|
|
import { CATEGORY_OPTIONS } from "@/pages/assets/constants"
|
|
|
|
/* ============================================================
|
|
* BatchClassifyModal — 批量改分类弹窗
|
|
* ============================================================ */
|
|
export interface BatchClassifyModalProps {
|
|
open: boolean
|
|
selectedCount: number
|
|
onCancel: () => void
|
|
onOk: () => void
|
|
category: string
|
|
onCategoryChange: (value: string) => void
|
|
confirmLoading?: boolean
|
|
}
|
|
|
|
const BatchClassifyModal: React.FC<BatchClassifyModalProps> = ({
|
|
open,
|
|
selectedCount,
|
|
onCancel,
|
|
onOk,
|
|
category,
|
|
onCategoryChange,
|
|
confirmLoading,
|
|
}) => (
|
|
<AntModal
|
|
title={`批量改分类(${selectedCount} 个素材)`}
|
|
open={open}
|
|
onCancel={onCancel}
|
|
onOk={onOk}
|
|
confirmLoading={confirmLoading}
|
|
okText="确认修改"
|
|
cancelText="取消"
|
|
>
|
|
<div className="xx-batch-classify-modal">
|
|
<p className="xx-batch-classify-hint">将选中的 {selectedCount} 个素材统一修改为以下分类:</p>
|
|
<AntSelect
|
|
value={category || undefined}
|
|
onChange={(v) => onCategoryChange(v)}
|
|
placeholder="请选择分类"
|
|
style={{ width: "100%" }}
|
|
options={CATEGORY_OPTIONS}
|
|
/>
|
|
</div>
|
|
</AntModal>
|
|
)
|
|
|
|
export default BatchClassifyModal
|