fix(chat): align knowledge citation hover with outline cards
parent
b57c362667
commit
d69df50b7a
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<Teleport to="body">
|
||||
<div v-if="float.visible" class="chat-citation-float" :style="{ top: `${float.top}px`, left: `${float.left}px` }"
|
||||
<div v-if="float.visible" class="chat-citation-float" :class="{ 'chat-citation-float--kb': float.type === 'kb' }"
|
||||
:style="{ top: `${float.top}px`, left: `${float.left}px` }"
|
||||
@mouseenter="onEnter?.()" @mouseleave="onLeave?.()">
|
||||
<template v-if="float.type === 'web'">
|
||||
<div class="chat-citation-float__title">{{ float.title || float.url }}</div>
|
||||
|
|
|
|||
|
|
@ -149,4 +149,39 @@
|
|||
&__error {
|
||||
color: var(--td-error-color);
|
||||
}
|
||||
|
||||
&--kb {
|
||||
box-sizing: border-box;
|
||||
width: 264px;
|
||||
max-width: calc(100vw - 32px);
|
||||
padding: 12px 14px;
|
||||
border: 0.5px solid var(--td-component-stroke);
|
||||
border-radius: var(--app-radius-lg);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 6px 20px rgba(0, 0, 0, 0.08);
|
||||
font-family: var(--app-font-family);
|
||||
font-size: var(--app-text-md);
|
||||
line-height: 1.6;
|
||||
overflow-wrap: anywhere;
|
||||
transition: background-color var(--app-motion-fast) ease;
|
||||
|
||||
&:hover {
|
||||
background: var(--td-bg-color-container-hover);
|
||||
}
|
||||
|
||||
.chat-citation-float__title {
|
||||
margin-bottom: 6px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
}
|
||||
|
||||
.chat-citation-float__body {
|
||||
color: var(--td-text-color-secondary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.chat-citation-float--kb {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue