mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
fix: Home page todays lessons not properly changing days #310
This commit is contained in:
@@ -81,7 +81,7 @@ function createHomeButton(fragment: DocumentFragment, _: HTMLElement) {
|
|||||||
container.append(div);
|
container.append(div);
|
||||||
|
|
||||||
const NewButton = stringToHTML(
|
const NewButton = stringToHTML(
|
||||||
'<li class="item" data-key="home" id="homebutton" data-path="/home" data-betterseqta="true"><label><svg style="width:24px;height:24px" viewBox="0 0 24 24"><path fill="currentColor" d="M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z" /></svg><span>Home</span></label></li>',
|
/* html */`<li class="item" data-key="home" id="homebutton" data-path="/home" data-betterseqta="true"><label><svg style="width:24px;height:24px" viewBox="0 0 24 24"><path fill="currentColor" d="M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z" /></svg><span>Home</span></label></li>`
|
||||||
);
|
);
|
||||||
if (NewButton.firstChild) {
|
if (NewButton.firstChild) {
|
||||||
fragment.appendChild(NewButton.firstChild);
|
fragment.appendChild(NewButton.firstChild);
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ let currentSelectedDate = new Date();
|
|||||||
export async function loadHomePage() {
|
export async function loadHomePage() {
|
||||||
console.info("[BetterSEQTA+] Started Loading Home Page");
|
console.info("[BetterSEQTA+] Started Loading Home Page");
|
||||||
|
|
||||||
|
// Reset currentSelectedDate to today when remounting the home page
|
||||||
|
currentSelectedDate = new Date();
|
||||||
|
|
||||||
// Wait for the DOM to finish clearing
|
// Wait for the DOM to finish clearing
|
||||||
await delay(10);
|
await delay(10);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user