From 63a1352311c3df9a6cc4aacc3e0d28112f850978 Mon Sep 17 00:00:00 2001 From: Sean Wu Date: Mon, 2 Nov 2020 22:35:05 +0800 Subject: [PATCH] Remove header component. Fix #151. --- .../components/header/header.component.html | 73 ------------------ .../components/header/header.component.scss | 0 .../header/header.component.spec.ts | 24 ------ src/app/components/header/header.component.ts | 15 ---- src/app/components/header/header.module.ts | 19 ----- src/app/pages/storage/storage.module.ts | 4 +- src/app/pages/storage/storage.page.html | 74 ++++++++++++++++++- 7 files changed, 74 insertions(+), 135 deletions(-) delete mode 100644 src/app/components/header/header.component.html delete mode 100644 src/app/components/header/header.component.scss delete mode 100644 src/app/components/header/header.component.spec.ts delete mode 100644 src/app/components/header/header.component.ts delete mode 100644 src/app/components/header/header.module.ts diff --git a/src/app/components/header/header.component.html b/src/app/components/header/header.component.html deleted file mode 100644 index 5d9c6e8bf..000000000 --- a/src/app/components/header/header.component.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - {{ t('all') }} - - - - - {{ t('tags') }} - - - - - - - - - - - - - - - - - - {{ t('settings') }} - - - - - - - - {{ t('general') }} - - - - - - {{ t('defaultInformationProvider') }} - - - - - - {{ t('defaultSignature') }} - - - - - - {{ t('informationProvider') }} - - - - - - {{ t('about') }} - - - - - \ No newline at end of file diff --git a/src/app/components/header/header.component.scss b/src/app/components/header/header.component.scss deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/app/components/header/header.component.spec.ts b/src/app/components/header/header.component.spec.ts deleted file mode 100644 index e30093d16..000000000 --- a/src/app/components/header/header.component.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { IonicModule } from '@ionic/angular'; - -import { HeaderComponent } from './header.component'; - -describe('HeaderComponent', () => { - let component: HeaderComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ HeaderComponent ], - imports: [IonicModule.forRoot()] - }).compileComponents(); - - fixture = TestBed.createComponent(HeaderComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - })); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/components/header/header.component.ts b/src/app/components/header/header.component.ts deleted file mode 100644 index 2b914d68f..000000000 --- a/src/app/components/header/header.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; - -@Component({ - selector: 'app-header', - templateUrl: './header.component.html', - styleUrls: ['./header.component.scss'], -}) -export class HeaderComponent implements OnInit { - @Input() headerTitle!: string; - @Output() next = new EventEmitter(); - @Output() back = new EventEmitter(); - - ngOnInit() { } - -} diff --git a/src/app/components/header/header.module.ts b/src/app/components/header/header.module.ts deleted file mode 100644 index bd40b8b58..000000000 --- a/src/app/components/header/header.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { IonicModule } from '@ionic/angular'; -import { TranslocoModule } from '@ngneat/transloco'; -import { SettingsPageRoutingModule } from 'src/app/pages/settings/settings-routing.module'; -import { HeaderComponent } from './header.component'; - - -@NgModule({ - imports: [ - TranslocoModule, - IonicModule, - CommonModule, - SettingsPageRoutingModule - ], - declarations: [HeaderComponent], - exports: [HeaderComponent] -}) -export class HeaderModule { } diff --git a/src/app/pages/storage/storage.module.ts b/src/app/pages/storage/storage.module.ts index 460fea566..a5695a91e 100644 --- a/src/app/pages/storage/storage.module.ts +++ b/src/app/pages/storage/storage.module.ts @@ -3,7 +3,6 @@ import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { IonicModule } from '@ionic/angular'; import { TranslocoModule } from '@ngneat/transloco'; -import { HeaderModule } from 'src/app/components/header/header.module'; import { StoragePageRoutingModule } from './storage-routing.module'; import { StoragePage } from './storage.page'; @@ -13,8 +12,7 @@ import { StoragePage } from './storage.page'; FormsModule, IonicModule, StoragePageRoutingModule, - TranslocoModule, - HeaderModule + TranslocoModule ], declarations: [StoragePage] }) diff --git a/src/app/pages/storage/storage.page.html b/src/app/pages/storage/storage.page.html index 9bc2ad3d6..fe8f6dc83 100644 --- a/src/app/pages/storage/storage.page.html +++ b/src/app/pages/storage/storage.page.html @@ -1,4 +1,76 @@ - + + + + + + + + + + + + + {{ t('all') }} + + + + + {{ t('tags') }} + + + + + + + + + + + + + + + + + + {{ t('settings') }} + + + + + + + + {{ t('general') }} + + + + + + {{ t('defaultInformationProvider') }} + + + + + + {{ t('defaultSignature') }} + + + + + + {{ t('informationProvider') }} + + + + + + {{ t('about') }} + + + + +