From 96870eb416bb5856cb1b8c913399e706e93a1352 Mon Sep 17 00:00:00 2001 From: tomermoshe <152430tm> Date: Sun, 28 May 2017 18:48:34 +0300 Subject: [PATCH] channel-component renamed stuff - better names fixed some stuff --- .angular-cli.json | 3 +- package.json | 1 + src/app/app.module.ts | 19 +++++---- src/app/app.routing.ts | 12 +++--- .../channel-item/channel-item.component.html | 11 +++++ .../channel-item/channel-item.component.scss | 38 +++++++++++++++++ .../channel-item/channel-item.component.ts | 42 +++++++++++++++++++ .../channel-view.component.html} | 7 +++- .../channel-view/channel-view.component.scss | 25 +++++++++++ .../channel-view.component.ts} | 6 +-- .../components/channel/channel.component.scss | 14 ------- .../chat-page.component.html} | 3 +- .../chat-page.component.scss} | 9 +++- .../chat-page.component.ts} | 20 ++++----- .../login-page.component.html} | 0 .../login-page.component.scss} | 3 ++ .../login-page.component.ts} | 6 +-- yarn.lock | 4 ++ 18 files changed, 173 insertions(+), 50 deletions(-) create mode 100644 src/app/components/channel-item/channel-item.component.html create mode 100644 src/app/components/channel-item/channel-item.component.scss create mode 100644 src/app/components/channel-item/channel-item.component.ts rename src/app/components/{channel/channel.component.html => channel-view/channel-view.component.html} (77%) create mode 100644 src/app/components/channel-view/channel-view.component.scss rename src/app/components/{channel/channel.component.ts => channel-view/channel-view.component.ts} (91%) delete mode 100644 src/app/components/channel/channel.component.scss rename src/app/components/{chat/chat.component.html => chat-page/chat-page.component.html} (64%) rename src/app/components/{chat/chat.component.scss => chat-page/chat-page.component.scss} (67%) rename src/app/components/{chat/chat.component.ts => chat-page/chat-page.component.ts} (58%) rename src/app/components/{login/login.component.html => login-page/login-page.component.html} (100%) rename src/app/components/{login/login.component.scss => login-page/login-page.component.scss} (87%) rename src/app/components/{login/login.component.ts => login-page/login-page.component.ts} (88%) diff --git a/.angular-cli.json b/.angular-cli.json index 49dbe99..a15ae5f 100644 --- a/.angular-cli.json +++ b/.angular-cli.json @@ -20,7 +20,8 @@ "prefix": "app", "styles": [ "theme/variables.scss", - "styles.scss" + "styles.scss", + "../node_modules/font-awesome/scss/font-awesome.scss" ], "scripts": [], "environmentSource": "environments/environment.ts", diff --git a/package.json b/package.json index ce66786..c0d1652 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "@angular/platform-browser-dynamic": "^4.1.0", "@angular/router": "^4.0.0", "core-js": "^2.4.1", + "font-awesome": "^4.7.0", "ionic-angular": "^3.2.1", "ionicons": "^3.0.0", "momentjs": "^2.0.0", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 81b1b36..1f29af3 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -6,27 +6,29 @@ import { IonicApp, IonicModule } from 'ionic-angular'; import { AppComponent } from './app.component'; import { AppRouting } from './app.routing'; -import { LoginComponent } from './components/login/login.component'; -import { ChatComponent } from './components/chat/chat.component'; +import { LoginPageComponent } from './components/login-page/login-page.component'; +import { ChatPageComponent } from './components/chat-page/chat-page.component'; import { AuthGuard } from './services/auth-guard.service'; import { AuthenticationService } from './services/authentication.service'; import { PageNotFoundComponent } from './components/page-not-found/page-not-found.component'; -import { ChannelComponent } from './components/channel/channel.component'; +import { ChannelViewComponent } from './components/channel-view/channel-view.component'; import { WelcomePageComponent } from './components/welcome-page/welcome-page.component'; import { ChatMessageComponent } from './components/chat-message/chat-message.component'; +import { ChannelItemComponent } from './components/channel-item/channel-item.component'; @NgModule({ declarations: [ AppComponent, - LoginComponent, - ChatComponent, + LoginPageComponent, + ChatPageComponent, PageNotFoundComponent, - ChannelComponent, + ChannelViewComponent, WelcomePageComponent, ChatMessageComponent, + ChannelItemComponent, ], imports: [ - IonicModule.forRoot(AppComponent), + IonicModule.forRoot(AppComponent, { mode: 'md' }), BrowserModule, FormsModule, HttpModule, @@ -35,4 +37,5 @@ import { ChatMessageComponent } from './components/chat-message/chat-message.com providers: [AuthGuard, AuthenticationService], bootstrap: [IonicApp] }) -export class AppModule { } +export class AppModule { +} diff --git a/src/app/app.routing.ts b/src/app/app.routing.ts index 423b27b..170b9e4 100644 --- a/src/app/app.routing.ts +++ b/src/app/app.routing.ts @@ -1,19 +1,19 @@ import { Routes, RouterModule } from '@angular/router'; import { AuthGuard } from './services/auth-guard.service'; -import { LoginComponent } from './components/login/login.component'; -import { ChatComponent } from './components/chat/chat.component'; +import { LoginPageComponent } from './components/login-page/login-page.component'; +import { ChatPageComponent } from './components/chat-page/chat-page.component'; import { PageNotFoundComponent } from './components/page-not-found/page-not-found.component'; -import { ChannelComponent } from './components/channel/channel.component'; +import { ChannelViewComponent } from './components/channel-view/channel-view.component'; import { WelcomePageComponent } from './components/welcome-page/welcome-page.component'; const appRoutes: Routes = [ { - path: 'chat', component: ChatComponent, canActivate: [AuthGuard], canActivateChild: [AuthGuard], + path: 'chat', component: ChatPageComponent, canActivate: [AuthGuard], canActivateChild: [AuthGuard], children: [ { path: 'channel/:id', - component: ChannelComponent + component: ChannelViewComponent }, { path: 'welcome-page', @@ -26,7 +26,7 @@ const appRoutes: Routes = [ } ] }, - { path: 'login', component: LoginComponent }, + { path: 'login', component: LoginPageComponent }, { path: '', redirectTo: 'chat', pathMatch: 'full' }, { path: '**', component: PageNotFoundComponent } ]; diff --git a/src/app/components/channel-item/channel-item.component.html b/src/app/components/channel-item/channel-item.component.html new file mode 100644 index 0000000..7f12f5f --- /dev/null +++ b/src/app/components/channel-item/channel-item.component.html @@ -0,0 +1,11 @@ +