This commit is contained in:
2025-02-18 15:38:43 +01:00
parent 7e2a48a469
commit 3df5ae6b80
3 changed files with 50 additions and 9 deletions
+11 -7
View File
@@ -489,10 +489,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
scroll-behavior: smooth; scroll-behavior: smooth;
} }
.sx__slide-left {
/* animation: sx-slide-left 0.3s ease-out; */
}
@keyframes sx-slide-left { @keyframes sx-slide-left {
0% { 0% {
transform: translateX(8%); transform: translateX(8%);
@@ -505,9 +501,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
opacity: 1; opacity: 1;
} }
} }
.sx__slide-right {
/* animation: sx-slide-right 0.3s ease-out; */
}
@keyframes sx-slide-right { @keyframes sx-slide-right {
0% { 0% {
@@ -1254,3 +1247,14 @@ html:has(.is-shadcn) .sx__date-picker__day--today {
background-color: var(--sx-color-surface-container); background-color: var(--sx-color-surface-container);
color: var(--sx-internal-color-text); 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 */
}
+17 -2
View File
@@ -1,3 +1,5 @@
'use client';
import { import {
Dialog, Dialog,
DialogContent, DialogContent,
@@ -19,6 +21,9 @@ import { CalendarIcon } from 'lucide-react';
import { Calendar } from './ui/calendar'; import { Calendar } from './ui/calendar';
import TimeSelect from './timeSelect'; import TimeSelect from './timeSelect';
import { CalendarEventExternal } from '@schedule-x/calendar'; import { CalendarEventExternal } from '@schedule-x/calendar';
import { Textarea } from './ui/textarea';
import { Label } from './ui/label';
import { useState } from 'react';
type PostDialogProps = { type PostDialogProps = {
newPostDialogOpen: boolean; newPostDialogOpen: boolean;
@@ -40,6 +45,8 @@ export default function PostDialog({
setEvents, setEvents,
eventId, eventId,
}: PostDialogProps) { }: PostDialogProps) {
const [content, setContent] = useState('');
return ( return (
<Dialog open={newPostDialogOpen} onOpenChange={setNewPostDialogOpen}> <Dialog open={newPostDialogOpen} onOpenChange={setNewPostDialogOpen}>
<DialogContent> <DialogContent>
@@ -95,6 +102,15 @@ export default function PostDialog({
/> />
</div> </div>
<div className="grid w-full gap-1.5">
<Label htmlFor="message">Content</Label>
<Textarea
className="resize-none"
placeholder="Enter your content here"
onChange={(event) => setContent(event.target.value)}
/>
</div>
<DialogFooter> <DialogFooter>
<Button <Button
variant="outline" variant="outline"
@@ -108,11 +124,10 @@ export default function PostDialog({
end.setHours(date.getHours() + 1); end.setHours(date.getHours() + 1);
setEvents({ setEvents({
title: 'My title', title: 'Post',
id: eventId, id: eventId,
start: format(date, 'y-MM-dd hh:mm'), start: format(date, 'y-MM-dd hh:mm'),
end: format(end, 'y-MM-dd hh:mm'), end: format(end, 'y-MM-dd hh:mm'),
description: '',
}); });
setNewPostDialogOpen(false); setNewPostDialogOpen(false);
+22
View File
@@ -0,0 +1,22 @@
import * as React from "react"
import { cn } from "@/lib/utils"
const Textarea = React.forwardRef<
HTMLTextAreaElement,
React.ComponentProps<"textarea">
>(({ className, ...props }, ref) => {
return (
<textarea
className={cn(
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
className
)}
ref={ref}
{...props}
/>
)
})
Textarea.displayName = "Textarea"
export { Textarea }