refactor(client): rename screen
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { Routes } from '@angular/router';
|
import { Routes } from '@angular/router';
|
||||||
import { ScreenSend } from './screens/screen-send/screen-send';
|
import { ScreenSend } from './screens/screen-send/screen-send';
|
||||||
import { ScreenReceive } from './screens/screen-receive/screen-receive';
|
import { ScreenRequest } from './screens/screen-request/screen-request';
|
||||||
import { ScreenProfile } from './screens/screen-profile/screen-profile';
|
import { ScreenProfile } from './screens/screen-profile/screen-profile';
|
||||||
import { ScreenLogin } from './screens/screen-login/screen-login';
|
import { ScreenLogin } from './screens/screen-login/screen-login';
|
||||||
import { authGuard } from './services/auth-guard';
|
import { authGuard } from './services/auth-guard';
|
||||||
@@ -22,7 +22,7 @@ export const routes: Routes = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path:'receive',
|
path:'receive',
|
||||||
component: ScreenReceive,
|
component: ScreenRequest,
|
||||||
canActivate: [authGuard],
|
canActivate: [authGuard],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { ScreenReceive } from './screen-receive';
|
import { ScreenRequest } from './screen-request';
|
||||||
|
|
||||||
describe('ScreenReceive', () => {
|
describe('ScreenReceive', () => {
|
||||||
let component: ScreenReceive;
|
let component: ScreenRequest;
|
||||||
let fixture: ComponentFixture<ScreenReceive>;
|
let fixture: ComponentFixture<ScreenRequest>;
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [ScreenReceive],
|
imports: [ScreenRequest],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
|
||||||
fixture = TestBed.createComponent(ScreenReceive);
|
fixture = TestBed.createComponent(ScreenRequest);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
await fixture.whenStable();
|
await fixture.whenStable();
|
||||||
});
|
});
|
||||||
@@ -6,12 +6,12 @@ import { APIService } from '../../services/api';
|
|||||||
import { Modal } from '../../components/modal/modal';
|
import { Modal } from '../../components/modal/modal';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-screen-receive',
|
selector: 'app-screen-request',
|
||||||
imports: [FormsModule, QrCodeComponent],
|
imports: [FormsModule, QrCodeComponent],
|
||||||
templateUrl: './screen-receive.html',
|
templateUrl: './screen-request.html',
|
||||||
styleUrl: './screen-receive.less',
|
styleUrl: './screen-request.less',
|
||||||
})
|
})
|
||||||
export class ScreenReceive {
|
export class ScreenRequest {
|
||||||
private modalService = inject(NgbModal);
|
private modalService = inject(NgbModal);
|
||||||
api = inject(APIService);
|
api = inject(APIService);
|
||||||
@ViewChild('qrTemplate') qrTemplate !: TemplateRef<any>;
|
@ViewChild('qrTemplate') qrTemplate !: TemplateRef<any>;
|
||||||
@@ -3,12 +3,12 @@ import { FormsModule } from '@angular/forms';
|
|||||||
import { APIService } from '../../services/api';
|
import { APIService } from '../../services/api';
|
||||||
import { NotificationService } from '../../services/notification';
|
import { NotificationService } from '../../services/notification';
|
||||||
import QrScanner from 'qr-scanner';
|
import QrScanner from 'qr-scanner';
|
||||||
import { NgbModal, NgbSlide } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { Modal } from '../../components/modal/modal';
|
import { Modal } from '../../components/modal/modal';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-screen-send',
|
selector: 'app-screen-send',
|
||||||
imports: [FormsModule, NgbSlide],
|
imports: [FormsModule],
|
||||||
templateUrl: './screen-send.html',
|
templateUrl: './screen-send.html',
|
||||||
styleUrl: './screen-send.less',
|
styleUrl: './screen-send.less',
|
||||||
})
|
})
|
||||||
@@ -54,8 +54,6 @@ export class ScreenSend {
|
|||||||
const modalRef = this.modalService.open(Modal);
|
const modalRef = this.modalService.open(Modal);
|
||||||
modalRef.componentInstance.title = 'Scan a QR Code';
|
modalRef.componentInstance.title = 'Scan a QR Code';
|
||||||
modalRef.componentInstance.body = this.templScanner;
|
modalRef.componentInstance.body = this.templScanner;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
closeScanner(){}
|
closeScanner(){}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user