Complete 3.3.3: Mobile Navigation - Implement bottom navigation pattern for mobile with chat controls
This commit is contained in:
parent
a7fa21d3fa
commit
91a5c81a25
3 changed files with 188 additions and 0 deletions
|
|
@ -414,6 +414,33 @@
|
|||
}
|
||||
};
|
||||
|
||||
// Mobile navigation action handler
|
||||
function handleMobileNavAction(action) {
|
||||
switch (action) {
|
||||
case 'toggle-chat':
|
||||
toggleChat();
|
||||
break;
|
||||
case 'refresh-stream':
|
||||
performPullToRefresh();
|
||||
break;
|
||||
case 'toggle-fullscreen':
|
||||
toggleFullscreen();
|
||||
break;
|
||||
case 'toggle-picture-in-picture':
|
||||
togglePictureInPicture();
|
||||
break;
|
||||
case 'toggle-quality':
|
||||
// Toggle quality selector visibility
|
||||
const qualitySelector = document.getElementById('qualitySelector');
|
||||
if (qualitySelector) {
|
||||
qualitySelector.style.display = qualitySelector.style.display === 'none' ? 'block' : 'none';
|
||||
}
|
||||
break;
|
||||
default:
|
||||
AppLogger.warn('Unknown mobile nav action:', action);
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize event listeners
|
||||
function initializeEventListeners() {
|
||||
// Keyboard shortcuts
|
||||
|
|
@ -442,6 +469,18 @@
|
|||
DOMUtils.addEvent(document, 'touchmove', handlePullToRefreshTouchMove, { passive: false });
|
||||
DOMUtils.addEvent(document, 'touchend', handlePullToRefreshTouchEnd, { passive: true });
|
||||
|
||||
// Mobile navigation buttons
|
||||
const mobileNav = document.getElementById('mobileNav');
|
||||
if (mobileNav) {
|
||||
mobileNav.addEventListener('click', function(event) {
|
||||
const button = event.target.closest('.mobile-nav-btn');
|
||||
if (button && button.dataset.action) {
|
||||
event.preventDefault();
|
||||
handleMobileNavAction(button.dataset.action);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
AppLogger.log('UI controls event listeners initialized');
|
||||
}
|
||||
|
||||
|
|
@ -456,6 +495,7 @@
|
|||
updateConnectionStatus: updateConnectionStatus,
|
||||
updateNotificationBadge: updateNotificationBadge,
|
||||
playNotificationSound: playNotificationSound,
|
||||
handleMobileNavAction: handleMobileNavAction,
|
||||
DOMUtils: DOMUtils
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue