Skip to content

Commit ead2299

Browse files
committed
fix(arc-docs): review changes
review changes
1 parent 44b2602 commit ead2299

21 files changed

+402
-83
lines changed

projects/arc-lib/src/lib/components/auth/auth.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<nb-layout>
2-
<nb-layout-column>
2+
<nb-layout-column class="loginImg-wrapper">
33
<div class="login-img">
44
<img
55
width="100%"

projects/arc-lib/src/lib/components/auth/auth.component.scss

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
::ng-deep {
1818
nb-layout .layout .layout-container .content .columns nb-layout-column {
1919
padding: $auth-layout-padding;
20-
2120
@include media-breakpoint-down(sm) {
2221
padding: 0;
2322
}
@@ -30,3 +29,15 @@
3029
flex-shrink: 0 !important;
3130
flex-basis: 35% !important;
3231
}
32+
33+
@media (max-width: 1024px) {
34+
.loginImg-wrapper {
35+
display: none;
36+
}
37+
.card-row {
38+
flex-grow: 1 !important;
39+
flex-shrink: 0 !important;
40+
flex-basis: 100% !important;
41+
}
42+
}
43+

projects/arc-lib/src/lib/components/auth/login/login.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ <h3>Welcome to Arc by SourceFuse</h3>
5353
<div class="input-title">
5454
<span>Password</span>
5555
</div>
56-
<div class="input">
56+
<div class="input pwd-wrapper">
5757
<input
5858
placeholder=" Enter New Password"
5959
[type]="getInputType()"

projects/arc-lib/src/lib/components/auth/login/login.component.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@
2020
padding-top: 15%;
2121
}
2222
}
23+
.pwd-wrapper{
24+
position: relative;
25+
button{
26+
position: absolute;
27+
top: 10px;
28+
right: 40px;
29+
}
30+
}
2331

2432
.forgot-password {
2533
a {

projects/arc-lib/src/lib/components/auth/reset-password/reset-password.component.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,18 @@
2424
.main-wrapper {
2525
padding-top: 147px;
2626
}
27+
28+
.input {
29+
display: flex;
30+
align-items: center;
31+
position: relative;
32+
}
33+
34+
.password-icon{
35+
position: absolute;
36+
right: 15px;
37+
}
38+
39+
.input input{
40+
padding-right: 50px;
41+
}

projects/arc-lib/src/lib/components/auth/signup/signup.component.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
gap: 10px;
2727
}
2828

29+
.input-wrapper > *{
30+
31+
flex-basis: 50%;
32+
}
33+
2934
.inputTags {
3035
input {
3136
margin: 5px 0;
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<div class="nav-container">
2+
<div class="header-container">
3+
<div class="logo-container">
4+
<nb-icon
5+
icon="menu-outline"
6+
class="cursor-pointer menu-icon"
7+
(click)="toggle()"
8+
></nb-icon>
9+
<a
10+
class="logo"
11+
href="javascript:void(0)"
12+
(click)="navigateHome('/main/home')"
13+
>
14+
<img src="../../../assets/images/home/ARC_logo.png" alt="logo" />
15+
</a>
16+
</div>
17+
</div>
18+
19+
<div class="header-container">
20+
<nb-actions size="small">
21+
<nb-action class="control-item" icon="bell-outline"></nb-action>
22+
<nb-action class="user-action">
23+
<nb-user
24+
[nbContextMenu]="userMenu"
25+
nbContextMenuTag="userMenu"
26+
[name]="loggedInUserDM.fullName"
27+
[picture]="loggedInUserDM.photo ?? ''"
28+
[title]="loggedInUserDM.role ?? 'Admin'"
29+
>
30+
</nb-user>
31+
</nb-action>
32+
</nb-actions>
33+
</div>
34+
</div>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
@use 'sass:map';
2+
@use '../../../theme/styles/variables' as *;
3+
@use '../../';
4+
@use '../../../theme/styles/mixins' as *;
5+
6+
.nav-container {
7+
display: flex;
8+
justify-content: space-between;
9+
width: 100% !important;
10+
}
11+
12+
.logo-container {
13+
display: flex;
14+
align-items: center;
15+
width: calc(#{nb-theme(sidebar-width)} - #{nb-theme(header-padding)});
16+
user-select: none;
17+
}
18+
19+
20+
nb-action {
21+
height: auto;
22+
display: flex;
23+
align-content: center;
24+
}
25+
26+
nb-user {
27+
cursor: pointer;
28+
}
29+
30+
31+
.header-container {
32+
display: flex;
33+
align-items: center;
34+
width: auto;
35+
36+
.menu-icon {
37+
margin-left: 0.625rem;
38+
}
39+
40+
.logo {
41+
padding: 0 1.25rem;
42+
padding-left: 0.625rem;
43+
font-size: 1.75rem;
44+
white-space: nowrap;
45+
text-decoration: none;
46+
}
47+
}
48+
49+
.hi {
50+
text-align: center;
51+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { HeaderComponent } from './header.component';
4+
5+
describe('HeaderComponent', () => {
6+
let component: HeaderComponent;
7+
let fixture: ComponentFixture<HeaderComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
imports: [ HeaderComponent ]
12+
})
13+
.compileComponents();
14+
15+
fixture = TestBed.createComponent(HeaderComponent);
16+
component = fixture.componentInstance;
17+
fixture.detectChanges();
18+
});
19+
20+
it('should create', () => {
21+
expect(component).toBeTruthy();
22+
});
23+
});
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import {Component, OnInit} from '@angular/core';
2+
import {CommonModule} from '@angular/common';
3+
import { ThemeModule } from '@project-lib/theme/theme.module';
4+
import { ActivatedRoute, Router } from '@angular/router';
5+
import { NbSidebarService, NbMenuService, NbMenuItem } from '@nebular/theme';
6+
import { AuthService, LoggedInUserDM } from '@project-lib/core/auth';
7+
import { RouteComponentBaseDirective } from '@project-lib/core/route-component-base';
8+
import { IconPacksManagerService } from '@project-lib/theme/services';
9+
import { takeUntil } from 'rxjs';
10+
import {Location} from '@angular/common';
11+
12+
@Component({
13+
selector: 'lib-header',
14+
standalone: true,
15+
imports: [CommonModule, ThemeModule],
16+
templateUrl: './header.component.html',
17+
styleUrls: ['./header.component.scss'],
18+
})
19+
export class HeaderComponent
20+
extends RouteComponentBaseDirective
21+
implements OnInit
22+
{
23+
toggleFooter = false;
24+
loggedInUserDM: LoggedInUserDM = new LoggedInUserDM();
25+
userMenu: NbMenuItem[] = [{ title: 'Log out', data: 'logout' }]; //dynamic krna hai ,
26+
// dusry project mai b chala hai
27+
//header place change ------Done
28+
//css variable
29+
constructor(
30+
override readonly route: ActivatedRoute,
31+
override readonly location: Location,
32+
private readonly sidebarService: NbSidebarService,
33+
private readonly authService: AuthService,
34+
private readonly menuService: NbMenuService,
35+
private readonly iconMgr: IconPacksManagerService,
36+
private router: Router,
37+
) {
38+
super(route, location);
39+
this.iconMgr.registerSvgs();
40+
}
41+
42+
navigate(link: string) {
43+
this.router.navigate([link]);
44+
}
45+
46+
toggle() {
47+
this.sidebarService.toggle(true, 'right');
48+
this.toggleFooter = !this.toggleFooter;
49+
}
50+
51+
ngOnInit(): void {
52+
this.authService
53+
.currentUser()
54+
.pipe(takeUntil(this._destroy$))
55+
.subscribe(usr => {
56+
this.loggedInUserDM = usr;
57+
});
58+
// this.menuService
59+
// .onItemClick()
60+
// .pipe(takeUntil(this._destroy$))
61+
// .subscribe(menu => {
62+
// console.log(menu);
63+
// if (menu.tag === 'userMenu' && menu.item.data === 'logout') {
64+
// this.authService.logout().pipe(takeUntil(this._destroy$)).subscribe();
65+
// }
66+
// });
67+
}
68+
}

0 commit comments

Comments
 (0)