WIP: New metadata engine
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<div *ngIf="loading" class="loading-overlay">
|
||||
<p-progressSpinner></p-progressSpinner>
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
.loading-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.5); /* Dimmed background */
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 9999; /* Ensure it stays on top of all content */
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||
import { Subscription } from 'rxjs';
|
||||
import {LoadingService} from '../loading.service';
|
||||
import {ProgressSpinner} from 'primeng/progressspinner';
|
||||
import {NgIf} from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-loading-overlay',
|
||||
templateUrl: './loading-overlay.component.html',
|
||||
imports: [
|
||||
ProgressSpinner,
|
||||
NgIf
|
||||
],
|
||||
styleUrls: ['./loading-overlay.component.scss']
|
||||
})
|
||||
export class LoadingOverlayComponent implements OnInit, OnDestroy {
|
||||
loading: boolean = false;
|
||||
private loadingSubscription: Subscription | undefined;
|
||||
|
||||
constructor(private loadingService: LoadingService) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.loadingSubscription = this.loadingService.loading$.subscribe(
|
||||
(loading) => {
|
||||
this.loading = loading;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.loadingSubscription?.unsubscribe();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user