mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-04-20 18:14:28 +08:00
787 lines
14 KiB
SCSS
787 lines
14 KiB
SCSS
/* JimengCreate Mobile Styles */
|
|
|
|
/* 自定义动画 */
|
|
@keyframes fade-in {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(-10px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@keyframes fade-out {
|
|
from {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
transform: translateY(-10px);
|
|
}
|
|
}
|
|
|
|
@keyframes scale-up {
|
|
from {
|
|
opacity: 0;
|
|
transform: scale(0.9);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
.animate-fade-in {
|
|
animation: fade-in 0.3s ease-out;
|
|
}
|
|
|
|
.animate-fade-out {
|
|
animation: fade-out 0.3s ease-out;
|
|
}
|
|
|
|
.animate-scale-up {
|
|
animation: scale-up 0.3s ease-out;
|
|
}
|
|
|
|
/* 文本截断 */
|
|
.line-clamp-2 {
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 深色模式适配 */
|
|
@media (prefers-color-scheme: dark) {
|
|
.bg-gray-50 {
|
|
background-color: #1f2937;
|
|
}
|
|
|
|
.bg-white {
|
|
background-color: #374151;
|
|
}
|
|
|
|
.text-gray-900 {
|
|
color: #f9fafb;
|
|
}
|
|
|
|
.text-gray-700 {
|
|
color: #d1d5db;
|
|
}
|
|
|
|
.text-gray-600 {
|
|
color: #9ca3af;
|
|
}
|
|
|
|
.text-gray-500 {
|
|
color: #6b7280;
|
|
}
|
|
|
|
.border-gray-200 {
|
|
border-color: #4b5563;
|
|
}
|
|
|
|
.bg-gray-100:hover {
|
|
background-color: #4b5563;
|
|
}
|
|
}
|
|
|
|
/* 即梦创作页面专用样式 */
|
|
.jimeng-create {
|
|
min-height: 100vh;
|
|
background-color: #f9fafb;
|
|
|
|
/* 页面头部样式 */
|
|
&__header {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 40;
|
|
background-color: white;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
|
|
&-content {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0 1rem;
|
|
height: 3.5rem;
|
|
}
|
|
|
|
&-back-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 2rem;
|
|
height: 2rem;
|
|
border-radius: 50%;
|
|
transition: background-color 0.2s;
|
|
|
|
&:hover {
|
|
background-color: #f3f4f6;
|
|
}
|
|
|
|
.iconfont {
|
|
color: #6b7280;
|
|
}
|
|
}
|
|
|
|
&-title {
|
|
flex: 1;
|
|
text-align: center;
|
|
font-size: 1.125rem;
|
|
font-weight: 600;
|
|
color: #111827;
|
|
}
|
|
|
|
&-spacer {
|
|
width: 2rem;
|
|
}
|
|
}
|
|
|
|
/* 主要内容区域 */
|
|
&__content {
|
|
padding: 1rem;
|
|
|
|
.space-y-6 > * + * {
|
|
margin-top: 1.5rem;
|
|
}
|
|
}
|
|
|
|
/* 功能分类选择 */
|
|
&__category-section {
|
|
background-color: white;
|
|
border-radius: 0.75rem;
|
|
padding: 1rem;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
|
|
&-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
&-button {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 0.75rem;
|
|
border-radius: 0.5rem;
|
|
border: 2px solid;
|
|
transition: all 0.2s;
|
|
|
|
&--active {
|
|
border-color: #3b82f6;
|
|
background-color: #eff6ff;
|
|
color: #1d4ed8;
|
|
}
|
|
|
|
&--inactive {
|
|
border-color: #e5e7eb;
|
|
background-color: #f9fafb;
|
|
color: #6b7280;
|
|
|
|
&:hover {
|
|
border-color: #d1d5db;
|
|
background-color: #f3f4f6;
|
|
}
|
|
}
|
|
|
|
.iconfont {
|
|
font-size: 1.5rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
span {
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
}
|
|
}
|
|
}
|
|
|
|
/* 生成模式切换 */
|
|
&__mode-section {
|
|
background-color: white;
|
|
border-radius: 0.75rem;
|
|
padding: 1rem;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
|
|
&-content {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
&-title {
|
|
color: #111827;
|
|
font-weight: 500;
|
|
}
|
|
|
|
&-description {
|
|
font-size: 0.875rem;
|
|
color: #6b7280;
|
|
margin-top: 0.25rem;
|
|
}
|
|
}
|
|
|
|
/* 表单组件样式 */
|
|
&__form-section {
|
|
background-color: white;
|
|
border-radius: 0.75rem;
|
|
padding: 1rem;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
|
|
&-label {
|
|
display: block;
|
|
color: #374151;
|
|
font-weight: 500;
|
|
margin-bottom: 0.75rem;
|
|
}
|
|
|
|
&-textarea {
|
|
width: 100%;
|
|
padding: 0.75rem 1rem;
|
|
border: 1px solid #e5e7eb;
|
|
border-radius: 0.5rem;
|
|
resize: none;
|
|
transition: all 0.2s;
|
|
|
|
&:focus {
|
|
outline: none;
|
|
ring: 2px solid #3b82f6;
|
|
border-color: transparent;
|
|
}
|
|
}
|
|
|
|
&-counter {
|
|
text-align: right;
|
|
margin-top: 0.5rem;
|
|
font-size: 0.875rem;
|
|
color: #6b7280;
|
|
}
|
|
}
|
|
|
|
/* 图片上传样式 */
|
|
&__upload {
|
|
border: 2px dashed #d1d5db;
|
|
border-radius: 0.5rem;
|
|
padding: 1.5rem;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
|
|
&:hover {
|
|
border-color: #60a5fa;
|
|
background-color: #eff6ff;
|
|
}
|
|
|
|
&-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
&-icon {
|
|
color: #3b82f6;
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
&-text {
|
|
color: #374151;
|
|
font-weight: 500;
|
|
}
|
|
|
|
&-preview {
|
|
position: relative;
|
|
|
|
.el-image {
|
|
width: 8rem;
|
|
height: 8rem;
|
|
border-radius: 0.5rem;
|
|
}
|
|
}
|
|
|
|
&-remove-btn {
|
|
position: absolute;
|
|
top: -0.5rem;
|
|
right: -0.5rem;
|
|
width: 1.5rem;
|
|
height: 1.5rem;
|
|
background-color: #ef4444;
|
|
color: white;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 0.75rem;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s;
|
|
|
|
&:hover {
|
|
background-color: #dc2626;
|
|
}
|
|
}
|
|
|
|
/* 多图片上传样式 */
|
|
&-multiple {
|
|
display: flex;
|
|
gap: 0.75rem;
|
|
|
|
&-item {
|
|
position: relative;
|
|
|
|
.el-image {
|
|
width: 6rem;
|
|
height: 6rem;
|
|
border-radius: 0.5rem;
|
|
}
|
|
}
|
|
|
|
&-add {
|
|
width: 6rem;
|
|
height: 6rem;
|
|
border: 2px dashed #d1d5db;
|
|
border-radius: 0.5rem;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
transition: border-color 0.2s;
|
|
|
|
&:hover {
|
|
border-color: #60a5fa;
|
|
}
|
|
|
|
.iconfont {
|
|
color: #9ca3af;
|
|
font-size: 1.25rem;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* 滑块样式 */
|
|
&__slider-section {
|
|
.space-y-4 > * + * {
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
&-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
|
|
label {
|
|
display: block;
|
|
color: #374151;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.el-tooltip {
|
|
.iconfont {
|
|
color: #9ca3af;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* 开关样式 */
|
|
&__switch-section {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
|
|
span {
|
|
color: #111827;
|
|
font-weight: 500;
|
|
}
|
|
}
|
|
|
|
/* 生成按钮 */
|
|
&__submit-btn {
|
|
position: sticky;
|
|
bottom: 1rem;
|
|
background-color: white;
|
|
border-radius: 0.75rem;
|
|
padding: 1rem;
|
|
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
|
|
|
|
button {
|
|
width: 100%;
|
|
padding: 1rem;
|
|
background: linear-gradient(to right, #3b82f6, #8b5cf6);
|
|
color: white;
|
|
font-weight: 600;
|
|
border-radius: 0.75rem;
|
|
border: none;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
|
|
&:hover:not(:disabled) {
|
|
background: linear-gradient(to right, #2563eb, #7c3aed);
|
|
}
|
|
|
|
&:disabled {
|
|
background: linear-gradient(to right, #9ca3af, #9ca3af);
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.iconfont {
|
|
&.animate-spin {
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* 作品列表样式 */
|
|
&__works {
|
|
padding: 1rem;
|
|
|
|
&-title {
|
|
font-size: 1.125rem;
|
|
font-weight: 600;
|
|
color: #111827;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
&-list {
|
|
.space-y-4 > * + * {
|
|
margin-top: 1rem;
|
|
}
|
|
}
|
|
|
|
&-item {
|
|
background-color: white;
|
|
border-radius: 0.75rem;
|
|
padding: 1rem;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
|
|
&-content {
|
|
display: flex;
|
|
gap: 1rem;
|
|
}
|
|
|
|
&-thumb {
|
|
flex-shrink: 0;
|
|
|
|
&-container {
|
|
position: relative;
|
|
width: 4rem;
|
|
height: 4rem;
|
|
border-radius: 0.5rem;
|
|
overflow: hidden;
|
|
background-color: #f3f4f6;
|
|
}
|
|
|
|
.el-image {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
&-placeholder {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background-color: #f3f4f6;
|
|
|
|
.iconfont {
|
|
color: #9ca3af;
|
|
font-size: 1.25rem;
|
|
}
|
|
}
|
|
|
|
&-overlay {
|
|
position: absolute;
|
|
inset: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
opacity: 0;
|
|
transition: opacity 0.2s;
|
|
|
|
&:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
.iconfont {
|
|
color: white;
|
|
font-size: 1.25rem;
|
|
}
|
|
}
|
|
|
|
&-status {
|
|
position: absolute;
|
|
inset: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
&--loading {
|
|
background-color: rgba(59, 130, 246, 0.2);
|
|
|
|
.iconfont {
|
|
color: #3b82f6;
|
|
font-size: 1.25rem;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
}
|
|
|
|
&--failed {
|
|
background-color: rgba(239, 68, 68, 0.2);
|
|
|
|
.iconfont {
|
|
color: #ef4444;
|
|
font-size: 1.25rem;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&-info {
|
|
flex: 1;
|
|
min-width: 0;
|
|
|
|
&-header {
|
|
display: flex;
|
|
align-items: start;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
&-title {
|
|
color: #111827;
|
|
font-weight: 500;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
&-prompt {
|
|
color: #6b7280;
|
|
font-size: 0.875rem;
|
|
margin-top: 0.25rem;
|
|
}
|
|
|
|
&-status {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
font-size: 0.875rem;
|
|
|
|
&--failed {
|
|
color: #dc2626;
|
|
}
|
|
|
|
&--processing {
|
|
color: #2563eb;
|
|
|
|
.loading-spinner {
|
|
width: 0.75rem;
|
|
height: 0.75rem;
|
|
border: 1px solid #2563eb;
|
|
border-top-color: transparent;
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
}
|
|
}
|
|
|
|
&-tags {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
margin-top: 0.5rem;
|
|
|
|
&-item {
|
|
padding: 0.25rem 0.5rem;
|
|
font-size: 0.75rem;
|
|
border-radius: 9999px;
|
|
|
|
&--primary {
|
|
background-color: #dbeafe;
|
|
color: #2563eb;
|
|
}
|
|
|
|
&--warning {
|
|
background-color: #fef3c7;
|
|
color: #d97706;
|
|
}
|
|
|
|
&--power {
|
|
background-color: #fed7aa;
|
|
color: #ea580c;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-top: 1rem;
|
|
|
|
&-left {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
&-btn {
|
|
padding: 0.375rem 0.75rem;
|
|
font-size: 0.875rem;
|
|
border-radius: 0.5rem;
|
|
border: none;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.25rem;
|
|
|
|
.iconfont {
|
|
font-size: 0.75rem !important;
|
|
}
|
|
|
|
&--primary {
|
|
background-color: #2563eb;
|
|
color: white;
|
|
|
|
&:hover {
|
|
background-color: #1d4ed8;
|
|
}
|
|
}
|
|
|
|
&--success {
|
|
background-color: #16a34a;
|
|
color: white;
|
|
|
|
&:hover {
|
|
background-color: #15803d;
|
|
}
|
|
}
|
|
|
|
&--warning {
|
|
background-color: #ea580c;
|
|
color: white;
|
|
|
|
&:hover {
|
|
background-color: #dc2626;
|
|
}
|
|
}
|
|
|
|
&--danger {
|
|
background-color: #fef2f2;
|
|
color: #dc2626;
|
|
|
|
&:hover {
|
|
background-color: #fecaca;
|
|
}
|
|
}
|
|
|
|
&:disabled {
|
|
background-color: #9ca3af;
|
|
cursor: not-allowed;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&-loading {
|
|
display: flex;
|
|
justify-content: center;
|
|
padding: 1rem;
|
|
|
|
.iconfont {
|
|
color: #3b82f6;
|
|
font-size: 1.25rem;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
}
|
|
|
|
&-finished {
|
|
text-align: center;
|
|
padding: 1rem;
|
|
color: #6b7280;
|
|
}
|
|
}
|
|
|
|
/* 媒体预览弹窗 */
|
|
&__media-dialog {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 50;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
|
|
&-content {
|
|
background-color: white;
|
|
border-radius: 1rem;
|
|
width: 100%;
|
|
max-width: 56rem;
|
|
max-height: 80vh;
|
|
}
|
|
|
|
&-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 1rem;
|
|
border-bottom: 1px solid #e5e7eb;
|
|
|
|
h3 {
|
|
font-size: 1.125rem;
|
|
font-weight: 600;
|
|
color: #111827;
|
|
}
|
|
|
|
button {
|
|
padding: 0.5rem;
|
|
border: none;
|
|
background: none;
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s;
|
|
|
|
&:hover {
|
|
background-color: #f3f4f6;
|
|
}
|
|
|
|
.iconfont {
|
|
color: #6b7280;
|
|
}
|
|
}
|
|
}
|
|
|
|
&-body {
|
|
padding: 1.5rem;
|
|
|
|
img, video {
|
|
width: 100%;
|
|
max-height: 60vh;
|
|
object-fit: contain;
|
|
border-radius: 0.5rem;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* 旋转动画 */
|
|
@keyframes spin {
|
|
from {
|
|
transform: rotate(0deg);
|
|
}
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
} |