Oviya commited on
Commit
06c5ea6
Β·
1 Parent(s): 99b2002

update statichat

Browse files
dist/gramm-ai/browser/assets/staticchat/bg-layout.png ADDED

Git LFS Details

  • SHA256: b03aba7cad156d26ab292172a07bed66adeb2a822adb3eb10044a6f353843118
  • Pointer size: 132 Bytes
  • Size of remote file: 1.16 MB
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-53XHVZC2.js" type="module"></script></body>
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: 91vh;
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
- <!-- If bot exists in pair (now shown below user) -->
21
- <div *ngIf="pair.bot" class="message-row bot-row">
22
- <img src="assets/staticchat/teacher.png" class="avatar" />
23
- <div class="message-bubble bot-message">
24
- <span style="font-size:1.5vw;">{{ pair.bot.text }}</span>
25
-
26
- <div class="mediaRow" *ngIf="pair.bot.rawData && (pair.bot.rawData?.audio_url || pair.bot.rawData?.video_url)">
27
- <button class="chip" *ngIf="pair.bot.rawData?.audio_url" (click)="playAudio(pair.bot.rawData?.audio_url)">
28
- πŸ”Š Audio
29
- </button>
30
- <button class="chip" *ngIf="pair.bot.rawData?.video_url" (click)="playResponseVideo(pair.bot.rawData?.video_url)">
31
- 🎬 Video
32
- </button>
33
- <button class="chip" *ngIf="pair.bot.rawData?.detail_url" (click)="playResponseVideo(pair.bot.rawData?.detail_url)">
34
- πŸ’‘ Detail
35
- </button>
36
- <button class="chip" *ngIf="pair.bot.rawData?.story_url" (click)="playResponseVideo(pair.bot.rawData?.story_url)">
37
- πŸ“– Story
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
- <div class="message-time">
45
- {{ pair.bot.timestamp | date:'shortTime' }}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  </div>
47
  </div>
48
- </div>
49
 
50
- </div>
51
 
52
- <!-- Typing indicator -->
53
- <div *ngIf="isTyping" class="typing-indicator">
54
- <div class="dot"></div>
55
- <div class="dot"></div>
56
- <div class="dot"></div>
 
57
  </div>
58
- </div>
59
- <button class="arrow-btn down" title="Next message" (click)="showNextPair()">↓</button>
60
-
61
- <!-- SUGGESTIONS DROPDOWN -->
62
- <div *ngIf="showSuggestions && suggestedQuestions.length > 0" class="suggestions-box">
63
- <div *ngFor="let question of suggestedQuestions"
64
- class="suggestion-item"
65
- (click)="selectQuestion(question)">
66
- {{ question }}
67
  </div>
68
- </div>
69
 
70
- <!-- INPUT BAR -->
71
- <form [formGroup]="chatForm" (ngSubmit)="sendMessage()" class="chat-input">
72
- <!--<input type="text"
73
- formControlName="message"
74
- #messageInput
75
- placeholder="Type your message..."
76
- (focus)="onInputFocus()"
77
- (input)="onInputChange()"
78
- [readonly]="isSpeechProcessing" />-->
79
- <input type="text"
80
- formControlName="message"
81
- #messageInput
82
- [placeholder]="isListening ? '⏺ Listening...' : 'Type your message...'"
83
- (focus)="onInputFocus()"
84
- (input)="onInputChange()"
85
- [readonly]="isSpeechProcessing || isListening" />
86
-
87
- <button type="button"
88
- class="micBtn"
89
- [disabled]="!supported || isListening"
90
- (click)="toggleMic()">
91
- 🎀
92
- </button>
93
-
94
- <div class="actions" *ngIf="showActions">
95
- <button class="reject" (click)="reject()">❌</button>
96
- <button class="accept" (click)="accept()">βœ…</button>
97
 
98
- </div>
99
 
100
- <button type="submit" [disabled]="!chatForm.valid">
101
- ➀
102
- </button>
103
- </form>
104
 
105
- </div>
106
 
107
 
108
- <div class="video-window">
109
 
110
- <video #videoPlayer autoplay muted playsinline></video>
111
- <img class="play-pause-btn"
112
- [src]="(currentVideoType !== 'blink' && isVideoPlaying) ? 'assets/staticchat/pause.png' : 'assets/staticchat/play.png'"
113
- (click)="togglePlayPause()" />
 
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

  • SHA256: b03aba7cad156d26ab292172a07bed66adeb2a822adb3eb10044a6f353843118
  • Pointer size: 132 Bytes
  • Size of remote file: 1.16 MB