-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added console admin login and updated endpoint
Added request control limit for avoiding brute force attacks
- Loading branch information
Showing
12 changed files
with
310 additions
and
26 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
frontend/projects/shared-call-components/src/lib/pages/console/login/login.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<div class="login-container"> | ||
<div class="card-container"> | ||
<mat-card class="login-card"> | ||
<h1>Log in</h1> | ||
<p>Continue to OpenVidu Console</p> | ||
<form [formGroup]="loginForm" (ngSubmit)="onSubmit()"> | ||
<mat-form-field class="form-input" appearance="fill"> | ||
<mat-label>Username</mat-label> | ||
<input matInput formControlName="username" required /> | ||
<mat-icon matPrefix>person</mat-icon> | ||
</mat-form-field> | ||
|
||
<mat-form-field class="form-input" appearance="fill"> | ||
<mat-label>Password</mat-label> | ||
<input matInput type="password" formControlName="password" required /> | ||
<mat-icon matPrefix>lock</mat-icon> | ||
</mat-form-field> | ||
|
||
<div class="login-button"> | ||
<button mat-raised-button color="primary" type="submit">Login</button> | ||
</div> | ||
<!-- <p class="forgot-password"><a href="#">Forgot password?</a></p> --> | ||
</form> | ||
</mat-card> | ||
<div class="signup-section"> | ||
<div> | ||
<img src="https://openvidu.io/assets/images/openvidu_white_bg_transp.png" alt="Sign Up" /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
142 changes: 142 additions & 0 deletions
142
frontend/projects/shared-call-components/src/lib/pages/console/login/login.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
font-family: Arial, sans-serif; | ||
background-color: #F8FAFA; | ||
} | ||
|
||
.login-container { | ||
height: 100vh; | ||
} | ||
|
||
.card-container { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100%; | ||
width: 75%; | ||
margin: auto; | ||
max-width: 1200px; | ||
} | ||
|
||
.login-card { | ||
padding: 40px; | ||
width: 400px; | ||
height: 400px; | ||
// box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); | ||
box-shadow: none; | ||
border-top-right-radius: 0px; | ||
border-bottom-right-radius: 0px; | ||
} | ||
|
||
.form-input { | ||
width: 100%; | ||
} | ||
|
||
.login-button { | ||
text-align: center; | ||
button { | ||
width: 100%; | ||
background-color: #0088aa; | ||
color: #ffffff; | ||
border-radius: 4px; | ||
transition: background-color 0.3s; | ||
} | ||
} | ||
.login-button button:hover { | ||
background-color: #00777f; | ||
} | ||
|
||
.signup-section { | ||
display: flex; | ||
text-align: center; | ||
justify-content: center; | ||
align-items: center; | ||
align-content: center; | ||
background-color: #4d4d4d; | ||
padding: 20px; | ||
flex: 1; | ||
width: 400px; | ||
height: 400px; | ||
max-width: 400px; | ||
max-height: 400px; | ||
border-top-right-radius: 12px; | ||
border-bottom-right-radius: 12px; | ||
// box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); | ||
box-shadow: none; | ||
} | ||
|
||
.signup-section img { | ||
max-width: 80%; | ||
height: auto; | ||
} | ||
|
||
// .forgot-password { | ||
// margin-top: 10px; | ||
// text-align: center; | ||
// } | ||
|
||
a { | ||
color: #6a5acd; /* Color del enlace */ | ||
text-decoration: none; | ||
} | ||
|
||
a:hover { | ||
text-decoration: underline; | ||
} | ||
|
||
@media (max-width: 991px) { | ||
/* Ocultar .signup-section en pantallas de 991px o menos */ | ||
.signup-section { | ||
display: none; | ||
} | ||
|
||
.card-container { | ||
width: 75%; | ||
flex-direction: column; | ||
} | ||
|
||
.login-card { | ||
width: 100%; | ||
max-width: 100%; | ||
border-radius: 12px; | ||
height: auto; | ||
// box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.15); | ||
padding: 40px; | ||
margin-bottom: 15px; | ||
} | ||
|
||
.login-button button { | ||
width: 100%; | ||
padding: 12px; | ||
font-size: 1em; | ||
} | ||
|
||
.form-input { | ||
margin-bottom: 10px; | ||
} | ||
} | ||
|
||
/* Pantallas pequeñas adicionales (576px o menos) */ | ||
@media (max-width: 576px) { | ||
.login-card { | ||
padding: 40px; | ||
font-size: 0.9em; | ||
} | ||
|
||
.login-button button { | ||
font-size: 0.85em; | ||
padding: 10px; | ||
} | ||
|
||
.card-container { | ||
width: 95%; | ||
} | ||
|
||
.signup-section { | ||
display: none; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
frontend/projects/shared-call-components/src/lib/pages/console/login/login.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { LoginComponent } from './login.component'; | ||
|
||
describe('LoginComponent', () => { | ||
let component: LoginComponent; | ||
let fixture: ComponentFixture<LoginComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [LoginComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(LoginComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.