Download src/app/homepage/auth-wrapper.component.ts from pykara/Py-detect: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/spaces/pykara/Py-detect/resolve/main/src/app/homepage/auth-wrapper.component.ts
- Command line
-
hf download hf://spaces/pykara/Py-detect/src/app/homepage/auth-wrapper.component.ts
-
curl -L -o auth-wrapper.component.ts https://huggingface.co/spaces/pykara/Py-detect/resolve/main/src/app/homepage/auth-wrapper.component.ts
1.24 kB
| import { Component } from '@angular/core'; | |
| import { trigger, state, style, animate, transition } from '@angular/animations'; | |
| import { CommonModule } from '@angular/common'; | |
| import { SignInComponent } from './sign-in/sign-in.component'; | |
| import { SignUpComponent } from './sign-up/sign-up.component'; | |
| ({ | |
| selector: 'app-auth-wrapper', | |
| standalone: true, | |
| imports: [CommonModule, SignInComponent, SignUpComponent], | |
| template: ` | |
| <div class="card-swipe-container" [@cardSwipe]="cardState"> | |
| <app-sign-in | |
| *ngIf="cardState === 'signin'" | |
| [cardState]="cardState" | |
| (switchToSignUp)="switchToSignUp()" | |
| ></app-sign-in> | |
| <app-sign-up | |
| *ngIf="cardState === 'signup'" | |
| [cardState]="cardState" | |
| (switchToSignIn)="switchToSignIn()" | |
| ></app-sign-up> | |
| </div> | |
| `, | |
| styleUrls: ['./auth-wrapper.component.css'], | |
| animations: [ | |
| trigger('cardSwipe', [ | |
| state('signup', style({ transform: 'translateX(0%)' })), | |
| state('signin', style({ transform: 'translateX(-100%)' })), | |
| transition('signup <=> signin', [ | |
| animate('400ms cubic-bezier(.25,.8,.25,1)') | |
| ]), | |
| ]) | |
| ] | |
| }) | |
| export class AuthWrapperComponent { | |
| cardState: 'signup' | 'signin' = 'signin'; | |
| switchToSignUp() { this.cardState = 'signup'; } | |
| switchToSignIn() { this.cardState = 'signin'; } | |
| } | |