video-shuoshan/web/src/components/PromptInput.module.css
zyc 7b804df30f
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m1s
Fix: restore video generation UI features
- Remove 图片生成 option — only 视频生成 available
- Remove Seedance 2.0 Fast — fixed to Seedance 2.0
- Implement @ mention system with contentEditable editor:
  - Click @ or type @ to show reference popup
  - Select media to insert dimmed mention tag
  - Hover over mention shows media preview tooltip
  - Videos auto-play on hover
2026-03-13 10:59:24 +08:00

152 lines
2.7 KiB
CSS

.wrapper {
flex: 1;
padding: 4px 0;
position: relative;
}
.editor {
background: transparent;
border: none;
outline: none;
color: var(--color-text-primary);
font-size: 14px;
line-height: 1.6;
width: 100%;
min-height: 24px;
max-height: 144px;
font-family: 'Noto Sans SC', system-ui, sans-serif;
overflow-y: auto;
white-space: pre-wrap;
word-break: break-word;
}
.placeholder {
position: absolute;
top: 4px;
left: 0;
color: #5a5a6a;
font-size: 14px;
line-height: 1.6;
pointer-events: none;
font-family: 'Noto Sans SC', system-ui, sans-serif;
}
/* @ mention tag (inserted as contentEditable=false span) */
.mention {
display: inline;
padding: 1px 6px;
margin: 0 2px;
border-radius: 4px;
background: rgba(0, 184, 230, 0.12);
color: rgba(0, 184, 230, 0.7);
font-size: 13px;
cursor: default;
user-select: none;
transition: background 0.15s;
}
.mention:hover {
background: rgba(0, 184, 230, 0.22);
color: rgba(0, 184, 230, 0.9);
}
/* Mention popup */
.mentionPopup {
position: absolute;
z-index: 100;
background: #1e1e2e;
border: 1px solid #2a2a3a;
border-radius: 10px;
padding: 6px;
min-width: 200px;
max-width: 280px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
animation: fadeIn 0.12s ease;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(-4px); }
to { opacity: 1; transform: translateY(0); }
}
.mentionHeader {
padding: 4px 8px 6px;
font-size: 11px;
color: #5a5a6a;
border-bottom: 1px solid #2a2a3a;
margin-bottom: 4px;
}
.mentionItem {
display: flex;
align-items: center;
gap: 10px;
width: 100%;
padding: 6px 8px;
border: none;
background: transparent;
border-radius: 6px;
cursor: pointer;
transition: background 0.1s;
text-align: left;
}
.mentionItem:hover {
background: rgba(255, 255, 255, 0.06);
}
.mentionThumb {
width: 36px;
height: 36px;
border-radius: 6px;
overflow: hidden;
flex-shrink: 0;
background: #2a2a3a;
}
.thumbMedia {
width: 100%;
height: 100%;
object-fit: cover;
}
.mentionLabel {
flex: 1;
color: var(--color-text-primary);
font-size: 13px;
}
.mentionType {
color: #5a5a6a;
font-size: 11px;
}
/* Hover preview tooltip */
.previewTooltip {
position: absolute;
z-index: 200;
transform: translate(-50%, -100%);
background: #1e1e2e;
border: 1px solid #2a2a3a;
border-radius: 10px;
padding: 6px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
pointer-events: none;
animation: fadeIn 0.1s ease;
}
.previewMedia {
display: block;
width: 160px;
height: 100px;
object-fit: cover;
border-radius: 6px;
}
.previewLabel {
text-align: center;
color: #8a8a9a;
font-size: 11px;
margin-top: 4px;
}