more mobile fixes with direct linking and others

This commit is contained in:
lowcarbdev
2025-11-22 22:35:37 -07:00
parent b6d63fc2d2
commit c542c9aebb
3 changed files with 50 additions and 21 deletions
+26
View File
@@ -92,3 +92,29 @@
font-size: 1rem !important; font-size: 1rem !important;
} }
} }
/* Date picker input sizing */
.date-picker-input {
width: 100%;
min-width: 0;
font-size: 0.875rem;
}
/* Date picker wrapper - responsive behavior */
.date-picker-wrapper {
flex-shrink: 0;
}
/* Mobile date picker - more compact and flexible */
@media (max-width: 767.98px) {
.date-picker-wrapper {
flex-grow: 1;
flex-shrink: 1;
min-width: 0;
}
.date-picker-input {
font-size: 0.75rem;
padding: 0.25rem 0.5rem;
}
}
+10 -8
View File
@@ -82,6 +82,8 @@ function App() {
// If conversation not found in list, create a minimal conversation object // If conversation not found in list, create a minimal conversation object
setSelectedConversation({ address, contact_name: address, type: 'message' }) setSelectedConversation({ address, contact_name: address, type: 'message' })
} }
// Hide sidebar on mobile when viewing a conversation (from direct link or navigation)
setShowSidebar(false)
} else { } else {
// Not viewing a specific conversation // Not viewing a specific conversation
setSelectedConversation(null) setSelectedConversation(null)
@@ -223,10 +225,10 @@ function App() {
className={`nav-link ${activeView === 'conversations' ? 'active' : ''}`} className={`nav-link ${activeView === 'conversations' ? 'active' : ''}`}
onClick={() => handleViewChange('conversations')} onClick={() => handleViewChange('conversations')}
> >
<svg style={{width: '1rem', height: '1rem'}} className="me-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg style={{width: '1rem', height: '1rem'}} className="me-sm-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z" /> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z" />
</svg> </svg>
Conversations <span className="d-none d-sm-inline">Conversations</span>
</button> </button>
</li> </li>
<li className="nav-item"> <li className="nav-item">
@@ -234,10 +236,10 @@ function App() {
className={`nav-link ${activeView === 'calls' ? 'active' : ''}`} className={`nav-link ${activeView === 'calls' ? 'active' : ''}`}
onClick={() => handleViewChange('calls')} onClick={() => handleViewChange('calls')}
> >
<svg style={{width: '1rem', height: '1rem'}} className="me-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg style={{width: '1rem', height: '1rem'}} className="me-sm-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" /> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" />
</svg> </svg>
Calls <span className="d-none d-sm-inline">Calls</span>
</button> </button>
</li> </li>
<li className="nav-item"> <li className="nav-item">
@@ -245,10 +247,10 @@ function App() {
className={`nav-link ${activeView === 'search' ? 'active' : ''}`} className={`nav-link ${activeView === 'search' ? 'active' : ''}`}
onClick={() => handleViewChange('search')} onClick={() => handleViewChange('search')}
> >
<svg style={{width: '1rem', height: '1rem'}} className="me-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg style={{width: '1rem', height: '1rem'}} className="me-sm-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
</svg> </svg>
Search <span className="d-none d-sm-inline">Search</span>
</button> </button>
</li> </li>
<li className="nav-item"> <li className="nav-item">
@@ -256,10 +258,10 @@ function App() {
className={`nav-link ${activeView === 'activity' ? 'active' : ''}`} className={`nav-link ${activeView === 'activity' ? 'active' : ''}`}
onClick={() => handleViewChange('activity')} onClick={() => handleViewChange('activity')}
> >
<svg style={{width: '1rem', height: '1rem'}} className="me-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg style={{width: '1rem', height: '1rem'}} className="me-sm-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" /> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg> </svg>
Activity <span className="d-none d-sm-inline">Activity</span>
</button> </button>
</li> </li>
</ul> </ul>
+12 -11
View File
@@ -9,12 +9,13 @@ function DateFilter({ startDate, endDate, minDate, maxDate, onStartDateChange, o
return ( return (
<div className="px-2 py-1 bg-light"> <div className="px-2 py-1 bg-light">
<div className="d-flex align-items-center gap-2 flex-wrap small"> <div className="d-flex align-items-center gap-1 gap-sm-2 small">
<div className="d-flex align-items-center gap-1"> <svg style={{width: '1rem', height: '1rem'}} className="text-primary flex-shrink-0 d-none d-sm-block" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<svg style={{width: '1rem', height: '1rem'}} className="text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" /> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" />
</svg> </svg>
<label className="fw-semibold mb-0">From:</label>
<div className="d-flex align-items-center gap-1 date-picker-wrapper">
<label className="fw-semibold mb-0 flex-shrink-0 small">From:</label>
<DatePicker <DatePicker
selected={startDate} selected={startDate}
onChange={onStartDateChange} onChange={onStartDateChange}
@@ -24,13 +25,13 @@ function DateFilter({ startDate, endDate, minDate, maxDate, onStartDateChange, o
minDate={minDate} minDate={minDate}
maxDate={maxDate} maxDate={maxDate}
dateFormat="MMM d, yyyy" dateFormat="MMM d, yyyy"
className="form-control form-control-sm" className="form-control form-control-sm date-picker-input"
placeholderText="Start date" placeholderText="Start"
/> />
</div> </div>
<div className="d-flex align-items-center gap-1"> <div className="d-flex align-items-center gap-1 date-picker-wrapper">
<label className="fw-semibold mb-0">To:</label> <label className="fw-semibold mb-0 flex-shrink-0 small">To:</label>
<DatePicker <DatePicker
selected={endDate} selected={endDate}
onChange={onEndDateChange} onChange={onEndDateChange}
@@ -40,15 +41,15 @@ function DateFilter({ startDate, endDate, minDate, maxDate, onStartDateChange, o
minDate={startDate || minDate} minDate={startDate || minDate}
maxDate={maxDate} maxDate={maxDate}
dateFormat="MMM d, yyyy" dateFormat="MMM d, yyyy"
className="form-control form-control-sm" className="form-control form-control-sm date-picker-input"
placeholderText="End date" placeholderText="End"
/> />
</div> </div>
{(startDate || endDate) && ( {(startDate || endDate) && (
<button <button
onClick={clearDates} onClick={clearDates}
className="btn btn-sm btn-outline-primary d-flex align-items-center gap-1" className="btn btn-sm btn-outline-primary d-flex align-items-center gap-1 flex-shrink-0"
> >
<svg style={{width: '0.875rem', height: '0.875rem'}} fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg style={{width: '0.875rem', height: '0.875rem'}} fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" /> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />