Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions client/uis/screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export interface UILockScreenElements {
lockedTimeAgo: HTMLSpanElement;
passwordInput: HTMLInputElement;
unlockButton: HTMLButtonElement;
calendar: HTMLDivElement;
}

export interface UIExamModeElements {
Expand All @@ -23,6 +24,7 @@ export interface UIExamModeElements {
examStartText: HTMLSpanElement;
examEndText: HTMLSpanElement;
examStartButton: HTMLButtonElement;
calendar: HTMLDivElement;
}

export abstract class UIScreen {
Expand Down
3 changes: 3 additions & 0 deletions client/uis/screens/examscreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions client/uis/screens/lockscreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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 {
Expand Down