Skip to content

Commit 175e792

Browse files
committed
Setup changelog for v2.3.8 + misc changes
Misc changes: 1. Code cleanup 2. Add strings for a hardcoded string.
1 parent 9237fda commit 175e792

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### Version 2.3.8
2+
- `Scanner Paused` color tone changes.
3+
- Misc code refactor.
4+
15
### Version 2.3.7
26
- Fix QR code scanning error.
37

src/html5-qrcode-scanner.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,6 @@ export class Html5QrcodeScanner {
493493
}
494494

495495
private setupInitialDashboard(dashboard: HTMLElement) {
496-
const $this = this;
497496
this.createSection(dashboard);
498497
this.createSectionControlPanel();
499498
if (this.scanTypeSelector.hasMoreThanOneScanType()) {
@@ -636,7 +635,6 @@ export class Html5QrcodeScanner {
636635
}
637636

638637
private createSectionControlPanel() {
639-
const $this = this;
640638
const section = document.getElementById(this.getDashboardSectionId())!;
641639
const sectionControlPanel = document.createElement("div");
642640
section.appendChild(sectionControlPanel);

src/html5-qrcode.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,12 +1096,13 @@ export class Html5Qrcode {
10961096
// TODO(mebjas): Convert this to a standard message viewer.
10971097
private createScannerPausedUiElement(rootElement: HTMLElement) {
10981098
const scannerPausedUiElement = document.createElement("div");
1099-
scannerPausedUiElement.innerText = "Scanner paused";
1099+
scannerPausedUiElement.innerText = Html5QrcodeStrings.scannerPaused();
11001100
scannerPausedUiElement.style.display = "none";
11011101
scannerPausedUiElement.style.position = "absolute";
11021102
scannerPausedUiElement.style.top = "0px";
11031103
scannerPausedUiElement.style.zIndex = "1";
1104-
scannerPausedUiElement.style.background = "yellow";
1104+
scannerPausedUiElement.style.background = "rgba(9, 9, 9, 0.46)";
1105+
scannerPausedUiElement.style.color = "#FFECEC";
11051106
scannerPausedUiElement.style.textAlign = "center";
11061107
scannerPausedUiElement.style.width = "100%";
11071108
rootElement.appendChild(scannerPausedUiElement);

src/strings.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ export class Html5QrcodeStrings {
4141
return "Camera access is only supported in secure context like https "
4242
+ "or localhost.";
4343
}
44+
45+
public static scannerPaused(): string {
46+
return "Scanner paused";
47+
}
4448
}
4549

4650
/**

0 commit comments

Comments
 (0)