diff --git a/resources/js/Projects/EF27/Pages/IntegratedSignCCH.vue b/resources/js/Projects/EF27/Pages/IntegratedSignCCH.vue index 9db9d93..476d2f8 100644 --- a/resources/js/Projects/EF27/Pages/IntegratedSignCCH.vue +++ b/resources/js/Projects/EF27/Pages/IntegratedSignCCH.vue @@ -36,6 +36,15 @@ onMounted(() => { }) }) +String.prototype.truncate = String.prototype.truncate || + function ( n, useWordBoundary ){ + if (this.length <= n) { return this; } + const subString = this.slice(0, n-1); // the original check + return (useWordBoundary + ? subString.slice(0, subString.lastIndexOf(" ")) + : subString) + "…"; +}; + const nextEvent = function (room) { return computed(() => { return props.schedule.filter(event => { @@ -43,12 +52,24 @@ const nextEvent = function (room) { }).filter(event => { return currentTime.value <= DateTime.fromISO(event.ends_at).plus({minutes: event.delay}) && !event.title.toLowerCase().includes("seating") }).map((event, index) => { + console.log(event.title); event.title = event.title ? event.title - .replace("Dealers' Den & Art Show Party", "") + .replace("Dealers' Den & Art Show", "") + .replace("Dealers' Den", "") + .replace("Art Show", "") .replace("Fursuit Badge", "") - .replace(room.name, "") - .replace(/^[ ‑–—‐−‐–—⸺|‖•‣]+/g, "") : event.title; - + .replace("Registration", "") + .replace("Constore", "") + .replace("Fursuit Badge", "") + .replace("Fursuit Lounge", "") + .replace("Artists' Lounge", "") + .replace("Locker Service", "") + .replace("The Electric Lounge Sessions", "") + // .replace(/^[ ‑–—‐−‐–—⸺|‖•‣]+/g, "") + // .replace("room.name", "") + .replace(/^[\W]+/g, "") + : event.title; + event.title = event.title.split(" – ")[0].truncate(30, true); return event;//event.title.replace(room.name); }).shift(); }); @@ -84,21 +105,20 @@ import HourTime from "@/Components/HourTime.vue";