dev #14384 Правка ошибок отображения WPA КофеЛайк: fix logout and login, change ios header
This commit is contained in:
parent
4e0a41b644
commit
3ff34525ed
@ -2,7 +2,6 @@
|
||||
padding: 24px 16px 0px;
|
||||
|
||||
& > h2 {
|
||||
font-family: Montserrat;
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-size: 15px;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<div class="container">
|
||||
<div>
|
||||
<div class="back">
|
||||
<mat-icon *ngIf="backEvent" style="cursor: pointer;" aria-hidden="false" aria-label="Назад" fontIcon="arrow_back_ios" class="back-arrow" (click)="back()"></mat-icon>
|
||||
</div>
|
||||
</div>
|
||||
<h1 class="title">{{title}}</h1>
|
||||
<!-- <div class="plug"></div> -->
|
||||
<div *ngIf="showDropdown" class="backdrop" (click)="closeMenu()"></div>
|
||||
|
||||
@ -20,6 +20,9 @@
|
||||
grid-template-columns: auto auto auto;
|
||||
justify-items: center;
|
||||
align-items: center;
|
||||
.back {
|
||||
width: 40px;
|
||||
}
|
||||
.back-arrow {
|
||||
font-size: 16px;
|
||||
display: flex;
|
||||
@ -32,7 +35,6 @@
|
||||
visibility: hidden;
|
||||
}
|
||||
.title {
|
||||
font-family: "Montserrat", sans-serif;
|
||||
font-weight: 700;
|
||||
font-size: 17px;
|
||||
line-height: 22px;
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { MessagingService } from 'src/app/services/messaging.service';
|
||||
import { getTypeDevice, DeviceType } from 'src/app/utils';
|
||||
import { AppleWalletService } from 'src/app/services/apple-wallet.service';
|
||||
import { CookiesService } from 'src/app/services/cookies.service';
|
||||
import { MatBottomSheet } from '@angular/material/bottom-sheet';
|
||||
import { ExitComponent } from 'src/app/components/exit/exit.component';
|
||||
import { Router } from '@angular/router';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-navbar[title]',
|
||||
@ -24,7 +24,7 @@ export class NavbarComponent implements OnInit {
|
||||
private appleWalletService: AppleWalletService,
|
||||
private cookiesService: CookiesService,
|
||||
private _bottomSheet: MatBottomSheet,
|
||||
private router: Router,
|
||||
private authService: AuthService,
|
||||
) { }
|
||||
|
||||
handler(cb: () => void): (e: any) => void {
|
||||
@ -73,8 +73,7 @@ export class NavbarComponent implements OnInit {
|
||||
bottomSheet.afterDismissed().subscribe({
|
||||
next: (val) => {
|
||||
if (val) {
|
||||
this.deleteToken();
|
||||
this.router.navigate(['/login']);
|
||||
this.authService.logout();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
@ -104,7 +104,6 @@
|
||||
|
||||
h2 {
|
||||
font-style: normal;
|
||||
font-family: Montserrat;
|
||||
font-weight: 700;
|
||||
font-size: 17px;
|
||||
line-height: 22px;
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { MatBottomSheet } from '@angular/material/bottom-sheet';
|
||||
import { Router } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { ExitComponent } from 'src/app/components/exit/exit.component';
|
||||
import { CookiesService } from 'src/app/services/cookies.service';
|
||||
import { WpJsonService } from 'src/app/services/wp-json.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { MessageService } from 'primeng/api';
|
||||
import { MessagingService } from 'src/app/services/messaging.service';
|
||||
import { DeviceType, getTypeDevice } from 'src/app/utils';
|
||||
@ -25,16 +21,14 @@ export class GuestCardComponent implements OnInit {
|
||||
constructor(
|
||||
private _bottomSheet: MatBottomSheet,
|
||||
public cookiesService: CookiesService,
|
||||
private router: Router,
|
||||
private wpJsonService: WpJsonService,
|
||||
private messagingService: MessagingService,
|
||||
private messageService: MessageService,
|
||||
public authService: AuthService,
|
||||
public authService: AuthService,
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.showBack = getTypeDevice() === DeviceType.android;
|
||||
|
||||
|
||||
this.requestPermission();
|
||||
}
|
||||
|
||||
@ -66,13 +60,12 @@ export class GuestCardComponent implements OnInit {
|
||||
this.cookiesService.logout();
|
||||
}
|
||||
|
||||
logout() {
|
||||
logout = () => {
|
||||
const bottomSheet = this._bottomSheet.open(ExitComponent);
|
||||
bottomSheet.afterDismissed().subscribe({
|
||||
next: (val) => {
|
||||
if (val) {
|
||||
this.deleteToken();
|
||||
this.router.navigate(['/login']);
|
||||
this.authService.logout();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
@ -0,0 +1 @@
|
||||
nikolay@arch.6700:1687496762
|
||||
@ -93,10 +93,10 @@
|
||||
</form>
|
||||
<p class="resend-code">
|
||||
Не пришло SMS?<br />
|
||||
<ng-container *ngIf="timeLeft">
|
||||
Отправим повторно через {{timeLeft}}с
|
||||
<ng-container *ngIf="authService.timeLeft">
|
||||
Отправим повторно через {{authService.timeLeft}}с
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!timeLeft">
|
||||
<ng-container *ngIf="!authService.timeLeft">
|
||||
<span class="resend" (click)="submitNumber()">Отправить повторно</span>
|
||||
</ng-container>
|
||||
</p>
|
||||
|
||||
@ -26,11 +26,10 @@ export class LoginComponent implements OnInit {
|
||||
code2: new FormControl('', [Validators.required]),
|
||||
code3: new FormControl('', [Validators.required]),
|
||||
});
|
||||
private inputIds = ['field', 'field1', 'field2', 'field3'];
|
||||
timeLeft: number = 0;
|
||||
private inputIds = ['field', 'field1', 'field2', 'field3'];
|
||||
|
||||
constructor(
|
||||
private authService: AuthService,
|
||||
public authService: AuthService,
|
||||
private router: Router,
|
||||
) { }
|
||||
|
||||
|
||||
@ -100,6 +100,12 @@ export class AuthService {
|
||||
});
|
||||
}
|
||||
|
||||
logout() {
|
||||
this.userInfo = undefined;
|
||||
this.cookiesService.logout();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
|
||||
sendVerifyByPhone(phone: string) {
|
||||
if (this.timeLeft) {
|
||||
this.messageService.add({
|
||||
@ -175,17 +181,13 @@ export class AuthService {
|
||||
RpcService.authService,
|
||||
true
|
||||
).subscribe({
|
||||
next: (value) => {
|
||||
next: () => {
|
||||
this.router.navigate(['/']);
|
||||
this.getUserInfo();
|
||||
},
|
||||
error: (err) => {
|
||||
console.error(err);
|
||||
|
||||
},
|
||||
complete: () => {
|
||||
this.loading = false;
|
||||
}
|
||||
})
|
||||
} else if (result.code === 230) {
|
||||
this.messageService.add({
|
||||
@ -197,6 +199,9 @@ export class AuthService {
|
||||
error: (error) => {
|
||||
console.error(error);
|
||||
},
|
||||
complete: () => {
|
||||
this.loading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -135,6 +135,22 @@ body {
|
||||
border-color: var(--button-text-color) !important;
|
||||
}
|
||||
|
||||
.mat-h1,
|
||||
.mat-headline-5,
|
||||
.mat-typography .mat-h1,
|
||||
.mat-typography .mat-headline-5,
|
||||
.mat-typography h1 {
|
||||
font-family: Montserrat;
|
||||
}
|
||||
|
||||
.mat-h2,
|
||||
.mat-headline-6,
|
||||
.mat-typography .mat-h2,
|
||||
.mat-typography .mat-headline-6,
|
||||
.mat-typography h2 {
|
||||
font-family: Montserrat, sans-serif;
|
||||
}
|
||||
|
||||
hr {
|
||||
width: 100%;
|
||||
border-top: 1px solid #BDBDBD;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user