mirror of https://github.com/abpframework/abp.git
committed by
GitHub
97 changed files with 1881 additions and 363 deletions
@ -0,0 +1,5 @@ |
|||
{ |
|||
"search.exclude": { |
|||
"**/dist": true |
|||
} |
|||
} |
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,35 @@ |
|||
/** |
|||
* @fileoverview added by tsickle |
|||
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc |
|||
*/ |
|||
export class LoaderStart { |
|||
/** |
|||
* @param {?} payload |
|||
*/ |
|||
constructor(payload) { |
|||
this.payload = payload; |
|||
} |
|||
} |
|||
LoaderStart.type = '[Loader] Start'; |
|||
if (false) { |
|||
/** @type {?} */ |
|||
LoaderStart.type; |
|||
/** @type {?} */ |
|||
LoaderStart.prototype.payload; |
|||
} |
|||
export class LoaderStop { |
|||
/** |
|||
* @param {?} payload |
|||
*/ |
|||
constructor(payload) { |
|||
this.payload = payload; |
|||
} |
|||
} |
|||
LoaderStop.type = '[Loader] Stop'; |
|||
if (false) { |
|||
/** @type {?} */ |
|||
LoaderStop.type; |
|||
/** @type {?} */ |
|||
LoaderStop.prototype.payload; |
|||
} |
|||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9hZGVyLmFjdGlvbnMuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AYWJwL25nLmNvcmUvIiwic291cmNlcyI6WyJsaWIvYWN0aW9ucy9sb2FkZXIuYWN0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBRUEsTUFBTSxPQUFPLFdBQVc7Ozs7SUFFdEIsWUFBbUIsT0FBeUI7UUFBekIsWUFBTyxHQUFQLE9BQU8sQ0FBa0I7SUFBRyxDQUFDOztBQURoQyxnQkFBSSxHQUFHLGdCQUFnQixDQUFDOzs7SUFBeEMsaUJBQXdDOztJQUM1Qiw4QkFBZ0M7O0FBRzlDLE1BQU0sT0FBTyxVQUFVOzs7O0lBRXJCLFlBQW1CLE9BQXlCO1FBQXpCLFlBQU8sR0FBUCxPQUFPLENBQWtCO0lBQUcsQ0FBQzs7QUFEaEMsZUFBSSxHQUFHLGVBQWUsQ0FBQzs7O0lBQXZDLGdCQUF1Qzs7SUFDM0IsNkJBQWdDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSHR0cFJlcXVlc3QgfSBmcm9tICdAYW5ndWxhci9jb21tb24vaHR0cCc7XG5cbmV4cG9ydCBjbGFzcyBMb2FkZXJTdGFydCB7XG4gIHN0YXRpYyByZWFkb25seSB0eXBlID0gJ1tMb2FkZXJdIFN0YXJ0JztcbiAgY29uc3RydWN0b3IocHVibGljIHBheWxvYWQ6IEh0dHBSZXF1ZXN0PGFueT4pIHt9XG59XG5cbmV4cG9ydCBjbGFzcyBMb2FkZXJTdG9wIHtcbiAgc3RhdGljIHJlYWRvbmx5IHR5cGUgPSAnW0xvYWRlcl0gU3RvcCc7XG4gIGNvbnN0cnVjdG9yKHB1YmxpYyBwYXlsb2FkOiBIdHRwUmVxdWVzdDxhbnk+KSB7fVxufVxuIl19
|
|||
@ -0,0 +1,33 @@ |
|||
/** |
|||
* @fileoverview added by tsickle |
|||
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc |
|||
*/ |
|||
var LoaderStart = /** @class */ (function () { |
|||
function LoaderStart(payload) { |
|||
this.payload = payload; |
|||
} |
|||
LoaderStart.type = '[Loader] Start'; |
|||
return LoaderStart; |
|||
}()); |
|||
export { LoaderStart }; |
|||
if (false) { |
|||
/** @type {?} */ |
|||
LoaderStart.type; |
|||
/** @type {?} */ |
|||
LoaderStart.prototype.payload; |
|||
} |
|||
var LoaderStop = /** @class */ (function () { |
|||
function LoaderStop(payload) { |
|||
this.payload = payload; |
|||
} |
|||
LoaderStop.type = '[Loader] Stop'; |
|||
return LoaderStop; |
|||
}()); |
|||
export { LoaderStop }; |
|||
if (false) { |
|||
/** @type {?} */ |
|||
LoaderStop.type; |
|||
/** @type {?} */ |
|||
LoaderStop.prototype.payload; |
|||
} |
|||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9hZGVyLmFjdGlvbnMuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AYWJwL25nLmNvcmUvIiwic291cmNlcyI6WyJsaWIvYWN0aW9ucy9sb2FkZXIuYWN0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBRUE7SUFFRSxxQkFBbUIsT0FBeUI7UUFBekIsWUFBTyxHQUFQLE9BQU8sQ0FBa0I7SUFBRyxDQUFDO0lBRGhDLGdCQUFJLEdBQUcsZ0JBQWdCLENBQUM7SUFFMUMsa0JBQUM7Q0FBQSxBQUhELElBR0M7U0FIWSxXQUFXOzs7SUFDdEIsaUJBQXdDOztJQUM1Qiw4QkFBZ0M7O0FBRzlDO0lBRUUsb0JBQW1CLE9BQXlCO1FBQXpCLFlBQU8sR0FBUCxPQUFPLENBQWtCO0lBQUcsQ0FBQztJQURoQyxlQUFJLEdBQUcsZUFBZSxDQUFDO0lBRXpDLGlCQUFDO0NBQUEsQUFIRCxJQUdDO1NBSFksVUFBVTs7O0lBQ3JCLGdCQUF1Qzs7SUFDM0IsNkJBQWdDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSHR0cFJlcXVlc3QgfSBmcm9tICdAYW5ndWxhci9jb21tb24vaHR0cCc7XG5cbmV4cG9ydCBjbGFzcyBMb2FkZXJTdGFydCB7XG4gIHN0YXRpYyByZWFkb25seSB0eXBlID0gJ1tMb2FkZXJdIFN0YXJ0JztcbiAgY29uc3RydWN0b3IocHVibGljIHBheWxvYWQ6IEh0dHBSZXF1ZXN0PGFueT4pIHt9XG59XG5cbmV4cG9ydCBjbGFzcyBMb2FkZXJTdG9wIHtcbiAgc3RhdGljIHJlYWRvbmx5IHR5cGUgPSAnW0xvYWRlcl0gU3RvcCc7XG4gIGNvbnN0cnVjdG9yKHB1YmxpYyBwYXlsb2FkOiBIdHRwUmVxdWVzdDxhbnk+KSB7fVxufVxuIl19
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,4 +1,5 @@ |
|||
export * from './config.actions'; |
|||
export * from './loader.actions'; |
|||
export * from './profile.actions'; |
|||
export * from './rest.actions'; |
|||
export * from './session.actions'; |
|||
|
|||
@ -0,0 +1,11 @@ |
|||
import { HttpRequest } from '@angular/common/http'; |
|||
export declare class LoaderStart { |
|||
payload: HttpRequest<any>; |
|||
static readonly type = "[Loader] Start"; |
|||
constructor(payload: HttpRequest<any>); |
|||
} |
|||
export declare class LoaderStop { |
|||
payload: HttpRequest<any>; |
|||
static readonly type = "[Loader] Stop"; |
|||
constructor(payload: HttpRequest<any>); |
|||
} |
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,57 @@ |
|||
/** |
|||
* @fileoverview added by tsickle |
|||
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc |
|||
*/ |
|||
import { Component } from '@angular/core'; |
|||
import { Store } from '@ngxs/store'; |
|||
export class Error500Component { |
|||
/** |
|||
* @param {?} store |
|||
*/ |
|||
constructor(store) { |
|||
this.store = store; |
|||
} |
|||
/** |
|||
* @return {?} |
|||
*/ |
|||
ngOnInit() { } |
|||
} |
|||
Error500Component.decorators = [ |
|||
{ type: Component, args: [{ |
|||
selector: 'abp-error-500', |
|||
template: ` |
|||
<div class="error"> |
|||
<div class="row centered"> |
|||
<div class="col-md-12"> |
|||
<div class="error-template"> |
|||
<h1> |
|||
Oops! |
|||
</h1> |
|||
<div class="error-details"> |
|||
Sorry, an error has occured. |
|||
</div> |
|||
<div class="error-actions"> |
|||
<a routerLink="/" class="btn btn-primary btn-md mt-2" |
|||
><span class="glyphicon glyphicon-home"></span> Take Me Home |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
`,
|
|||
styles: [".error{position:fixed;top:0;background-color:#fff;width:100vw;height:100vh;z-index:999999}.centered{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}"] |
|||
}] } |
|||
]; |
|||
/** @nocollapse */ |
|||
Error500Component.ctorParameters = () => [ |
|||
{ type: Store } |
|||
]; |
|||
if (false) { |
|||
/** |
|||
* @type {?} |
|||
* @private |
|||
*/ |
|||
Error500Component.prototype.store; |
|||
} |
|||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3ItNTAwLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BhYnAvbmcudGhlbWUuc2hhcmVkLyIsInNvdXJjZXMiOlsibGliL2NvbXBvbmVudHMvZXJyb3JzL2Vycm9yLTUwMC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQVUsTUFBTSxlQUFlLENBQUM7QUFDbEQsT0FBTyxFQUFFLEtBQUssRUF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JpbWFyeSBidG4tbWQgbXQtMlwiXG4gICAgICAgICAgICAgICAgPjxzcGFuIGNsYXNzPVwiZ2x5cGhpY29uIGdseXBoaWNvbi1ob21lXCI+PC9zcGFuPiBUYWtlIE1lIEhvbWVcbiAgICAgICAgICAgICAgPC9hPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG4gIGAsXG4gIHN0eWxlVXJsczogWydlcnJvci01MDAuY29tcG9uZW50LnNjc3MnXSxcbn0pXG5leHBvcnQgY2xhc3MgRXJyb3I1MDBDb21wb25lbnQgaW1wbGVtZW50cyBPbkluaXQge1xuICBjb25zdHJ1Y3Rvcihwcml2YXRlIHN0b3JlOiBTdG9yZSkge31cblxuICBuZ09uSW5pdCgpOiB2b2lkIHt9XG59XG4iXX0=
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,39 @@ |
|||
/** |
|||
* @fileoverview added by tsickle |
|||
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc |
|||
*/ |
|||
import { Component } from '@angular/core'; |
|||
import { Store } from '@ngxs/store'; |
|||
var Error500Component = /** @class */ (function () { |
|||
function Error500Component(store) { |
|||
this.store = store; |
|||
} |
|||
/** |
|||
* @return {?} |
|||
*/ |
|||
Error500Component.prototype.ngOnInit = /** |
|||
* @return {?} |
|||
*/ |
|||
function () { }; |
|||
Error500Component.decorators = [ |
|||
{ type: Component, args: [{ |
|||
selector: 'abp-error-500', |
|||
template: "\n <div class=\"error\">\n <div class=\"row centered\">\n <div class=\"col-md-12\">\n <div class=\"error-template\">\n <h1>\n Oops!\n </h1>\n <div class=\"error-details\">\n Sorry, an error has occured.\n </div>\n <div class=\"error-actions\">\n <a routerLink=\"/\" class=\"btn btn-primary btn-md mt-2\"\n ><span class=\"glyphicon glyphicon-home\"></span> Take Me Home\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n ", |
|||
styles: [".error{position:fixed;top:0;background-color:#fff;width:100vw;height:100vh;z-index:999999}.centered{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}"] |
|||
}] } |
|||
]; |
|||
/** @nocollapse */ |
|||
Error500Component.ctorParameters = function () { return [ |
|||
{ type: Store } |
|||
]; }; |
|||
return Error500Component; |
|||
}()); |
|||
export { Error500Component }; |
|||
if (false) { |
|||
/** |
|||
* @type {?} |
|||
* @private |
|||
*/ |
|||
Error500Component.prototype.store; |
|||
} |
|||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3ItNTAwLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BhYnAvbmcudGhlbWUuc2hhcmVkLyIsInNvdXJjZXMiOlsibGliL2NvbXBvbmVudHMvZXJyb3JzL2Vycm9yLTUwMC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQVUsTUFBTSxlQUFlLENBQUM7QUFDbEQsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUVwQztJQTBCRSwyQkFBb0IsS0FBWTtRQUFaLFVBQUssR0FBTCxLQUFLLENBQU87SUFBRyxDQUFDOzs7O0lBRXBDLG9DQUFROzs7SUFBUixjQUFrQixDQUFDOztnQkE1QnBCLFNBQVMsU0FBQztvQkFDVCxRQUFRLEVBQUUsZUFBZTtvQkFDekIsUUFBUSxFQUFFLCtsQkFvQlQ7O2lCQUVGOzs7O2dCQTFCUSxLQUFLOztJQStCZCx3QkFBQztDQUFBLEFBN0JELElBNkJDO1NBSlksaUJBQWlCOzs7Ozs7SUFDaEIsa0NBQW9CIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ29tcG9uZW50LCBPbkluaXQg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zdHJ1Y3Rvcihwcml2YXRlIHN0b3JlOiBTdG9yZSkge31cblxuICBuZ09uSW5pdCgpOiB2b2lkIHt9XG59XG4iXX0=
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,7 @@ |
|||
import { OnInit } from '@angular/core'; |
|||
import { Store } from '@ngxs/store'; |
|||
export declare class Error500Component implements OnInit { |
|||
private store; |
|||
constructor(store: Store); |
|||
ngOnInit(): void; |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
import { Actions } from '@ngxs/store'; |
|||
import { LoaderStart, LoaderStop } from '@abp/ng.core'; |
|||
export declare class LoaderBarComponent { |
|||
private actions; |
|||
containerClass: string; |
|||
progressClass: string; |
|||
isLoading: boolean; |
|||
filter: (action: LoaderStart | LoaderStop) => boolean; |
|||
progressLevel: number; |
|||
interval: any; |
|||
constructor(actions: Actions); |
|||
startLoading(): void; |
|||
stopLoading(): void; |
|||
} |
|||
@ -1,10 +1,16 @@ |
|||
import { ApplicationRef, ComponentFactoryResolver, RendererFactory2, Injector } from '@angular/core'; |
|||
import { Actions, Store } from '@ngxs/store'; |
|||
import { ConfirmationService } from '../services/confirmation.service'; |
|||
export declare class ErrorHandler { |
|||
private actions; |
|||
private store; |
|||
private confirmationService; |
|||
constructor(actions: Actions, store: Store, confirmationService: ConfirmationService); |
|||
private appRef; |
|||
private cfRes; |
|||
private rendererFactory; |
|||
private injector; |
|||
constructor(actions: Actions, store: Store, confirmationService: ConfirmationService, appRef: ApplicationRef, cfRes: ComponentFactoryResolver, rendererFactory: RendererFactory2, injector: Injector); |
|||
private showError; |
|||
private navigateToLogin; |
|||
private show500Component; |
|||
} |
|||
|
|||
@ -1,4 +1,5 @@ |
|||
export * from './config.actions'; |
|||
export * from './loader.actions'; |
|||
export * from './profile.actions'; |
|||
export * from './rest.actions'; |
|||
export * from './session.actions'; |
|||
|
|||
@ -0,0 +1,11 @@ |
|||
import { HttpRequest } from '@angular/common/http'; |
|||
|
|||
export class LoaderStart { |
|||
static readonly type = '[Loader] Start'; |
|||
constructor(public payload: HttpRequest<any>) {} |
|||
} |
|||
|
|||
export class LoaderStop { |
|||
static readonly type = '[Loader] Stop'; |
|||
constructor(public payload: HttpRequest<any>) {} |
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
.error { |
|||
position: fixed; |
|||
top: 0; |
|||
background-color: #fff; |
|||
width: 100vw; |
|||
height: 100vh; |
|||
z-index: 999999; |
|||
} |
|||
|
|||
.centered { |
|||
position: fixed; |
|||
top: 50%; |
|||
left: 50%; |
|||
transform: translate(-50%, -50%); |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
import { Component, OnInit } from '@angular/core'; |
|||
import { Store } from '@ngxs/store'; |
|||
|
|||
@Component({ |
|||
selector: 'abp-error-500', |
|||
template: ` |
|||
<div class="error"> |
|||
<div class="row centered"> |
|||
<div class="col-md-12"> |
|||
<div class="error-template"> |
|||
<h1> |
|||
Oops! |
|||
</h1> |
|||
<div class="error-details"> |
|||
Sorry, an error has occured. |
|||
</div> |
|||
<div class="error-actions"> |
|||
<a routerLink="/" class="btn btn-primary btn-md mt-2" |
|||
><span class="glyphicon glyphicon-home"></span> Take Me Home |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
`,
|
|||
styleUrls: ['error-500.component.scss'], |
|||
}) |
|||
export class Error500Component implements OnInit { |
|||
constructor(private store: Store) {} |
|||
|
|||
ngOnInit(): void {} |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
.abp-loader-bar { |
|||
left: 0; |
|||
opacity: 0; |
|||
position: fixed; |
|||
top: 0; |
|||
transition: opacity 0.4s linear 0.4s; |
|||
z-index: 99999; |
|||
|
|||
&.is-loading { |
|||
opacity: 1; |
|||
transition: none; |
|||
} |
|||
|
|||
.abp-progress { |
|||
background: #77b6ff; |
|||
box-shadow: 0 0 10px rgba(119, 182, 255, 0.7); |
|||
height: 2px; |
|||
left: 0; |
|||
position: fixed; |
|||
top: 0; |
|||
transition: width 0.4s ease; |
|||
} |
|||
} |
|||
@ -0,0 +1,73 @@ |
|||
import { Component, OnInit, Input } from '@angular/core'; |
|||
import { Actions, ofActionSuccessful } from '@ngxs/store'; |
|||
import { LoaderStart, LoaderStop } from '@abp/ng.core'; |
|||
import { filter } from 'rxjs/operators'; |
|||
|
|||
@Component({ |
|||
selector: 'abp-loader-bar', |
|||
template: ` |
|||
<div id="abp-loader-bar" [ngClass]="containerClass" [class.is-loading]="isLoading"> |
|||
<div [ngClass]="progressClass" [style.width.vw]="progressLevel"></div> |
|||
</div> |
|||
`,
|
|||
styleUrls: ['./loader-bar.component.scss'], |
|||
}) |
|||
export class LoaderBarComponent { |
|||
@Input() |
|||
containerClass: string = 'abp-loader-bar'; |
|||
|
|||
@Input() |
|||
progressClass: string = 'abp-progress'; |
|||
|
|||
@Input() |
|||
isLoading: boolean = false; |
|||
|
|||
@Input() |
|||
filter = (action: LoaderStart | LoaderStop) => action.payload.url.indexOf('openid-configuration') < 0; |
|||
|
|||
progressLevel: number = 0; |
|||
|
|||
interval: any; |
|||
|
|||
constructor(private actions: Actions) { |
|||
actions |
|||
.pipe( |
|||
ofActionSuccessful(LoaderStart, LoaderStop), |
|||
filter(this.filter), |
|||
) |
|||
.subscribe(action => { |
|||
if (action instanceof LoaderStart) { |
|||
this.startLoading(); |
|||
} else { |
|||
this.stopLoading(); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
startLoading() { |
|||
this.isLoading = true; |
|||
const interval = setInterval(() => { |
|||
if (this.progressLevel < 75) { |
|||
this.progressLevel += Math.random() * 10; |
|||
} else if (this.progressLevel < 90) { |
|||
this.progressLevel += 0.4; |
|||
} else if (this.progressLevel < 100) { |
|||
this.progressLevel += 0.1; |
|||
} else { |
|||
clearInterval(interval); |
|||
} |
|||
}, 300); |
|||
|
|||
this.interval = interval; |
|||
} |
|||
|
|||
stopLoading() { |
|||
clearInterval(this.interval); |
|||
this.progressLevel = 100; |
|||
this.isLoading = false; |
|||
|
|||
setTimeout(() => { |
|||
this.progressLevel = 0; |
|||
}, 800); |
|||
} |
|||
} |
|||
@ -1,14 +1,16 @@ |
|||
<!doctype html> |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<title>MyProjectName</title> |
|||
<base href="/"> |
|||
<head> |
|||
<meta charset="utf-8" /> |
|||
<title>MyProjectName</title> |
|||
<base href="/" /> |
|||
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1"> |
|||
<link rel="icon" type="image/x-icon" href="favicon.ico"> |
|||
</head> |
|||
<body> |
|||
<app-root></app-root> |
|||
</body> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1" /> |
|||
<link rel="icon" type="image/x-icon" href="favicon.ico" /> |
|||
</head> |
|||
<body> |
|||
<app-root> |
|||
<div class="donut centered"></div> |
|||
</app-root> |
|||
</body> |
|||
</html> |
|||
|
|||
@ -1 +1,27 @@ |
|||
/* You can add global styles to this file, and also import other style files */ |
|||
|
|||
@keyframes donut-spin { |
|||
0% { |
|||
transform: rotate(0deg); |
|||
} |
|||
100% { |
|||
transform: rotate(360deg); |
|||
} |
|||
} |
|||
.donut { |
|||
display: inline-block; |
|||
border: 4px solid rgba(0, 0, 0, 0.1); |
|||
border-left-color: #7983ff; |
|||
border-radius: 50%; |
|||
width: 30px; |
|||
height: 30px; |
|||
animation: donut-spin 1.2s linear infinite; |
|||
|
|||
&.centered { |
|||
position: fixed; |
|||
top: 50%; |
|||
left: 50%; |
|||
/* bring your own prefixes */ |
|||
transform: translate(-50%, -50%); |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue