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
65 lines
1.6 KiB
TypeScript
65 lines
1.6 KiB
TypeScript
import React from "react"
|
|
import { Modal as AntModal } from "antd"
|
|
import { Input, Select } from "@/components/ui"
|
|
import type { AssetKind } from "@/pages/assets/types"
|
|
import { LIBRARY_KIND_OPTIONS } from "@/pages/assets/constants"
|
|
|
|
/* ============================================================
|
|
* CreateLibraryModal — 新建视频库弹窗
|
|
* ============================================================ */
|
|
export interface CreateLibraryModalProps {
|
|
open: boolean
|
|
onCancel: () => void
|
|
onOk: () => void
|
|
name: string
|
|
onNameChange: (value: string) => void
|
|
kind: AssetKind
|
|
onKindChange: (value: AssetKind) => void
|
|
confirmLoading?: boolean
|
|
}
|
|
|
|
const CreateLibraryModal: React.FC<CreateLibraryModalProps> = ({
|
|
open,
|
|
onCancel,
|
|
onOk,
|
|
name,
|
|
onNameChange,
|
|
kind,
|
|
onKindChange,
|
|
confirmLoading,
|
|
}) => (
|
|
<AntModal
|
|
title="新建视频库"
|
|
open={open}
|
|
onCancel={onCancel}
|
|
onOk={onOk}
|
|
okText="创建"
|
|
cancelText="取消"
|
|
destroyOnClose
|
|
confirmLoading={confirmLoading}
|
|
>
|
|
<div className="xx-asset-form-body">
|
|
<div>
|
|
<div className="xx-asset-form-label">名称</div>
|
|
<Input
|
|
placeholder="请输入视频库名称"
|
|
value={name}
|
|
onChange={(e) => onNameChange(e.target.value)}
|
|
maxLength={50}
|
|
/>
|
|
</div>
|
|
<div>
|
|
<div className="xx-asset-form-label">类型</div>
|
|
<Select
|
|
value={kind}
|
|
onChange={(v) => onKindChange(v)}
|
|
style={{ width: "100%" }}
|
|
options={LIBRARY_KIND_OPTIONS}
|
|
/>
|
|
</div>
|
|
</div>
|
|
</AntModal>
|
|
)
|
|
|
|
export default CreateLibraryModal
|