2019-12-23 14:59:56 +01:00
|
|
|
import {Component, Input} from "@angular/core";
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'loading',
|
|
|
|
template: `
|
2020-10-30 12:33:00 +01:00
|
|
|
<ng-template [ngIf]="full" [ngIfElse]="loading">
|
2020-12-17 16:38:28 +01:00
|
|
|
<div class="uk-position-relative" style="height: 100vh; width: 99vw;">
|
2020-10-30 12:33:00 +01:00
|
|
|
<div class="uk-position-center">
|
|
|
|
<ng-container [ngTemplateOutlet]="loading"></ng-container>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</ng-template>
|
|
|
|
<ng-template #loading>
|
2021-02-10 10:05:37 +01:00
|
|
|
<div [class]="'uk-flex uk-flex-center '+(top_margin ? 'uk-margin-small-top' : '')">
|
2020-11-05 00:09:55 +01:00
|
|
|
<span class="portal-color uk-icon uk-spinner">
|
|
|
|
<svg width="60" height="60" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg" data-svg="spinner"><circle
|
|
|
|
fill="none" stroke="#000" cx="15" cy="15" r="14" style="stroke-width: 2px;"></circle></svg>
|
|
|
|
</span>
|
2020-10-30 12:33:00 +01:00
|
|
|
</div>
|
|
|
|
</ng-template>`
|
2019-12-23 14:59:56 +01:00
|
|
|
})
|
|
|
|
export class LoadingComponent {
|
|
|
|
/**
|
|
|
|
* Possible values '': blue, 'success': green, 'warning': orange and 'danger': red
|
|
|
|
*/
|
|
|
|
@Input() color: 'success' | 'warning' | 'danger' = null;
|
2020-10-30 12:33:00 +01:00
|
|
|
@Input() full: boolean = false;
|
2021-02-10 10:05:37 +01:00
|
|
|
@Input() top_margin: boolean = true;
|
2019-12-23 14:59:56 +01:00
|
|
|
constructor() {
|
|
|
|
}
|
|
|
|
}
|