Skip to content
Snippets Groups Projects
Commit 412990e8 authored by andreistroescu's avatar andreistroescu
Browse files

added screen size info to the device information functionality

parent c967cfb8
No related branches found
No related tags found
No related merge requests found
......@@ -74,7 +74,7 @@
<button mat-raised-button color="foreground" (click)="sysInfo()">Get device info</button>
<button mat-raised-button (click)="removeSysInfo()">Hide device info</button>
</div>
<br>
<div>{{ screenSize }} </div>
<div *ngFor="let item of deviceInfo | keyvalue">
{{item.key}}:{{item.value}}
</div>
......
......@@ -21,6 +21,7 @@ export class HomeComponent implements OnInit {
errorMessage = '';
workspaceList: WorkspaceData[] = [];
deviceInfo = null;
screenSize: any;
constructor(private fb: FormBuilder,
private mds: MainDatastoreService,
......@@ -62,10 +63,11 @@ export class HomeComponent implements OnInit {
sysInfo() {
this.deviceInfo = this.deviceService.getDeviceInfo();
const isDesktopDevice = this.deviceService.isDesktop();
this.screenSize = "screen size: " + (window.screen.width) + "px" + (window.screen.height) + "px";
}
removeSysInfo() {
this.deviceInfo = "";
this.screenSize = "";
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment