Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2b65206b84 |
@@ -523,6 +523,12 @@ const formatUploadedImageRatio = (image?: CloneImageItem) => {
|
|||||||
if (!image.width || !image.height) return `上传图片\u00a0\u00a0\u00a0原图比例${format}`;
|
if (!image.width || !image.height) return `上传图片\u00a0\u00a0\u00a0原图比例${format}`;
|
||||||
return `上传图片 ${image.width}×${image.height}px\u00a0\u00a0\u00a0${formatAspectRatio(image.width, image.height)}${format}`;
|
return `上传图片 ${image.width}×${image.height}px\u00a0\u00a0\u00a0${formatAspectRatio(image.width, image.height)}${format}`;
|
||||||
};
|
};
|
||||||
|
const formatProductImageSpec = (image?: CloneImageItem | null) => {
|
||||||
|
if (!image) return "等待上传";
|
||||||
|
const format = image.format ? ` · ${image.format}` : "";
|
||||||
|
if (!image.width || !image.height) return `正在识别尺寸${format}`;
|
||||||
|
return `${image.width}×${image.height}px · ${formatAspectRatio(image.width, image.height)}${format}`;
|
||||||
|
};
|
||||||
const defaultMarketLanguageOption = marketLanguageOptions[0]!;
|
const defaultMarketLanguageOption = marketLanguageOptions[0]!;
|
||||||
const normalizeMarket = (value: string) =>
|
const normalizeMarket = (value: string) =>
|
||||||
marketLanguageOptions.some((option) => option.country === value) ? value : defaultMarketLanguageOption.country;
|
marketLanguageOptions.some((option) => option.country === value) ? value : defaultMarketLanguageOption.country;
|
||||||
@@ -778,6 +784,7 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
|
|||||||
const [selectedProductSetPreview, setSelectedProductSetPreview] = useState<{ src: string; label: string } | null>(null);
|
const [selectedProductSetPreview, setSelectedProductSetPreview] = useState<{ src: string; label: string } | null>(null);
|
||||||
const [showHostingModal, setShowHostingModal] = useState(false);
|
const [showHostingModal, setShowHostingModal] = useState(false);
|
||||||
const [productImages, setProductImages] = useState<CloneImageItem[]>([]);
|
const [productImages, setProductImages] = useState<CloneImageItem[]>([]);
|
||||||
|
const [selectedProductImageId, setSelectedProductImageId] = useState<string | null>(null);
|
||||||
const [isProductUploadDragging, setIsProductUploadDragging] = useState(false);
|
const [isProductUploadDragging, setIsProductUploadDragging] = useState(false);
|
||||||
const [cloneOutput, setCloneOutput] = useState<CloneOutputKey>("detail");
|
const [cloneOutput, setCloneOutput] = useState<CloneOutputKey>("detail");
|
||||||
const [openCloneBasicSelect, setOpenCloneBasicSelect] = useState<CloneBasicSelectKey | null>(null);
|
const [openCloneBasicSelect, setOpenCloneBasicSelect] = useState<CloneBasicSelectKey | null>(null);
|
||||||
@@ -862,6 +869,13 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
|
|||||||
const selectedProductSetOutput =
|
const selectedProductSetOutput =
|
||||||
productSetOutputOptions.find((option) => option.key === productSetOutput) ?? productSetOutputOptions[0]!;
|
productSetOutputOptions.find((option) => option.key === productSetOutput) ?? productSetOutputOptions[0]!;
|
||||||
const selectedCloneOutput = cloneOutputOptions.find((option) => option.key === cloneOutput) ?? cloneOutputOptions[1]!;
|
const selectedCloneOutput = cloneOutputOptions.find((option) => option.key === cloneOutput) ?? cloneOutputOptions[1]!;
|
||||||
|
const selectedProductImage = productImages.find((image) => image.id === selectedProductImageId) ?? productImages[0] ?? null;
|
||||||
|
const selectedProductImageIndex = selectedProductImage
|
||||||
|
? productImages.findIndex((image) => image.id === selectedProductImage.id)
|
||||||
|
: -1;
|
||||||
|
const selectedProductImageLabel = selectedProductImageIndex >= 0 ? `商品图 ${selectedProductImageIndex + 1}` : "商品图";
|
||||||
|
const selectedProductImageSpec = formatProductImageSpec(selectedProductImage);
|
||||||
|
const isProductImageLimitReached = productImages.length >= maxCloneProductImages;
|
||||||
const productSetPreviewReady = productSetStatus === "done";
|
const productSetPreviewReady = productSetStatus === "done";
|
||||||
const cloneSetTotal = Object.values(cloneSetCounts).reduce((sum, value) => sum + value, 0);
|
const cloneSetTotal = Object.values(cloneSetCounts).reduce((sum, value) => sum + value, 0);
|
||||||
const canGenerateSet = setImages.length > 0 && productSetStatus !== "generating";
|
const canGenerateSet = setImages.length > 0 && productSetStatus !== "generating";
|
||||||
@@ -890,6 +904,30 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!productImages.length) {
|
||||||
|
if (selectedProductImageId !== null) setSelectedProductImageId(null);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!selectedProductImageId || !productImages.some((image) => image.id === selectedProductImageId)) {
|
||||||
|
setSelectedProductImageId(productImages[0].id);
|
||||||
|
}
|
||||||
|
}, [productImages, selectedProductImageId]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
productImages
|
||||||
|
.filter((item) => !item.width || !item.height)
|
||||||
|
.forEach((item) => {
|
||||||
|
readImageDimensions(item.src)
|
||||||
|
.then(({ width, height }) => {
|
||||||
|
setProductImages((current) =>
|
||||||
|
current.map((currentItem) => (currentItem.id === item.id ? { ...currentItem, width, height } : currentItem)),
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.catch(() => undefined);
|
||||||
|
});
|
||||||
|
}, [productImages]);
|
||||||
|
|
||||||
const addSetImages = (files: File[]) => {
|
const addSetImages = (files: File[]) => {
|
||||||
if (setImages.length >= 3) return;
|
if (setImages.length >= 3) return;
|
||||||
const imageFiles = files.filter((file) => file.type.startsWith("image/"));
|
const imageFiles = files.filter((file) => file.type.startsWith("image/"));
|
||||||
@@ -945,6 +983,7 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
|
|||||||
const handleProductDrop = (event: DragEvent<HTMLDivElement>) => {
|
const handleProductDrop = (event: DragEvent<HTMLDivElement>) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
setIsProductUploadDragging(false);
|
setIsProductUploadDragging(false);
|
||||||
|
if (isProductImageLimitReached) return;
|
||||||
const files = Array.from(event.dataTransfer.files);
|
const files = Array.from(event.dataTransfer.files);
|
||||||
if (files.length) addProductImages(files);
|
if (files.length) addProductImages(files);
|
||||||
};
|
};
|
||||||
@@ -1815,6 +1854,7 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
|
|||||||
setSelectedProductSetPreview(null);
|
setSelectedProductSetPreview(null);
|
||||||
setShowHostingModal(false);
|
setShowHostingModal(false);
|
||||||
setProductImages([]);
|
setProductImages([]);
|
||||||
|
setSelectedProductImageId(null);
|
||||||
setIsProductUploadDragging(false);
|
setIsProductUploadDragging(false);
|
||||||
setCloneOutput("detail");
|
setCloneOutput("detail");
|
||||||
setRatio((current) => normalizeRatioForPlatform(platform, current, "detail"));
|
setRatio((current) => normalizeRatioForPlatform(platform, current, "detail"));
|
||||||
@@ -2061,18 +2101,24 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
|
|||||||
</h2>
|
</h2>
|
||||||
<div
|
<div
|
||||||
role="button"
|
role="button"
|
||||||
tabIndex={0}
|
tabIndex={isProductImageLimitReached ? -1 : 0}
|
||||||
className={`clone-ai-upload-zone${isProductUploadDragging ? " is-dragging" : ""}`}
|
aria-disabled={isProductImageLimitReached}
|
||||||
onClick={() => productInputRef.current?.click()}
|
className={`clone-ai-upload-zone${isProductUploadDragging ? " is-dragging" : ""}${isProductImageLimitReached ? " is-full" : ""}`}
|
||||||
|
onClick={() => {
|
||||||
|
if (isProductImageLimitReached) return;
|
||||||
|
productInputRef.current?.click();
|
||||||
|
}}
|
||||||
onKeyDown={(event) => {
|
onKeyDown={(event) => {
|
||||||
if (event.target !== event.currentTarget) return;
|
if (event.target !== event.currentTarget) return;
|
||||||
if (event.key === "Enter" || event.key === " ") {
|
if (event.key === "Enter" || event.key === " ") {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
if (isProductImageLimitReached) return;
|
||||||
productInputRef.current?.click();
|
productInputRef.current?.click();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onDragEnter={(event) => {
|
onDragEnter={(event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
if (isProductImageLimitReached) return;
|
||||||
setIsProductUploadDragging(true);
|
setIsProductUploadDragging(true);
|
||||||
}}
|
}}
|
||||||
onDragOver={(event) => event.preventDefault()}
|
onDragOver={(event) => event.preventDefault()}
|
||||||
@@ -2085,35 +2131,68 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
|
|||||||
</span>
|
</span>
|
||||||
<span className="clone-ai-upload-title">拖拽或点击上传</span>
|
<span className="clone-ai-upload-title">拖拽或点击上传</span>
|
||||||
<strong>
|
<strong>
|
||||||
<span aria-hidden="true">+</span>
|
{isProductImageLimitReached ? (
|
||||||
上传图片
|
"已达上限"
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<span aria-hidden="true">+</span>
|
||||||
|
上传图片
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</strong>
|
</strong>
|
||||||
<span className="clone-ai-upload-hint">同一产品,最多 7 张</span>
|
<span className="clone-ai-upload-hint">同一产品,最多 7 张</span>
|
||||||
</div>
|
</div>
|
||||||
{productImages.length ? (
|
{productImages.length ? (
|
||||||
<div className="clone-ai-uploaded-files" aria-label="已上传商品原图">
|
<div className="clone-ai-upload-preview-wrap" onClick={(event) => event.stopPropagation()} aria-live="polite">
|
||||||
{productImages.map((item) => (
|
<div className="clone-ai-upload-preview">
|
||||||
<figure key={item.id} className="clone-ai-uploaded-file">
|
<img src={selectedProductImage?.src ?? productImages[0].src} alt={`当前预览:${selectedProductImageLabel}`} />
|
||||||
<img src={item.src} alt={item.name} />
|
</div>
|
||||||
<span className="uploaded-image-zoom" aria-hidden="true">
|
<div className="clone-ai-upload-preview__meta">
|
||||||
<img src={item.src} alt="" />
|
<span>
|
||||||
</span>
|
<b>{selectedProductImageLabel}</b>
|
||||||
<button
|
<em title={selectedProductImage?.name ?? productImages[0].name}>{selectedProductImageSpec}</em>
|
||||||
type="button"
|
</span>
|
||||||
onClick={(event) => {
|
</div>
|
||||||
event.stopPropagation();
|
</div>
|
||||||
removeProductImage(item.id);
|
) : null}
|
||||||
}}
|
{productImages.length ? (
|
||||||
aria-label={`删除${item.name}`}
|
<div className="clone-ai-uploaded-stack">
|
||||||
>
|
<div className="clone-ai-uploaded-head">
|
||||||
<CloseOutlined />
|
<span>已上传素材</span>
|
||||||
</button>
|
<b>{productImages.length}/{maxCloneProductImages}</b>
|
||||||
</figure>
|
</div>
|
||||||
))}
|
<div className="clone-ai-uploaded-files" aria-label="已上传商品原图">
|
||||||
|
{productImages.map((item, index) => (
|
||||||
|
<figure key={item.id} className={`clone-ai-uploaded-file${item.id === selectedProductImage?.id ? " is-active" : ""}`}>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="clone-ai-uploaded-file__thumb"
|
||||||
|
onClick={(event) => {
|
||||||
|
event.stopPropagation();
|
||||||
|
setSelectedProductImageId(item.id);
|
||||||
|
}}
|
||||||
|
aria-label={`预览商品图 ${index + 1}`}
|
||||||
|
>
|
||||||
|
<img src={item.src} alt={`商品图 ${index + 1}`} />
|
||||||
|
<span>{index + 1}</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={(event) => {
|
||||||
|
event.stopPropagation();
|
||||||
|
removeProductImage(item.id);
|
||||||
|
}}
|
||||||
|
aria-label={`删除商品图 ${index + 1}`}
|
||||||
|
>
|
||||||
|
<CloseOutlined />
|
||||||
|
</button>
|
||||||
|
</figure>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
<input ref={productInputRef} type="file" accept="image/*" multiple onChange={handleProductUpload} />
|
<input ref={productInputRef} type="file" accept="image/*" multiple disabled={isProductImageLimitReached} onChange={handleProductUpload} />
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section className="clone-ai-card">
|
<section className="clone-ai-card">
|
||||||
|
|||||||
@@ -3,6 +3,24 @@ import type { ReactNode } from "react";
|
|||||||
import type { WorkbenchOption, WorkbenchFieldGroup } from "./workbenchConstants";
|
import type { WorkbenchOption, WorkbenchFieldGroup } from "./workbenchConstants";
|
||||||
import { getRatioOptionClassName, getSettingsGridColumnsClassName } from "./workbenchReferenceUtils";
|
import { getRatioOptionClassName, getSettingsGridColumnsClassName } from "./workbenchReferenceUtils";
|
||||||
|
|
||||||
|
const VIDEO_MODEL_ICON_URLS = {
|
||||||
|
happyHorse: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/static/model-icons/HappyHorse.svg",
|
||||||
|
pixverse: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/static/model-icons/Pixverse.svg",
|
||||||
|
vidu: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/static/model-icons/viduQ3.svg",
|
||||||
|
wanxiang: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/static/model-icons/wan.svg",
|
||||||
|
kling: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/static/model-icons/kling.svg",
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
function getVideoModelIconUrl(option: WorkbenchOption): string | null {
|
||||||
|
const text = `${option.value} ${option.label}`.toLowerCase();
|
||||||
|
if (text.includes("happyhorse")) return VIDEO_MODEL_ICON_URLS.happyHorse;
|
||||||
|
if (text.includes("pixverse")) return VIDEO_MODEL_ICON_URLS.pixverse;
|
||||||
|
if (text.includes("vidu")) return VIDEO_MODEL_ICON_URLS.vidu;
|
||||||
|
if (text.includes("wan") || text.includes("万相")) return VIDEO_MODEL_ICON_URLS.wanxiang;
|
||||||
|
if (text.includes("kling") || text.includes("可灵")) return VIDEO_MODEL_ICON_URLS.kling;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
export function SelectChip({
|
export function SelectChip({
|
||||||
chipId,
|
chipId,
|
||||||
value,
|
value,
|
||||||
@@ -56,6 +74,7 @@ export function SelectChip({
|
|||||||
>
|
>
|
||||||
{options.map((option, index) => {
|
{options.map((option, index) => {
|
||||||
const active = option.value === value;
|
const active = option.value === value;
|
||||||
|
const iconUrl = chipId === "video-model" ? getVideoModelIconUrl(option) : null;
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
key={option.value}
|
key={option.value}
|
||||||
@@ -71,6 +90,11 @@ export function SelectChip({
|
|||||||
>
|
>
|
||||||
<span className="ai-workbench-select-chip__option-label">
|
<span className="ai-workbench-select-chip__option-label">
|
||||||
<span className="ai-workbench-select-chip__option-dot" aria-hidden="true" />
|
<span className="ai-workbench-select-chip__option-dot" aria-hidden="true" />
|
||||||
|
{iconUrl ? (
|
||||||
|
<span className="ai-workbench-select-chip__option-icon" aria-hidden="true">
|
||||||
|
<img src={iconUrl} alt="" loading="lazy" />
|
||||||
|
</span>
|
||||||
|
) : null}
|
||||||
<span className="ai-workbench-select-chip__option-copy">
|
<span className="ai-workbench-select-chip__option-copy">
|
||||||
<span className="ai-workbench-select-chip__option-title">
|
<span className="ai-workbench-select-chip__option-title">
|
||||||
<span>{option.label}</span>
|
<span>{option.label}</span>
|
||||||
|
|||||||
@@ -1157,6 +1157,25 @@
|
|||||||
background: #202c28;
|
background: #202c28;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-zone.is-full {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-zone.is-full strong {
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||||
|
background: rgba(255, 255, 255, 0.08);
|
||||||
|
color: #aeb8c4;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-zone.is-full:hover {
|
||||||
|
border-color: rgba(255, 255, 255, 0.16);
|
||||||
|
background:
|
||||||
|
radial-gradient(circle at 50% 0%, rgba(var(--ecm-accent-rgb), 0.09), transparent 58%),
|
||||||
|
var(--ecm-inset);
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
.product-clone-page[data-tool="clone"] .clone-ai-upload-zone:active {
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-zone:active {
|
||||||
transform: scale(0.98);
|
transform: scale(0.98);
|
||||||
}
|
}
|
||||||
@@ -1274,6 +1293,27 @@
|
|||||||
transform: scale(0.92);
|
transform: scale(0.92);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-card,
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-zone,
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-files {
|
||||||
|
position: relative;
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-zone {
|
||||||
|
z-index: 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-zone:has(.clone-ai-uploaded-file:hover),
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-zone:has(.clone-ai-uploaded-file:focus-within) {
|
||||||
|
z-index: 90;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-file:hover,
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-file:focus-within {
|
||||||
|
z-index: 95;
|
||||||
|
}
|
||||||
|
|
||||||
.product-clone-page[data-tool="clone"] .clone-ai-settings-section {
|
.product-clone-page[data-tool="clone"] .clone-ai-settings-section {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
@@ -3096,7 +3136,7 @@
|
|||||||
|
|
||||||
.uploaded-image-zoom {
|
.uploaded-image-zoom {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 70;
|
z-index: 220;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
bottom: calc(100% + 10px);
|
bottom: calc(100% + 10px);
|
||||||
display: block;
|
display: block;
|
||||||
@@ -3117,6 +3157,18 @@
|
|||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-file .uploaded-image-zoom {
|
||||||
|
left: 0;
|
||||||
|
bottom: calc(100% + 12px);
|
||||||
|
width: min(240px, 58vw);
|
||||||
|
transform: translate(0, 8px) scale(0.96);
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-file:hover .uploaded-image-zoom,
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-file:focus-within .uploaded-image-zoom {
|
||||||
|
transform: translate(0, 0) scale(1);
|
||||||
|
}
|
||||||
|
|
||||||
.uploaded-image-zoom img {
|
.uploaded-image-zoom img {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -3139,6 +3191,233 @@
|
|||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-zone:has(.clone-ai-upload-preview-wrap) {
|
||||||
|
align-content: start;
|
||||||
|
justify-items: stretch;
|
||||||
|
gap: 10px;
|
||||||
|
min-height: 0;
|
||||||
|
padding: 12px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-zone:has(.clone-ai-upload-preview-wrap) .clone-ai-upload-main {
|
||||||
|
grid-template-columns: 34px minmax(0, 1fr) auto;
|
||||||
|
width: 100%;
|
||||||
|
align-items: center;
|
||||||
|
justify-items: start;
|
||||||
|
gap: 4px 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-zone:has(.clone-ai-upload-preview-wrap) .clone-ai-upload-icon {
|
||||||
|
grid-row: span 2;
|
||||||
|
width: 34px;
|
||||||
|
height: 34px;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-zone:has(.clone-ai-upload-preview-wrap) .clone-ai-upload-title {
|
||||||
|
min-width: 0;
|
||||||
|
color: #c9d2dd;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-zone:has(.clone-ai-upload-preview-wrap) strong {
|
||||||
|
grid-row: span 2;
|
||||||
|
min-width: 96px;
|
||||||
|
height: 34px;
|
||||||
|
padding: 0 12px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-zone:has(.clone-ai-upload-preview-wrap) .clone-ai-upload-hint {
|
||||||
|
grid-column: 2;
|
||||||
|
min-width: 0;
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-preview-wrap {
|
||||||
|
display: grid;
|
||||||
|
gap: 7px;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-preview {
|
||||||
|
position: relative;
|
||||||
|
display: grid;
|
||||||
|
width: 100%;
|
||||||
|
min-height: 126px;
|
||||||
|
overflow: hidden;
|
||||||
|
border: 1px solid rgba(var(--ecm-accent-rgb), 0.2);
|
||||||
|
border-radius: 10px;
|
||||||
|
background:
|
||||||
|
linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 48%),
|
||||||
|
rgba(8, 10, 12, 0.56);
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-preview img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 126px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-preview__meta {
|
||||||
|
display: flex;
|
||||||
|
min-width: 0;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 0 2px;
|
||||||
|
color: #eef2f6;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-preview__meta span {
|
||||||
|
display: grid;
|
||||||
|
min-width: 0;
|
||||||
|
gap: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-preview__meta b,
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-preview__meta em {
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
max-width: 260px;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-preview__meta b {
|
||||||
|
color: var(--ecm-accent);
|
||||||
|
font-size: 10px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 900;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-preview__meta em {
|
||||||
|
color: #aeb8c4;
|
||||||
|
font-size: 10px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-files {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 7px;
|
||||||
|
margin-top: 0;
|
||||||
|
padding-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-stack {
|
||||||
|
display: grid;
|
||||||
|
gap: 7px;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-head {
|
||||||
|
display: flex;
|
||||||
|
min-width: 0;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 8px;
|
||||||
|
color: #768292;
|
||||||
|
font-size: 10px;
|
||||||
|
font-weight: 900;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-head span {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-head b {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
padding: 2px 7px;
|
||||||
|
border: 1px solid rgba(var(--ecm-accent-rgb), 0.18);
|
||||||
|
border-radius: 999px;
|
||||||
|
background: rgba(var(--ecm-accent-rgb), 0.07);
|
||||||
|
color: var(--ecm-accent);
|
||||||
|
font-size: 10px;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-file {
|
||||||
|
width: 46px;
|
||||||
|
height: 46px;
|
||||||
|
overflow: hidden;
|
||||||
|
border-color: rgba(255, 255, 255, 0.12);
|
||||||
|
border-radius: 9px;
|
||||||
|
background: rgba(255, 255, 255, 0.035);
|
||||||
|
transition:
|
||||||
|
border-color 160ms ease,
|
||||||
|
box-shadow 160ms ease,
|
||||||
|
transform 160ms ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-file > button:not(.clone-ai-uploaded-file__thumb) {
|
||||||
|
top: 2px;
|
||||||
|
right: 2px;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
background: rgba(8, 10, 12, 0.82);
|
||||||
|
color: #fff;
|
||||||
|
font-size: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-file.is-active {
|
||||||
|
border-color: rgba(var(--ecm-accent-rgb), 0.86);
|
||||||
|
box-shadow: 0 0 0 2px rgba(var(--ecm-accent-rgb), 0.12);
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-file .clone-ai-uploaded-file__thumb {
|
||||||
|
position: static;
|
||||||
|
inset: auto;
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
border-radius: inherit;
|
||||||
|
background: transparent;
|
||||||
|
color: inherit;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: inherit;
|
||||||
|
opacity: 1;
|
||||||
|
transform: none;
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-file .clone-ai-uploaded-file__thumb img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-file__thumb span {
|
||||||
|
position: absolute;
|
||||||
|
left: 3px;
|
||||||
|
bottom: 3px;
|
||||||
|
min-width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: rgba(8, 10, 12, 0.76);
|
||||||
|
color: #eef2f6;
|
||||||
|
font-size: 9px;
|
||||||
|
font-weight: 900;
|
||||||
|
line-height: 14px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-uploaded-file:hover {
|
||||||
|
border-color: rgba(var(--ecm-accent-rgb), 0.62);
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes image-mention-menu-rise {
|
@keyframes image-mention-menu-rise {
|
||||||
from {
|
from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@@ -8157,6 +8436,13 @@
|
|||||||
box-shadow: 0 10px 28px rgba(var(--ecm-accent-rgb), 0.18);
|
box-shadow: 0 10px 28px rgba(var(--ecm-accent-rgb), 0.18);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.product-clone-page[data-tool="clone"] .clone-ai-upload-zone.is-full strong {
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||||
|
background: rgba(255, 255, 255, 0.08);
|
||||||
|
color: #aeb8c4;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
.product-clone-page[data-tool="clone"] :is(.clone-ai-generate:hover:not(:disabled), .clone-ai-send-button:hover:not(:disabled)) {
|
.product-clone-page[data-tool="clone"] :is(.clone-ai-generate:hover:not(:disabled), .clone-ai-send-button:hover:not(:disabled)) {
|
||||||
filter: brightness(1.03);
|
filter: brightness(1.03);
|
||||||
transform: translateY(-1px);
|
transform: translateY(-1px);
|
||||||
|
|||||||
@@ -1485,6 +1485,40 @@
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.web-shell[data-ui-theme="dark-green"] .ai-workbench-select-chip__option-icon {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex: 0 0 24px;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
margin-top: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.075);
|
||||||
|
border-radius: 8px;
|
||||||
|
background: rgba(255, 255, 255, 0.04);
|
||||||
|
}
|
||||||
|
|
||||||
|
.web-shell[data-ui-theme="dark-green"] .ai-workbench-select-chip__option-icon img {
|
||||||
|
display: block;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
object-fit: contain;
|
||||||
|
filter: brightness(0) invert(1);
|
||||||
|
opacity: 0.86;
|
||||||
|
}
|
||||||
|
|
||||||
|
.web-shell[data-ui-theme="dark-green"] .ai-workbench-select-chip__option:hover .ai-workbench-select-chip__option-icon,
|
||||||
|
.web-shell[data-ui-theme="dark-green"] .ai-workbench-select-chip__option.is-active .ai-workbench-select-chip__option-icon {
|
||||||
|
border-color: rgba(var(--accent-rgb), 0.2);
|
||||||
|
background: rgba(var(--accent-rgb), 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.web-shell[data-ui-theme="dark-green"] .ai-workbench-select-chip__option:hover .ai-workbench-select-chip__option-icon img,
|
||||||
|
.web-shell[data-ui-theme="dark-green"] .ai-workbench-select-chip__option.is-active .ai-workbench-select-chip__option-icon img {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.web-shell[data-ui-theme="dark-green"] .ai-workbench-select-chip__option-copy {
|
.web-shell[data-ui-theme="dark-green"] .ai-workbench-select-chip__option-copy {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user