GitHub Copilot commited on
Commit
cf95c2f
·
1 Parent(s): 63bc04d

Match CPU heads-up popup with previous model UI

Browse files
Files changed (1) hide show
  1. static/index.html +92 -29
static/index.html CHANGED
@@ -1141,7 +1141,9 @@
1141
  background: var(--text-muted);
1142
  }
1143
 
1144
- /* CPU heads-up toast */
 
 
1145
  .notification-toast {
1146
  position: fixed;
1147
  bottom: 24px;
@@ -1154,8 +1156,8 @@
1154
  opacity: 0;
1155
  visibility: hidden;
1156
  transform: translateY(20px) scale(0.95);
1157
- transition: all 0.35s ease;
1158
- box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(64, 201, 201, 0.28);
1159
  }
1160
 
1161
  .notification-toast.show {
@@ -1164,6 +1166,33 @@
1164
  transform: translateY(0) scale(1);
1165
  }
1166
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1167
  .toast-header {
1168
  display: flex;
1169
  align-items: center;
@@ -1175,15 +1204,32 @@
1175
  display: flex;
1176
  align-items: center;
1177
  gap: 8px;
1178
- font-size: 15px;
1179
  font-weight: 700;
1180
- color: var(--text-primary);
 
 
 
1181
  }
1182
 
1183
  .toast-icon {
1184
- width: 18px;
1185
- height: 18px;
1186
- color: #2d8cbe;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1187
  }
1188
 
1189
  .toast-close {
@@ -1191,8 +1237,12 @@
1191
  border: none;
1192
  color: var(--text-muted);
1193
  cursor: pointer;
1194
- padding: 3px;
1195
  border-radius: 6px;
 
 
 
 
1196
  }
1197
 
1198
  .toast-close:hover {
@@ -1201,42 +1251,56 @@
1201
  }
1202
 
1203
  .toast-message {
1204
- font-size: 13px;
1205
  color: var(--text-primary);
1206
- line-height: 1.5;
1207
- margin-bottom: 12px;
 
 
 
 
 
 
 
 
1208
  }
1209
 
1210
  .toast-btn {
1211
- background: var(--accent-gradient);
1212
  color: white;
1213
  border: none;
1214
- padding: 10px 14px;
1215
  border-radius: 10px;
1216
- font-size: 13px;
1217
  font-weight: 600;
1218
  cursor: pointer;
 
1219
  width: 100%;
1220
  }
1221
 
 
 
 
 
 
 
1222
  .toast-progress {
1223
  position: absolute;
1224
- left: 0;
1225
  bottom: 0;
 
1226
  height: 3px;
1227
- width: 100%;
1228
  border-radius: 0 0 16px 16px;
1229
- background: linear-gradient(90deg, #00d4aa, #00bcd4);
1230
- animation: toast-progress-shrink 10s linear forwards;
1231
  }
1232
 
1233
- @keyframes toast-progress-shrink {
1234
  from {
1235
  width: 100%;
1236
  }
1237
 
1238
  to {
1239
- width: 0;
1240
  }
1241
  }
1242
 
@@ -1389,12 +1453,12 @@
1389
  <div class="notification-toast" id="notificationToast">
1390
  <div class="toast-header">
1391
  <div class="toast-title">
1392
- <svg class="toast-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
1393
  <circle cx="12" cy="12" r="10"></circle>
1394
  <line x1="12" y1="8" x2="12" y2="12"></line>
1395
  <line x1="12" y1="16" x2="12.01" y2="16"></line>
1396
  </svg>
1397
- Heads Up
1398
  </div>
1399
  <button class="toast-close" onclick="closeToast()">
1400
  <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
@@ -1404,9 +1468,11 @@
1404
  </button>
1405
  </div>
1406
  <p class="toast-message">
1407
- CPU resources are limited here, so responses may be slow. Please wait for your response.
1408
  </p>
1409
- <button class="toast-btn" onclick="closeToast()">OK, got it</button>
 
 
1410
  <div class="toast-progress"></div>
1411
  </div>
1412
 
@@ -1451,10 +1517,7 @@
1451
  // Auto-check connection (optional)
1452
  checkConnection();
1453
 
1454
- if (sessionStorage.getItem('cpuHeadsUpShown') !== 'true') {
1455
- showToast();
1456
- sessionStorage.setItem('cpuHeadsUpShown', 'true');
1457
- }
1458
 
1459
  // Enable send button on input (only if not generating)
1460
  document.getElementById('messageInput').addEventListener('input', (e) => {
 
1141
  background: var(--text-muted);
1142
  }
1143
 
1144
+ /* ============================================ */
1145
+ /* NOTIFICATION TOAST - Bottom Left */
1146
+ /* ============================================ */
1147
  .notification-toast {
1148
  position: fixed;
1149
  bottom: 24px;
 
1156
  opacity: 0;
1157
  visibility: hidden;
1158
  transform: translateY(20px) scale(0.95);
1159
+ transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
1160
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 255, 255, 0.3);
1161
  }
1162
 
1163
  .notification-toast.show {
 
1166
  transform: translateY(0) scale(1);
1167
  }
1168
 
1169
+ /* Animated glowing border */
1170
+ .notification-toast::before {
1171
+ content: '';
1172
+ position: absolute;
1173
+ inset: -2px;
1174
+ border-radius: 18px;
1175
+ padding: 2px;
1176
+ background: linear-gradient(90deg, #1e3a5f, #2d8cbe, #40c9c9, #2d8cbe, #1e3a5f);
1177
+ background-size: 300% 100%;
1178
+ animation: border-glow 3s linear infinite;
1179
+ -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
1180
+ mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
1181
+ -webkit-mask-composite: xor;
1182
+ mask-composite: exclude;
1183
+ z-index: -1;
1184
+ }
1185
+
1186
+ @keyframes border-glow {
1187
+ 0% {
1188
+ background-position: 0% 50%;
1189
+ }
1190
+
1191
+ 100% {
1192
+ background-position: 300% 50%;
1193
+ }
1194
+ }
1195
+
1196
  .toast-header {
1197
  display: flex;
1198
  align-items: center;
 
1204
  display: flex;
1205
  align-items: center;
1206
  gap: 8px;
1207
+ font-size: 16px;
1208
  font-weight: 700;
1209
+ background: linear-gradient(135deg, #1e3a5f 0%, #2d8cbe 50%, #40c9c9 100%);
1210
+ -webkit-background-clip: text;
1211
+ -webkit-text-fill-color: transparent;
1212
+ background-clip: text;
1213
  }
1214
 
1215
  .toast-icon {
1216
+ width: 20px;
1217
+ height: 20px;
1218
+ animation: pulse-icon 2s infinite ease-in-out;
1219
+ }
1220
+
1221
+ @keyframes pulse-icon {
1222
+
1223
+ 0%,
1224
+ 100% {
1225
+ opacity: 1;
1226
+ transform: scale(1);
1227
+ }
1228
+
1229
+ 50% {
1230
+ opacity: 0.7;
1231
+ transform: scale(0.9);
1232
+ }
1233
  }
1234
 
1235
  .toast-close {
 
1237
  border: none;
1238
  color: var(--text-muted);
1239
  cursor: pointer;
1240
+ padding: 4px;
1241
  border-radius: 6px;
1242
+ transition: all 0.2s;
1243
+ display: flex;
1244
+ align-items: center;
1245
+ justify-content: center;
1246
  }
1247
 
1248
  .toast-close:hover {
 
1251
  }
1252
 
1253
  .toast-message {
1254
+ font-size: 14px;
1255
  color: var(--text-primary);
1256
+ line-height: 1.6;
1257
+ margin-bottom: 14px;
1258
+ }
1259
+
1260
+ .toast-message strong {
1261
+ background: linear-gradient(135deg, #2d8cbe 0%, #40c9c9 100%);
1262
+ -webkit-background-clip: text;
1263
+ -webkit-text-fill-color: transparent;
1264
+ background-clip: text;
1265
+ font-weight: 700;
1266
  }
1267
 
1268
  .toast-btn {
1269
+ background: linear-gradient(135deg, #1e3a5f 0%, #2d8cbe 50%, #40c9c9 100%);
1270
  color: white;
1271
  border: none;
1272
+ padding: 12px 24px;
1273
  border-radius: 10px;
1274
+ font-size: 14px;
1275
  font-weight: 600;
1276
  cursor: pointer;
1277
+ transition: all 0.3s ease;
1278
  width: 100%;
1279
  }
1280
 
1281
+ .toast-btn:hover {
1282
+ filter: brightness(1.15);
1283
+ transform: translateY(-2px);
1284
+ box-shadow: 0 4px 20px rgba(45, 140, 190, 0.4);
1285
+ }
1286
+
1287
  .toast-progress {
1288
  position: absolute;
 
1289
  bottom: 0;
1290
+ left: 0;
1291
  height: 3px;
1292
+ background: linear-gradient(90deg, #00FFFF, #00D4FF);
1293
  border-radius: 0 0 16px 16px;
1294
+ animation: progress-shrink 10s linear forwards;
 
1295
  }
1296
 
1297
+ @keyframes progress-shrink {
1298
  from {
1299
  width: 100%;
1300
  }
1301
 
1302
  to {
1303
+ width: 0%;
1304
  }
1305
  }
1306
 
 
1453
  <div class="notification-toast" id="notificationToast">
1454
  <div class="toast-header">
1455
  <div class="toast-title">
1456
+ <svg class="toast-icon" viewBox="0 0 24 24" fill="none" stroke="#2d8cbe" stroke-width="2.5">
1457
  <circle cx="12" cy="12" r="10"></circle>
1458
  <line x1="12" y1="8" x2="12" y2="12"></line>
1459
  <line x1="12" y1="16" x2="12.01" y2="16"></line>
1460
  </svg>
1461
+ Heads Up!
1462
  </div>
1463
  <button class="toast-close" onclick="closeToast()">
1464
  <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
 
1468
  </button>
1469
  </div>
1470
  <p class="toast-message">
1471
+ Responses may be <strong>slow</strong> due to limited CPU resources. Thank you for your patience!
1472
  </p>
1473
+ <button class="toast-btn" onclick="closeToast()">
1474
+ Let's Chat!
1475
+ </button>
1476
  <div class="toast-progress"></div>
1477
  </div>
1478
 
 
1517
  // Auto-check connection (optional)
1518
  checkConnection();
1519
 
1520
+ showToast();
 
 
 
1521
 
1522
  // Enable send button on input (only if not generating)
1523
  document.getElementById('messageInput').addEventListener('input', (e) => {