Skip to content

Commit 0250689

Browse files
committed
A fwe tweaks. Better about page
1 parent b9099c3 commit 0250689

File tree

7 files changed

+98
-6
lines changed

7 files changed

+98
-6
lines changed

electron/about.html

+57-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,65 @@
11
<html>
22
<body>
33
<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>
448
</head>
549
</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>
763
<script>
864
const remote = require('electron').remote;
965
document.getElementById("cancel-btn").addEventListener("click", function (e) {

electron/icon.icns

220 KB
Binary file not shown.

electron/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ function doCreateWindow(url) {
135135

136136
// Open the DevTools.
137137
//mainWindow.webContents.openDevTools({mode:'undocked'});
138+
139+
// setTimeout(() => {
140+
// mainWindow.webContents.send('endpointsChanged', 'HELLO!!!!');
141+
// }, 5000);
138142
}
139143

140144
app.on('ready', createWindow)

electron/logo.png

91.4 KB
Loading

electron/menu.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function about() {
1919
let child = new BrowserWindow({
2020
parent: appMainWindow,
2121
modal: true,
22-
width: 300,
22+
width: 360,
2323
height: 300,
2424
webPreferences: {
2525
enableRemoteModule: true,
@@ -37,7 +37,6 @@ const template = [
3737
label: 'About Stratos',
3838
click: function () {
3939
about();
40-
console.log('about');
4140
}
4241
},
4342
{

src/frontend/packages/desktop-extensions/sass/styles.scss

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.stratos {
1+
.stratos.stratos-desktop {
22

33
// Remove some of the padding on the list header
44
.list-component__header {
@@ -19,4 +19,20 @@
1919
line-height: 20px;
2020
width: 20px;
2121
}
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+
2238
}

src/frontend/packages/desktop-extensions/src/desktop.module.ts

+19-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { NgModule } from '@angular/core';
22
import { Router } from '@angular/router';
3+
import { Store } from '@ngrx/store';
4+
import { ElectronService } from 'ngx-electron';
35

46
import { DesktopLoginComponent } from './desktop-login/desktop-login.component';
57

@@ -15,7 +17,11 @@ export class DesktopModule {
1517

1618
static init = false;
1719

18-
constructor(router: Router) {
20+
constructor(
21+
router: Router,
22+
private _electronService: ElectronService,
23+
private store: Store)
24+
{
1925
// Only update the routes once
2026
if (!DesktopModule.init) {
2127
// Override the component used for the login route
@@ -24,6 +30,17 @@ export class DesktopModule {
2430
loginRoute.component = DesktopLoginComponent;
2531
router.resetConfig(routeConfig);
2632
DesktopModule.init = true;
33+
this.init();
2734
}
2835
}
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+
}

0 commit comments

Comments
 (0)