From 1047757e9f89467c9005582d4a446bdd40949516 Mon Sep 17 00:00:00 2001 From: 22nibis Date: Thu, 26 Jun 2025 14:13:03 +0530 Subject: [PATCH] style:"ui fixed v2" --- angular.json | 6 +- package.json | 2 +- src/app/app.routes.ts | 1 + .../middle-section.component.css | 45 +++- .../middle-section.component.html | 17 +- .../components/navbar/navbar.component.css | 22 +- .../components/navbar/navbar.component.html | 4 +- src/app/components/navbar/navbar.component.ts | 14 ++ .../components/sidebar/sidebar.component.css | 9 +- .../components/sidebar/sidebar.component.html | 21 +- .../components/sidebar/sidebar.component.ts | 48 ++-- .../touch-pad-menu.component.css | 211 ++++++++++++++---- .../touch-pad-menu.component.html | 77 +++---- .../touch-pad-menu.component.ts | 4 +- src/app/constants/http-routs.ts | 12 + src/app/home/home.component.html | 22 +- src/app/home/home.component.ts | 9 + src/app/login/login.component.css | 211 +++++++++++++++--- src/app/login/login.component.html | 93 ++++---- src/app/login/login.component.ts | 15 +- src/app/service/auth.guard.ts | 19 ++ src/app/service/auth.service.ts | 20 ++ src/app/service/btc.service.ts | 42 ++++ src/assets/image2.jpg | Bin 0 -> 993394 bytes src/assets/img.jpg | Bin 0 -> 910692 bytes src/assets/logo_w.png | Bin 0 -> 19310 bytes src/assets/newlogo.png | Bin 0 -> 74405 bytes src/main.ts | 3 +- 28 files changed, 680 insertions(+), 247 deletions(-) create mode 100644 src/app/constants/http-routs.ts create mode 100644 src/app/service/auth.guard.ts create mode 100644 src/app/service/auth.service.ts create mode 100644 src/app/service/btc.service.ts create mode 100644 src/assets/image2.jpg create mode 100644 src/assets/img.jpg create mode 100644 src/assets/logo_w.png create mode 100644 src/assets/newlogo.png diff --git a/angular.json b/angular.json index 24246d0..7fc60b8 100644 --- a/angular.json +++ b/angular.json @@ -18,7 +18,7 @@ "zone.js" ], "tsConfig": "tsconfig.app.json", - "assets": [ + "assets": [ "src/assets", "src/favicon.ico", { @@ -62,6 +62,10 @@ }, "serve": { "builder": "@angular/build:dev-server", + "options": { + "host": "0.0.0.0", + "allowedHosts": true + }, "configurations": { "production": { "buildTarget": "Btc-race-app:build:production" diff --git a/package.json b/package.json index 63d5efb..86833c9 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "scripts": { "ng": "ng", - "start": "ng serve", + "start": "ng serve --host 0.0.0.0 --port 4200", "build": "ng build", "watch": "ng build --watch --configuration development", "test": "ng test" diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index e6cfe06..1cfd9f8 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -1,6 +1,7 @@ import { Routes } from '@angular/router'; import { LoginComponent } from './login/login.component'; import { HomeComponent } from './home/home.component'; +import {AuthGuard} from './service/auth.guard'; export const routes: Routes = [ { path: 'login', component: LoginComponent }, diff --git a/src/app/components/middle-section/middle-section.component.css b/src/app/components/middle-section/middle-section.component.css index f167728..bdc78c0 100644 --- a/src/app/components/middle-section/middle-section.component.css +++ b/src/app/components/middle-section/middle-section.component.css @@ -1,13 +1,11 @@ - - .borderless-custom { border-collapse: separate; border-spacing: 4px; } .custom-cell { - height: 3.4rem; /* increased height for better fill */ + height: 2.5rem; /* increased height for better fill */ background-color: #f8f9fa; border: 1px solid #ced4da; border-radius: 0.3rem; @@ -22,23 +20,27 @@ div[style*="background-color: black"] .custom-cell { /* Override custom cell color inside grey box */ .pure-white { background-color: #ffffff !important; + border-color: black; } .middle-section-container { display: flex; gap: 1rem; - height: 49vh; + height: 38vh; width: 100%; + } /* Desktop view (default) */ .main-table { width: 60%; + background-color: #f1f1f1df; } .transaction-summary { width: 40%; + background-color: #d0ddf5; } .borderless-custom { @@ -46,11 +48,11 @@ div[style*="background-color: black"] .custom-cell { border-spacing: 4px; } -.custom-cell { - height: 3.4rem; +.custom-cell-new { + height: 2.5rem; background-color: #f8f9fa; - border: 1px solid #ced4da; border-radius: 0.3rem; + border: 1px solid rgba(3, 27, 69, 0.678); } div[style*="background-color: black"] .custom-cell { @@ -60,6 +62,24 @@ div[style*="background-color: black"] .custom-cell { .pure-white { background-color: #ffffff !important; } + +.buttons-custom{ + display: flex; + height: 2.6rem; + width: 100%; + justify-content: space-between; + padding-bottom: 0.2rem; +} + + +.btn{ + padding-bottom:0.8rem; + height: 100%; +} +.fw-bold{ + margin-right: 2rem; + padding-bottom: 1rem; +} /* Desktop view (default) - reorder the layout */ @media (min-width: 801px) { .main-table { @@ -87,3 +107,14 @@ div[style*="background-color: black"] .custom-cell { margin-bottom: 1rem; } } + +/* REMOVE or COMMENT this block */ +@media (min-width: 900px) and (max-width: 1400px) { + .middle-section-container { + height: auto; + max-height: 50vh; + } + + +} +/* REMOVE or COMMENT this block fixed */ diff --git a/src/app/components/middle-section/middle-section.component.html b/src/app/components/middle-section/middle-section.component.html index 281466b..872d5f5 100644 --- a/src/app/components/middle-section/middle-section.component.html +++ b/src/app/components/middle-section/middle-section.component.html @@ -3,7 +3,7 @@
-
+
Transaction Summary
@@ -27,7 +27,7 @@
-
+
@@ -37,19 +37,18 @@ - - - - + + + +
-
+
-
Amount :
+
Amount :
-
diff --git a/src/app/components/navbar/navbar.component.css b/src/app/components/navbar/navbar.component.css index 6d96d9e..1204746 100644 --- a/src/app/components/navbar/navbar.component.css +++ b/src/app/components/navbar/navbar.component.css @@ -1,13 +1,13 @@ /* Top Bar */ .top-bar { - background-color: #6a4607; + background-color: #043785; height: 2.5rem; - font-size: 0.85rem; + font-size: 1rem; width: 100%; } .top-live-button { - background: rgb(5, 126, 43); + background: rgb(3, 108, 36); color: #f8f3f3; font-weight: bold; height: 2.5rem; @@ -21,13 +21,13 @@ } .top-live-button:hover { - background-color: rgba(12, 249, 142, 0.903); + background-color: rgba(3, 93, 52, 0.903); cursor: pointer; } /* Navbar */ .custom-navbar { - background-color: #a15914; + background-color: #0e4487; height: 2.7rem; font-weight: bold; font-size: 0.9rem; @@ -38,7 +38,7 @@ background: none; border: none !important; height: 2.7rem; - color: rgb(14, 0, 0); + color: rgb(251, 248, 248); font-weight: bold; font-size: 1rem; } @@ -50,11 +50,11 @@ } .nav-button { - color: rgb(26, 1, 1); - background: none; - border-left: 1px solid white; - border-right: 1px solid white; - height: 2.7rem; + color: rgb(254, 253, 253); + + height: 2.3rem; + margin-bottom: 0.5rem; + padding: 0 0.5rem; display: flex; align-items: center; diff --git a/src/app/components/navbar/navbar.component.html b/src/app/components/navbar/navbar.component.html index 8ac1fd8..fe10e05 100644 --- a/src/app/components/navbar/navbar.component.html +++ b/src/app/components/navbar/navbar.component.html @@ -5,7 +5,7 @@
B.T.No:1111 -
LIVE
+
LIVE
@@ -31,7 +31,7 @@
-
+
diff --git a/src/app/components/navbar/navbar.component.ts b/src/app/components/navbar/navbar.component.ts index 0a6fd45..865e669 100644 --- a/src/app/components/navbar/navbar.component.ts +++ b/src/app/components/navbar/navbar.component.ts @@ -1,5 +1,6 @@ import { Component, OnInit, HostListener } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { BtcService } from '../../service/btc.service'; @Component({ selector: 'app-navbar', @@ -45,6 +46,10 @@ export class NavbarComponent implements OnInit { { description: '', venue: '', ticketNumber: '', poolName: '', totalAmount: '' } ]; + constructor(private btcService : BtcService){ + + } + ngOnInit() { this.updateDateTime(); setInterval(() => this.updateDateTime(), 1000); @@ -109,4 +114,13 @@ export class NavbarComponent implements OnInit { this.selectedRace = race; this.closeModals(); } + + ping() { + console.log("Ping"); + + this.btcService.pingLiveStatus().subscribe({ + next: (employee) => {console.log(employee); console.log("Resp")}, + error: (e) => {console.log(e); console.log("Error")} + }); + } } diff --git a/src/app/components/sidebar/sidebar.component.css b/src/app/components/sidebar/sidebar.component.css index 739aa91..078e721 100644 --- a/src/app/components/sidebar/sidebar.component.css +++ b/src/app/components/sidebar/sidebar.component.css @@ -4,7 +4,7 @@ align-items: center; height: 104vh; width: 5rem; - background-color: #1e1e2f; + background-color: #01050f; padding-top: 1rem; padding-bottom: 2rem; box-sizing: border-box; @@ -16,6 +16,10 @@ margin: 0 auto; } +.logo{ + width: 4rem; + height: 3rem; +} .sidebar-menu { list-style: none; padding: 0; @@ -31,7 +35,8 @@ display: flex; flex-direction: column; align-items: center; - font-size: 0.75rem; + font-size: 0.8rem; + font-weight: bold; padding: 0.5rem 0; cursor: pointer; transition: background 0.2s; diff --git a/src/app/components/sidebar/sidebar.component.html b/src/app/components/sidebar/sidebar.component.html index b9f3baa..9006182 100644 --- a/src/app/components/sidebar/sidebar.component.html +++ b/src/app/components/sidebar/sidebar.component.html @@ -1,18 +1,25 @@ -new + +