Merged with main
|
@ -5,7 +5,7 @@ import { CheckIcon } from '@heroicons/react/outline'
|
||||||
export default function Modal(props) {
|
export default function Modal(props) {
|
||||||
return (
|
return (
|
||||||
<Transition.Root show={props.open} as={Fragment}>
|
<Transition.Root show={props.open} as={Fragment}>
|
||||||
<Dialog as="div" static className="fixed z-10 inset-0 overflow-y-auto" open={props.open} onClose={props.handleClose}>
|
<Dialog as="div" static className="fixed z-50 inset-0 overflow-y-auto" open={props.open} onClose={props.handleClose}>
|
||||||
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
<Transition.Child
|
<Transition.Child
|
||||||
as={Fragment}
|
as={Fragment}
|
||||||
|
@ -16,7 +16,7 @@ export default function Modal(props) {
|
||||||
leaveFrom="opacity-100"
|
leaveFrom="opacity-100"
|
||||||
leaveTo="opacity-0"
|
leaveTo="opacity-0"
|
||||||
>
|
>
|
||||||
<Dialog.Overlay className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" />
|
<Dialog.Overlay className="fixed inset-0 bg-gray-500 z-0 bg-opacity-75 transition-opacity" />
|
||||||
</Transition.Child>
|
</Transition.Child>
|
||||||
|
|
||||||
{/* This element is to trick the browser into centering the modal contents. */}
|
{/* This element is to trick the browser into centering the modal contents. */}
|
||||||
|
|
|
@ -67,6 +67,7 @@ export default function Shell(props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return session ? (
|
return session ? (
|
||||||
|
<>
|
||||||
<div className="h-screen flex overflow-hidden bg-gray-100">
|
<div className="h-screen flex overflow-hidden bg-gray-100">
|
||||||
{/* Static sidebar for desktop */}
|
{/* Static sidebar for desktop */}
|
||||||
<div className="hidden md:flex md:flex-shrink-0">
|
<div className="hidden md:flex md:flex-shrink-0">
|
||||||
|
@ -91,7 +92,9 @@ export default function Shell(props) {
|
||||||
)}>
|
)}>
|
||||||
<item.icon
|
<item.icon
|
||||||
className={classNames(
|
className={classNames(
|
||||||
item.current ? "text-neutral-500" : "text-neutral-400 group-hover:text-neutral-500",
|
item.current
|
||||||
|
? "text-neutral-500"
|
||||||
|
: "text-neutral-400 group-hover:text-neutral-500",
|
||||||
"mr-3 flex-shrink-0 h-5 w-5"
|
"mr-3 flex-shrink-0 h-5 w-5"
|
||||||
)}
|
)}
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
@ -108,7 +111,9 @@ export default function Shell(props) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex flex-col w-0 flex-1 overflow-hidden">
|
<div className="flex flex-col w-0 flex-1 overflow-hidden">
|
||||||
|
<main className="flex-1 relative z-0 overflow-y-auto focus:outline-none">
|
||||||
{/* show top navigation for md and smaller (tablet and phones) */}
|
{/* show top navigation for md and smaller (tablet and phones) */}
|
||||||
<nav className="md:hidden bg-white shadow p-4 flex justify-between items-center">
|
<nav className="md:hidden bg-white shadow p-4 flex justify-between items-center">
|
||||||
<Link href="/event-types">
|
<Link href="/event-types">
|
||||||
|
@ -130,8 +135,6 @@ export default function Shell(props) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<main className="flex-1 relative z-0 overflow-y-auto focus:outline-none">
|
|
||||||
<div className="py-6">
|
<div className="py-6">
|
||||||
<div className="block sm:flex justify-between px-4 sm:px-6 md:px-8">
|
<div className="block sm:flex justify-between px-4 sm:px-6 md:px-8">
|
||||||
<div className="mb-6">
|
<div className="mb-6">
|
||||||
|
@ -178,6 +181,7 @@ export default function Shell(props) {
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
) : null;
|
) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,9 @@ export default function EditTeamModal(props) {
|
||||||
}).then(loadMembers);
|
}).then(loadMembers);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (<div className="fixed z-10 inset-0 overflow-y-auto" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
return (<div className="fixed z-50 inset-0 overflow-y-auto" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
||||||
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
<div className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true"></div>
|
<div className="fixed inset-0 bg-gray-500 z-0 bg-opacity-75 transition-opacity" aria-hidden="true"></div>
|
||||||
|
|
||||||
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span>
|
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span>
|
||||||
|
|
||||||
|
|
|
@ -40,12 +40,12 @@ export default function MemberInvitationModal(props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="fixed z-10 inset-0 overflow-y-auto"
|
className="fixed z-50 inset-0 overflow-y-auto"
|
||||||
aria-labelledby="modal-title"
|
aria-labelledby="modal-title"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal="true">
|
aria-modal="true">
|
||||||
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
<div className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true"></div>
|
<div className="fixed inset-0 bg-gray-500 z-0 bg-opacity-75 transition-opacity" aria-hidden="true"></div>
|
||||||
|
|
||||||
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
||||||
​
|
​
|
||||||
|
|
|
@ -28,12 +28,12 @@ export default function SetTimesModal(props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="fixed z-10 inset-0 overflow-y-auto"
|
className="fixed z-50 inset-0 overflow-y-auto"
|
||||||
aria-labelledby="modal-title"
|
aria-labelledby="modal-title"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal="true">
|
aria-modal="true">
|
||||||
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
<div className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true"></div>
|
<div className="fixed inset-0 bg-gray-500 z-0 bg-opacity-75 transition-opacity" aria-hidden="true"></div>
|
||||||
|
|
||||||
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
||||||
​
|
​
|
||||||
|
|
|
@ -65,7 +65,7 @@ export default function Book(props: any): JSX.Element {
|
||||||
const data = event.target["custom_" + input.id];
|
const data = event.target["custom_" + input.id];
|
||||||
if (data) {
|
if (data) {
|
||||||
if (input.type === EventTypeCustomInputType.Bool) {
|
if (input.type === EventTypeCustomInputType.Bool) {
|
||||||
return input.label + "\n" + (data.value ? "Yes" : "No");
|
return input.label + "\n" + (data.checked ? "Yes" : "No");
|
||||||
} else {
|
} else {
|
||||||
return input.label + "\n" + data.value;
|
return input.label + "\n" + data.value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,19 @@ class MyDocument extends Document {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Html>
|
<Html>
|
||||||
<Head />
|
<Head>
|
||||||
|
<meta
|
||||||
|
name="viewport"
|
||||||
|
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
|
||||||
|
/>
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
|
||||||
|
<link rel="manifest" href="/site.webmanifest" />
|
||||||
|
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#000000" />
|
||||||
|
<meta name="msapplication-TileColor" content="#ff0000" />
|
||||||
|
<meta name="theme-color" content="#ffffff" />
|
||||||
|
</Head>
|
||||||
<body className="dark:bg-gray-900 bg-white">
|
<body className="dark:bg-gray-900 bg-white">
|
||||||
<Main />
|
<Main />
|
||||||
<NextScript />
|
<NextScript />
|
||||||
|
|
|
@ -8,7 +8,7 @@ export default function Error() {
|
||||||
const { error } = router.query;
|
const { error } = router.query;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="fixed z-10 inset-0 overflow-y-auto" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
<div className="fixed z-50 inset-0 overflow-y-auto" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
||||||
<Head>
|
<Head>
|
||||||
<title>{error} - Calendso</title>
|
<title>{error} - Calendso</title>
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { CheckIcon } from '@heroicons/react/outline';
|
||||||
|
|
||||||
export default function Logout() {
|
export default function Logout() {
|
||||||
return (
|
return (
|
||||||
<div className="fixed z-10 inset-0 overflow-y-auto" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
<div className="fixed z-50 inset-0 overflow-y-auto" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
||||||
<Head>
|
<Head>
|
||||||
<title>Logged out - Calendso</title>
|
<title>Logged out - Calendso</title>
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
|
|
|
@ -848,13 +848,13 @@ export default function EventTypePage({
|
||||||
</div>
|
</div>
|
||||||
{showLocationModal && (
|
{showLocationModal && (
|
||||||
<div
|
<div
|
||||||
className="fixed z-10 inset-0 overflow-y-auto"
|
className="fixed z-50 inset-0 overflow-y-auto"
|
||||||
aria-labelledby="modal-title"
|
aria-labelledby="modal-title"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal="true">
|
aria-modal="true">
|
||||||
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"
|
className="fixed inset-0 bg-gray-500 z-0 bg-opacity-75 transition-opacity"
|
||||||
aria-hidden="true"></div>
|
aria-hidden="true"></div>
|
||||||
|
|
||||||
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
||||||
|
@ -897,13 +897,13 @@ export default function EventTypePage({
|
||||||
)}
|
)}
|
||||||
{showAddCustomModal && (
|
{showAddCustomModal && (
|
||||||
<div
|
<div
|
||||||
className="fixed z-10 inset-0 overflow-y-auto"
|
className="fixed z-50 inset-0 overflow-y-auto"
|
||||||
aria-labelledby="modal-title"
|
aria-labelledby="modal-title"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal="true">
|
aria-modal="true">
|
||||||
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"
|
className="fixed inset-0 bg-gray-500 z-0 bg-opacity-75 transition-opacity"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
@ -161,13 +161,13 @@ export default function Availability(props) {
|
||||||
</div>
|
</div>
|
||||||
{showChangeTimesModal && (
|
{showChangeTimesModal && (
|
||||||
<div
|
<div
|
||||||
className="fixed z-10 inset-0 overflow-y-auto"
|
className="fixed z-50 inset-0 overflow-y-auto"
|
||||||
aria-labelledby="modal-title"
|
aria-labelledby="modal-title"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal="true">
|
aria-modal="true">
|
||||||
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"
|
className="fixed inset-0 bg-gray-500 z-0 bg-opacity-75 transition-opacity"
|
||||||
aria-hidden="true"></div>
|
aria-hidden="true"></div>
|
||||||
|
|
||||||
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
||||||
|
|
|
@ -11,7 +11,9 @@ import classNames from "@lib/classNames";
|
||||||
import { ClockIcon, XIcon } from "@heroicons/react/outline";
|
import { ClockIcon, XIcon } from "@heroicons/react/outline";
|
||||||
|
|
||||||
export default function Bookings({ bookings }) {
|
export default function Bookings({ bookings }) {
|
||||||
const [, loading] = useSession();
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
|
const [session, loading] = useSession();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
|
@ -72,7 +74,7 @@ export default function Bookings({ bookings }) {
|
||||||
Unconfirmed
|
Unconfirmed
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
<div className="text-sm text-neutral-900 font-medium truncate">
|
<div className="text-sm text-neutral-900 font-medium truncate max-w-60 md:max-w-96">
|
||||||
{booking.title}
|
{booking.title}
|
||||||
</div>
|
</div>
|
||||||
<div className="sm:hidden">
|
<div className="sm:hidden">
|
||||||
|
@ -109,7 +111,7 @@ export default function Bookings({ bookings }) {
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
onClick={() => confirmBookingHandler(booking, false)}
|
onClick={() => confirmBookingHandler(booking, false)}
|
||||||
className="text-xs sm:text-sm ml-4 inline-flex items-center px-4 py-2 border-transparent font-medium rounded-sm shadow-sm text-neutral-700 bg-white hover:bg-neutral-100 border border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-black ml-2">
|
className="text-xs sm:text-sm inline-flex items-center px-4 py-2 border-transparent font-medium rounded-sm shadow-sm text-neutral-700 bg-white hover:bg-neutral-100 border border-neutral-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-black ml-2">
|
||||||
Reject
|
Reject
|
||||||
</button>
|
</button>
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -62,7 +62,7 @@ export default function Type(props) {
|
||||||
<link rel="icon" href="/favicon.ico"/>
|
<link rel="icon" href="/favicon.ico"/>
|
||||||
</Head>
|
</Head>
|
||||||
<main className="max-w-3xl mx-auto my-24">
|
<main className="max-w-3xl mx-auto my-24">
|
||||||
<div className="fixed z-10 inset-0 overflow-y-auto">
|
<div className="fixed z-50 inset-0 overflow-y-auto">
|
||||||
<div
|
<div
|
||||||
className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
<div className="fixed inset-0 my-4 sm:my-0 transition-opacity" aria-hidden="true">
|
<div className="fixed inset-0 my-4 sm:my-0 transition-opacity" aria-hidden="true">
|
||||||
|
|
|
@ -27,7 +27,7 @@ export default function Type(props) {
|
||||||
<link rel="icon" href="/favicon.ico"/>
|
<link rel="icon" href="/favicon.ico"/>
|
||||||
</Head>
|
</Head>
|
||||||
<main className="max-w-3xl mx-auto my-24">
|
<main className="max-w-3xl mx-auto my-24">
|
||||||
<div className="fixed z-10 inset-0 overflow-y-auto">
|
<div className="fixed z-50 inset-0 overflow-y-auto">
|
||||||
<div
|
<div
|
||||||
className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
<div className="fixed inset-0 my-4 sm:my-0 transition-opacity" aria-hidden="true">
|
<div className="fixed inset-0 my-4 sm:my-0 transition-opacity" aria-hidden="true">
|
||||||
|
|
|
@ -391,10 +391,10 @@ export default function EventTypePage({
|
||||||
<Shell heading={"Event Type: " + eventType.title} subtitle={eventType.description}>
|
<Shell heading={"Event Type: " + eventType.title} subtitle={eventType.description}>
|
||||||
<div className="block sm:flex">
|
<div className="block sm:flex">
|
||||||
<div className="w-full sm:w-10/12 mr-2">
|
<div className="w-full sm:w-10/12 mr-2">
|
||||||
<div className="bg-white rounded-sm border border-neutral-200 p-8">
|
<div className="bg-white rounded-sm border border-neutral-200 -mx-4 sm:mx-0 p-4 sm:p-8">
|
||||||
<form onSubmit={updateEventTypeHandler} className="space-y-4">
|
<form onSubmit={updateEventTypeHandler} className="space-y-4">
|
||||||
<div className="flex">
|
<div className="block sm:flex">
|
||||||
<div className="min-w-32">
|
<div className="min-w-32 mb-4 sm:mb-0">
|
||||||
<label htmlFor="title" className="flex font-medium text-neutral-700 mt-1">
|
<label htmlFor="title" className="flex font-medium text-neutral-700 mt-1">
|
||||||
<PencilIcon className="w-4 h-4 mr-2 mt-1 text-neutral-500" />
|
<PencilIcon className="w-4 h-4 mr-2 mt-1 text-neutral-500" />
|
||||||
Title
|
Title
|
||||||
|
@ -413,8 +413,8 @@ export default function EventTypePage({
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex">
|
<div className="block sm:flex">
|
||||||
<div className="min-w-32">
|
<div className="min-w-32 mb-4 sm:mb-0">
|
||||||
<label htmlFor="slug" className="flex font-medium text-neutral-700 mt-1">
|
<label htmlFor="slug" className="flex font-medium text-neutral-700 mt-1">
|
||||||
<LinkIcon className="w-4 h-4 mr-2 mt-1 text-neutral-500" />
|
<LinkIcon className="w-4 h-4 mr-2 mt-1 text-neutral-500" />
|
||||||
URL
|
URL
|
||||||
|
@ -437,8 +437,8 @@ export default function EventTypePage({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex">
|
<div className="block sm:flex">
|
||||||
<div className="min-w-32">
|
<div className="min-w-32 mb-4 sm:mb-0">
|
||||||
<label htmlFor="location" className="flex font-medium text-neutral-700 mt-1">
|
<label htmlFor="location" className="flex font-medium text-neutral-700 mt-1">
|
||||||
<LocationMarkerIcon className="w-4 h-4 mr-2 mt-1 text-neutral-500" />
|
<LocationMarkerIcon className="w-4 h-4 mr-2 mt-1 text-neutral-500" />
|
||||||
Location
|
Location
|
||||||
|
@ -566,8 +566,8 @@ export default function EventTypePage({
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex">
|
<div className="block sm:flex">
|
||||||
<div className="min-w-32">
|
<div className="min-w-32 mb-4 sm:mb-0">
|
||||||
<label htmlFor="length" className="flex font-medium text-neutral-700 mt-1">
|
<label htmlFor="length" className="flex font-medium text-neutral-700 mt-1">
|
||||||
<ClockIcon className="w-4 h-4 mr-2 mt-1 text-neutral-500" />
|
<ClockIcon className="w-4 h-4 mr-2 mt-1 text-neutral-500" />
|
||||||
Duration
|
Duration
|
||||||
|
@ -593,8 +593,8 @@ export default function EventTypePage({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex">
|
<div className="block sm:flex">
|
||||||
<div className="min-w-32">
|
<div className="min-w-32 mb-4 sm:mb-0">
|
||||||
<label htmlFor="description" className="flex font-medium text-neutral-700 mt-1">
|
<label htmlFor="description" className="flex font-medium text-neutral-700 mt-1">
|
||||||
<DocumentIcon className="w-4 h-4 mr-2 mt-1 text-neutral-500" />
|
<DocumentIcon className="w-4 h-4 mr-2 mt-1 text-neutral-500" />
|
||||||
Description
|
Description
|
||||||
|
@ -620,8 +620,8 @@ export default function EventTypePage({
|
||||||
<span className="text-neutral-700 text-sm font-medium">Show advanced settings</span>
|
<span className="text-neutral-700 text-sm font-medium">Show advanced settings</span>
|
||||||
</Disclosure.Button>
|
</Disclosure.Button>
|
||||||
<Disclosure.Panel className="space-y-4">
|
<Disclosure.Panel className="space-y-4">
|
||||||
<div className="flex">
|
<div className="block sm:flex">
|
||||||
<div className="min-w-32">
|
<div className="min-w-32 mb-4 sm:mb-0">
|
||||||
<label htmlFor="eventName" className="flex font-medium text-neutral-700 mt-2">
|
<label htmlFor="eventName" className="flex font-medium text-neutral-700 mt-2">
|
||||||
Event name
|
Event name
|
||||||
</label>
|
</label>
|
||||||
|
@ -640,8 +640,8 @@ export default function EventTypePage({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex">
|
<div className="block sm:flex">
|
||||||
<div className="min-w-32">
|
<div className="min-w-32 mb-4 sm:mb-0">
|
||||||
<label
|
<label
|
||||||
htmlFor="additionalFields"
|
htmlFor="additionalFields"
|
||||||
className="flex font-medium text-neutral-700 mt-2">
|
className="flex font-medium text-neutral-700 mt-2">
|
||||||
|
@ -694,8 +694,8 @@ export default function EventTypePage({
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex">
|
<div className="block sm:flex">
|
||||||
<div className="min-w-32">
|
<div className="min-w-32 mb-4 sm:mb-0">
|
||||||
<label htmlFor="hidden" className="flex font-medium text-neutral-700">
|
<label htmlFor="hidden" className="flex font-medium text-neutral-700">
|
||||||
Hide event type
|
Hide event type
|
||||||
</label>
|
</label>
|
||||||
|
@ -721,8 +721,8 @@ export default function EventTypePage({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex">
|
<div className="block sm:flex">
|
||||||
<div className="min-w-32">
|
<div className="min-w-32 mb-4 sm:mb-0">
|
||||||
<label
|
<label
|
||||||
htmlFor="requiresConfirmation"
|
htmlFor="requiresConfirmation"
|
||||||
className="flex font-medium text-neutral-700">
|
className="flex font-medium text-neutral-700">
|
||||||
|
@ -750,8 +750,8 @@ export default function EventTypePage({
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex">
|
<div className="block sm:flex">
|
||||||
<div className="min-w-32">
|
<div className="min-w-32 mb-4 sm:mb-0">
|
||||||
<label
|
<label
|
||||||
htmlFor="inviteesCanSchedule"
|
htmlFor="inviteesCanSchedule"
|
||||||
className="flex font-medium text-neutral-700 mt-2">
|
className="flex font-medium text-neutral-700 mt-2">
|
||||||
|
@ -769,22 +769,22 @@ export default function EventTypePage({
|
||||||
className={({ checked }) =>
|
className={({ checked }) =>
|
||||||
classnames(
|
classnames(
|
||||||
checked ? "border-secondary-200 z-10" : "border-gray-200",
|
checked ? "border-secondary-200 z-10" : "border-gray-200",
|
||||||
"relative min-h-14 lg:flex items-center cursor-pointer focus:outline-none"
|
"relative min-h-14 flex items-center cursor-pointer focus:outline-none"
|
||||||
)
|
)
|
||||||
}>
|
}>
|
||||||
{({ active, checked }) => (
|
{({ active, checked }) => (
|
||||||
<>
|
<>
|
||||||
<span
|
<div
|
||||||
className={classnames(
|
className={classnames(
|
||||||
checked
|
checked
|
||||||
? "bg-primary-600 border-transparent"
|
? "bg-primary-600 border-transparent"
|
||||||
: "bg-white border-gray-300",
|
: "bg-white border-gray-300",
|
||||||
active ? "ring-2 ring-offset-2 ring-primary-500" : "",
|
active ? "ring-2 ring-offset-2 ring-primary-500" : "",
|
||||||
"h-4 w-4 mt-0.5 cursor-pointer rounded-full border flex items-center justify-center"
|
"h-4 w-4 mt-0.5 mr-2 cursor-pointer rounded-full border items-center justify-center"
|
||||||
)}
|
)}
|
||||||
aria-hidden="true">
|
aria-hidden="true">
|
||||||
<span className="rounded-full bg-white w-1.5 h-1.5" />
|
<span className="rounded-full bg-white w-1.5 h-1.5" />
|
||||||
</span>
|
</div>
|
||||||
<div className="lg:ml-3 flex flex-col">
|
<div className="lg:ml-3 flex flex-col">
|
||||||
<RadioGroup.Label
|
<RadioGroup.Label
|
||||||
as="span"
|
as="span"
|
||||||
|
@ -849,8 +849,8 @@ export default function EventTypePage({
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex">
|
<div className="block sm:flex">
|
||||||
<div className="min-w-32">
|
<div className="min-w-32 mb-4 sm:mb-0">
|
||||||
<label htmlFor="availability" className="flex font-medium text-neutral-700 mt-2">
|
<label htmlFor="availability" className="flex font-medium text-neutral-700 mt-2">
|
||||||
Availability
|
Availability
|
||||||
</label>
|
</label>
|
||||||
|
@ -916,13 +916,13 @@ export default function EventTypePage({
|
||||||
</div>
|
</div>
|
||||||
{showLocationModal && (
|
{showLocationModal && (
|
||||||
<div
|
<div
|
||||||
className="fixed z-10 inset-0 overflow-y-auto"
|
className="fixed z-50 inset-0 overflow-y-auto"
|
||||||
aria-labelledby="modal-title"
|
aria-labelledby="modal-title"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal="true">
|
aria-modal="true">
|
||||||
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"
|
className="fixed inset-0 bg-gray-500 z-0 bg-opacity-75 transition-opacity"
|
||||||
aria-hidden="true"></div>
|
aria-hidden="true"></div>
|
||||||
|
|
||||||
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
||||||
|
@ -966,13 +966,13 @@ export default function EventTypePage({
|
||||||
)}
|
)}
|
||||||
{showAddCustomModal && (
|
{showAddCustomModal && (
|
||||||
<div
|
<div
|
||||||
className="fixed z-10 inset-0 overflow-y-auto"
|
className="fixed z-50 inset-0 overflow-y-auto"
|
||||||
aria-labelledby="modal-title"
|
aria-labelledby="modal-title"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal="true">
|
aria-modal="true">
|
||||||
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"
|
className="fixed inset-0 bg-gray-500 z-0 bg-opacity-75 transition-opacity"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@ export default function Availability({ user, types }) {
|
||||||
heading="Event Types"
|
heading="Event Types"
|
||||||
subtitle="Create events to share for people to book on your calendar."
|
subtitle="Create events to share for people to book on your calendar."
|
||||||
CTA={types.length !== 0 && CreateNewEventDialog}>
|
CTA={types.length !== 0 && CreateNewEventDialog}>
|
||||||
<div className="bg-white shadow overflow-hidden sm:rounded-sm">
|
<div className="bg-white shadow overflow-hidden sm:rounded-sm -mx-4 sm:mx-0">
|
||||||
<ul className="divide-y divide-neutral-200">
|
<ul className="divide-y divide-neutral-200">
|
||||||
{types.map((type) => (
|
{types.map((type) => (
|
||||||
<li key={type.id}>
|
<li key={type.id}>
|
||||||
|
|
|
@ -191,7 +191,7 @@ export default function Home({ integrations }) {
|
||||||
</div>
|
</div>
|
||||||
{showAddModal && (
|
{showAddModal && (
|
||||||
<div
|
<div
|
||||||
className="fixed z-10 inset-0 overflow-y-auto"
|
className="fixed z-50 inset-0 overflow-y-auto"
|
||||||
aria-labelledby="modal-title"
|
aria-labelledby="modal-title"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal="true">
|
aria-modal="true">
|
||||||
|
@ -207,7 +207,7 @@ export default function Home({ integrations }) {
|
||||||
To: "opacity-0"
|
To: "opacity-0"
|
||||||
--> */}
|
--> */}
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"
|
className="fixed inset-0 bg-gray-500 z-0 bg-opacity-75 transition-opacity"
|
||||||
aria-hidden="true"></div>
|
aria-hidden="true"></div>
|
||||||
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
||||||
​
|
​
|
||||||
|
@ -291,7 +291,7 @@ export default function Home({ integrations }) {
|
||||||
</div>
|
</div>
|
||||||
{showSelectCalendarModal && (
|
{showSelectCalendarModal && (
|
||||||
<div
|
<div
|
||||||
className="fixed z-10 inset-0 overflow-y-auto"
|
className="fixed z-50 inset-0 overflow-y-auto"
|
||||||
aria-labelledby="modal-title"
|
aria-labelledby="modal-title"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal="true">
|
aria-modal="true">
|
||||||
|
@ -307,7 +307,7 @@ export default function Home({ integrations }) {
|
||||||
To: "opacity-0"
|
To: "opacity-0"
|
||||||
--> */}
|
--> */}
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"
|
className="fixed inset-0 bg-gray-500 z-0 bg-opacity-75 transition-opacity"
|
||||||
aria-hidden="true"></div>
|
aria-hidden="true"></div>
|
||||||
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
||||||
​
|
​
|
||||||
|
|
|
@ -1,21 +1,22 @@
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
import Link from "next/link";
|
|
||||||
import { useRef, useState } from "react";
|
import { useRef, useState } from "react";
|
||||||
import prisma from "../../lib/prisma";
|
import prisma from "../../lib/prisma";
|
||||||
import Modal from "../../components/Modal";
|
import Modal from "../../components/Modal";
|
||||||
import Shell from "../../components/Shell";
|
import Shell from "../../components/Shell";
|
||||||
import SettingsShell from "../../components/Settings";
|
import SettingsShell from "../../components/Settings";
|
||||||
import { useSession, getSession } from "next-auth/client";
|
import { useSession, getSession } from "next-auth/client";
|
||||||
import Loader from '@components/Loader';
|
import Loader from "@components/Loader";
|
||||||
|
|
||||||
export default function Settings(props) {
|
export default function Settings() {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const [session, loading] = useSession();
|
const [session, loading] = useSession();
|
||||||
|
|
||||||
const [successModalOpen, setSuccessModalOpen] = useState(false);
|
const [successModalOpen, setSuccessModalOpen] = useState(false);
|
||||||
const oldPasswordRef = useRef<HTMLInputElement>();
|
const oldPasswordRef = useRef<HTMLInputElement>();
|
||||||
const newPasswordRef = useRef<HTMLInputElement>();
|
const newPasswordRef = useRef<HTMLInputElement>();
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return <Loader/>;
|
return <Loader />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeSuccessModal = () => {
|
const closeSuccessModal = () => {
|
||||||
|
@ -30,6 +31,7 @@ export default function Settings(props) {
|
||||||
|
|
||||||
// TODO: Add validation
|
// TODO: Add validation
|
||||||
|
|
||||||
|
/*eslint-disable */
|
||||||
const response = await fetch("/api/auth/changepw", {
|
const response = await fetch("/api/auth/changepw", {
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
body: JSON.stringify({ oldPassword: enteredOldPassword, newPassword: enteredNewPassword }),
|
body: JSON.stringify({ oldPassword: enteredOldPassword, newPassword: enteredNewPassword }),
|
||||||
|
@ -37,12 +39,13 @@ export default function Settings(props) {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
/*eslint-enable */
|
||||||
|
|
||||||
setSuccessModalOpen(true);
|
setSuccessModalOpen(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Shell heading="Password" subtitle="Change the password that you use to sign in.">
|
<Shell heading="Password" subtitle="Change the password that you use to sign in to your account.">
|
||||||
<Head>
|
<Head>
|
||||||
<title>Change Password | Calendso</title>
|
<title>Change Password | Calendso</title>
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
|
|
|
@ -126,13 +126,13 @@ export default function Teams() {
|
||||||
</div>
|
</div>
|
||||||
{showCreateTeamModal && (
|
{showCreateTeamModal && (
|
||||||
<div
|
<div
|
||||||
className="fixed z-10 inset-0 overflow-y-auto"
|
className="fixed z-50 inset-0 overflow-y-auto"
|
||||||
aria-labelledby="modal-title"
|
aria-labelledby="modal-title"
|
||||||
role="dialog"
|
role="dialog"
|
||||||
aria-modal="true">
|
aria-modal="true">
|
||||||
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
<div
|
<div
|
||||||
className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"
|
className="fixed inset-0 bg-gray-500 z-0 bg-opacity-75 transition-opacity"
|
||||||
aria-hidden="true"></div>
|
aria-hidden="true"></div>
|
||||||
|
|
||||||
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
||||||
|
|
|
@ -69,7 +69,7 @@ export default function Success(props) {
|
||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
</Head>
|
</Head>
|
||||||
<main className="max-w-3xl mx-auto my-24">
|
<main className="max-w-3xl mx-auto my-24">
|
||||||
<div className="fixed z-10 inset-0 overflow-y-auto">
|
<div className="fixed z-50 inset-0 overflow-y-auto">
|
||||||
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
<div className="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
<div className="fixed inset-0 my-4 sm:my-0 transition-opacity" aria-hidden="true">
|
<div className="fixed inset-0 my-4 sm:my-0 transition-opacity" aria-hidden="true">
|
||||||
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
<span className="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">
|
||||||
|
|
BIN
public/android-chrome-192x192.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
public/android-chrome-256x256.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
public/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
9
public/browserconfig.xml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<browserconfig>
|
||||||
|
<msapplication>
|
||||||
|
<tile>
|
||||||
|
<square150x150logo src="/mstile-150x150.png"/>
|
||||||
|
<TileColor>#ff0000</TileColor>
|
||||||
|
</tile>
|
||||||
|
</msapplication>
|
||||||
|
</browserconfig>
|
BIN
public/favicon-16x16.png
Normal file
After Width: | Height: | Size: 736 B |
BIN
public/favicon-32x32.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
BIN
public/mstile-150x150.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
21
public/safari-pinned-tab.svg
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||||
|
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||||
|
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="363.000000pt" height="363.000000pt" viewBox="0 0 363.000000 363.000000"
|
||||||
|
preserveAspectRatio="xMidYMid meet">
|
||||||
|
<metadata>
|
||||||
|
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
||||||
|
</metadata>
|
||||||
|
<g transform="translate(0.000000,363.000000) scale(0.100000,-0.100000)"
|
||||||
|
fill="#000000" stroke="none">
|
||||||
|
<path d="M1738 2645 c-2 -2 -27 -6 -57 -9 -65 -8 -188 -48 -256 -84 -209 -110
|
||||||
|
-337 -273 -407 -517 -30 -107 -32 -313 -4 -425 64 -253 214 -439 439 -545 384
|
||||||
|
-181 845 -49 1053 303 45 76 93 185 97 221 l2 25 -160 1 c-88 0 -165 -1 -172
|
||||||
|
-3 -6 -2 -14 -14 -17 -26 -8 -32 -85 -129 -132 -167 -82 -66 -190 -100 -319
|
||||||
|
-101 -133 0 -247 52 -344 158 -206 225 -155 617 99 766 154 89 325 96 486 18
|
||||||
|
87 -42 170 -119 209 -196 l21 -39 167 0 c92 0 167 0 167 1 0 0 -11 33 -24 72
|
||||||
|
-25 73 -75 174 -88 180 -5 2 -8 8 -8 14 0 14 -67 95 -120 146 -96 92 -272 179
|
||||||
|
-400 197 -45 7 -227 14 -232 10z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
19
public/site.webmanifest
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"name": "Calendso",
|
||||||
|
"short_name": "Calendso",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/android-chrome-192x192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/android-chrome-256x256.png",
|
||||||
|
"sizes": "256x256",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"theme_color": "#ffffff",
|
||||||
|
"background_color": "#ffffff",
|
||||||
|
"display": "standalone"
|
||||||
|
}
|