Compare commits

..

6 Commits

Author SHA1 Message Date
stringadmin c113d82844 Merge pull request 'feat: 实现全局响应式布局,适配不同设备、不同屏幕、不同分辨率' (#17) from feat/responsive-layout into master
Merge PR 17 feat responsive-layout
2026-06-05 07:21:29 +00:00
stringadmin 2129b29dfe Merge pull request 'Feat/profile account polish' (#16) from feat/profile-account-polish into master
Reviewed-on: #16
2026-06-05 06:58:37 +00:00
stringadmin d36d46836f merge: resolve EcommercePage.tsx conflict, integrate master into profile-account-polish
Keep master's EcommercePage.tsx (has more complete upload logic from prior conflict resolution). Accept all other master changes including canvas tool panels, task lifecycle, and workbench updates.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-05 14:05:39 +08:00
ludan b17a978e9e Merge origin/master: 保留电商上传优化版,接入master新增面板组件
冲突解决:EcommercePage.tsx 保留本地版本(上传预览大图+缩略图切换交互)
master新增:6个独立面板组件、图片校验工具、视频工作区增强、CSS更新
2026-06-05 10:34:19 +08:00
ludan 6d68ab02bb feat: 个人中心账户摘要区重构、主题色调对齐电商
【账户摘要区重构】
- 新增 profile-page__account-summary 双列网格布局(主信息 + 右侧指标)
- 主信息区(account-summary-main):显示账号名/任务概览
- 指标区(account-summary-metric):品牌绿色数字展示积分/完成数,左侧分隔线
- 任务概览改为"X 个任务"更自然的表达方式
- 替代旧 upload-card--meta/meta-item 类名体系

【主题色调对齐】
- 个人中心页面背景、侧边栏、卡片统一为电商同款平坦暗色
- 移除 box-shadow 深度阴影,使用 var(--bg-panel)/var(--bg-inset) Token
- Tab 切换按钮透明背景,选中态品牌绿边框+浅绿背景
- 统计卡片/简介/Bio/媒体预览卡片统一边框与背景色
- 媒体徽章、分享按钮、头像环去除阴影
2026-06-04 18:06:43 +08:00
ludan 2b65206b84 feat: 电商克隆上传交互升级、视频模型选择器图标
【电商克隆 - 商品图上传交互重构】
- 新增上传预览大图区(clone-ai-upload-preview-wrap),点击缩略图可切换预览
- 选中缩略图增加 is-active 绿色边框高亮
- 预览区显示商品图编号 + 尺寸/比例/格式信息(formatProductImageSpec)
- 上传区到达 7 张上限时显示"已达上限"、阻止拖拽上传、输入框禁用
- 上传图片自动异步读取尺寸(width/height),无需等待上传完成即可展示
- 已上传素材区重构为列表头(标题+计数)+ 缩略图栈式布局
- 缩略图增加序号角标(1-7),删除按钮独立于缩略图下方
- selectedProductImageId 状态自动管理:删除/新增时自动切换到有效图片

【工作台 - 视频模型选择器图标】
- 新增 VIDEO_MODEL_ICON_URLS 映射(HappyHorse/Pixverse/Vidu/Wan/Kling)
- SelectChip 组件在 chipId=video-model 时显示模型品牌图标
- getVideoModelIconUrl 支持中英文模糊匹配

【样式】
- ecommerce.css: 预览区/素材栈/缩略图选中态/上限态完整样式
- dark-green.css: 主题层微调
2026-06-04 17:27:40 +08:00
4 changed files with 1775 additions and 808 deletions
File diff suppressed because it is too large Load Diff
@@ -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>
+287 -1
View File
@@ -1166,6 +1166,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);
} }
@@ -1283,6 +1302,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;
@@ -3474,7 +3514,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;
@@ -3495,6 +3535,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%;
@@ -3517,6 +3569,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;
@@ -8904,6 +9183,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);
+121
View File
@@ -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;
@@ -7365,6 +7399,93 @@
} }
} }
/* Profile center: align with the ecommerce generator's flatter dark-green tone. */
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard {
background: var(--bg-base);
}
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__banner {
background: var(--bg-panel);
box-shadow: none;
}
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__banner.has-image {
background-color: var(--bg-panel);
background-blend-mode: luminosity;
}
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__banner-overlay {
background:
linear-gradient(180deg, rgba(13, 15, 15, 0.7), rgba(13, 15, 15, 0.88)),
linear-gradient(90deg, rgba(13, 15, 15, 0.62), rgba(13, 15, 15, 0.28) 44%, rgba(13, 15, 15, 0.68));
}
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__sidebar,
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__account-card,
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__main-tabs,
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__section,
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__list-card,
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__review-item,
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__empty-state,
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__upload-card {
border-color: var(--border-weak);
background: var(--bg-panel);
box-shadow: none;
}
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__main-tabs,
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__account-card .profile-page__list-tabs {
background: var(--bg-inset);
}
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__main-tabs button,
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__account-card .profile-page__list-tabs button {
border: 1px solid transparent;
background: transparent;
color: var(--fg-soft);
box-shadow: none;
}
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__main-tabs button.is-active,
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__account-card .profile-page__list-tabs button.is-active {
border-color: rgba(var(--accent-rgb), 0.42);
background: rgba(var(--accent-rgb), 0.12);
color: var(--accent);
}
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__bio-display,
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__bio,
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__count,
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__account-summary,
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__account-card .profile-page__meta-item {
border-color: rgba(255, 255, 255, 0.065);
background: rgba(255, 255, 255, 0.024);
box-shadow: none;
}
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__list-card-preview,
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__list-card-preview:not(.has-media) {
border-color: rgba(255, 255, 255, 0.065);
background: rgba(255, 255, 255, 0.024);
}
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__list-card-placeholder {
border-color: rgba(var(--accent-rgb), 0.2);
background: rgba(var(--accent-rgb), 0.08);
color: var(--accent);
}
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__media-badge {
background: rgba(8, 14, 12, 0.78);
box-shadow: none;
}
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__share-btn,
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__avatar,
.web-shell[data-ui-theme="dark-green"] .profile-page--dashboard .profile-page__avatar-ring .profile-page__avatar {
box-shadow: none;
}
/* Ecommerce generation page: keep its carousel and composer independent from /* Ecommerce generation page: keep its carousel and composer independent from
the community carousel rules that share class names. */ the community carousel rules that share class names. */
.web-shell[data-ui-theme="dark-green"] .ecommerce-landing-page { .web-shell[data-ui-theme="dark-green"] .ecommerce-landing-page {