Fix hold button to properly show Resume state when call is on hold

- Enhanced Call SID detection using multiple fallback methods
- Fixed button state logic to properly toggle between Hold/Resume
- Added immediate UI feedback during hold operations
- Enhanced error handling with proper button state reversion
- Added distinctive orange styling for active hold button state
- Improved user messaging to clarify when call is on hold
- Added comprehensive console logging for debugging hold operations
- Fixed logic error in button state updates

The button will now properly show:
- "Hold" when call is active (normal state)
- "Resume" when call is on hold (orange/active state)
- Loading states during operations ("Holding..." / "Resuming...")

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-08-30 16:49:59 -07:00
parent 18ace04e5b
commit cf37cbd3cc
2 changed files with 59 additions and 6 deletions

View File

@@ -1253,4 +1253,17 @@
padding: 20px;
color: #6c757d;
font-style: italic;
}
/* Hold button active state */
.twp-btn.btn-active {
background-color: #ff6b35 !important;
color: white !important;
border-color: #e55100 !important;
font-weight: bold;
}
.twp-btn.btn-active:hover {
background-color: #e55100 !important;
border-color: #bf360c !important;
}