mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-16 22:26:16 -08:00
feat: electron based app
This commit is contained in:
1 parent
2719d3932c
commit
998e7e9255
109 files changed
+13120
-6262
No files matched your search
@@ -1,16 +1,44 @@
|
||||
import { Component, NgZone } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { AppConfig } from '../environments/environment';
|
||||
import { akitaDevtools } from '@datorama/akita';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { Titlebar, Color } from 'custom-electron-titlebar';
|
||||
import { ElectronService } from './services/electron.service';
|
||||
|
||||
new Titlebar({
|
||||
backgroundColor: Color.fromHex('#000'),
|
||||
});
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.scss']
|
||||
styleUrls: ['./app.component.scss'],
|
||||
})
|
||||
export class AppComponent {
|
||||
constructor(private ngZone: NgZone) {
|
||||
if (!environment.production) {
|
||||
constructor(
|
||||
private electronService: ElectronService,
|
||||
private ngZone: NgZone,
|
||||
private translate: TranslateService
|
||||
) {
|
||||
if (!AppConfig.production) {
|
||||
akitaDevtools(ngZone);
|
||||
}
|
||||
this.translate.setDefaultLang('en');
|
||||
console.log('AppConfig', AppConfig);
|
||||
|
||||
if (electronService.isElectron) {
|
||||
console.log(process.env);
|
||||
console.log('Run in electron');
|
||||
console.log(
|
||||
'Electron ipcRenderer',
|
||||
this.electronService.ipcRenderer
|
||||
);
|
||||
console.log(
|
||||
'NodeJS childProcess',
|
||||
this.electronService.childProcess
|
||||
);
|
||||
} else {
|
||||
console.log('Run in browser');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user