feat(web): improve playground media resource prompts
This commit is contained in:
@@ -1831,37 +1831,220 @@
|
||||
|
||||
.mediaTaskHeader {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 14px;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.mediaTaskHeader > div {
|
||||
display: grid;
|
||||
gap: 4px;
|
||||
.mediaTaskHeaderMain {
|
||||
display: flex;
|
||||
flex: 1 1 auto;
|
||||
align-items: flex-end;
|
||||
gap: 14px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.mediaTaskHeader p {
|
||||
.mediaTaskHeaderContent {
|
||||
display: grid;
|
||||
flex: 1 1 auto;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.mediaTaskMetaLine {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
align-items: baseline;
|
||||
gap: 9px;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
color: #7a8794;
|
||||
font-size: var(--font-size-sm);
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.mediaTaskHeader p span {
|
||||
color: var(--text-strong);
|
||||
font-size: var(--font-size-lg);
|
||||
.mediaTaskMetaLine svg {
|
||||
flex: 0 0 auto;
|
||||
color: #607080;
|
||||
}
|
||||
|
||||
.mediaTaskMetaLine time,
|
||||
.mediaTaskMetaLine strong,
|
||||
.mediaTaskMetaLine span {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.mediaTaskMetaLine strong {
|
||||
color: var(--text-normal);
|
||||
font-weight: var(--font-weight-medium);
|
||||
}
|
||||
|
||||
.mediaTaskHeader small,
|
||||
.mediaTaskPromptLine {
|
||||
position: relative;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.mediaTaskPromptText {
|
||||
display: block;
|
||||
min-width: 0;
|
||||
color: var(--text-strong);
|
||||
font-size: var(--font-size-base);
|
||||
font-weight: var(--font-weight-regular);
|
||||
line-height: 1.65;
|
||||
max-height: 4.95em;
|
||||
overflow: hidden;
|
||||
overflow-wrap: anywhere;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.mediaTaskPromptLine:hover {
|
||||
z-index: 13;
|
||||
}
|
||||
|
||||
.mediaTaskPromptLine:hover .mediaTaskPromptText {
|
||||
max-height: none;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.mediaPromptResourceTag {
|
||||
display: inline-flex;
|
||||
max-width: min(220px, 86vw);
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin: 0 5px 3px;
|
||||
padding: 2px 8px 2px 4px;
|
||||
border-radius: 7px;
|
||||
background: #438ce9;
|
||||
color: #fff;
|
||||
font-size: var(--font-size-xs);
|
||||
font-weight: var(--font-weight-regular);
|
||||
line-height: 1.25;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
.mediaPromptResourceThumb {
|
||||
display: inline-grid;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
min-width: 24px;
|
||||
place-items: center;
|
||||
overflow: hidden;
|
||||
border-radius: 6px;
|
||||
background: rgba(255, 255, 255, 0.18);
|
||||
}
|
||||
|
||||
.mediaPromptResourceThumb img,
|
||||
.mediaPromptResourceThumb video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.mediaPromptResourceThumb svg {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.mediaTaskHeader time {
|
||||
color: #7a8794;
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
.mediaTaskReferenceStack {
|
||||
--task-reference-width: 54px;
|
||||
--task-reference-height: 72px;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
flex: 0 0 auto;
|
||||
width: var(--task-reference-width);
|
||||
height: var(--task-reference-height);
|
||||
margin: 2px 2px 2px 0;
|
||||
vertical-align: middle;
|
||||
transition: width 180ms ease;
|
||||
}
|
||||
|
||||
.mediaTaskReferenceStack:hover {
|
||||
z-index: 14;
|
||||
width: min(calc(var(--reference-count) * 58px), calc(100vw - 96px));
|
||||
}
|
||||
|
||||
.mediaTaskReferenceCard {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: calc(var(--reference-y, 0px));
|
||||
display: grid;
|
||||
width: var(--task-reference-width);
|
||||
height: var(--task-reference-height);
|
||||
place-items: center;
|
||||
overflow: hidden;
|
||||
border: 1px solid rgba(255, 255, 255, 0.86);
|
||||
border-radius: 7px;
|
||||
background: var(--surface-muted);
|
||||
color: var(--primary);
|
||||
box-shadow: 0 8px 22px rgba(15, 23, 42, 0.2);
|
||||
transform: rotate(var(--reference-tilt, -8deg));
|
||||
transition: left 180ms ease, top 180ms ease, transform 180ms ease, box-shadow 180ms ease;
|
||||
}
|
||||
|
||||
.mediaTaskReferenceStack:hover .mediaTaskReferenceCard {
|
||||
left: calc(var(--reference-index) * 58px);
|
||||
top: 0;
|
||||
transform: rotate(var(--reference-tilt, -5deg));
|
||||
}
|
||||
|
||||
.mediaTaskReferenceCard:hover {
|
||||
z-index: 6;
|
||||
transform: translateY(-5px) scale(1.04) rotate(0deg) !important;
|
||||
box-shadow: 0 16px 34px rgba(15, 23, 42, 0.24);
|
||||
}
|
||||
|
||||
.mediaTaskReferenceCard img,
|
||||
.mediaTaskReferenceCard video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.mediaTaskReferenceCard svg {
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
}
|
||||
|
||||
.mediaTaskReferenceCard small {
|
||||
position: absolute;
|
||||
left: 4px;
|
||||
bottom: 4px;
|
||||
padding: 1px 4px;
|
||||
border-radius: 999px;
|
||||
background: rgba(24, 24, 27, 0.68);
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.mediaTaskReferenceCard[data-kind="audio"],
|
||||
.mediaTaskReferenceCard[data-kind="file"] {
|
||||
background: linear-gradient(135deg, #f7fbff, #e7edf5);
|
||||
}
|
||||
|
||||
.mediaTaskReferenceOverflow {
|
||||
position: absolute;
|
||||
right: -9px;
|
||||
bottom: -7px;
|
||||
z-index: 8;
|
||||
display: inline-grid;
|
||||
min-width: 22px;
|
||||
height: 22px;
|
||||
place-items: center;
|
||||
padding: 0 5px;
|
||||
border-radius: 999px;
|
||||
background: var(--text-strong);
|
||||
color: var(--surface);
|
||||
font-size: var(--font-size-xs);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
|
||||
}
|
||||
|
||||
.mediaTaskStatus {
|
||||
flex: 0 0 auto;
|
||||
min-height: 28px;
|
||||
|
||||
Reference in New Issue
Block a user