Skip to content

Commit dbd9ff2

Browse files
5 more pages added
1 parent 58a5391 commit dbd9ff2

36 files changed

+1135
-9
lines changed

frontend/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
2-
"name": "supertokens-frontend",
2+
"name": "auth-jwt-frontend",
33
"version": "1.0.0",
4-
"author": "Rodrigo Kamada <[email protected]> (https://github.com/rodrigokamada)",
5-
"private": true,
4+
"private": false,
65
"scripts": {
76
"ng": "ng",
87
"start": "ng serve",

frontend/src/app/app-routing.module.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,26 @@ const routes: Routes = [
3131
path: 'generate-token1',
3232
loadChildren: () => import('./generate-token1/generate-token1.module').then(mod => mod.GenerateToken1Module),
3333
},
34+
{
35+
path: 'send-jwt1',
36+
loadChildren: () => import('./send-jwt1/send-jwt1.module').then(mod => mod.SendJwt1Module),
37+
},
38+
{
39+
path: 'send-jwt2',
40+
loadChildren: () => import('./send-jwt2/send-jwt2.module').then(mod => mod.SendJwt2Module),
41+
},
42+
{
43+
path: 'send-jwt3',
44+
loadChildren: () => import('./send-jwt3/send-jwt3.module').then(mod => mod.SendJwt3Module),
45+
},
46+
{
47+
path: 'send-jwt4',
48+
loadChildren: () => import('./send-jwt4/send-jwt4.module').then(mod => mod.SendJwt4Module),
49+
},
50+
{
51+
path: 'send-jwt5',
52+
loadChildren: () => import('./send-jwt4/send-jwt4.module').then(mod => mod.SendJwt4Module),
53+
},
3454
{
3555
path: '**',
3656
redirectTo: 'home',

frontend/src/app/app.component.html

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,20 +75,38 @@
7575
<img src="assets/images/icon-checked.svg" class="w-12px" *ngIf="step > 10" />
7676
<img src="assets/images/icon-check.svg" class="w-12px" *ngIf="step === 10" />
7777
<div class="w-12px d-inline-flex" *ngIf="step <= 9"></div>
78-
<span class="ms-2">{{ "app.bestMethod" | transloco }}</span>
78+
<span class="ms-4">{{ "app.tokenAuthenticate4" | transloco }}</span>
7979
</li>
8080
<li class="nav-item m-2">
8181
<img src="assets/images/icon-checked.svg" class="w-12px" *ngIf="step > 11" />
8282
<img src="assets/images/icon-check.svg" class="w-12px" *ngIf="step === 11" />
8383
<div class="w-12px d-inline-flex" *ngIf="step <= 10"></div>
84-
<span class="ms-2">{{ "app.logout" | transloco }}</span>
84+
<span class="ms-2">{{ "app.bestMethod" | transloco }}</span>
8585
</li>
8686
<li class="nav-item m-2">
8787
<img src="assets/images/icon-checked.svg" class="w-12px" *ngIf="step > 12" />
8888
<img src="assets/images/icon-check.svg" class="w-12px" *ngIf="step === 12" />
8989
<div class="w-12px d-inline-flex" *ngIf="step <= 11"></div>
90+
<span class="ms-2">{{ "app.logout" | transloco }}</span>
91+
</li>
92+
<li class="nav-item m-2">
93+
<img src="assets/images/icon-checked.svg" class="w-12px" *ngIf="step > 13" />
94+
<img src="assets/images/icon-check.svg" class="w-12px" *ngIf="step === 13" />
95+
<div class="w-12px d-inline-flex" *ngIf="step <= 12"></div>
9096
<span class="ms-2">{{ "app.finishTutorial" | transloco }}</span>
9197
</li>
98+
<li class="nav-item m-2">
99+
<img src="assets/images/icon-checked.svg" class="w-12px" *ngIf="step > 13" />
100+
<img src="assets/images/icon-check.svg" class="w-12px" *ngIf="step === 13" />
101+
<div class="w-12px d-inline-flex" *ngIf="step <= 12"></div>
102+
<span class="ms-2">{{ "app.disclosure" | transloco }}</span>
103+
</li>
104+
<li class="nav-item m-2">
105+
<img src="assets/images/icon-checked.svg" class="w-12px" *ngIf="step > 13" />
106+
<img src="assets/images/icon-check.svg" class="w-12px" *ngIf="step === 13" />
107+
<div class="w-12px d-inline-flex" *ngIf="step <= 12"></div>
108+
<span class="ms-2">{{ "app.reference" | transloco }}</span>
109+
</li>
92110
</ul>
93111
</div>
94112
</div>

frontend/src/app/generate-token1/generate-token1.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ export class GenerateToken1Component implements OnInit {
2626
nextStep(){
2727
this.stepService.setStep(6)
2828
this.stepService.setStep(7)
29+
this.router.navigate(['/send-jwt1'])
2930
}
3031
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { NgModule } from '@angular/core';
2+
import { RouterModule, Routes } from '@angular/router';
3+
import { SendJwt1Component } from './send-jwt1.component';
4+
5+
const routes: Routes = [
6+
{
7+
path: '',
8+
component: SendJwt1Component,
9+
}
10+
];
11+
12+
@NgModule({
13+
imports: [RouterModule.forChild(routes)],
14+
exports: [RouterModule]
15+
})
16+
export class SendJwt1RoutingModule { }
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<h1 class="mb-3">{{ "send-jwt1.introduction" | transloco }}</h1>
2+
3+
<p class="font-grey" style="font-size: 24px;">{{ "send-jwt1.ways" | transloco }}</p>
4+
5+
<hr>
6+
7+
<div class="rectangle">
8+
<img src="assets/images/icon-check-square.png"/>
9+
<span>{{ "send-jwt1.authenticated" | transloco | uppercase }}</span>
10+
</div>
11+
12+
<div class="rectangle1">
13+
<h1>{{ "send-jwt1.request" | transloco }}</h1>
14+
<div class="box">
15+
<a href="#" class="font-grey">{{ "send-jwt1.request1" | transloco | uppercase }}</a>
16+
<img src="assets/images/icon-arrow-right.svg"/>
17+
</div>
18+
19+
<p class="font-grey">{{ "send-jwt1.request2" | transloco}}</p>
20+
21+
<div class="box1">
22+
23+
</div>
24+
25+
<a class="query" target="_blank" href="#">{{ "send-jwt1.queryParameter" | transloco}}</a>
26+
27+
<p class="font-grey">{{ "send-jwt1.secureWay" | transloco}}</p>
28+
</div>
29+
30+
<div class="row">
31+
<div class="col text-end">
32+
<button type="button" (click)="backStep()" class="btn btn-outline-light mt-5">{{ "verify.back" | transloco }}</button>
33+
</div>
34+
<div class="col-auto text-end">
35+
<button type="button" (click)="nextStep()" class="btn btn-warning mt-5" innerHTML="{{ 'send-jwt1.body' | transloco }}"></button>
36+
</div>
37+
</div>
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
.rectangle {
2+
width: 667px;
3+
height: 53px;
4+
padding: 16.5px 223.1px 15.5px 19.9px;
5+
border-radius: 12px;
6+
border: solid 1px rgba(0, 195, 15, 0.75);
7+
background-color: rgba(0, 195, 15, 0.15);
8+
display: flex;
9+
align-items: center;
10+
img {
11+
width: 22px;
12+
height: 21px;
13+
}
14+
span {
15+
font-size: 16px;
16+
font-weight: bold;
17+
margin: 2px 0 0 7px;
18+
font-stretch: normal;
19+
font-style: normal
20+
}
21+
}
22+
23+
.rectangle1 {
24+
width: 668px;
25+
height: 405px;
26+
margin-top: 34px;
27+
padding: 26.5px 4px 33.5px 26.9px;
28+
border-radius: 12px;
29+
border: dashed 1px #505255;
30+
31+
.box {
32+
width: 331.1px;
33+
height: 30.5px;
34+
padding: 6px 12.2px 8.5px 12.3px;
35+
border-radius: 6px;
36+
box-shadow: 0 0 6px 0 rgba(255, 255, 255, 0.24);
37+
border: solid 1px #5ca7ff;
38+
background-color: #a3cdfe;
39+
margin-top: 29px;
40+
display: flex;
41+
align-items: center;
42+
43+
a {
44+
font-size: 13px;
45+
font-weight: bold;
46+
font-stretch: normal;
47+
font-style: normal;
48+
letter-spacing: 0.13px;
49+
color: #2a2f44;
50+
text-decoration: none;
51+
}
52+
53+
img {
54+
width: 10.8px;
55+
height: 9px;
56+
margin: 0px 0 3px 5.8px;
57+
object-fit: contain;
58+
}
59+
}
60+
p {
61+
font-family: Helvetica;
62+
font-size: 18px;
63+
font-weight: normal;
64+
font-stretch: normal;
65+
font-style: normal;
66+
margin-top: 28px;
67+
}
68+
69+
.box1 {
70+
width: 579px;
71+
height: 28px;
72+
margin-top: 8.5px ;
73+
padding: 2px 4.1px 5px 3.9px;
74+
border-radius: 4px;
75+
border: solid 1px #34394c;
76+
background-color: #23283d;
77+
}
78+
79+
.query{
80+
font-size: 18px;
81+
font-weight: normal;
82+
font-stretch: normal;
83+
font-style: normal;
84+
margin-top: 33px;
85+
color: #7292ff;
86+
}
87+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { SendJwt1Component } from './send-jwt1.component';
4+
5+
describe('SendJwt1Component', () => {
6+
let component: SendJwt1Component;
7+
let fixture: ComponentFixture<SendJwt1Component>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
declarations: [ SendJwt1Component ]
12+
})
13+
.compileComponents();
14+
});
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(SendJwt1Component);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should create', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { Component, OnInit } from '@angular/core';
2+
import { Router } from '@angular/router';
3+
import { StepService } from '../shared/services/step.service';
4+
5+
@Component({
6+
selector: 'app-send-jwt1',
7+
templateUrl: './send-jwt1.component.html',
8+
styleUrls: ['./send-jwt1.component.scss']
9+
})
10+
export class SendJwt1Component implements OnInit {
11+
12+
constructor(
13+
private router: Router,
14+
private stepService: StepService
15+
) {
16+
this.stepService.setStep(7)
17+
}
18+
19+
ngOnInit(): void {
20+
}
21+
22+
backStep() {
23+
this.stepService.setStep(6)
24+
this.router.navigate(['generate-token1'])
25+
}
26+
nextStep(){
27+
this.stepService.setStep(8)
28+
this.router.navigate(['send-jwt2'])
29+
}
30+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { NgModule } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
3+
4+
import { SendJwt1RoutingModule } from './send-jwt1-routing.module';
5+
import { TranslocoModule } from '@ngneat/transloco';
6+
import { SendJwt1Component } from './send-jwt1.component'
7+
8+
9+
@NgModule({
10+
declarations: [
11+
SendJwt1Component
12+
],
13+
imports: [
14+
CommonModule,
15+
TranslocoModule,
16+
SendJwt1RoutingModule
17+
]
18+
})
19+
export class SendJwt1Module { }

0 commit comments

Comments
 (0)