diff --git a/client/src/app/app.html b/client/src/app/app.html index 7240e17..aebbeaa 100644 --- a/client/src/app/app.html +++ b/client/src/app/app.html @@ -3,13 +3,13 @@ - + - + - + diff --git a/client/src/app/app.routes.ts b/client/src/app/app.routes.ts index dc39edb..a1c4935 100644 --- a/client/src/app/app.routes.ts +++ b/client/src/app/app.routes.ts @@ -1,3 +1,24 @@ import { Routes } from '@angular/router'; +import { ScreenSend } from './screens/screen-send/screen-send'; +import { ScreenReceive } from './screens/screen-receive/screen-receive'; +import { ScreenProfile } from './screens/screen-profile/screen-profile'; -export const routes: Routes = []; +export const routes: Routes = [ + { + path: '', + pathMatch:'full', + redirectTo: '/send' + }, + { + path:'send', + component: ScreenSend, + }, + { + path:'receive', + component: ScreenReceive, + }, + { + path:'profile', + component: ScreenProfile, + }, +]; diff --git a/client/src/app/app.ts b/client/src/app/app.ts index a369b58..4cfb7c7 100644 --- a/client/src/app/app.ts +++ b/client/src/app/app.ts @@ -1,5 +1,5 @@ import { Component, signal } from '@angular/core'; -import { RouterOutlet } from '@angular/router'; +import { RouterOutlet, RouterLinkWithHref } from '@angular/router'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { NgbNav, @@ -10,11 +10,12 @@ import { @Component({ selector: 'app-root', - imports: [RouterOutlet, NgbModule, NgbNav, NgbNavItem, NgbNavItemRole, NgbNavLinkBase], + imports: [RouterOutlet, NgbModule, NgbNav, NgbNavItem, NgbNavItemRole, NgbNavLinkBase, RouterLinkWithHref], templateUrl: './app.html', styleUrl: './app.less' }) export class App { protected readonly title = signal('client'); + //FIXME nav jumping back to 1 after reload active = 1; } diff --git a/client/src/app/screens/screen-send/screen-send.html b/client/src/app/screens/screen-send/screen-send.html new file mode 100644 index 0000000..25f1d01 --- /dev/null +++ b/client/src/app/screens/screen-send/screen-send.html @@ -0,0 +1,57 @@ + + + + + + Send Money + + + + + Amount + + $ + + + + + + + To + + @ + + + + + + + Note (Optional) + + + + + + + Send Money + + + Cancel + + + + + + + + diff --git a/client/src/app/screens/screen-send/screen-send.less b/client/src/app/screens/screen-send/screen-send.less new file mode 100644 index 0000000..e69de29 diff --git a/client/src/app/screens/screen-send/screen-send.spec.ts b/client/src/app/screens/screen-send/screen-send.spec.ts new file mode 100644 index 0000000..c01349f --- /dev/null +++ b/client/src/app/screens/screen-send/screen-send.spec.ts @@ -0,0 +1,22 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ScreenSend } from './screen-send'; + +describe('ScreenSend', () => { + let component: ScreenSend; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [ScreenSend], + }).compileComponents(); + + fixture = TestBed.createComponent(ScreenSend); + component = fixture.componentInstance; + await fixture.whenStable(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/client/src/app/screens/screen-send/screen-send.ts b/client/src/app/screens/screen-send/screen-send.ts new file mode 100644 index 0000000..a6756c3 --- /dev/null +++ b/client/src/app/screens/screen-send/screen-send.ts @@ -0,0 +1,25 @@ +import { Component } from '@angular/core'; +import { FormsModule } from '@angular/forms'; + +@Component({ + selector: 'app-screen-send', + imports: [FormsModule], + templateUrl: './screen-send.html', + styleUrl: './screen-send.less', +}) +export class ScreenSend { + amount: number = 0; + recipient: string = ''; + note: string = ''; + + sendMoney() { + console.log('Sending:', this.amount, 'to', this.recipient); + // Add your logic here (e.g., API call) + } + + cancel() { + this.amount = 0; + this.recipient = ''; + this.note = ''; + } +} \ No newline at end of file