Skip to content

Commit

Permalink
Added version next to logo
Browse files Browse the repository at this point in the history
for the web app only
  • Loading branch information
AXeL-dev committed May 31, 2020
1 parent 4a6f4cd commit 2f8d6dc
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 20 deletions.
4 changes: 3 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { AngularFireAuthModule } from '@angular/fire/auth';
import { NgxDiff2htmlModule } from 'ngx-diff2html';
import { ClickOutsideDirective } from './directives/click-outside.directive';
import { SafePipe } from './pipes/safe.pipe';
import { LogoComponent } from './components/partials/logo/logo.component';

@NgModule({
declarations: [
Expand All @@ -38,7 +39,8 @@ import { SafePipe } from './pipes/safe.pipe';
TranslateDirective,
TranslatePipe,
ClickOutsideDirective,
SafePipe
SafePipe,
LogoComponent
],
imports: [
BrowserModule,
Expand Down
3 changes: 0 additions & 3 deletions src/app/components/explorer/explorer.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
font-weight: 600;
line-height: 60px;
}
.left-layout > nz-header img {
margin: 0 16px;
}
nz-sider {
overflow: auto;
height: 100%;
Expand Down
7 changes: 1 addition & 6 deletions src/app/components/explorer/explorer.component.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<nz-layout class="left-layout">
<nz-header>
<img
width="40"
alt="Firestore Manager Logo"
src="assets/images/firestore_logo.png"
/>
<span>Firestore Manager</span>
<fm-logo></fm-logo>
<div class="spacer"></div>
<a
class="toolbar-icon"
Expand Down
3 changes: 0 additions & 3 deletions src/app/components/manager/manager.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ p {
color: white;
font-weight: 600;
}
.toolbar img {
margin: 0 16px;
}
.toolbar-icon {
font-size: 23px;
margin-right: 24px;
Expand Down
7 changes: 1 addition & 6 deletions src/app/components/manager/manager.component.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@

<!-- Toolbar -->
<div class="toolbar" role="banner">
<img
width="40"
alt="Firestore Manager Logo"
src="assets/images/firestore_logo.png"
/>
<span>Firestore Manager</span>
<fm-logo></fm-logo>
<div class="spacer"></div>
<span
*ngIf="!app.isWebExtension"
Expand Down
3 changes: 3 additions & 0 deletions src/app/components/partials/logo/logo.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
img {
margin: 0 16px;
}
8 changes: 8 additions & 0 deletions src/app/components/partials/logo/logo.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

<img
width="40"
alt="Firestore Manager Logo"
src="assets/images/firestore_logo.png"
/>
<span>Firestore Manager</span>
<nz-tag *ngIf="!app.isWebExtension" nzColor="#108ee9" style="margin-left: 10px;">{{ version }}</nz-tag>
25 changes: 25 additions & 0 deletions src/app/components/partials/logo/logo.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

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

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

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

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

it('should create', () => {
expect(component).toBeTruthy();
});
});
19 changes: 19 additions & 0 deletions src/app/components/partials/logo/logo.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Component, OnInit } from '@angular/core';
import { AppService } from 'src/app/services/app.service';
import { version } from 'package.json';

@Component({
selector: 'fm-logo',
templateUrl: './logo.component.html',
styleUrls: ['./logo.component.css']
})
export class LogoComponent implements OnInit {

version: string = version;

constructor(public app: AppService) { }

ngOnInit() {
}

}
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"lib": [
"es2018",
"dom"
]
],
"resolveJsonModule": true
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
Expand Down

0 comments on commit 2f8d6dc

Please sign in to comment.