mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-08-07 01:03:15 +02:00
style: Make message action buttons icon-only with uniform size
- Remove text labels from Reply and Map buttons - Add consistent 36x36px square buttons with icons only - Add tooltips for accessibility - Prepare for adding more action buttons in the future Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -716,3 +716,18 @@ main {
|
||||
.leaflet-bottom {
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
/* =============================================================================
|
||||
Message Action Buttons
|
||||
============================================================================= */
|
||||
|
||||
/* Icon-only action buttons on message bubbles */
|
||||
.btn-msg-action {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
padding: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
@@ -583,13 +583,13 @@ function createMessageElement(msg) {
|
||||
<p class="message-content">${processMessageContent(msg.content)}</p>
|
||||
${metaInfo ? `<div class="message-meta">${metaInfo}</div>` : ''}
|
||||
${!msg.is_own ? `
|
||||
<div class="mt-1">
|
||||
<button class="btn btn-outline-secondary btn-sm btn-reply" onclick="replyTo('${escapeHtml(msg.sender)}')">
|
||||
<i class="bi bi-reply"></i> Reply
|
||||
<div class="mt-1 d-flex gap-1">
|
||||
<button class="btn btn-outline-secondary btn-msg-action" onclick="replyTo('${escapeHtml(msg.sender)}')" title="Reply">
|
||||
<i class="bi bi-reply"></i>
|
||||
</button>
|
||||
${contactsGeoCache[msg.sender] ? `
|
||||
<button class="btn btn-outline-primary btn-sm ms-1" onclick="showContactOnMap('${escapeHtml(msg.sender)}', ${contactsGeoCache[msg.sender].lat}, ${contactsGeoCache[msg.sender].lon})">
|
||||
<i class="bi bi-geo-alt"></i> Map
|
||||
<button class="btn btn-outline-primary btn-msg-action" onclick="showContactOnMap('${escapeHtml(msg.sender)}', ${contactsGeoCache[msg.sender].lat}, ${contactsGeoCache[msg.sender].lon})" title="Show on map">
|
||||
<i class="bi bi-geo-alt"></i>
|
||||
</button>
|
||||
` : ''}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user