added update notification's animation
This commit is contained in:
parent
f9ac4319aa
commit
00cd6ae592
|
@ -10,9 +10,9 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="auto-update">
|
||||
<div class="auto-update" [class.auto-update__activated]="updateAvailable">
|
||||
<div class="auto-update__display">
|
||||
<div class="auto-update__display--text">A new version is available!</div> <a href class="auto-update__display--reload">reload</a> <a href class="auto-update__display--close"><fa-icon [icon]="faTimes"></fa-icon></a>
|
||||
<div class="auto-update__display--text">A new version is available!</div> <a href class="auto-update__display--reload">reload</a> <a href class="auto-update__display--close" (click)="closeAutoUpdate()"><fa-icon [icon]="faTimes"></fa-icon></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -101,13 +101,21 @@ app-streams-selection-footer {
|
|||
|
||||
.auto-update {
|
||||
transition: all .2s;
|
||||
transition-timing-function: ease-in;
|
||||
|
||||
position: absolute;
|
||||
height: 70px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
bottom: -70px;
|
||||
z-index: 999999999;
|
||||
|
||||
&__activated {
|
||||
// opacity: 1;
|
||||
transition: all .25s;
|
||||
transition-timing-function: ease-out;
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
&__display {
|
||||
position: relative;
|
||||
|
|
|
@ -29,6 +29,9 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
private streamSub: Subscription;
|
||||
private dragoverSub: Subscription;
|
||||
|
||||
|
||||
updateAvailable: boolean;
|
||||
|
||||
@Select(state => state.streamsstatemodel.streams) streamElements$: Observable<StreamElement[]>;
|
||||
|
||||
constructor(
|
||||
|
@ -38,6 +41,11 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
setTimeout(() => {
|
||||
this.updateAvailable = true;
|
||||
}, 2000);
|
||||
|
||||
|
||||
this.streamSub = this.streamElements$.subscribe((streams: StreamElement[]) => {
|
||||
if (streams && streams.length === 0) {
|
||||
this.tutorialActive = true;
|
||||
|
@ -114,4 +122,12 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
this.mediaService.uploadMedia(selectedAccount, files);
|
||||
return false;
|
||||
}
|
||||
|
||||
closeAutoUpdate(): boolean {
|
||||
this.updateAvailable = false;
|
||||
setTimeout(() => {
|
||||
this.updateAvailable = true;
|
||||
}, 2000);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue