From 950d69002005762e4d9797b71ce3ef98f7c09445 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Wed, 27 Jul 2022 21:48:31 +0200 Subject: [PATCH 01/41] Tweaks --- src/App.svelte | 5 +---- src/calendar.js | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index cba1a8a..34972f5 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,5 +1,4 @@ -{#if isLoading} -
-
- -
-
-{/if} -

Calendrier de la vie étudiante à l'ENS

@@ -184,16 +189,6 @@
-- 2.47.1 From 9bc5e860ea0d54855c3929cfe049c5c55ef289f3 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Thu, 28 Jul 2022 14:39:51 +0200 Subject: [PATCH 04/41] Update share modal --- src/Share.svelte | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/src/Share.svelte b/src/Share.svelte index 73a99ad..db8dd30 100644 --- a/src/Share.svelte +++ b/src/Share.svelte @@ -1,5 +1,13 @@ - + diff --git a/src/Share.svelte b/src/Share.svelte index db8dd30..c6f2b7e 100644 --- a/src/Share.svelte +++ b/src/Share.svelte @@ -69,7 +69,12 @@ - - {#if event.allDay} + {#if event.extendedProps.simAllDay} + + {dateFormat(event.start)} ({timeFormat(event.extendedProps.realStart)}) - {dateFormat(event.end)} ({timeFormat(event.extendedProps.realEnd)}) + {:else if event.allDay} {dateFormat(event.start)} - {dateFormat(event.end)} {:else} diff --git a/src/calendar.js b/src/calendar.js index e3c0b36..ca9d2d6 100644 --- a/src/calendar.js +++ b/src/calendar.js @@ -132,13 +132,29 @@ function fcEventFromjCalEvent(cal) { return function (evt) { const start = new Date(evt.dtstart) const end = new Date(evt.dtend) + + const duration = end - start // in ms + const dayMs = 24 * 3600 * 1000 + const fcEvent = { title: `${cal.short_name ?? cal.name} : ${evt.summary}`, - start: evt.dtstart, - end: evt.dtend, + start: start, + end: end, color: cal.color, textColor: invertColor(cal.color), - duration: end - start // in ms + duration: duration + } + + if (duration > dayMs - 1) { + fcEvent.allDay = true + fcEvent.simAllDay = true + + fcEvent.realStart = new Date(start) + fcEvent.realEnd = new Date(end) + + fcEvent.start.setUTCHours(0, 0, 0) + fcEvent.end.setUTCHours(23, 59, 59) + fcEvent.duration = end - start // Update the duration } fcEvent.calendar = cal.name -- 2.47.1 From 32d9b4d60c601ef23df4444320aabfb94efb12a0 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Tue, 25 Oct 2022 10:38:09 +0200 Subject: [PATCH 39/41] Fix display or real allDay events --- src/calendar.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/calendar.js b/src/calendar.js index ca9d2d6..c8ef67a 100644 --- a/src/calendar.js +++ b/src/calendar.js @@ -133,27 +133,29 @@ function fcEventFromjCalEvent(cal) { const start = new Date(evt.dtstart) const end = new Date(evt.dtend) + const allDay = !evt.dtstart.endsWith('Z') + const duration = end - start // in ms const dayMs = 24 * 3600 * 1000 const fcEvent = { title: `${cal.short_name ?? cal.name} : ${evt.summary}`, - start: start, - end: end, + start: evt.dtstart, + end: evt.dtend, color: cal.color, textColor: invertColor(cal.color), duration: duration } - if (duration > dayMs - 1) { + if (!allDay && (duration > dayMs - 1)) { fcEvent.allDay = true fcEvent.simAllDay = true fcEvent.realStart = new Date(start) fcEvent.realEnd = new Date(end) - fcEvent.start.setUTCHours(0, 0, 0) - fcEvent.end.setUTCHours(23, 59, 59) + fcEvent.start = start.setUTCHours(0, 0, 0) + fcEvent.end = end.setUTCHours(23, 59, 59) fcEvent.duration = end - start // Update the duration } -- 2.47.1 From 7c5df4e7904eb6c55a6578d4b5c47cb87c3a812f Mon Sep 17 00:00:00 2001 From: sinavir Date: Sun, 23 Jul 2023 13:27:12 +0200 Subject: [PATCH 40/41] =?UTF-8?q?Add=20rentr=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/calendars.json | 50 +++++++++++++++++++++++++++++++++++++++++++-- data/locations.json | 4 +++- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/data/calendars.json b/data/calendars.json index 5986545..0ef8aa9 100644 --- a/data/calendars.json +++ b/data/calendars.json @@ -1,6 +1,15 @@ { "tree": { + "Rentrée": { + "Amphis de rentrée": {}, + "Départements": {}, + "Visites de bibliothèque": {}, + "Masters": {}, + "Étudiants internationaux": {}, + "Conférences de recherche": {} + }, "COF": { + "Rentrée du COF": {}, "Évènements (COF)": {}, "Assemblées Générales (COF)": {}, "BdA": { @@ -24,7 +33,10 @@ "Ulmity": {}, "Club Inutile ☔": {} }, - "BDS": {}, + "BDS": { + "Évènements (BDS)": {}, + "Rentrée du BDS": {} + }, "Clubs BDS": { "Créneaux encadrés": {} }, @@ -123,7 +135,7 @@ "short_name": "Banda" }, "dSYCtdC6bgyWpKyt": { - "name": "BDS" + "name": "Évènements (BDS)" }, "goXLq2dQ8LgFAjkM": { "name": "Club Bouffe" @@ -144,6 +156,40 @@ }, "AYNpoC674yAjEmRy": { "name": "L'Hômonerie" + }, + "TcwNdrs6iyBRxFzk": { + "name": "Divers" + }, + "G5ZRyTkMifXC2iHj": { + "name": "Amphis de rentrée", + "short_name": "Amphis" + }, + "dJofECeczaGgNiKs": { + "name": "Rentrée du BDS", + "short_name": "BDS" + }, + "7Rwd8JERwBsso7XG": { + "name": "Rentrée du COF", + "short_name": "COF" + }, + "tiMsNcncqBxR4nL2": { + "name": "Départements", + "short_name": "Dpt" + }, + "RpP773D6e2ReLfcY": { + "name": "Visites de bibliothèque", + "short_name": "Bibli" + }, + "YRZ4A8imEEf8jnDE": { + "name": "Masters" + }, + "8EDHX6kiPYcSrXXL": { + "name": "Étudiants internationaux", + "short_name": "Internationaux" + }, + "TWgNxdri7zQSoiRf": { + "name": "Conférences de recherche", + "short_name": "Conf" } } } diff --git a/data/locations.json b/data/locations.json index 5e705d8..a90d540 100644 --- a/data/locations.json +++ b/data/locations.json @@ -1,10 +1,12 @@ { "nameMap": { "Amphi Jourdan": "Amphithéâtre Jourdan", + "Cour aux Ernest": "Cour aux Ernests", "R2-21 (Jourdan)": "R2-21", "Salle Jean Ibanes (Jourdan, R1-07)": "Salle Jean Ibanes (R1-07)", "Salle Madeleine Rebérioux (Jourdan, R2-02)": "Salle Madeleine Rebérioux (R2-02)", - "Salle Marcel Roncayolo (Jourdan, R2-05)": "Salle Marcel Roncayolo (R2-05)" + "Salle Marcel Roncayolo (Jourdan, R2-05)": "Salle Marcel Roncayolo (R2-05)", + "Cour des bibliothèques": "Cour du NIR" }, "rooms": { -- 2.47.1 From 85570af7afa4b618ee59b194191d9198b88e9627 Mon Sep 17 00:00:00 2001 From: sinavir Date: Wed, 20 Sep 2023 15:37:55 +0200 Subject: [PATCH 41/41] Add arts-pla' --- data/calendars.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data/calendars.json b/data/calendars.json index 0ef8aa9..d4847ea 100644 --- a/data/calendars.json +++ b/data/calendars.json @@ -31,6 +31,7 @@ "BandarrêtdurgENS": {}, "L'Hômonerie": {}, "Ulmity": {}, + "Arts pla'": {}, "Club Inutile ☔": {} }, "BDS": { @@ -190,6 +191,10 @@ "TWgNxdri7zQSoiRf": { "name": "Conférences de recherche", "short_name": "Conf" + }, + "MJf2wnQafbLc2arS": { + "name": "Arts pla'", + "color": "#ffb969" } } } -- 2.47.1