fix: update sidebar border styling for consistency across pages

This commit is contained in:
Linus Rath
2026-03-16 11:02:34 +01:00
parent 8044c60905
commit ed4be96706
6 changed files with 59 additions and 56 deletions
+42 -41
View File
@@ -697,7 +697,7 @@ export default function CalendarPage() {
<div className="flex h-dvh bg-background overflow-hidden"> <div className="flex h-dvh bg-background overflow-hidden">
{/* Left Navigation Rail */} {/* Left Navigation Rail */}
{!isMobile && ( {!isMobile && (
<div className="w-14 border-r border-border bg-secondary flex flex-col flex-shrink-0"> <div className="w-14 bg-secondary flex flex-col flex-shrink-0" style={{ borderRight: '1px solid rgba(128, 128, 128, 0.3)' }}>
<NavigationRail <NavigationRail
collapsed collapsed
quota={quota} quota={quota}
@@ -707,6 +707,47 @@ export default function CalendarPage() {
</div> </div>
)} )}
{/* Sidebar - full height */}
{!isMobile && (
<>
<div
className={cn(
"border-r border-border bg-secondary overflow-y-auto flex-shrink-0 p-3",
!isResizing && "transition-[width] duration-300"
)}
style={{ width: `${calSidebarWidth}px` }}
>
<MiniCalendar
selectedDate={selectedDate}
displayMonth={miniMonth}
onSelectDate={handleSelectDate}
onChangeMonth={handleMiniMonthChange}
events={events}
firstDayOfWeek={firstDayOfWeek}
/>
<CalendarSidebarPanel
calendars={calendars}
selectedCalendarIds={selectedCalendarIds}
onToggleVisibility={toggleCalendarVisibility}
onColorChange={client ? (calendarId, color) => {
updateCalendar(client, calendarId, { color });
} : undefined}
onSubscribe={() => setShowSubscriptionModal(true)}
client={client}
/>
</div>
<ResizeHandle
onResizeStart={() => { dragStartWidth.current = calSidebarWidth; setIsResizing(true); }}
onResize={(delta) => setCalSidebarWidth(Math.max(180, Math.min(400, dragStartWidth.current + delta)))}
onResizeEnd={() => {
setIsResizing(false);
localStorage.setItem("calendar-sidebar-width", String(calSidebarWidth));
}}
onDoubleClick={() => { setCalSidebarWidth(256); localStorage.setItem("calendar-sidebar-width", "256"); }}
/>
</>
)}
<div className="flex flex-col flex-1 min-w-0"> <div className="flex flex-col flex-1 min-w-0">
<CalendarToolbar <CalendarToolbar
selectedDate={selectedDate} selectedDate={selectedDate}
@@ -729,46 +770,6 @@ export default function CalendarPage() {
onTouchStart={handleTouchStart} onTouchStart={handleTouchStart}
onTouchEnd={handleTouchEnd} onTouchEnd={handleTouchEnd}
> >
{!isMobile && (
<>
<div
className={cn(
"border-r border-border bg-secondary overflow-y-auto flex-shrink-0 p-3",
!isResizing && "transition-[width] duration-300"
)}
style={{ width: `${calSidebarWidth}px` }}
>
<MiniCalendar
selectedDate={selectedDate}
displayMonth={miniMonth}
onSelectDate={handleSelectDate}
onChangeMonth={handleMiniMonthChange}
events={events}
firstDayOfWeek={firstDayOfWeek}
/>
<CalendarSidebarPanel
calendars={calendars}
selectedCalendarIds={selectedCalendarIds}
onToggleVisibility={toggleCalendarVisibility}
onColorChange={client ? (calendarId, color) => {
updateCalendar(client, calendarId, { color });
} : undefined}
onSubscribe={() => setShowSubscriptionModal(true)}
client={client}
/>
</div>
<ResizeHandle
onResizeStart={() => { dragStartWidth.current = calSidebarWidth; setIsResizing(true); }}
onResize={(delta) => setCalSidebarWidth(Math.max(180, Math.min(400, dragStartWidth.current + delta)))}
onResizeEnd={() => {
setIsResizing(false);
localStorage.setItem("calendar-sidebar-width", String(calSidebarWidth));
}}
onDoubleClick={() => { setCalSidebarWidth(256); localStorage.setItem("calendar-sidebar-width", "256"); }}
/>
</>
)}
{renderView()} {renderView()}
{/* Desktop event panel */} {/* Desktop event panel */}
+1 -1
View File
@@ -437,7 +437,7 @@ export default function ContactsPage() {
return ( return (
<div className="flex h-dvh bg-background overflow-hidden"> <div className="flex h-dvh bg-background overflow-hidden">
{!isMobile && ( {!isMobile && (
<div className="w-14 border-r border-border bg-secondary flex flex-col flex-shrink-0"> <div className="w-14 bg-secondary flex flex-col flex-shrink-0" style={{ borderRight: '1px solid rgba(128, 128, 128, 0.3)' }}>
<NavigationRail <NavigationRail
collapsed collapsed
quota={quota} quota={quota}
+1 -1
View File
@@ -348,7 +348,7 @@ export default function FilesPage() {
return ( return (
<div className="flex h-dvh bg-background overflow-hidden"> <div className="flex h-dvh bg-background overflow-hidden">
{!isMobile && ( {!isMobile && (
<div className="w-14 border-r border-border bg-secondary flex flex-col flex-shrink-0"> <div className="w-14 bg-secondary flex flex-col flex-shrink-0" style={{ borderRight: '1px solid rgba(128, 128, 128, 0.3)' }}>
<NavigationRail <NavigationRail
collapsed collapsed
quota={quota} quota={quota}
+1 -1
View File
@@ -935,7 +935,7 @@ export default function Home() {
<div className="flex flex-1 overflow-hidden"> <div className="flex flex-1 overflow-hidden">
{/* Desktop Navigation Rail */} {/* Desktop Navigation Rail */}
{!isMobile && !isTablet && ( {!isMobile && !isTablet && (
<div className="w-14 border-r border-border bg-secondary flex flex-col flex-shrink-0"> <div className="w-14 bg-secondary flex flex-col flex-shrink-0" style={{ borderRight: '1px solid rgba(128, 128, 128, 0.3)' }}>
<NavigationRail <NavigationRail
collapsed collapsed
quota={quota} quota={quota}
+1 -1
View File
@@ -284,7 +284,7 @@ export default function SettingsPage() {
return ( return (
<div className="flex h-dvh bg-background"> <div className="flex h-dvh bg-background">
{/* Navigation Rail */} {/* Navigation Rail */}
<div className="w-14 border-r border-border bg-secondary flex flex-col flex-shrink-0"> <div className="w-14 bg-secondary flex flex-col flex-shrink-0" style={{ borderRight: '1px solid rgba(128, 128, 128, 0.3)' }}>
<NavigationRail <NavigationRail
collapsed collapsed
quota={quota} quota={quota}
+13 -11
View File
@@ -118,17 +118,19 @@ export function CalendarToolbar({
return ( return (
<div className={cn("flex items-center gap-1.5 px-2 py-2 border-b border-border flex-wrap", !isMobile && "px-4 py-3 gap-2")}> <div className={cn("flex items-center gap-1.5 px-2 py-2 border-b border-border flex-wrap", !isMobile && "px-4 py-3 gap-2")}>
<div className="flex items-center gap-0.5"> {isMobile && (
<button onClick={onPrev} className="p-2 rounded hover:bg-muted transition-colors touch-manipulation" aria-label={t("nav_prev")}> <div className="flex items-center gap-0.5">
<ChevronLeft className="w-4 h-4" /> <button onClick={onPrev} className="p-2 rounded hover:bg-muted transition-colors touch-manipulation" aria-label={t("nav_prev")}>
</button> <ChevronLeft className="w-4 h-4" />
<span className={cn("text-sm font-medium text-center", isMobile ? "min-w-[80px]" : "min-w-[140px]")}> </button>
{getDateLabel()} <span className={cn("text-sm font-medium text-center min-w-[80px]")}>
</span> {getDateLabel()}
<button onClick={onNext} className="p-2 rounded hover:bg-muted transition-colors touch-manipulation" aria-label={t("nav_next")}> </span>
<ChevronRight className="w-4 h-4" /> <button onClick={onNext} className="p-2 rounded hover:bg-muted transition-colors touch-manipulation" aria-label={t("nav_next")}>
</button> <ChevronRight className="w-4 h-4" />
</div> </button>
</div>
)}
<Button variant="outline" size="sm" onClick={onToday} className="touch-manipulation"> <Button variant="outline" size="sm" onClick={onToday} className="touch-manipulation">
{t("views.today")} {t("views.today")}