From 3df5ae6b80342cb28fd5cb877e11cfac53750d59 Mon Sep 17 00:00:00 2001 From: Leo dev Date: Tue, 18 Feb 2025 15:38:43 +0100 Subject: [PATCH] bug fix --- src/calendar-theme.css | 18 +++++++++++------- src/components/postDialog.tsx | 19 +++++++++++++++++-- src/components/ui/textarea.tsx | 22 ++++++++++++++++++++++ 3 files changed, 50 insertions(+), 9 deletions(-) create mode 100644 src/components/ui/textarea.tsx diff --git a/src/calendar-theme.css b/src/calendar-theme.css index 0c1f6be..bfeab67 100644 --- a/src/calendar-theme.css +++ b/src/calendar-theme.css @@ -489,10 +489,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI scroll-behavior: smooth; } -.sx__slide-left { - /* animation: sx-slide-left 0.3s ease-out; */ -} - @keyframes sx-slide-left { 0% { transform: translateX(8%); @@ -505,9 +501,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI opacity: 1; } } -.sx__slide-right { - /* animation: sx-slide-right 0.3s ease-out; */ -} @keyframes sx-slide-right { 0% { @@ -1254,3 +1247,14 @@ html:has(.is-shadcn) .sx__date-picker__day--today { background-color: var(--sx-color-surface-container); color: var(--sx-internal-color-text); } + +/* modified by leo, this is done because on mobile sometimes pc, you select the calendar without wanting to */ +.sx__calendar, +.sx__calendar * { + -webkit-touch-callout: none !important; /* iOS Safari */ + -webkit-user-select: none !important; /* Safari, Chrome, Opera, Samsung */ + -khtml-user-select: none !important; /* Konqueror HTML */ + -moz-user-select: none !important; /* Firefox */ + -ms-user-select: none !important; /* Edge, IE */ + user-select: none !important; /* Modern browsers */ +} diff --git a/src/components/postDialog.tsx b/src/components/postDialog.tsx index ef54f40..95bed1c 100644 --- a/src/components/postDialog.tsx +++ b/src/components/postDialog.tsx @@ -1,3 +1,5 @@ +'use client'; + import { Dialog, DialogContent, @@ -19,6 +21,9 @@ import { CalendarIcon } from 'lucide-react'; import { Calendar } from './ui/calendar'; import TimeSelect from './timeSelect'; import { CalendarEventExternal } from '@schedule-x/calendar'; +import { Textarea } from './ui/textarea'; +import { Label } from './ui/label'; +import { useState } from 'react'; type PostDialogProps = { newPostDialogOpen: boolean; @@ -40,6 +45,8 @@ export default function PostDialog({ setEvents, eventId, }: PostDialogProps) { + const [content, setContent] = useState(''); + return ( @@ -95,6 +102,15 @@ export default function PostDialog({ /> +
+ +