Running Prettier in Project
This commit is contained in:
@@ -28,17 +28,16 @@
|
||||
}
|
||||
|
||||
.user-options li a {
|
||||
font-family: 'Montserrat';
|
||||
font-family: "Montserrat";
|
||||
text-decoration: none;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
|
||||
.user-options li a:hover {
|
||||
color: #f44336;
|
||||
transition: 0.5s;
|
||||
cursor: pointer;
|
||||
opacity: .8;
|
||||
}
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,23 @@
|
||||
<div class="user-container">
|
||||
<div class="user-options">
|
||||
<ul>
|
||||
<li *ngFor="let options of (user ? userOptions : userlessOptions); let i=index"[@animateSliderItem]="{ value: itemStatus, params: { fadeInTime: .6 + i/10 , fadeOutTime: .6 - i/10 } }">
|
||||
<li
|
||||
*ngFor="
|
||||
let options of user ? userOptions : userlessOptions;
|
||||
let i = index
|
||||
"
|
||||
[@animateSliderItem]="{
|
||||
value: itemStatus,
|
||||
params: {
|
||||
fadeInTime: 0.6 + i / 10,
|
||||
fadeOutTime: 0.6 - i / 10
|
||||
}
|
||||
}"
|
||||
>
|
||||
<a (click)="options.onClick()">
|
||||
{{options.name}}
|
||||
{{ options.name }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,9 +8,8 @@ describe('UserSliderComponent', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ UserSliderComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [UserSliderComponent],
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(UserSliderComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
||||
@@ -8,77 +8,75 @@ import { User } from 'src/app/shared/model/user/user.model';
|
||||
@Component({
|
||||
selector: 'app-user-slider',
|
||||
templateUrl: './user-slider.component.html',
|
||||
styleUrls: ['./user-slider.component.css']
|
||||
styleUrls: ['./user-slider.component.css'],
|
||||
})
|
||||
export class UserSliderComponent extends SliderItemComponent implements OnInit {
|
||||
|
||||
userlessOptions = [
|
||||
{
|
||||
name: "Login",
|
||||
name: 'Login',
|
||||
onClick: () => {
|
||||
this.onLoginOptionClicked();
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Signup",
|
||||
name: 'Signup',
|
||||
onClick: () => {
|
||||
this.onSignUpOptionClick();
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
userOptions = [
|
||||
{
|
||||
name: "My Profile",
|
||||
name: 'My Profile',
|
||||
onClick: () => {
|
||||
this.onMyProfileClicked()
|
||||
}
|
||||
this.onMyProfileClicked();
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Help",
|
||||
name: 'Help',
|
||||
onClick: () => {
|
||||
this.onHelpClicked();
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Logout",
|
||||
name: 'Logout',
|
||||
onClick: () => {
|
||||
this.onLogout();
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
user!: User|null;
|
||||
user!: User | null;
|
||||
|
||||
authSubscription!: Subscription;
|
||||
|
||||
@Output()
|
||||
loginPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
loginPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
signupPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
signupPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
helpPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
helpPopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
|
||||
@Output()
|
||||
myProfilePopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
myProfilePopupState: EventEmitter<boolean> = new EventEmitter();
|
||||
|
||||
constructor(private authService: AuthService) {
|
||||
super();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.authSubscription =
|
||||
this.authService.authSubject.subscribe(
|
||||
res => {
|
||||
if (UserChecker.test(res)) {
|
||||
this.user = <User>res;
|
||||
} else {
|
||||
this.user = null;
|
||||
}
|
||||
this.authSubscription = this.authService.authSubject.subscribe(
|
||||
(res) => {
|
||||
if (UserChecker.test(res)) {
|
||||
this.user = <User>res;
|
||||
} else {
|
||||
this.user = null;
|
||||
}
|
||||
)
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
onLoginOptionClicked(): void {
|
||||
@@ -100,5 +98,4 @@ export class UserSliderComponent extends SliderItemComponent implements OnInit {
|
||||
onLogout() {
|
||||
this.authService.logout();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user