style: update CSS and TSX for TemplateCard and history components
This commit is contained in:
@@ -122,6 +122,7 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 水印 */
|
/* 水印 */
|
||||||
.watermark {
|
.watermark {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -133,21 +134,23 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name-badge {
|
.name-badge {
|
||||||
background: #0000004D;
|
background: #0000004d;
|
||||||
backdrop-filter: blur(5px);
|
backdrop-filter: blur(5px);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
border: 1px solid #FFFFFF4D;
|
border: 1px solid #ffffff4d;
|
||||||
height: 30px;
|
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
padding: 12px 16px;
|
padding: 12px 16px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 单视频容器样式 */
|
/* 单视频容器样式 */
|
||||||
.single-video-container {
|
.single-video-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -101,12 +101,9 @@ export default function TemplateCard({ template, onClick }: TemplateCardProps) {
|
|||||||
/>
|
/>
|
||||||
{/* 模板名称悬浮 - 视频底部 */}
|
{/* 模板名称悬浮 - 视频底部 */}
|
||||||
<View className="name-overlay">
|
<View className="name-overlay">
|
||||||
<Text className="name-badge">
|
<Text className="name-badge">✨{template.name}</Text>
|
||||||
✨
|
|
||||||
{template.name}
|
|
||||||
</Text>
|
|
||||||
</View>
|
</View>
|
||||||
<View className='watermark'>
|
<View className="watermark">
|
||||||
<Text className="watermark-text">内容由AI生成</Text>
|
<Text className="watermark-text">内容由AI生成</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -161,7 +158,7 @@ export default function TemplateCard({ template, onClick }: TemplateCardProps) {
|
|||||||
<View className="name-overlay">
|
<View className="name-overlay">
|
||||||
<Text className="name-badge">✨{template.name}</Text>
|
<Text className="name-badge">✨{template.name}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View className='watermark'>
|
<View className="watermark">
|
||||||
<Text className="watermark-text">内容由AI生成</Text>
|
<Text className="watermark-text">内容由AI生成</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -4,15 +4,18 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.history-header {
|
.history-header {
|
||||||
padding: 32px 0;
|
padding: 32px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.history-title {
|
.history-title {
|
||||||
font-size: 48px;
|
font-size: 48px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #1D1F22;
|
color: #1d1f22;
|
||||||
padding: 0 32px;
|
padding: 0 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.history-list {
|
.history-list {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -67,7 +70,7 @@
|
|||||||
|
|
||||||
.empty-text {
|
.empty-text {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
color: #B9B9B9;
|
color: #b9b9b9;
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: 32px;
|
margin-top: 32px;
|
||||||
}
|
}
|
||||||
@@ -141,7 +144,7 @@
|
|||||||
.item-title {
|
.item-title {
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #1D1F22;
|
color: #1d1f22;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
@@ -240,7 +243,7 @@
|
|||||||
|
|
||||||
.item-time {
|
.item-time {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
color: #B9B9B9;
|
color: #b9b9b9;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
@@ -291,12 +294,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
background: linear-gradient(
|
background: linear-gradient(135deg, rgb(0 0 0 / 20%) 0%, rgb(0 0 0 / 10%) 50%, rgb(0 0 0 / 30%) 100%);
|
||||||
135deg,
|
|
||||||
rgb(0 0 0 / 20%) 0%,
|
|
||||||
rgb(0 0 0 / 10%) 50%,
|
|
||||||
rgb(0 0 0 / 30%) 100%
|
|
||||||
);
|
|
||||||
z-index: 4;
|
z-index: 4;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
@@ -322,13 +320,13 @@
|
|||||||
/* 缩略图加载转圈 */
|
/* 缩略图加载转圈 */
|
||||||
.thumbnail-loader {
|
.thumbnail-loader {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: calc(50% - 25px); /* 向上移动25px */
|
top: calc(50%); /* 向上移动25px */
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
border: 3px solid transparent;
|
border: 3px solid transparent;
|
||||||
border-top: 3px solid #FFFFFF;
|
border-top: 3px solid #ffffff;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
z-index: 6;
|
z-index: 6;
|
||||||
animation: spin 1s linear infinite;
|
animation: spin 1s linear infinite;
|
||||||
@@ -338,14 +336,10 @@
|
|||||||
/* 缩略图进度文字 */
|
/* 缩略图进度文字 */
|
||||||
.thumbnail-scan-progress {
|
.thumbnail-scan-progress {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
color: #FFFFFF;
|
color: #ffffff;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
z-index: 7;
|
z-index: 7;
|
||||||
/* 文字阴影增强可读性 */
|
text-shadow: 0 2px 4px rgb(0 0 0 / 50%), 0 0 8px rgb(0 0 0 / 30%), 0 0 16px rgb(0 0 0 / 20%);
|
||||||
text-shadow:
|
|
||||||
0 2px 4px rgb(0 0 0 / 50%),
|
|
||||||
0 0 8px rgb(0 0 0 / 30%),
|
|
||||||
0 0 16px rgb(0 0 0 / 20%);
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: calc(50% + 25px); /* 向下移动25px */
|
top: calc(50% + 25px); /* 向下移动25px */
|
||||||
left: 50%;
|
left: 50%;
|
||||||
|
|||||||
@@ -158,7 +158,6 @@ export default function History() {
|
|||||||
<View className="thumbnail-scan-light" />
|
<View className="thumbnail-scan-light" />
|
||||||
{/* 加载loading 转圈 */}
|
{/* 加载loading 转圈 */}
|
||||||
<View className='thumbnail-loader' />
|
<View className='thumbnail-loader' />
|
||||||
<View className="thumbnail-scan-progress">{Math.round(progress)}%</View>
|
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -159,7 +159,10 @@ export default function Home() {
|
|||||||
// 审核不通过
|
// 审核不通过
|
||||||
handleAuditFailure(auditResult);
|
handleAuditFailure(auditResult);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error: any) {
|
||||||
|
if (error.errMsg.includes('chooseImage:fail cancel')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 统一错误处理
|
// 统一错误处理
|
||||||
Taro.hideLoading();
|
Taro.hideLoading();
|
||||||
Taro.showToast({
|
Taro.showToast({
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ const GeneratingComponent: React.FC<GeneratingComponentProps> = ({ task }) => {
|
|||||||
{/* 状态文本 */}
|
{/* 状态文本 */}
|
||||||
<View className="status-section">
|
<View className="status-section">
|
||||||
<View className="status-title">
|
<View className="status-title">
|
||||||
<Image className="status-icon-image" src="/assets/icons/funnel.png" />
|
|
||||||
<Text className="status-title-text">生成中...</Text>
|
<Text className="status-title-text">生成中...</Text>
|
||||||
</View>
|
</View>
|
||||||
<View className="status-subtitle">内容生成中,请耐心等待</View>
|
<View className="status-subtitle">内容生成中,请耐心等待</View>
|
||||||
|
|||||||
@@ -229,13 +229,13 @@
|
|||||||
animation: scan 2s ease-in-out infinite;
|
animation: scan 2s ease-in-out infinite;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 进度文字 */
|
/* 进度文字 */
|
||||||
.scan-progress {
|
.scan-progress {
|
||||||
font-size: 56px;
|
font-size: 56px;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
z-index: 6;
|
z-index: 6;
|
||||||
/* 文字阴影增强可读性 */
|
|
||||||
text-shadow:
|
text-shadow:
|
||||||
0 2px 4px rgb(0 0 0 / 50%),
|
0 2px 4px rgb(0 0 0 / 50%),
|
||||||
0 0 8px rgb(0 0 0 / 30%),
|
0 0 8px rgb(0 0 0 / 30%),
|
||||||
@@ -269,8 +269,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.status-icon-image {
|
.status-icon-image {
|
||||||
width: 44px;
|
width: 40px;
|
||||||
height: 44px;
|
height: 40px;
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user