diff --git a/webapp/src/app/auth/login/login.component.ts.orig b/webapp/src/app/auth/login/login.component.ts.orig deleted file mode 100644 index 6bfd0a7..0000000 --- a/webapp/src/app/auth/login/login.component.ts.orig +++ /dev/null @@ -1,74 +0,0 @@ -import { Component } from '@angular/core'; -import { Store } from '@ngrx/store'; -<<<<<<< HEAD -import { UserActions } from '../../store/actions/user'; -======= -import { UserActions } from '../../shared/sdk/actions/user'; ->>>>>>> a9e5222... chore(cleanup): general cleanup -import { FormService } from '../../ui/form/ui-form.service'; -import { AccountApi } from '../../shared/sdk/services'; - -@Component({ - selector: 'fire-auth-login', - template: ` -<<<<<<< HEAD - - -======= - ->>>>>>> a9e5222... chore(cleanup): general cleanup - `, -}) -export class LoginComponent { - - public credentials = { - email: null, - password: null, - } - - public formConfig: {}; - - constructor( - private store: Store, - private formService: FormService, - public userApi: AccountApi - ) { - this.formConfig = this.getFormConfig(); - } - - getFormConfig() { - return { - fields: this.getFormFields(), - showCancel: false, - action: 'login', - submitButtonText: 'Log In' - }; - } - - getFormFields() { - return [ - this.formService.email('email', { - label: 'Email', - className: 'col-12', - addonLeft: { - class: 'fa fa-fw fa-envelope-o' - } - }), - this.formService.password('password', { - label: 'Password', - className: 'col-12', - addonLeft: { - class: 'fa fa-fw fa-key' - } - }) - ]; - } - - login() { - this.store.dispatch(new UserActions.login({ credentials: this.credentials })) - } - - logout() { - this.store.dispatch(new UserActions.logout({})); - } -} diff --git a/webapp/src/app/auth/status/status.component.ts.orig b/webapp/src/app/auth/status/status.component.ts.orig deleted file mode 100644 index a37c60a..0000000 --- a/webapp/src/app/auth/status/status.component.ts.orig +++ /dev/null @@ -1,43 +0,0 @@ -import { Component, OnDestroy } from '@angular/core'; -import { Store } from '@ngrx/store'; -import { UserActions } from '../../store/actions'; -import { AccountApi } from '../../shared/sdk/services'; -import { Subscription } from 'rxjs/Subscription'; - -@Component({ - selector: 'fire-auth-status', - template: ` -
-
-
- - -
-
-
{{ auth | json }}
-
-
-
- `, -}) -export class StatusComponent implements OnDestroy { - - public auth: any = {}; - private subscriptions: Subscription[] = new Array(); - - ngOnDestroy() { - this.subscriptions.forEach((subscription: Subscription) => subscription.unsubscribe()); - } - - constructor(private store: Store, public userApi: AccountApi) { -<<<<<<< HEAD - this.subscriptions.push(this.store.select('auth').subscribe(a => this.auth = a)); -======= - this.store.select('auth').subscribe(a => this.auth = a); ->>>>>>> f8cb314... refactor(ngrx): de-couple ngrx from sdk - } -} diff --git a/webapp/src/app/home/home.component.ts.orig b/webapp/src/app/home/home.component.ts.orig deleted file mode 100644 index ae1dd7c..0000000 --- a/webapp/src/app/home/home.component.ts.orig +++ /dev/null @@ -1,108 +0,0 @@ -import { Component, OnDestroy } from '@angular/core'; -import { Store } from '@ngrx/store'; -import { UserActions } from '../shared/sdk/actions/user'; -import { AccountApi } from '../shared/sdk/services'; -import { UiService, NavItem } from '../ui/ui.service'; -import { Subscription } from 'rxjs/Subscription'; - -@Component({ - selector: 'fire-home', - template: ``, - styleUrls: ['./home.component.scss'] - -}) -export class HomeComponent implements OnDestroy { - private authIcon; - private sidebarNav: NavItem[]; - private subscriptions: Subscription[] = new Array(); - - constructor( - private uiService: UiService, - private userApi: AccountApi, - private store: Store, - ) { -<<<<<<< HEAD - this.uiService.setSidebarNav([ - { - 'name': 'Auth', - 'link': '/home/auth', - 'icon': this.getAuthIcon() - }, - { - 'name': 'Dashboard', - 'link': '/home/dashboard', - 'icon': 'tachometer' - }, - { - 'name': 'UI', - 'link': '/home/ui', - 'icon': 'object-group' - }, - { - 'name': 'Files', - 'link': '/home/files', - 'icon': 'files-o' - }, - { - 'name': 'Todos', - 'link': '/home/todos', - 'icon': 'check-square-o' - }, - { - 'name': 'Notes', - 'link': '/home/notes', - 'icon': 'sticky-note-o' - }, - - ]); -======= - this.subscriptions.push(this.store.select('auth').subscribe( - (res: any) => { - this.uiService.setSidebarNav([ - { - 'name': 'Auth', - 'link': '/home/auth', - 'icon': this.getAuthIcon() - }, - { - 'name': 'Dashboard', - 'link': '/home/dashboard', - 'icon': 'tachometer' - }, - { - 'name': 'Files', - 'link': '/home/files', - 'icon': 'files-o' - }, - { - 'name': 'Todos', - 'link': '/home/todos', - 'icon': 'check-square-o' - }, - { - 'name': 'Notes', - 'link': '/home/notes', - 'icon': 'sticky-note-o' - }, - { - 'name': 'Notifications', - 'link': '/home/notifications', - 'icon': 'comments-o' - }, - ]); - })); ->>>>>>> a9e5222... chore(cleanup): general cleanup - } - - ngOnDestroy() { - this.subscriptions.forEach((subscription: Subscription) => subscription.unsubscribe()); - } - - getAuthIcon() { - if (this.userApi.isAuthenticated()) { - return 'unlock' - } else { - return 'lock' - } - } -} diff --git a/webapp/src/app/home/home.routing.ts.orig b/webapp/src/app/home/home.routing.ts.orig deleted file mode 100644 index 9a7b6dc..0000000 --- a/webapp/src/app/home/home.routing.ts.orig +++ /dev/null @@ -1,66 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; -import { HomeComponent } from './home.component'; -import { DashboardComponent } from './dashboard/dashboard.component'; -import { AuthComponent } from '../auth/auth.component'; -import { LoginComponent } from '../auth/login/login.component'; -import { RegisterComponent } from '../auth/register/register.component'; -import { TodoComponent } from './todo/todo.component'; -import { UiDemoComponent } from './ui/ui-demo.component'; -import { NotificationsComponent } from './ui/notifications/notifications.component'; -import { NoteComponent } from './note/note.component'; -import { FileComponent } from '../files/file.component'; -import { UploadFormComponent } from '../files/upload/upload-form.component'; -import { ContainerListComponent } from '../files/list/container-list.component'; - -const routes: Routes = [ - { - path: '', - component: HomeComponent, - children: [ - { path: '', redirectTo: 'auth', pathMatch: 'full' }, - { - path: 'auth', - component: AuthComponent, - children: [ - { path: '', redirectTo: 'login', pathMatch: 'full' }, - { path: 'login', component: LoginComponent }, - { path: 'register', component: RegisterComponent }, - ] - }, - { path: 'dashboard', component: DashboardComponent }, -<<<<<<< HEAD - { - path: 'ui', - component: UiDemoComponent, - children: [ - { path: '', redirectTo: 'notifications', pathMatch: 'full' }, - { path: 'notifications', component: NotificationsComponent }, - ] - }, -======= ->>>>>>> a9e5222... chore(cleanup): general cleanup - { - path: 'files', - component: FileComponent, - children: [ - { path: '', redirectTo: 'containers', pathMatch: 'full' }, - { path: 'containers', component: ContainerListComponent }, - { path: 'upload', component: UploadFormComponent }, - ] - }, - { path: 'todos', component: TodoComponent }, - { path: 'notes', component: NoteComponent }, - ] - } -]; - -@NgModule({ - imports: [ - RouterModule.forChild(routes), - ], - exports: [ - RouterModule, - ], -}) -export class HomeRoutingModule { }