Skip to content

Commit 2a00ae5

Browse files
committed
Cleanup
1 parent d74e018 commit 2a00ae5

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/app/status/status.component.css

+2-4
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,20 @@ span#status-label {
1010
text-align: left;
1111
}
1212

13+
/* Make it a circle */
1314
div#indicator {
1415
width: 12px;
1516
height: 12px;
1617
border-radius: 6px;
1718
margin: 0 10px;
1819
display: inline-block;
20+
background: #ffbf00; /* Ember by default, will be used for CONNECTING and CLOSING */
1921
}
2022

2123
div.CLOSED#indicator {
2224
background: red;
2325
}
2426

25-
div.CONNECTING#indicator, div.CLOSING#indicator {
26-
background: #ffbf00;
27-
}
28-
2927
div.OPEN#indicator {
3028
background: green;
3129
}

src/app/status/status.component.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,13 @@ import {RxStompState} from '@stomp/rx-stomp';
99
templateUrl: './status.component.html',
1010
styleUrls: ['./status.component.css']
1111
})
12-
export class StatusComponent implements OnInit {
12+
export class StatusComponent {
1313
public connectionStatus$: Observable<string>;
1414

1515
constructor(public rxStompService: RxStompService) {
1616
this.connectionStatus$ = rxStompService.connectionState$.pipe(map((state) => {
17+
// convert numeric RxStompState to string
1718
return RxStompState[state];
1819
}));
1920
}
20-
21-
ngOnInit() {
22-
}
23-
2421
}

0 commit comments

Comments
 (0)