fix: compact mobile session header

Reduce the mobile profile header to a compact identity row and concise actions.
This commit is contained in:
2026-08-05 19:11:48 +02:00
parent 50b549d24a
commit 08571fc845
3 changed files with 97 additions and 11 deletions

View File

@@ -1,4 +1,3 @@
fix: prevent mobile slot field overlap
fix: compact mobile session header
Stack weekday and date controls on narrow screens and constrain native select
widths to their grid column.
Reduce the mobile profile header to a compact identity row and concise actions.

View File

@@ -761,29 +761,29 @@ const DashboardView = ({
return (
<div className="p-4 max-w-6xl mx-auto bg-white shadow-lg rounded-lg mt-4">
<h1 className="text-2xl font-bold mb-4 text-center text-gray-800">Foodsharing Pickup Manager</h1>
<div className="dashboard-summary-card bg-blue-50 border border-blue-100 rounded-lg p-4 mb-4 shadow">
<div className="dashboard-summary-card dashboard-session bg-blue-50 border border-blue-100 rounded-lg p-4 mb-4 shadow">
<div className="flex flex-col md:flex-row md:items-center md:justify-between gap-4">
<div>
<p className="text-sm uppercase text-blue-600 font-semibold">Angemeldet</p>
<p className="text-lg font-medium text-gray-800">{session.profile.name}</p>
<div className="dashboard-session__identity">
<p className="dashboard-session__label text-sm uppercase text-blue-600 font-semibold">Angemeldet</p>
<p className="dashboard-session__name text-lg font-medium text-gray-800">{session.profile.name}</p>
</div>
<div className="flex flex-wrap gap-2 items-center">
<div className="dashboard-session__actions flex flex-wrap gap-2 items-center">
<button
onClick={() => onRefresh({ block: false })}
className="bg-blue-500 hover:bg-blue-600 text-white py-2 px-4 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors"
className="dashboard-session__refresh bg-blue-500 hover:bg-blue-600 text-white py-2 px-4 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors"
>
Betriebe aktualisieren
</button>
<button
onClick={onLogout}
className="bg-gray-200 hover:bg-gray-300 text-gray-800 py-2 px-4 rounded focus:outline-none focus:ring-2 focus:ring-gray-400 transition-colors"
className="dashboard-session__logout bg-gray-200 hover:bg-gray-300 text-gray-800 py-2 px-4 rounded focus:outline-none focus:ring-2 focus:ring-gray-400 transition-colors"
>
Logout
</button>
<button
type="button"
onClick={onToggleNotificationPanel}
className={`flex items-center justify-center w-11 h-11 rounded-full border ${
className={`dashboard-session__notifications flex items-center justify-center w-11 h-11 rounded-full border ${
notificationPanelOpen ? 'border-blue-500 text-blue-600' : 'border-gray-300 text-gray-600'
} hover:text-blue-700 hover:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-400 transition`}
title="Benachrichtigungen konfigurieren"

View File

@@ -3,6 +3,93 @@
}
@media (max-width: 767px) {
.dashboard-session {
margin: 0.75rem 0 1rem;
padding: 0.75rem;
border: 1px solid #dbe4ee;
border-radius: 6px;
background: #f8fafc;
box-shadow: none;
}
.dashboard-session > div {
display: grid;
gap: 0.65rem;
}
.dashboard-session__identity {
display: flex;
align-items: baseline;
gap: 0.4rem;
min-width: 0;
}
.dashboard-session__label,
.dashboard-session__name {
margin: 0;
}
.dashboard-session__label {
flex: 0 0 auto;
color: #64748b;
font-size: 0.75rem;
letter-spacing: 0;
text-transform: none;
}
.dashboard-session__name {
overflow: hidden;
color: #1f2937;
font-size: 0.95rem;
text-overflow: ellipsis;
white-space: nowrap;
}
.dashboard-session__actions {
display: grid;
grid-template-columns: minmax(0, 1fr) auto auto;
gap: 0.45rem;
align-items: center;
}
.dashboard-session__refresh,
.dashboard-session__logout,
.dashboard-session__notifications {
box-sizing: border-box;
min-height: 2.35rem;
border-radius: 5px;
font-size: 0.8125rem;
}
.dashboard-session__refresh {
width: 100%;
border: 1px solid #2563eb;
background: #2563eb;
color: #fff;
}
.dashboard-session__logout {
width: auto;
border: 1px solid #cbd5e1;
padding: 0.45rem 0.65rem;
background: #fff;
color: #475569;
}
.dashboard-session__notifications {
width: 2.35rem;
height: 2.35rem;
padding: 0;
border: 1px solid #cbd5e1;
background: #fff;
color: #475569;
}
.dashboard-session__notifications svg {
width: 1rem;
height: 1rem;
}
.mobile-config-list {
display: block;
padding-bottom: 5.5rem;