]> Repos - mime-chat/commitdiff
new session + blue dots
authorAndrew Gundersen <gundersena@xavier.edu>
Sun, 23 Jan 2022 18:19:00 +0000 (12:19 -0600)
committerAndrew Gundersen <gundersena@xavier.edu>
Sun, 23 Jan 2022 18:19:00 +0000 (12:19 -0600)
src/render/components/bubble.js
src/render/components/message.js
src/render/main.css

index 87d989742d2855cce22d9592277d4811aa897fd6..8181c640d3696946a829ee4bacd6cddc18120562 100644 (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>
index 23e28df0fd964e5369ed12fa15f70064bcfd8e65..5c4a4651539b5feebb69c22050da4d1984956aa9 100644 (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"
index 57429e3d0ade085d6137a6dde4280a908c669db8..810960dd45cd16e42b9402af3831c33f4c227910 100644 (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;