From 22f055decca37bc207ceafc321284952fca1d045 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Sat, 12 Mar 2022 16:39:58 +0100 Subject: [PATCH] =?UTF-8?q?Ajoute=20le=20support=20des=20statuts=20d'?= =?UTF-8?q?=C3=A9v=C3=A8nements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.svelte | 23 +++++++++++++++-------- src/EventModal.svelte | 12 ++++++++++++ src/calendar.js | 12 +++++++++--- 3 files changed, 36 insertions(+), 11 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index e247689..9176fe7 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -23,6 +23,11 @@ const toggle = () => (openModal = !openModal); const mobile = window.innerWidth < 765; const now = new Date(); + const scrollTo = (() => { + const time = new Date(); + time.setHours(Math.max(0, time.getHours() - 2)); + return time.toLocaleTimeString(); + })(); let calendar; @@ -49,7 +54,7 @@ schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives', nowIndicator: true, now: now, - scrollTime: now.toLocaleTimeString(), + scrollTime: scrollTo, eventClick: info => { openModal = true; event.set(info.event); @@ -82,17 +87,19 @@ -
-
- -
-
+ -