-
-
Notifications
You must be signed in to change notification settings - Fork 227
Expand file tree
/
Copy pathmain-screen.component.ts
More file actions
43 lines (37 loc) · 1.18 KB
/
main-screen.component.ts
File metadata and controls
43 lines (37 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { ConfigService } from '../../services/config.service';
import { EventService } from '../../services/event.service';
import { FilesService } from '../../services/files/files.service';
import { PrusaMMUService } from '../../services/prusammu/prusa-mmu.service';
@Component({
selector: 'app-main-screen',
templateUrl: './main-screen.component.html',
standalone: false,
})
export class MainScreenComponent {
public printing = false;
usePrusaMMU = false;
public constructor(
private eventService: EventService,
private fileService: FilesService,
private configService: ConfigService,
private router: Router,
public prusaMMUService: PrusaMMUService,
) {
if (!this.configService.isInitialized()) {
this.router.navigate(['/']);
} else {
this.usePrusaMMU = this.configService.isPrusaMMUPluginEnabled();
}
}
public isPrinting(): boolean {
return this.eventService.isPrinting();
}
public isFileLoaded(): boolean {
return this.fileService.getLoadedFile();
}
public isTouchscreen(): boolean {
return this.configService.isTouchscreen();
}
}