Compare commits

..

3 Commits

Author SHA1 Message Date
sethburkart123 f996e4bf19 bump: version to hotfix 2024-08-28 15:05:05 +10:00
sethburkart123 30c5a823d8 fix: assessments not loading after notices error #150 2024-08-28 15:02:09 +10:00
sethburkart123 10977247cc fix: manifest description too long 2024-08-27 17:39:26 +10:00
2 changed files with 34 additions and 29 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
{ {
"manifest_version": 3, "manifest_version": 3,
"name": "BetterSEQTA+", "name": "BetterSEQTA+",
"version": "3.3.0", "version": "3.3.1",
"description": "Enhance SEQTA Learn's usability and aesthetics! A fork of BetterSEQTA to continue development, and incorporate a plethora of new features!", "description": "Enhance SEQTA Learn's usability and aesthetics! A fork of BetterSEQTA to continue development add add heaps more features!",
"icons": { "icons": {
"32": "src/resources/icons/icon-32.png", "32": "src/resources/icons/icon-32.png",
"48": "src/resources/icons/icon-48.png", "48": "src/resources/icons/icon-48.png",
+30 -25
View File
@@ -158,6 +158,8 @@ export function OpenWhatsNewPopup() {
let text = stringToHTML( let text = stringToHTML(
/* html */ ` /* html */ `
<div class="whatsnewTextContainer" style="height: 50%;overflow-y: scroll;"> <div class="whatsnewTextContainer" style="height: 50%;overflow-y: scroll;">
<h1>3.3.1 - Hot Fix</h1>
<li>Fixed assessments not loading when no notices are available</li>
<h1>3.3.0 - Overhauled Theming System</h1> <h1>3.3.0 - Overhauled Theming System</h1>
<li>Added a theme store!</li> <li>Added a theme store!</li>
@@ -2195,7 +2197,7 @@ export async function loadHomePage() {
var Notices = stringToHTML(NoticesStr) var Notices = stringToHTML(NoticesStr)
// Appends the shortcut container into the home container // Appends the shortcut container into the home container
document.getElementById('home-container')!.append(Notices.firstChild!) document.getElementById('home-container')!.append(Notices.firstChild!) // HERE!!!
if (settingsState.animations) { if (settingsState.animations) {
animate( animate(
@@ -2219,38 +2221,41 @@ export async function loadHomePage() {
const response = await GetPrefs.json() const response = await GetPrefs.json()
const labelArray = response.payload.filter((item: any) => item.name === 'notices.filters').map((item: any) => item.value)[0].split(' ') const labelArray = response.payload.filter((item: any) => item.name === 'notices.filters').map((item: any) => item.value)
const xhr2 = new XMLHttpRequest() if (labelArray.length !== 0) {
xhr2.open( const labelArray = response.payload.filter((item: any) => item.name === 'notices.filters').map((item: any) => item.value)[0].split(' ')
'POST', const xhr2 = new XMLHttpRequest()
`${location.origin}/seqta/student/load/notices?`, xhr2.open(
true 'POST',
) `${location.origin}/seqta/student/load/notices?`,
xhr2.setRequestHeader('Content-Type', 'application/json; charset=utf-8') true
)
xhr2.onreadystatechange = function () { xhr2.setRequestHeader('Content-Type', 'application/json; charset=utf-8')
if (xhr2.readyState === 4) {
processNotices(xhr2.response, labelArray);
}
};
const dateControl = document.querySelector('input[type="date"]') as HTMLInputElement;
xhr2.send(JSON.stringify({ date: dateControl.value }));
function onInputChange(e: any) {
xhr2.open('POST', `${location.origin}/seqta/student/load/notices?`, true);
xhr2.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
xhr2.send(JSON.stringify({ date: e.target.value }));
xhr2.onreadystatechange = function () { xhr2.onreadystatechange = function () {
if (xhr2.readyState === 4) { if (xhr2.readyState === 4) {
processNotices(xhr2.response, labelArray); processNotices(xhr2.response, labelArray);
} }
}; };
}
dateControl.addEventListener('input', onInputChange); const dateControl = document.querySelector('input[type="date"]') as HTMLInputElement;
xhr2.send(JSON.stringify({ date: dateControl.value }));
function onInputChange(e: any) {
xhr2.open('POST', `${location.origin}/seqta/student/load/notices?`, true);
xhr2.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
xhr2.send(JSON.stringify({ date: e.target.value }));
xhr2.onreadystatechange = function () {
if (xhr2.readyState === 4) {
processNotices(xhr2.response, labelArray);
}
};
}
dateControl.addEventListener('input', onInputChange);
}
if (settingsState.notificationcollector) { if (settingsState.notificationcollector) {
enableNotificationCollector() enableNotificationCollector()