diff --git a/client/uis/screen.ts b/client/uis/screen.ts index a2db5e9..e9c8d3b 100644 --- a/client/uis/screen.ts +++ b/client/uis/screen.ts @@ -15,6 +15,7 @@ export interface UILockScreenElements { lockedTimeAgo: HTMLSpanElement; passwordInput: HTMLInputElement; unlockButton: HTMLButtonElement; + calendar: HTMLDivElement; } export interface UIExamModeElements { @@ -23,6 +24,7 @@ export interface UIExamModeElements { examStartText: HTMLSpanElement; examEndText: HTMLSpanElement; examStartButton: HTMLButtonElement; + calendar: HTMLDivElement; } export abstract class UIScreen { diff --git a/client/uis/screens/examscreen.ts b/client/uis/screens/examscreen.ts index 816ec17..656b8b3 100644 --- a/client/uis/screens/examscreen.ts +++ b/client/uis/screens/examscreen.ts @@ -42,6 +42,7 @@ export class ExamModeUI extends UIScreen { examStartText: document.getElementById('exam-mode-start') as HTMLSpanElement, examEndText: document.getElementById('exam-mode-end') as HTMLSpanElement, examStartButton: document.getElementById('exam-mode-start-button') as HTMLButtonElement, + calendar: document.getElementById('intra-calendar') as HTMLDivElement, } as UIExamModeElements; this._initForm(); @@ -62,11 +63,13 @@ export class ExamModeUI extends UIScreen { if (this._exam === null) { this.hideForm(); + (this._form as UIExamModeElements).calendar.style.display = 'block'; this._loginScreen.showForm(); return false; } else { this._loginScreen.hideForm(); + (this._form as UIExamModeElements).calendar.style.display = 'none'; this.showForm(); return true; } diff --git a/client/uis/screens/lockscreen.ts b/client/uis/screens/lockscreen.ts index 4d57dea..c211b1e 100644 --- a/client/uis/screens/lockscreen.ts +++ b/client/uis/screens/lockscreen.ts @@ -40,6 +40,7 @@ export class LockScreenUI extends UIScreen { lockedTimeAgo: document.getElementById('active-user-session-locked-ago') as HTMLSpanElement, passwordInput: document.getElementById('active-user-session-password') as HTMLInputElement, unlockButton: document.getElementById('unlock-button') as HTMLButtonElement, + calendar: document.getElementById('intra-calendar') as HTMLDivElement, } as UILockScreenElements; this._initForm(); @@ -58,6 +59,7 @@ export class LockScreenUI extends UIScreen { form.loginName.style.marginTop = UI.getPadding(); // Add some padding for readability form.passwordInput.value = "exam"; form.passwordInput.style.display = "none"; + form.calendar.style.display = "none"; this._enableOrDisableSubmitButton(); } else {