new session + blue dots

This commit is contained in:
Andrew Gundersen 2022-01-23 12:19:00 -06:00
commit bd9d3aa612
3 changed files with 42 additions and 1 deletions

View file

@ -18,6 +18,8 @@ const Bubble =
template: `
<div :class="'bubble ' + modifier + '-bubble ' + modifier +'-'+ child">
<small class="bubble-notify" v-if="modifier=='ai'"></small>
<p v-if="category=='text'">{{ text }}</p>
<p v-else-if="category=='audio'">{{ text }}</p>

View file

@ -8,7 +8,7 @@ const Message =
Context
},
props: ["modifier", "content", "context", "avatar", "id"],
props: ["modifier", "content", "context", "avatar", "id", "seen"],
setup(props)
{
@ -18,6 +18,10 @@ const Message =
template: `
<div :id="id" :class="'message ' + modifier + '-message'">
<div class="message-session" v-if="context=='Crimata AI'">
New Session
</div>
<Bubble
v-for="(c, index) in content"
:category="c.category"

View file

@ -410,6 +410,18 @@ html, body {
margin-bottom: 6px;
}
.message-session {
width: 100vw;
display: flex;
justify-content: center;
align-items: center;
font-family: "SF Compact Display";
font-size: 12px;
font-weight: bold;
color: #9B9B9B;
margin-bottom: 18px;
}
.client-message {
align-items: flex-end;
}
@ -427,6 +439,29 @@ html, body {
margin-bottom: 4px;
}
.bubble-notify {
position: absolute;
width: 12px;
height: 12px;
border-radius: 50%;
background-color: #58D9FF;
top: -5px;
left: -5px;
border: 2px solid #EBEBEB;
transform: scale(0);
animation-name: bubble-notify-anim;
animation-duration: 5s;
}
@keyframes bubble-notify-anim {
0%, 90% {
transform: scale(1);
}
100% {
transform: scale(0);
}
}
.ai-bubble {
background-color: #FFFFFF;
margin-left: 15px;