mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
fix upcoming assessments bug
This commit is contained in:
+2
-2
@@ -5,8 +5,8 @@
|
|||||||
"description": " ",
|
"description": " ",
|
||||||
"main": "webpack.config.js",
|
"main": "webpack.config.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack --config webpack.config.js --mode production",
|
"build": "webpack --config webpack.config.js --mode production && sh ./package.sh",
|
||||||
"dev": "webpack --config webpack.config.js --watch --mode production"
|
"dev": "webpack --config webpack.config.js --watch --mode development"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
+9
-4
@@ -2636,7 +2636,8 @@ function CreateFilters(subjects) {
|
|||||||
let filterdiv = document.querySelector("#upcoming-filters");
|
let filterdiv = document.querySelector("#upcoming-filters");
|
||||||
for (let i = 0; i < subjects.length; i++) {
|
for (let i = 0; i < subjects.length; i++) {
|
||||||
const element = subjects[i];
|
const element = subjects[i];
|
||||||
if (!filteroptions.prototype.hasOwnProperty.call(element.code)) {
|
// eslint-disable-next-line
|
||||||
|
if (!Object.prototype.hasOwnProperty.call(filteroptions, element.code)) {
|
||||||
filteroptions[element.code] = true;
|
filteroptions[element.code] = true;
|
||||||
chrome.storage.local.set({ subjectfilters: filteroptions });
|
chrome.storage.local.set({ subjectfilters: filteroptions });
|
||||||
}
|
}
|
||||||
@@ -3200,13 +3201,15 @@ function SendHomePage() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
console.log("Getting assessments");
|
||||||
let activeClassList;
|
let activeClassList;
|
||||||
GetUpcomingAssessments().then((assessments) => {
|
GetUpcomingAssessments().then((assessments) => {
|
||||||
GetActiveClasses().then((classes) => {
|
GetActiveClasses().then((classes) => {
|
||||||
// Gets all subjects for the student
|
// Gets all subjects for the student
|
||||||
for (let i = 0; i < classes.length; i++) {
|
for (let i = 0; i < classes.length; i++) {
|
||||||
const element = classes[i];
|
const element = classes[i];
|
||||||
if (element.prototype.hasOwnProperty.call("active")) {
|
// eslint-disable-next-line
|
||||||
|
if (element.hasOwnProperty("active")) { // for some reason eslint gets mad, even though it works?
|
||||||
// Finds the active class list with the current subjects
|
// Finds the active class list with the current subjects
|
||||||
activeClassList = classes[i];
|
activeClassList = classes[i];
|
||||||
}
|
}
|
||||||
@@ -3215,20 +3218,22 @@ function SendHomePage() {
|
|||||||
|
|
||||||
let activeSubjectCodes = [];
|
let activeSubjectCodes = [];
|
||||||
// Gets the code for each of the subjects and puts them in an array
|
// Gets the code for each of the subjects and puts them in an array
|
||||||
|
let element;
|
||||||
for (let i = 0; i < activeSubjects.length; i++) {
|
for (let i = 0; i < activeSubjects.length; i++) {
|
||||||
const element = activeSubjects[i];
|
element = activeSubjects[i];
|
||||||
activeSubjectCodes.push(element.code);
|
activeSubjectCodes.push(element.code);
|
||||||
}
|
}
|
||||||
|
|
||||||
let CurrentAssessments = [];
|
let CurrentAssessments = [];
|
||||||
for (let i = 0; i < assessments.length; i++) {
|
for (let i = 0; i < assessments.length; i++) {
|
||||||
const element = assessments[i];
|
element = assessments[i];
|
||||||
if (activeSubjectCodes.includes(element.code)) {
|
if (activeSubjectCodes.includes(element.code)) {
|
||||||
CurrentAssessments.push(element);
|
CurrentAssessments.push(element);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentAssessments.sort(comparedate);
|
CurrentAssessments.sort(comparedate);
|
||||||
|
console.log(CurrentAssessments, activeSubjects);
|
||||||
|
|
||||||
CreateUpcomingSection(CurrentAssessments, activeSubjects);
|
CreateUpcomingSection(CurrentAssessments, activeSubjects);
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -145,7 +145,7 @@ ul.magicDelete > li.deleting {
|
|||||||
|
|
||||||
#menu li,
|
#menu li,
|
||||||
#menu section {
|
#menu section {
|
||||||
margin: 3px 20px;
|
margin-right: 8px !important;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
@@ -191,6 +191,10 @@ ul.magicDelete > li.deleting {
|
|||||||
width: 85% !important;
|
width: 85% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
li.item.draggable {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
#menu li.active > .sub > ul > .item {
|
#menu li.active > .sub > ul > .item {
|
||||||
box-shadow: inset 3px 0 var(--item-colour, transparent);
|
box-shadow: inset 3px 0 var(--item-colour, transparent);
|
||||||
border-radius: 0px 8px 8px 0px;
|
border-radius: 0px 8px 8px 0px;
|
||||||
@@ -714,7 +718,7 @@ div > ol:has(.uiFileHandlerWrapper) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.border {
|
.border {
|
||||||
border-radius: 8px;
|
border-radius: 0.5rem 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shortcut-container h2 {
|
.shortcut-container h2 {
|
||||||
@@ -1617,7 +1621,7 @@ body {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
background: black;
|
background: black;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 19;
|
z-index: 10;
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1636,7 +1640,7 @@ body {
|
|||||||
.editmenuoption-container {
|
.editmenuoption-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 42px;
|
height: 42px;
|
||||||
background: var(--background-primary);
|
background: var(--better-main);
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -1751,9 +1755,8 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.draggable::before {
|
.draggable::before {
|
||||||
left: 0 !important;
|
top: 1.1rem;
|
||||||
top: 100% !important;
|
left: -0.5rem;
|
||||||
transform: translateY(-100%) !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#menuToggle {
|
#menuToggle {
|
||||||
|
|||||||
+10
-10
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user