|
41 | 41 | 40% { transform: scale(1); opacity: 0.85; } |
42 | 42 | } |
43 | 43 |
|
44 | | - /* Per-message hover actions (Regenerate on last bot, Edit on last user). */ |
45 | | - .chat-msg__actions { position: absolute; top: -0.6rem; right: 0.4rem; display: none; gap: 0.25rem; opacity: 0; transition: opacity 0.15s; } |
| 44 | + /* Per-message actions: a subtle footer row inside the last user/bot |
| 45 | + bubble. No absolute positioning → no clipping or weird overlap |
| 46 | + regardless of bubble width or screen size. Only rendered on the |
| 47 | + last bubble of each role (see updateLastActions in JS). */ |
| 48 | + .chat-msg__actions { display: none; justify-content: flex-end; gap: 0.4rem; margin-top: 0.4rem; padding-top: 0.35rem; border-top: 1px solid rgba(0,0,0,0.1); } |
46 | 49 | .chat-msg--last-user .chat-msg__actions, |
47 | 50 | .chat-msg--last-bot .chat-msg__actions { display: flex; } |
48 | | - .chat-msg--last-user:hover .chat-msg__actions, |
49 | | - .chat-msg--last-bot:hover .chat-msg__actions { opacity: 1; } |
50 | | - .chat-msg__actions button { font-size: 0.72em; padding: 0.15em 0.5em; border-radius: 4px; border: 1px solid rgba(0,0,0,0.15); background: rgba(255,255,255,0.95); cursor: pointer; } |
51 | | - .chat-msg__actions button:disabled { opacity: 0.5; cursor: default; } |
| 51 | + .chat-msg--user .chat-msg__actions { border-top-color: rgba(255,255,255,0.2); } |
| 52 | + .chat-msg__actions button { font-size: 0.75em; padding: 0.2em 0.6em; border-radius: 4px; border: 1px solid currentColor; background: transparent; color: inherit; opacity: 0.75; cursor: pointer; font-family: inherit; } |
| 53 | + .chat-msg__actions button:hover { opacity: 1; } |
| 54 | + .chat-msg__actions button:disabled { opacity: 0.4; cursor: default; } |
52 | 55 |
|
53 | 56 | /* Copy button injected into <pre> blocks by hydrateCodeBlocks(). */ |
54 | 57 | .chat-code-copy { position: absolute; top: 0.35rem; right: 0.35rem; font-size: 0.7em; padding: 0.1em 0.4em; border-radius: 4px; border: 1px solid rgba(0,0,0,0.15); background: rgba(255,255,255,0.9); cursor: pointer; opacity: 0.6; } |
|
92 | 95 | .chat-form .chat-controls select { flex: 1; min-width: 0; } |
93 | 96 | .chat-form .chat-controls .btn { min-height: 40px; padding-inline: 1.1em; } |
94 | 97 | .chat-attachment { width: 3.5rem; height: 3.5rem; } |
95 | | - .chat-msg__actions { top: -0.55rem; } |
96 | 98 | .chat-msg__actions button { opacity: 1; } |
97 | | - /* On touch devices hover is sticky; show actions always on last bubbles. */ |
98 | | - .chat-msg--last-user .chat-msg__actions, |
99 | | - .chat-msg--last-bot .chat-msg__actions { opacity: 1; } |
100 | 99 | } |
101 | 100 | </style> |
102 | 101 | </head> |
@@ -425,11 +424,11 @@ <h1>Admin</h1> |
425 | 424 | var btn = document.createElement('button'); |
426 | 425 | btn.type = 'button'; |
427 | 426 | if (isUser) { |
428 | | - btn.textContent = '\u270E Edit'; |
| 427 | + btn.textContent = 'Edit'; |
429 | 428 | btn.title = 'Edit last message (drops the assistant reply)'; |
430 | 429 | btn.addEventListener('click', editLast); |
431 | 430 | } else { |
432 | | - btn.textContent = '\u21BB Regenerate'; |
| 431 | + btn.textContent = 'Regenerate'; |
433 | 432 | btn.title = 'Regenerate the last reply'; |
434 | 433 | btn.addEventListener('click', regenerateLast); |
435 | 434 | } |
|
0 commit comments