-
Notifications
You must be signed in to change notification settings - Fork 61
Modified dashboard page #141
Modified dashboard page #141
Conversation
9250b81
to
639df0f
Compare
Codecov Report
@@ Coverage Diff @@
## master #141 +/- ##
==========================================
- Coverage 52.17% 52.06% -0.11%
==========================================
Files 61 61
Lines 3178 3196 +18
Branches 370 371 +1
==========================================
+ Hits 1658 1664 +6
- Misses 1436 1444 +8
- Partials 84 88 +4
Continue to review full report at Codecov.
|
b61c7a7
to
773b6a2
Compare
dc06cf8
to
779593f
Compare
@lunayach this can be reviewed now |
angular.json
Outdated
"src/styles/base.scss", | ||
"./node_modules/froala-editor/css/froala_editor.pkgd.min.css", | ||
"./node_modules/froala-editor/css/froala_style.min.css", | ||
"./node_modules/ng-pick-datetime/assets/style/picker.min.css" | ||
"./node_modules/ng-pick-datetime/assets/style/picker.min.css", | ||
"src/styles/styles-port/basic.scss" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't we agree on removing styles-port
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am making a PR for that after merging that It will be removed. I kept it to make the PR functional.
*/ | ||
ngOnInit() { | ||
if (!this.authService.isLoggedIn()) { | ||
this.router.navigate(['/auth/login']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't hard-code the URL, /auth/login
, define a separate variable above or get from elsewhere if available.
/** | ||
* Participant teams list | ||
*/ | ||
participantteams = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Camel casing in variable names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
); | ||
this.authServiceSubscription = this.authService.change.subscribe((authState) => { | ||
if (!authState.isLoggedIn) { | ||
this.router.navigate(['/auth/login']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here for /auth/login
.
@@ -0,0 +1,37 @@ | |||
<footer class="ev-md-container dashboard-footer ev-dark-bg"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had reviewed the same file in #158!
Should we close/merge that first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should close that PR
@@ -165,4 +177,6 @@ export class HeaderStaticComponent implements OnInit, OnDestroy { | |||
this.isMenuExpanded = !this.isMenuExpanded; | |||
} | |||
|
|||
profileDropdown(event) {} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function does nothing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok i will remove that.
src/app/services/auth.service.ts
Outdated
@@ -12,12 +12,21 @@ export class AuthService { | |||
|
|||
|
|||
/** | |||
* Modifications in Auth Services | |||
* Ported From Angular Application |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Means ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I will remove these comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/app/services/auth.service.ts
Outdated
}, | ||
err => { | ||
error(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this function will be used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed changes in it
templateUrl: './simple-header.component.html', | ||
styleUrls: ['./simple-header.component.scss'] | ||
}) | ||
export class SimpleHeaderComponent implements OnInit, OnDestroy { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why its name is simple header ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I named it as per used in angularJS project.
}) | ||
export class SimpleHeaderComponent implements OnInit, OnDestroy { | ||
|
||
user = {username: ''}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to let you know - If you want to create an object then it would be better to user Angular interface concept and make a model in a separate file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I will keep that in mind.
e7b7466
to
c278c64
Compare
Ported the image assets from angularJs application into 'image-port' directory
Ported styles from angularjs Application inside style-port folder
Made the footer UI similar to the angularjs application one.
Made header UI similar to Angularjs Application one.
Added isAuth parameter in auth service
Added mock window service for calling loadJS method.
Added routerLink proprety for routing through UI
Added github fork and star button using github api
Changes made in auth services to integrate angularJS authentication features
Changes made in static header to handle different authentication cases
Added main.scss file of ported style in the angular.json file to compile it at the time of building project.
Dashboard-content component added to added functionality in the dashboard UI
Added proprtiess in .btn class
9625e1a
to
3bfab54
Compare
Unnecessary changes removed from auth service
3bfab54
to
096a9d5
Compare
@sanketbansal please verify the changes once before pushing. This big image comes when visiting any link in the application: |
@lunayach it's working fine on my machine. |
</div> | ||
</div> | ||
</div> | ||
<footer class="ev-md-container ev-footer ev-dark-bg"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sanketbansal no need of this footer
component again. It has the identical code for dash-footer
component which is already merged in #158.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, will remove that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should I rename the dash-footer to footer ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please.
<div class="btn ev-btn-dark waves-effect waves-dark grad-btn grad-btn-dark fs-14" (click)="logOut()">Logout</div> | ||
</li> | ||
</ul> | ||
<ul class="side-nav" style="width:200px; transform:translateX(0px);" (click)="menuExpander()" *ngIf="!isMenuExpanded" > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move these inline styles to .scss
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
</ul> | ||
<ul class="right hide-on-med-and-down"> | ||
<li *ngIf="!authService.isAuth"><a class="waves-effect waves-dark main-header-link" routerLink="/auth/signup" routerLinkActive="active">Sign Up</a></li> | ||
<li *ngIf="!authService.isAuth"><a class="btn ev-btn-dark waves-effect waves-dark grad-btn grad-btn-dark fs-14" style="padding: 0 29px; font-size: 14px; display: inline-block" routerLink="/auth/login" routerLinkActive="active">Log In</a></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, as well, move adding: 0 29px; font-size: 14px; display: inline-block
to .scss
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
@HostListener('window:resize', ['$event']) | ||
onResize(event) { | ||
this.innerWidth = window.innerWidth; | ||
if (this.innerWidth <= 810) { | ||
this.isMenuExpanded = false; | ||
if (this.innerWidth > 810) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create an expandMenu( )
method to use it in both the places i.e. Line 113 and Line 127 respectively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay
<a class="btn ev-btn-dark waves-effect waves-dark grad-btn grad-btn-dark fs-14" routerLink="/auth/login">Log In</a> | ||
</li> | ||
</ul> | ||
<ul class="side-nav" style="width:200px; transform:translateX(0px);" (click)="menuExpander()" *ngIf="!isMenuExpanded"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move style="width:200px; transform:translateX(0px);"
to .scss
. (Also, at other places.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,43 @@ | |||
<div class="sim-header padding-lr-header"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple Header and Header Static component are very similar. Can you tell why do we need both of them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, I will try to make a single component for both of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! That'll be great.
/** | ||
* Header is transparent on these URLs | ||
*/ | ||
transparentHeaderUrls = ['', '/']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think, this is used anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, I will check and remove that
UI bugs fixed in static header.
Simple header component has been removed
Added checkInnerwidth method
Added styles of dash footer component
Dash footer has been removed as it has duplicate styles and html with footer component
2ef4829
to
c2c85bd
Compare
@sanketbansal when I click on the available options on the side-bar (i.e. All Challenges, Hosted Challenges, etc.), the corresponding side-bar having these options dis-appears. (unlike current version). Can you please check this? |
That's not a bug actually after clicking on the options it gets routed to other components which are |
@sanketbansal The stats for the GitHub are not displayed in one go and I have to do a refresh and only then they are displayed. |
Added new github forks and star button
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RishabhJain2018 Now this can be merged.
It does break some UI of the homepage but that would be taken care with #140.
Changes proposed in this pull request: