Skip to content

Commit

Permalink
alertifyjs configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
gulsenkeskin committed Sep 20, 2022
1 parent 3de23e0 commit f8cd7bc
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/alertifytype.d.ts
@@ -0,0 +1,2 @@

declare module 'alertifyjs';
6 changes: 3 additions & 3 deletions src/app/access/register/register.component.ts
Expand Up @@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { UserService } from 'src/app/services/user.service';
import * as alertifyjs from 'alertifyjs';

@Component({
selector: 'app-register',
Expand Down Expand Up @@ -34,11 +35,10 @@ export class RegisterComponent implements OnInit {
item => {
this.responseData = item;
if (this.responseData.result == 'pass') {
alert('Register successfully please contact admin for activation')
alertifyjs.successfully('Register successfully please contact admin for activation');
this.redirectLogin();
} else {
alert('failed try again')

alertifyjs.error('failed try again')
}

}
Expand Down
13 changes: 11 additions & 2 deletions src/styles.css
@@ -1,4 +1,13 @@
/* You can add global styles to this file, and also import other style files */
@import "../node_modules/alertifyjs/build/css/alertify.css";
@import "../node_modules/alertifyjs/build/css/themes/bootstrap.min.css";
@import "../node_modules/alertifyjs//build/css/themes/default.min.css";

html, body { height: 100%; }
body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; }
html,
body {
height: 100%;
}
body {
margin: 0;
font-family: Roboto, "Helvetica Neue", sans-serif;
}
1 change: 1 addition & 0 deletions tsconfig.json
Expand Up @@ -16,6 +16,7 @@
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"typeRoots": ["node_modules/@types","src/alertifytype.d.ts"],
"target": "es2020",
"module": "es2020",
"lib": [
Expand Down

0 comments on commit f8cd7bc

Please sign in to comment.