mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-25 07:04:38 +02:00
feat(calendar): make toolbar content horizontally scrollable on mobile
- Added overflow-x: auto with hidden scrollbar - Max-width constraint to prevent overflow - Smooth touch scrolling for mobile devices 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
5ebdc35204
commit
e8ec273355
7 changed files with 314 additions and 4 deletions
|
|
@ -153,6 +153,15 @@
|
|||
box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.08);
|
||||
border-radius: 1rem;
|
||||
white-space: nowrap;
|
||||
max-width: calc(100vw - 2rem);
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
scrollbar-width: none; /* Firefox */
|
||||
-ms-overflow-style: none; /* IE/Edge */
|
||||
}
|
||||
|
||||
.toolbar-content::-webkit-scrollbar {
|
||||
display: none; /* Chrome/Safari */
|
||||
}
|
||||
|
||||
:global(.dark) .toolbar-content {
|
||||
|
|
|
|||
|
|
@ -293,8 +293,8 @@
|
|||
.date-strip-wrapper {
|
||||
position: fixed;
|
||||
bottom: calc(140px + env(safe-area-inset-bottom, 0px)); /* Above InputBar + PillNav */
|
||||
left: 1rem;
|
||||
right: 1rem;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 48;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
@ -513,8 +513,8 @@
|
|||
/* Responsive */
|
||||
@media (max-width: 640px) {
|
||||
.date-strip-wrapper {
|
||||
left: 0.5rem;
|
||||
right: 0.5rem;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.date-strip-container {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
/**
|
||||
* Event Context Menu Store - Manages context menu state for calendar events
|
||||
*/
|
||||
|
||||
import type { CalendarEvent } from '@calendar/shared';
|
||||
|
||||
// State
|
||||
let visible = $state(false);
|
||||
let x = $state(0);
|
||||
let y = $state(0);
|
||||
let targetEvent = $state<CalendarEvent | null>(null);
|
||||
|
||||
export const eventContextMenuStore = {
|
||||
// Getters
|
||||
get visible() {
|
||||
return visible;
|
||||
},
|
||||
get x() {
|
||||
return x;
|
||||
},
|
||||
get y() {
|
||||
return y;
|
||||
},
|
||||
get targetEvent() {
|
||||
return targetEvent;
|
||||
},
|
||||
|
||||
/**
|
||||
* Show the context menu for an event
|
||||
*/
|
||||
show(event: CalendarEvent, clientX: number, clientY: number) {
|
||||
targetEvent = event;
|
||||
x = clientX;
|
||||
y = clientY;
|
||||
visible = true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Hide the context menu
|
||||
*/
|
||||
hide() {
|
||||
visible = false;
|
||||
targetEvent = null;
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue