Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #72

Merged
merged 49 commits into from
Oct 29, 2019
Merged

Dev #72

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
ec51b75
Tweaked logo, removed extra div
bilalshaikh42 Oct 22, 2019
936e33d
Created icons component. Added icons to topbar
bilalshaikh42 Oct 22, 2019
1e37145
Fixed nav-icons test
bilalshaikh42 Oct 22, 2019
d10f77c
added icons to nav test import
bilalshaikh42 Oct 22, 2019
db4c1ed
Create account menu
bilalshaikh42 Oct 22, 2019
7bb592e
move nav icons
bilalshaikh42 Oct 22, 2019
883aa92
Typo
bilalshaikh42 Oct 22, 2019
f8b5e77
Change flat-button to icon-buttons in topbar
bilalshaikh42 Oct 24, 2019
12e5e0a
Create nav list protype
bilalshaikh42 Oct 24, 2019
8215ac8
Logo tweak to fit anywhere
bilalshaikh42 Oct 24, 2019
5541194
Update footer
bilalshaikh42 Oct 24, 2019
099b5e2
Add spacer after logo
bilalshaikh42 Oct 24, 2019
a98b9bd
Create seperate file for theme
bilalshaikh42 Oct 28, 2019
6500e4d
Show logo only if menu is closed
bilalshaikh42 Oct 28, 2019
4acbe09
Auto generate links
bilalshaikh42 Oct 28, 2019
74a6475
Have hover apply to whole bar
bilalshaikh42 Oct 29, 2019
8007c65
rename links to sidebar
bilalshaikh42 Oct 29, 2019
b045fc4
define nav-item interface and list
bilalshaikh42 Oct 29, 2019
1275f48
Added a filter pipe
bilalshaikh42 Oct 29, 2019
6fc18eb
Have links dynamically generated
bilalshaikh42 Oct 29, 2019
4c15d38
Moved components
bilalshaikh42 Oct 29, 2019
ae51a1c
Fixed bug in return type. Boolean need, string [] sent
bilalshaikh42 Oct 29, 2019
13bdb17
Fixed paremeter types of filter callback method
bilalshaikh42 Oct 29, 2019
f550249
fixed parameter type
bilalshaikh42 Oct 29, 2019
5d4245c
Fixed Tests
bilalshaikh42 Oct 29, 2019
47e3e45
Bump karma-coverage-istanbul-reporter from 2.0.6 to 2.1.0 in /CRBM-Vi…
dependabot-preview[bot] Oct 21, 2019
e69eae4
Bump @auth0/auth0-spa-js from 1.2.4 to 1.3.2 in /CRBM-Viz (#64)
dependabot-preview[bot] Oct 21, 2019
5a7c08a
Bump ts-node from 7.0.1 to 8.4.1 in /CRBM-Viz (#65)
dependabot-preview[bot] Oct 21, 2019
665225f
Bump rxjs from 6.4.0 to 6.5.3 in /CRBM-Viz (#69)
dependabot-preview[bot] Oct 22, 2019
ef81e26
Bump @types/jasmine from 3.3.16 to 3.4.4 in /CRBM-Viz (#67)
dependabot-preview[bot] Oct 22, 2019
a41932c
Bump @angular-devkit/build-angular from 0.803.6 to 0.803.12 in /CRBM-…
dependabot-preview[bot] Oct 22, 2019
b771c5c
Bump karma-chrome-launcher from 2.2.0 to 3.1.0 in /CRBM-Viz (#73)
dependabot-preview[bot] Oct 23, 2019
b1ec97b
Bump @angular/cli from 8.3.6 to 8.3.13 in /CRBM-Viz (#79)
dependabot-preview[bot] Oct 23, 2019
c0d596b
Bump @angular/language-service from 8.2.8 to 8.2.11 in /CRBM-Viz (#78)
dependabot-preview[bot] Oct 23, 2019
843f9be
Bump tslint from 5.15.0 to 5.20.0 in /CRBM-Viz (#77)
dependabot-preview[bot] Oct 23, 2019
3598c35
Bump @types/node from 8.9.5 to 12.11.5 in /CRBM-Viz (#75)
dependabot-preview[bot] Oct 23, 2019
b269f1b
Bump @angular-devkit/build-angular in /CRBM-Viz (#76)
dependabot-preview[bot] Oct 23, 2019
adf1d12
Bump codelyzer from 5.1.2 to 5.2.0 in /CRBM-Viz (#74)
dependabot-preview[bot] Oct 23, 2019
79691e6
Bump @types/node from 12.11.5 to 12.11.7 in /CRBM-Viz (#86)
dependabot-preview[bot] Oct 25, 2019
6909d2d
Bump puppeteer from 1.20.0 to 2.0.0 in /CRBM-Viz (#85)
dependabot-preview[bot] Oct 25, 2019
489ec5a
Bump @angular/language-service from 8.2.11 to 8.2.12 in /CRBM-Viz (#82)
dependabot-preview[bot] Oct 25, 2019
89f6b28
Bump @angular-devkit/build-angular in /CRBM-Viz (#83)
dependabot-preview[bot] Oct 25, 2019
81a6bba
Bump @angular/cli from 8.3.13 to 8.3.14 in /CRBM-Viz (#81)
dependabot-preview[bot] Oct 28, 2019
bced586
Update README.md
bilalshaikh42 Oct 28, 2019
559d2fc
Bump @angular-devkit/build-angular in /CRBM-Viz
dependabot-preview[bot] Oct 29, 2019
191904e
Bump @angular/cli from 8.3.14 to 8.3.15 in /CRBM-Viz
dependabot-preview[bot] Oct 29, 2019
51869ae
change name of token from test to token
bilalshaikh42 Oct 29, 2019
c7da86c
Dependency management
bilalshaikh42 Oct 29, 2019
e1f2034
Merge branch 'master' into dev
bilalshaikh42 Oct 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions CRBM-Viz/src/app/Layout/account-menu/account-menu.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<mat-menu #profileMenu="matMenu" color="primary">
<button
mat-menu-item
color="primary"
[routerLink]="['/profile']"
matTooltip=" View Profile"
matTooltipPosition="below"
>
<mat-icon aria-hidden="false" aria-label="Profile icon">face</mat-icon>
Profile
</button>

<button
mat-menu-item
color="primary"
[routerLink]="['/profile']"
matTooltip=" View Messages"
matTooltipPosition="below"
>
<mat-icon aria-hidden="false" aria-label="notifications icon"
>notifications</mat-icon
>
Notifications
</button>
<button
mat-menu-item
color="primary"
[routerLink]="['/profile']"
matTooltip=" Change Settings"
matTooltipPosition="below"
>
<mat-icon aria-hidden="false" aria-label="Settings icon"
>settings_applications</mat-icon
>
Settings
</button>

<button
mat-menu-item
color="primary"
matTooltip="Log Out"
matTooltipPosition="below"
(click)="auth.logout()"
>
<mat-icon aria-hidden="false" aria-label="Log Out icon">lock</mat-icon>
Log Out
</button>
</mat-menu>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { AccountMenuComponent } from './account-menu.component';
import { MaterialModule } from 'src/app/Modules/app-material.module';
import { RouterTestingModule } from '@angular/router/testing';

describe('AccountMenuComponent', () => {
let component: AccountMenuComponent;
let fixture: ComponentFixture<AccountMenuComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [AccountMenuComponent],
imports: [MaterialModule, RouterTestingModule],
}).compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(AccountMenuComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
14 changes: 14 additions & 0 deletions CRBM-Viz/src/app/Layout/account-menu/account-menu.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { AuthService } from 'src/app/Services/auth0.service';
import { MatMenu } from '@angular/material';
@Component({
selector: 'app-account-menu',
templateUrl: './account-menu.component.html',
styleUrls: ['./account-menu.component.sass'],
})
export class AccountMenuComponent implements OnInit {
@ViewChild('profileMenu', { static: true }) profileMenu: MatMenu;
constructor(public auth: AuthService) {}

ngOnInit() {}
}
6 changes: 5 additions & 1 deletion CRBM-Viz/src/app/Layout/footer/footer.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<div class="footer">
<div class="spacer"></div>
<span class="spacer"></span>
<span class="crbm">
<p>Created by:</p>
<app-logo class="app-logo"></app-logo>
</span>
<span class="Auth0">
<p>Authenticated by:</p>
<a
Expand Down
32 changes: 17 additions & 15 deletions CRBM-Viz/src/app/Layout/footer/footer.component.sass
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
.footer
background: inherit
height: 100%
height: auto
width: 100%
display: flex
flex-direction: row
flex-wrap: false

.spacer
min-width: 5px
flex: 1 0 auto
height: 100%
.spacer
min-width: 5px
flex: 1 0 auto
height: 100%

.Auth0, .github, .crbm
display: flex
flex: 0 0 auto
flex-wrap: false
padding: 5px
.app-logo
height: 50px

.Auth0, .github
display: flex
flex: 0 0 auto
height: auto
p
height: auto
align-self: flex-end
.octicon
margin-left: -40px

p
justify-self: flex-start
.octicon
margin-left: -40px
7 changes: 4 additions & 3 deletions CRBM-Viz/src/app/Layout/footer/footer.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { FooterComponent } from './footer.component';
import { LogoComponent } from '../logo/logo.component';

describe('FooterComponent', () => {
let component: FooterComponent;
let fixture: ComponentFixture<FooterComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ FooterComponent ]
})
.compileComponents();
declarations: [FooterComponent, LogoComponent],
imports: [],
}).compileComponents();
}));

beforeEach(() => {
Expand Down
42 changes: 0 additions & 42 deletions CRBM-Viz/src/app/Layout/links/links.component.html

This file was deleted.

2 changes: 0 additions & 2 deletions CRBM-Viz/src/app/Layout/links/links.component.sass

This file was deleted.

15 changes: 0 additions & 15 deletions CRBM-Viz/src/app/Layout/links/links.component.ts

This file was deleted.

8 changes: 3 additions & 5 deletions CRBM-Viz/src/app/Layout/logo/logo.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<div class="logo">
<a href="https://reproduciblebiomodels.org/">
<img src="assets/logo.png" />
</a>
</div>
<a href="https://reproduciblebiomodels.org/">
<img src="assets/logo.png" />
</a>
8 changes: 4 additions & 4 deletions CRBM-Viz/src/app/Layout/logo/logo.component.sass
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.logo
height: 100%
width: 100%
a
flex: 0 2 auto
height: 100%
img
height: 100%
max-height: 100%
max-width: 100%
71 changes: 71 additions & 0 deletions CRBM-Viz/src/app/Layout/nav-icons/nav-icons.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<div class="icons">
<button
mat-icon-button
[routerLink]="['']"
matTooltip="Home"
matTooltipPosition="below"
>
<mat-icon aria-hidden="false" aria-label="Example home icon">home</mat-icon>
</button>

<button
mat-icon-button
[routerLink]="['/about']"
matTooltip="About"
matTooltipPosition="below"
>
<mat-icon aria-hidden="false" aria-label="About icon">help</mat-icon>
</button>

<button
mat-icon-button
[routerLink]="['/visualize']"
matTooltip="Visualizations"
matTooltipPosition="below"
>
<mat-icon aria-hidden="false" aria-label="visualize icon"
>timeline</mat-icon
>
</button>

<button
mat-icon-button
[routerLink]="['/files']"
matTooltip="Models"
matTooltipPosition="below"
>
<mat-icon aria-hidden="false" aria-label="Files icon">file_copy</mat-icon>
</button>

<button
mat-icon-button
[routerLink]="['/simulate']"
matTooltip="Simulations"
matTooltipPosition="below"
>
<mat-icon aria-hidden="false" aria-label="Simulations icon"
>explore</mat-icon
>
</button>
<button
mat-icon-button
*ngIf="!auth.loggedIn"
(click)="auth.login()"
matTooltip="Log In"
matTooltipPosition="below"
>
<mat-icon aria-hidden="false" aria-label="LogIn icon">lock_open</mat-icon>
</button>
<app-account-menu></app-account-menu>
<button
mat-icon-button
*ngIf="auth.loggedIn"
matTooltip="Account"
matTooltipPosition="below"
[matMenuTriggerFor]="accountMenu?.profileMenu"
>
<mat-icon aria-hidden="false" aria-label="Account icon"
>account_circle</mat-icon
>
</button>
</div>
20 changes: 20 additions & 0 deletions CRBM-Viz/src/app/Layout/nav-icons/nav-icons.component.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@import 'src/styles.sass'
.icons
display: flex
flex-direction: row
justify-content: space-between
align-self: flex-end
button
min-width: min-content
flex: 1 1 auto
height: 100%
button:focus
outline: 0px
button:hover
color: mat-color($accent)

a
color: white
flex: 1 1 auto
a:hover
color: mat-color($accent)
30 changes: 30 additions & 0 deletions CRBM-Viz/src/app/Layout/nav-icons/nav-icons.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { NavIconsComponent } from './nav-icons.component';
import { MaterialModule } from 'src/app/Modules/app-material.module';
import { RouterTestingModule } from '@angular/router/testing';
// TODO mock account menu
import { AccountMenuComponent } from '../account-menu/account-menu.component';

describe('NavIconsComponent', () => {
let component: NavIconsComponent;
let fixture: ComponentFixture<NavIconsComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [MaterialModule, RouterTestingModule],
providers: [MaterialModule, RouterTestingModule],
declarations: [NavIconsComponent, AccountMenuComponent],
}).compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(NavIconsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
16 changes: 16 additions & 0 deletions CRBM-Viz/src/app/Layout/nav-icons/nav-icons.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { AuthService } from 'src/app/Services/auth0.service';
import { AccountMenuComponent } from 'src/app/Layout/account-menu/account-menu.component';

@Component({
selector: 'app-nav-icons',
templateUrl: './nav-icons.component.html',
styleUrls: ['./nav-icons.component.sass'],
})
export class NavIconsComponent implements OnInit {
@ViewChild(AccountMenuComponent, { static: true })
accountMenu: AccountMenuComponent;
constructor(public auth: AuthService) {}

ngOnInit() {}
}
Loading