diff --git a/backend/extension-src/content-script.js b/backend/extension-src/content-script.js
index c13cfb0..f437cad 100644
--- a/backend/extension-src/content-script.js
+++ b/backend/extension-src/content-script.js
@@ -95,7 +95,7 @@ function makeSendButton(bookingId, guestName, variant = 'block') {
btn.id = `tcp-btn-${bookingId}-${variant}`;
btn.type = 'button';
btn.className = variant === 'block' ? 'button most_width' : 'button';
- btn.innerHTML = ' Tablet Push';
+ btn.innerHTML = ' Tablet Push';
btn.style.cssText = `
${variant === 'block' ? 'margin-top: 6px;' : 'margin-right: 8px;'}
background: #be123c; border-color: #be123c; color: #fff;
@@ -103,121 +103,193 @@ function makeSendButton(bookingId, guestName, variant = 'block') {
btn.addEventListener('click', e => {
e.preventDefault();
e.stopPropagation();
- handleSendClick(btn, bookingId, guestName, variant);
+ handleSendClick(btn, bookingId, guestName);
});
return btn;
}
+function escapeHtml(s) {
+ const div = document.createElement('div');
+ div.textContent = s;
+ return div.innerHTML;
+}
+
+// Visual feedback is split two ways: a per-button icon swap for the simple
+// pass/fail cases (no page real estate taken, self-explanatory at a glance),
+// and the picker overlay below for anything that actually needs a human
+// decision (no default configured, default busy, default offline). Detail
+// text lives in the title attribute (hover tooltip) rather than a persistent
+// inline block — keeps every variant (table-cell row, banner, nav-bar menu
+// item) visually identical instead of needing per-container layout math.
+const STATE_ICON = {
+ idle: 'fa-tablet-alt',
+ loading: 'fa-spinner fa-spin',
+ success: 'fa-check',
+ warning: 'fa-exclamation-triangle',
+ error: 'fa-exclamation-triangle',
+};
+const STATE_BG = {
+ idle: '#be123c',
+ loading: '#be123c',
+ success: '#166534',
+ warning: '#b45309',
+ error: '#dc2626',
+};
+const STATE_ICON_COLOR = {
+ success: '#86efac',
+ warning: '#fde68a',
+ error: '#fecaca',
+};
+
+//