Merge branch 'main' of https://github.com/jottocraft/dtps into dev
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3dd4378..6e568b8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -26,9 +26,9 @@
npm start
```
-When the server is ready, open Power+ and go to Settings -> About -> Show Advanced Options -> Enable debug config. Then, reload Power+ and go to Settings -> Prerelease testing and select "Debugging". This will make Power+ load from the local server instead of the live version the next time you reload.
+When the server is ready, open Power+ and go to Settings -> About -> Show Advanced Options -> Test prerelease versions. Then, reload Power+ and go to Settings -> Prerelease testing and select "Local". This will make Power+ load from the local server instead of the live version the next time you reload.
## NPM scripts
- `start` Starts an HTTP server for testing Power+ locally
- `build` Minifies Power+ and generates docs into the build folder for deployment
-- `deploy` Runs the build script, then deploys Power+ to the gh-pages branch for hosting
\ No newline at end of file
+- `deploy` Runs the build script, then deploys Power+ to the gh-pages branch for hosting
diff --git a/dtps.css b/dtps.css
index 0c63147..75d3ee6 100644
--- a/dtps.css
+++ b/dtps.css
@@ -1324,10 +1324,20 @@
}
#calendar .fc-h-event {
- border: none;
+ border: 1px solid transparent;
cursor: pointer;
}
+#calendar .fc-event-title i {
+ color: #c44848;
+ font-size: 12px;
+ vertical-align: middle;
+}
+
+#calendar .fc-event-title span {
+ vertical-align: middle;
+}
+
#calendar .fc-daygrid-day.fc-day-today {
background-color: var(--theme);
border-radius: 5px;
diff --git a/scripts/assignments.js b/scripts/assignments.js
index dc8336a..f514b13 100644
--- a/scripts/assignments.js
+++ b/scripts/assignments.js
@@ -318,9 +318,11 @@
id: assignment.id,
allDay: true,
backgroundColor: course.color,
+ borderColor: (assignment.missing === true) ? '#c44848' : 'transparent',
textColor: "white",
classNum: courseIndex,
- assignmentID: assignment.id
+ assignmentID: assignment.id,
+ missing: assignment.missing
});
});
}
@@ -333,6 +335,21 @@
locale: "en",
initialView: 'dayGridMonth',
events: calEvents,
+ eventContent: ( info, createElement ) => {
+ console.log(info);
+ const { missing } = info.event.extendedProps;
+ const html = /*html*/`
+ <div class='fc-event-main-frame'>
+ <div class='fc-event-title-container'>
+ <div class='fc-event-title fc-sticky'>
+ ${missing ? `<i title="Assignment is missing" class="material-icons statusIcon">remove_circle_outline</i>` : ``}
+ <span style="vertical-align: middle;">${info.event.title}</span>
+ </div>
+ </div>
+ </div>
+ `;
+ return { html };
+ },
contentHeight: 0,
handleWindowResize: false,
headerToolbar: {
@@ -340,6 +357,10 @@
center: '',
end: 'prev,next'
},
+ dateClick: function (info) {
+ console.log('Clicked date', info);
+ // Set the current day and update the upcoming assignments based on that
+ },
eventClick: function (info) {
console.log(info)
dtps.assignment(info.event.extendedProps.assignmentID, info.event.extendedProps.classNum);