Oviya commited on
Commit Β·
06c5ea6
1
Parent(s): 99b2002
update statichat
Browse files- dist/gramm-ai/browser/assets/staticchat/bg-layout.png +3 -0
- dist/gramm-ai/browser/index.html +1 -1
- dist/gramm-ai/browser/{main-53XHVZC2.js β main-KU245MKS.js} +0 -0
- src/app/staticchat/staticchat.component.css +15 -1
- src/app/staticchat/staticchat.component.html +102 -97
- src/assets/staticchat/bg-layout.png +3 -0
dist/gramm-ai/browser/assets/staticchat/bg-layout.png
ADDED
|
Git LFS Details
|
dist/gramm-ai/browser/index.html
CHANGED
|
@@ -16,5 +16,5 @@
|
|
| 16 |
</style><link rel="stylesheet" href="styles-TX4PRGSR.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-TX4PRGSR.css"></noscript></head>
|
| 17 |
<body>
|
| 18 |
<app-root></app-root>
|
| 19 |
-
<script src="polyfills-FFHMD2TL.js" type="module"></script><script src="main-
|
| 20 |
</html>
|
|
|
|
| 16 |
</style><link rel="stylesheet" href="styles-TX4PRGSR.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-TX4PRGSR.css"></noscript></head>
|
| 17 |
<body>
|
| 18 |
<app-root></app-root>
|
| 19 |
+
<script src="polyfills-FFHMD2TL.js" type="module"></script><script src="main-KU245MKS.js" type="module"></script></body>
|
| 20 |
</html>
|
dist/gramm-ai/browser/{main-53XHVZC2.js β main-KU245MKS.js}
RENAMED
|
The diff for this file is too large to render.
See raw diff
|
|
|
src/app/staticchat/staticchat.component.css
CHANGED
|
@@ -4,12 +4,26 @@
|
|
| 4 |
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif !important;
|
| 5 |
}
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
/* ===== MAIN CONTAINER ===== */
|
| 8 |
.chat-container {
|
| 9 |
display: flex;
|
| 10 |
justify-content: center;
|
| 11 |
align-items: center;
|
| 12 |
-
height:
|
| 13 |
padding: 2vw;
|
| 14 |
gap: 2vw;
|
| 15 |
}
|
|
|
|
| 4 |
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif !important;
|
| 5 |
}
|
| 6 |
|
| 7 |
+
.staticchat-container {
|
| 8 |
+
height: 100vh;
|
| 9 |
+
background: url('/assets/staticchat/bg-layout.png') repeat;
|
| 10 |
+
}
|
| 11 |
+
.nav-bar {
|
| 12 |
+
background-color: rgb(25 34 69);
|
| 13 |
+
box-shadow: 0 6px 18px rgba(0,0,0,0.42);
|
| 14 |
+
text-align: center;
|
| 15 |
+
color: white;
|
| 16 |
+
font-size: 2vw;
|
| 17 |
+
font-family: Amonk_Outline !important;
|
| 18 |
+
padding:1vw;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
/* ===== MAIN CONTAINER ===== */
|
| 22 |
.chat-container {
|
| 23 |
display: flex;
|
| 24 |
justify-content: center;
|
| 25 |
align-items: center;
|
| 26 |
+
height: 89vh; /* keep viewport-based height */
|
| 27 |
padding: 2vw;
|
| 28 |
gap: 2vw;
|
| 29 |
}
|
src/app/staticchat/staticchat.component.html
CHANGED
|
@@ -1,115 +1,120 @@
|
|
| 1 |
-
<div class="chat-container">
|
| 2 |
-
<div class="chat-window">
|
| 3 |
-
<button class="arrow-btn up" title="Prev message" (click)="showPreviousPair()">β</button>
|
| 4 |
-
|
| 5 |
-
<!-- MESSAGES -->
|
| 6 |
-
<div class="chat-messages" #chatContainer>
|
| 7 |
-
<div *ngFor="let pair of pairedMessages; let i = index" class="pair" [attr.data-index]="i">
|
| 8 |
-
|
| 9 |
-
<!-- If user exists in pair (now shown first/top) -->
|
| 10 |
-
<div *ngIf="pair.user" class="message-row user-row">
|
| 11 |
-
<div class="message-bubble user-message">
|
| 12 |
-
<span style="font-size:1.5vw;">{{ pair.user.text }}</span>
|
| 13 |
-
<div class="message-time">
|
| 14 |
-
{{ pair.user.timestamp | date:'shortTime' }}
|
| 15 |
-
</div>
|
| 16 |
-
</div>
|
| 17 |
-
<img src="assets/staticchat/student.png" class="avatar" />
|
| 18 |
-
</div>
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
</button>
|
| 39 |
-
<button class="chip" *ngIf="pair.bot.rawData?.example_url" (click)="playResponseVideo(pair.bot.rawData?.example_url)">
|
| 40 |
-
π§ͺ Example
|
| 41 |
-
</button>
|
| 42 |
</div>
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
</div>
|
| 47 |
</div>
|
| 48 |
-
</div>
|
| 49 |
|
| 50 |
-
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
|
|
|
| 57 |
</div>
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
</div>
|
| 68 |
-
</div>
|
| 69 |
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
|
| 98 |
-
|
| 99 |
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
|
| 105 |
-
|
| 106 |
|
| 107 |
|
| 108 |
-
|
| 109 |
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
|
|
|
| 114 |
</div>
|
| 115 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
+
|
| 3 |
+
<div class="staticchat-container">
|
| 4 |
+
<div class="nav-bar">MJ-CHAT</div>
|
| 5 |
+
<div class="chat-container">
|
| 6 |
+
<div class="chat-window">
|
| 7 |
+
<button class="arrow-btn up" title="Prev message" (click)="showPreviousPair()">β</button>
|
| 8 |
+
|
| 9 |
+
<!-- MESSAGES -->
|
| 10 |
+
<div class="chat-messages" #chatContainer>
|
| 11 |
+
<div *ngFor="let pair of pairedMessages; let i = index" class="pair" [attr.data-index]="i">
|
| 12 |
+
|
| 13 |
+
<!-- If user exists in pair (now shown first/top) -->
|
| 14 |
+
<div *ngIf="pair.user" class="message-row user-row">
|
| 15 |
+
<div class="message-bubble user-message">
|
| 16 |
+
<span style="font-size:1.5vw;">{{ pair.user.text }}</span>
|
| 17 |
+
<div class="message-time">
|
| 18 |
+
{{ pair.user.timestamp | date:'shortTime' }}
|
| 19 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
</div>
|
| 21 |
+
<img src="assets/staticchat/student.png" class="avatar" />
|
| 22 |
+
</div>
|
| 23 |
|
| 24 |
+
<!-- If bot exists in pair (now shown below user) -->
|
| 25 |
+
<div *ngIf="pair.bot" class="message-row bot-row">
|
| 26 |
+
<img src="assets/staticchat/teacher.png" class="avatar" />
|
| 27 |
+
<div class="message-bubble bot-message">
|
| 28 |
+
<span style="font-size:1.5vw;">{{ pair.bot.text }}</span>
|
| 29 |
+
|
| 30 |
+
<div class="mediaRow" *ngIf="pair.bot.rawData && (pair.bot.rawData?.audio_url || pair.bot.rawData?.video_url)">
|
| 31 |
+
<button class="chip" *ngIf="pair.bot.rawData?.audio_url" (click)="playAudio(pair.bot.rawData?.audio_url)">
|
| 32 |
+
π Audio
|
| 33 |
+
</button>
|
| 34 |
+
<button class="chip" *ngIf="pair.bot.rawData?.video_url" (click)="playResponseVideo(pair.bot.rawData?.video_url)">
|
| 35 |
+
π¬ Video
|
| 36 |
+
</button>
|
| 37 |
+
<button class="chip" *ngIf="pair.bot.rawData?.detail_url" (click)="playResponseVideo(pair.bot.rawData?.detail_url)">
|
| 38 |
+
π‘ Detail
|
| 39 |
+
</button>
|
| 40 |
+
<button class="chip" *ngIf="pair.bot.rawData?.story_url" (click)="playResponseVideo(pair.bot.rawData?.story_url)">
|
| 41 |
+
π Story
|
| 42 |
+
</button>
|
| 43 |
+
<button class="chip" *ngIf="pair.bot.rawData?.example_url" (click)="playResponseVideo(pair.bot.rawData?.example_url)">
|
| 44 |
+
π§ͺ Example
|
| 45 |
+
</button>
|
| 46 |
+
</div>
|
| 47 |
+
|
| 48 |
+
<div class="message-time">
|
| 49 |
+
{{ pair.bot.timestamp | date:'shortTime' }}
|
| 50 |
+
</div>
|
| 51 |
</div>
|
| 52 |
</div>
|
|
|
|
| 53 |
|
| 54 |
+
</div>
|
| 55 |
|
| 56 |
+
<!-- Typing indicator -->
|
| 57 |
+
<div *ngIf="isTyping" class="typing-indicator">
|
| 58 |
+
<div class="dot"></div>
|
| 59 |
+
<div class="dot"></div>
|
| 60 |
+
<div class="dot"></div>
|
| 61 |
+
</div>
|
| 62 |
</div>
|
| 63 |
+
<button class="arrow-btn down" title="Next message" (click)="showNextPair()">β</button>
|
| 64 |
+
|
| 65 |
+
<!-- SUGGESTIONS DROPDOWN -->
|
| 66 |
+
<div *ngIf="showSuggestions && suggestedQuestions.length > 0" class="suggestions-box">
|
| 67 |
+
<div *ngFor="let question of suggestedQuestions"
|
| 68 |
+
class="suggestion-item"
|
| 69 |
+
(click)="selectQuestion(question)">
|
| 70 |
+
{{ question }}
|
| 71 |
+
</div>
|
| 72 |
</div>
|
|
|
|
| 73 |
|
| 74 |
+
<!-- INPUT BAR -->
|
| 75 |
+
<form [formGroup]="chatForm" (ngSubmit)="sendMessage()" class="chat-input">
|
| 76 |
+
<!--<input type="text"
|
| 77 |
+
formControlName="message"
|
| 78 |
+
#messageInput
|
| 79 |
+
placeholder="Type your message..."
|
| 80 |
+
(focus)="onInputFocus()"
|
| 81 |
+
(input)="onInputChange()"
|
| 82 |
+
[readonly]="isSpeechProcessing" />-->
|
| 83 |
+
<input type="text"
|
| 84 |
+
formControlName="message"
|
| 85 |
+
#messageInput
|
| 86 |
+
[placeholder]="isListening ? 'βΊ Listening...' : 'Type your message...'"
|
| 87 |
+
(focus)="onInputFocus()"
|
| 88 |
+
(input)="onInputChange()"
|
| 89 |
+
[readonly]="isSpeechProcessing || isListening" />
|
| 90 |
+
|
| 91 |
+
<button type="button"
|
| 92 |
+
class="micBtn"
|
| 93 |
+
[disabled]="!supported || isListening"
|
| 94 |
+
(click)="toggleMic()">
|
| 95 |
+
π€
|
| 96 |
+
</button>
|
| 97 |
+
|
| 98 |
+
<div class="actions" *ngIf="showActions">
|
| 99 |
+
<button class="reject" (click)="reject()">β</button>
|
| 100 |
+
<button class="accept" (click)="accept()">β
</button>
|
| 101 |
|
| 102 |
+
</div>
|
| 103 |
|
| 104 |
+
<button type="submit" [disabled]="!chatForm.valid">
|
| 105 |
+
β€
|
| 106 |
+
</button>
|
| 107 |
+
</form>
|
| 108 |
|
| 109 |
+
</div>
|
| 110 |
|
| 111 |
|
| 112 |
+
<div class="video-window">
|
| 113 |
|
| 114 |
+
<video #videoPlayer autoplay muted playsinline></video>
|
| 115 |
+
<img class="play-pause-btn"
|
| 116 |
+
[src]="(currentVideoType !== 'blink' && isVideoPlaying) ? 'assets/staticchat/pause.png' : 'assets/staticchat/play.png'"
|
| 117 |
+
(click)="togglePlayPause()" />
|
| 118 |
+
</div>
|
| 119 |
</div>
|
| 120 |
</div>
|
src/assets/staticchat/bg-layout.png
ADDED
|
Git LFS Details
|