Skip to content

Commit

Permalink
Added the navigation bar to the application [comixed#304]
Browse files Browse the repository at this point in the history
  • Loading branch information
mcpierce committed Jun 11, 2020
1 parent 195f8ea commit 6a18173
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 19 deletions.
6 changes: 3 additions & 3 deletions comixed-frontend/src/app/app.component.html
@@ -1,6 +1,6 @@
<p-breadcrumb [model]='breadcrumbs'
[home]='home'></p-breadcrumb>
<app-main-menu #mainmenu></app-main-menu>
<app-navigation-bar></app-navigation-bar>
<p-breadcrumb *ngIf='authenticated'
[model]='breadcrumbs'></p-breadcrumb>
<p-toast position='top-right'
styleClass='cx-alerts'></p-toast>
<p-confirmDialog></p-confirmDialog>
Expand Down
4 changes: 2 additions & 2 deletions comixed-frontend/src/app/app.component.spec.ts
Expand Up @@ -27,7 +27,6 @@ import { TranslateModule, TranslateService } from '@ngx-translate/core';
import { BreadcrumbAdaptor } from 'app/adaptors/breadcrumb.adaptor';
import { AppComponent } from 'app/app.component';
import { LoginComponent } from 'app/components/login/login.component';
import { MainMenuComponent } from 'app/components/main-menu/main-menu.component';
import { LibraryAdaptor } from 'app/library';
import { LibraryModule } from 'app/library/library.module';
import { UserService } from 'app/services/user.service';
Expand All @@ -49,6 +48,7 @@ import {
MenuModule
} from 'primeng/primeng';
import { ToastModule } from 'primeng/toast';
import { NavigationBarComponent } from 'app/components/navigation-bar/navigation-bar.component';

describe('AppComponent', () => {
const USER = USER_READER;
Expand Down Expand Up @@ -89,7 +89,7 @@ describe('AppComponent', () => {
BreadcrumbModule,
MenuModule
],
declarations: [AppComponent, LoginComponent, MainMenuComponent],
declarations: [AppComponent, LoginComponent, NavigationBarComponent],
providers: [
TranslateService,
MessageService,
Expand Down
13 changes: 1 addition & 12 deletions comixed-frontend/src/app/app.component.ts
Expand Up @@ -16,14 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses>
*/

import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { AuthenticationAdaptor, User } from 'app/user';
import { LibraryAdaptor } from 'app/library';
import { Subscription } from 'rxjs';
import { BreadcrumbAdaptor } from 'app/adaptors/breadcrumb.adaptor';
import { MenuItem } from 'primeng/api';
import { MainMenuComponent } from 'app/components/main-menu/main-menu.component';
import { LoggerLevel, LoggerService } from '@angular-ru/logger';

@Component({
Expand All @@ -32,23 +30,14 @@ import { LoggerLevel, LoggerService } from '@angular-ru/logger';
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
@ViewChild(MainMenuComponent, { static: false })
mainmenu: MainMenuComponent;

title = 'ComiXed';

user: User;

authenticated = false;
showLogin = false;
comicCount = 0;
processingCount = 0;
fetchingUpdateSubscription: Subscription;
breadcrumbs = [];
home = {
icon: 'fa fa-fw fas fa-bars',
command: (event: any) => this.mainmenu.toggle(event)
} as MenuItem;

constructor(
private translateService: TranslateService,
Expand Down
2 changes: 0 additions & 2 deletions comixed-frontend/src/app/app.module.ts
Expand Up @@ -40,7 +40,6 @@ import { BackendStatusModule } from 'app/backend-status/backend-status.module';
import { ComicImportModule } from 'app/comic-import/comic-import.module';
import { ComicsModule } from 'app/comics/comics.module';
import { LoginComponent } from 'app/components/login/login.component';
import { MainMenuComponent } from 'app/components/main-menu/main-menu.component';
import { LibraryModule } from 'app/library/library.module';
import { MainPageComponent } from 'app/pages/main-page/main-page.component';
import { UserService } from 'app/services/user.service';
Expand Down Expand Up @@ -89,7 +88,6 @@ import { NavigationBarComponent } from './components/navigation-bar/navigation-b
AppComponent,
MainPageComponent,
LoginComponent,
MainMenuComponent,
NavigationBarComponent
],
imports: [
Expand Down

0 comments on commit 6a18173

Please sign in to comment.