Fixes after review

This commit is contained in:
Piotr Pekala 2019-05-29 00:42:14 -07:00
parent a3110e87aa
commit d37b043711
3 changed files with 13 additions and 21 deletions

View File

@ -1,13 +1,10 @@
<div class="notification-box" *ngIf="isVisible">
<mat-progress-bar mode="determinate" [value]="progress"></mat-progress-bar>
<div style="display: flex; height: 80px;">
<div class="edgeline"></div>
<div style="display: flex; height: 82px;">
<div class="content">
<app-adbutler theme="dark"></app-adbutler>
<mat-icon (click)="closeNotification()" class="close-button">close</mat-icon>
<!-- <button class="check-button" mat-button>CHECK IT OUT</button> -->
</div>
<div class="edgeline"></div>
</div>
<div class="bottomline"></div>
</div>

View File

@ -1,5 +1,5 @@
.notification-box {
posiTion: fixed;
position: fixed;
bottom: 20px;
right: 20px;
width: 412px;
@ -9,6 +9,9 @@
.content {
background-color: #263238;
padding-left: 8px;
border-left: 2px solid #0097a7;
border-right: 2px solid #0097a7;
border-bottom: 2px solid #0097a7;
}
.close-button {
@ -22,18 +25,6 @@
color: #0097a7;
}
.edgeline {
height: 80px;
width: 2px;
background-color: #0097a7;
}
.bottomline {
width: 412px;
height: 2px;
background-color: #0097a7;
}
.check-button {
background-color: #0097a7;
margin-top: -10px;

View File

@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, OnDestroy } from '@angular/core';
import { timer, interval, Observable, Subscription } from 'rxjs';
import { take } from 'rxjs/operators';
import { NotificationSettingsService } from '../../services/notification-settings.service';
@ -9,7 +9,7 @@ import { NotificationSettings } from '../../models/notification-settings-models/
templateUrl: './notification-box.component.html',
styleUrls: ['./notification-box.component.scss']
})
export class NotificationBoxComponent implements OnInit {
export class NotificationBoxComponent implements OnInit, OnDestroy {
notificationSettings: NotificationSettings;
timer: Observable<number>;
timerSubscription: Subscription;
@ -17,7 +17,7 @@ export class NotificationBoxComponent implements OnInit {
viewsCounter = 0;
ticks: number = 1000;
progress: number = 0;
isVisible = false;
isVisible = true;
interval = 10;
constructor(
@ -26,7 +26,7 @@ export class NotificationBoxComponent implements OnInit {
ngOnInit() {
this.notificationSettings = this.notifactionSettingsService.getConfiguration();
this.startTimer();
//this.startTimer();
}
startTimer() {
@ -63,4 +63,8 @@ export class NotificationBoxComponent implements OnInit {
closeNotification() {
this.isVisible = false;
}
ngOnDestroy() {
this.timerSubscription.unsubscribe();
}
}