sorted the title updates
This commit is contained in:
parent
17f1cbfa9b
commit
c6c659535e
|
|
@ -12,19 +12,21 @@ export class Conductor {
|
|||
return this.instruments;
|
||||
}
|
||||
|
||||
setTitle() {
|
||||
static setTitle() {
|
||||
const now = new Date();
|
||||
const future = new Date(now.getTime() + 59 * 1000); // 59 seconds later
|
||||
|
||||
const formattedDate = `${this.padZero(now.getDate())}.${this.padZero(
|
||||
now.getMonth() + 1
|
||||
)}.${now.getFullYear()}`;
|
||||
const formattedTime = `${this.padZero(now.getHours())}:${this.padZero(
|
||||
now.getMinutes()
|
||||
)}:${this.padZero(now.getSeconds())}`;
|
||||
const formattedFutureTime = `${this.padZero(
|
||||
const formattedDate = `${Conductor.padZero(
|
||||
now.getDate()
|
||||
)}.${Conductor.padZero(now.getMonth() + 1)}.${now.getFullYear()}`;
|
||||
const formattedTime = `${Conductor.padZero(
|
||||
now.getHours()
|
||||
)}:${Conductor.padZero(now.getMinutes())}:${this.padZero(
|
||||
now.getSeconds()
|
||||
)}`;
|
||||
const formattedFutureTime = `${Conductor.padZero(
|
||||
future.getHours()
|
||||
)}:${this.padZero(future.getMinutes())}:${this.padZero(
|
||||
)}:${Conductor.padZero(future.getMinutes())}:${Conductor.padZero(
|
||||
future.getSeconds()
|
||||
)}`;
|
||||
|
||||
|
|
@ -32,7 +34,7 @@ export class Conductor {
|
|||
}
|
||||
|
||||
showMainContent() {
|
||||
this.setTitle();
|
||||
Conductor.setTitle();
|
||||
const mute = document.getElementById("mute");
|
||||
|
||||
mute.addEventListener("click", () => {
|
||||
|
|
@ -80,7 +82,7 @@ export class Conductor {
|
|||
inny.style.opacity = "1";
|
||||
}
|
||||
|
||||
padZero(num) {
|
||||
static padZero(num) {
|
||||
return num.toString().padStart(2, "0");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import { Conductor } from "./conductor";
|
||||
|
||||
export class Renderer {
|
||||
timeIndicator;
|
||||
currStaveNumber;
|
||||
|
|
@ -76,7 +78,7 @@ export class Renderer {
|
|||
this.currStaveNumber = 1;
|
||||
|
||||
// Assuming setTitle() exists globally or is handled elsewhere
|
||||
setTitle();
|
||||
Conductor.setTitle();
|
||||
|
||||
if (reload) location.reload();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue