feat: add icon, about dialog and menu

This commit is contained in:
4gray committed 2020-08-30 17:19:03 +02:00
1 parent 78079aa572
commit bcf49b84c7
10 files changed
+120 -15

No files matched your search

+10
View File
@@ -4,9 +4,13 @@ import { AppConfig } from '../environments/environment';
import { akitaDevtools } from '@datorama/akita';
import { Titlebar, Color } from 'custom-electron-titlebar';
import { ElectronService } from './services/electron.service';
import { Router } from '@angular/router';
// create custom title bar
new Titlebar({
backgroundColor: Color.fromHex('#000'),
itemBackgroundColor: Color.fromHex('#222'),
enableMnemonics: true,
});
@Component({
@@ -18,6 +22,7 @@ export class AppComponent {
constructor(
private electronService: ElectronService,
private ngZone: NgZone,
private router: Router,
private translate: TranslateService
) {
if (!AppConfig.production) {
@@ -40,5 +45,10 @@ export class AppComponent {
} else {
console.log('Run in browser');
}
this.electronService.ipcRenderer.on('add-playlist-view', () => {
this.ngZone.run(() => {
this.router.navigateByUrl('/', { skipLocationChange: true });
});
});
}
}