Commit 0250689 1 parent b9099c3 commit 0250689 Copy full SHA for 0250689
File tree 7 files changed +98
-6
lines changed
src/frontend/packages/desktop-extensions
7 files changed +98
-6
lines changed Original file line number Diff line number Diff line change 1
1
< html >
2
2
< body >
3
3
< head >
4
+ < style >
5
+ body {
6
+ font-family : "Lato" , "Helvetica" , "Arial" ;
7
+ margin : 0 ;
8
+ }
9
+ .about {
10
+ padding : 10px ;
11
+ text-align : right;
12
+ }
13
+ .panel {
14
+ align-items : center;
15
+ color : white;
16
+ display : flex;
17
+ flex-direction : column;
18
+ justify-content : center;
19
+ margin : 10px ;
20
+ }
21
+ .title {
22
+ align-items : center;
23
+ display : flex;
24
+ font-family : "Lato" , "Helvetica" , "Arial" ;
25
+ }
26
+ img {
27
+ height : 64px ;
28
+ width : 64px ;
29
+ }
30
+ h1 {
31
+ margin : 0 ;
32
+ padding-left : 10px ;
33
+ }
34
+ h2 {
35
+ font-size : 16px ;
36
+ margin-top : 20px ;
37
+ text-align : center;
38
+ }
39
+ P {
40
+ margin-top : 40px ;
41
+ }
42
+ button {
43
+ position : absolute;
44
+ right : 10px ;
45
+ bottom : 10px ;
46
+ }
47
+ </ style >
4
48
</ head >
5
49
</ body >
6
- < button id ="cancel-btn "> Cancel</ button >
50
+ < div class ="about ">
51
+ < div class ="panel ">
52
+ < div class ="title ">
53
+ < img src ="logo.png " />
54
+ < h1 > STRATOS</ h1 >
55
+ </ div >
56
+ < div >
57
+ < h2 > Version: 4.0.0</ h2 >
58
+ < p > Lovingly designed & created in Bristol</ p >
59
+ </ div >
60
+ </ div >
61
+ < button id ="cancel-btn "> Close</ button >
62
+ </ div >
7
63
< script >
8
64
const remote = require ( 'electron' ) . remote ;
9
65
document . getElementById ( "cancel-btn" ) . addEventListener ( "click" , function ( e ) {
Original file line number Diff line number Diff line change @@ -135,6 +135,10 @@ function doCreateWindow(url) {
135
135
136
136
// Open the DevTools.
137
137
//mainWindow.webContents.openDevTools({mode:'undocked'});
138
+
139
+ // setTimeout(() => {
140
+ // mainWindow.webContents.send('endpointsChanged', 'HELLO!!!!');
141
+ // }, 5000);
138
142
}
139
143
140
144
app . on ( 'ready' , createWindow )
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ function about() {
19
19
let child = new BrowserWindow ( {
20
20
parent : appMainWindow ,
21
21
modal : true ,
22
- width : 300 ,
22
+ width : 360 ,
23
23
height : 300 ,
24
24
webPreferences : {
25
25
enableRemoteModule : true ,
@@ -37,7 +37,6 @@ const template = [
37
37
label : 'About Stratos' ,
38
38
click : function ( ) {
39
39
about ( ) ;
40
- console . log ( 'about' ) ;
41
40
}
42
41
} ,
43
42
{
Original file line number Diff line number Diff line change 1
- .stratos {
1
+ .stratos.stratos-desktop {
2
2
3
3
// Remove some of the padding on the list header
4
4
.list-component__header {
19
19
line-height : 20px ;
20
20
width : 20px ;
21
21
}
22
+
23
+ .page-header__notifications-button .mat-badge-active {
24
+ font-size : 10px ;
25
+ height : 16px ;
26
+ line-height : 16px ;
27
+ right : -8px ;
28
+ top : -98px ;
29
+ width : 16px ;
30
+ }
31
+
32
+ .page-header__left {
33
+ h1 {
34
+ font-size : 18px ;
35
+ }
36
+ }
37
+
22
38
}
Original file line number Diff line number Diff line change 1
1
import { NgModule } from '@angular/core' ;
2
2
import { Router } from '@angular/router' ;
3
+ import { Store } from '@ngrx/store' ;
4
+ import { ElectronService } from 'ngx-electron' ;
3
5
4
6
import { DesktopLoginComponent } from './desktop-login/desktop-login.component' ;
5
7
@@ -15,7 +17,11 @@ export class DesktopModule {
15
17
16
18
static init = false ;
17
19
18
- constructor ( router : Router ) {
20
+ constructor (
21
+ router : Router ,
22
+ private _electronService : ElectronService ,
23
+ private store : Store )
24
+ {
19
25
// Only update the routes once
20
26
if ( ! DesktopModule . init ) {
21
27
// Override the component used for the login route
@@ -24,6 +30,17 @@ export class DesktopModule {
24
30
loginRoute . component = DesktopLoginComponent ;
25
31
router . resetConfig ( routeConfig ) ;
26
32
DesktopModule . init = true ;
33
+ this . init ( ) ;
27
34
}
28
35
}
29
- }
36
+
37
+ // Listen for events from the Electron host
38
+ private init ( ) {
39
+ this . _electronService . ipcRenderer . addListener ( 'endpointsChanged' , ( sender , args ) => {
40
+ console . log ( 'Got an event - endpoints changed' ) ;
41
+ console . log ( sender ) ;
42
+ console . log ( args ) ;
43
+ //this.store.dispatch()
44
+ } ) ;
45
+ }
46
+ }
You can’t perform that action at this time.
0 commit comments