forked from RocketChat/Rocket.Chat.PWA
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from tomermoshe/feat/chat-container
Feat/chat container
- Loading branch information
Showing
33 changed files
with
266 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,30 @@ | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { NgModule } from '@angular/core'; | ||
import { FormsModule } from '@angular/forms'; | ||
import { HttpModule } from '@angular/http'; | ||
import { IonicApp, IonicModule } from 'ionic-angular'; | ||
import { IonicApp } from 'ionic-angular'; | ||
|
||
import { AppComponent } from './app.component'; | ||
import { AppRouting } from './app.routing'; | ||
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 { 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'; | ||
import { ApolloModule } from 'apollo-angular'; | ||
import { getClient } from './graphql/client/apollo-client'; | ||
import { AuthGuard } from './shared/services/auth-guard.service'; | ||
import { AuthenticationService } from './shared/services/authentication.service'; | ||
import { PageNotFoundComponent } from './shared/components/page-not-found/page-not-found.component'; | ||
import { GetChatDummyService } from './graphql/get-chat-dummy.service'; | ||
import { ChatModule } from './chat/chat.module'; | ||
import { SharedModule } from './shared/shared.module'; | ||
import { LoginPageComponent } from './shared/components/login-page/login-page.component'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
AppComponent, | ||
LoginPageComponent, | ||
ChatPageComponent, | ||
PageNotFoundComponent, | ||
ChannelViewComponent, | ||
WelcomePageComponent, | ||
ChatMessageComponent, | ||
ChannelItemComponent, | ||
], | ||
imports: [ | ||
IonicModule.forRoot(AppComponent, { mode: 'md' }), | ||
ApolloModule.forRoot(getClient), | ||
BrowserModule, | ||
FormsModule, | ||
HttpModule, | ||
SharedModule, | ||
ChatModule, | ||
AppRouting, | ||
], | ||
providers: [AuthGuard, AuthenticationService, GetChatDummyService], | ||
bootstrap: [IonicApp] | ||
}) | ||
export class AppModule { | ||
} | ||
export class AppModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
import { WelcomePageComponent } from './welcome-page/welcome-page.component'; | ||
import { AuthGuard } from '../shared/services/auth-guard.service'; | ||
import { MainPageComponent } from './main-page/main-page.component'; | ||
import { ChatViewComponent } from './chat-view/channel-chat.component'; | ||
|
||
const routes: Routes = [{ | ||
path : 'main', component : MainPageComponent, canActivate : [AuthGuard], canActivateChild : [AuthGuard], | ||
children : [ | ||
{ | ||
path : 'channel/:id', | ||
component : ChatViewComponent | ||
}, | ||
{ | ||
path : 'welcome', | ||
component : WelcomePageComponent | ||
}, | ||
{ | ||
path : '', | ||
redirectTo : 'welcome', | ||
pathMatch : 'full' | ||
} | ||
] | ||
}, ]; | ||
|
||
@NgModule({ | ||
imports : [RouterModule.forChild(routes)], | ||
exports : [RouterModule] | ||
}) | ||
export class ChatRoutingModule { | ||
} |
12 changes: 7 additions & 5 deletions
12
.../channel-view/channel-view.component.html → ...hat/chat-view/channel-chat.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
.../channel-view/channel-view.component.scss → ...hat/chat-view/channel-chat.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
|
||
import { ChatRoutingModule } from './chat-routing.module'; | ||
import { ChatMessageComponent } from './chat-message/chat-message.component'; | ||
import { WelcomePageComponent } from './welcome-page/welcome-page.component'; | ||
import { SharedModule } from '../shared/shared.module'; | ||
import { MainPageComponent } from './main-page/main-page.component'; | ||
import { ChannelItemComponent } from './channel-item/channel-item.component'; | ||
import { ChatViewComponent } from './chat-view/channel-chat.component'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
CommonModule, | ||
SharedModule, | ||
ChatRoutingModule | ||
], | ||
declarations: [ | ||
MainPageComponent, | ||
ChatViewComponent, | ||
WelcomePageComponent, | ||
ChatMessageComponent, | ||
ChannelItemComponent, | ||
] | ||
}) | ||
export class ChatModule { } |
3 changes: 1 addition & 2 deletions
3
...onents/chat-page/chat-page.component.html → ...p/chat/main-page/main-page.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...onents/chat-page/chat-page.component.scss → ...p/chat/main-page/main-page.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { AfterViewInit, Component, ViewEncapsulation } from '@angular/core'; | ||
import { MenuController } from 'ionic-angular'; | ||
import { ActivatedRoute, Router } from '@angular/router'; | ||
import { AuthenticationService } from '../../shared/services/authentication.service'; | ||
|
||
@Component({ | ||
selector : 'chat', | ||
templateUrl : './main-page.component.html', | ||
styleUrls : ['./main-page.component.scss'], | ||
encapsulation : ViewEncapsulation.None | ||
}) | ||
export class MainPageComponent implements AfterViewInit { | ||
public channels = [ | ||
{title : 'channel1', privateChannel : true}, | ||
{title : 'channel2'}, | ||
{title : 'kentak', direct : true}, | ||
{title : 'tomer', direct : true} | ||
]; | ||
|
||
constructor(private menuCtrl: MenuController, | ||
private router: Router, | ||
private route: ActivatedRoute, | ||
private authenticationService: AuthenticationService) { | ||
} | ||
|
||
ngAfterViewInit(): void { | ||
this.menuCtrl.open(); | ||
} | ||
|
||
logout() { | ||
this.authenticationService.logout(); | ||
this.router.navigate(['login']); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<ion-header> | ||
<ion-toolbar> | ||
<button ion-button menuToggle> | ||
<ion-icon name="menu"></ion-icon> | ||
</button> | ||
<ion-title> | ||
Welcome | ||
</ion-title> | ||
</ion-toolbar> | ||
</ion-header> | ||
<ion-content padding class="content"> | ||
<img src="assets/images/rocketchat.logo-dark.svg"> | ||
<p> Have your own web chat. Developed with Meteor.com, Rocket.Chat is a great solution for | ||
developers looking forward to build and evolve their own chat platform.</p> | ||
<p><b>← Use the side menu to access your rooms and chats.</b></p> | ||
|
||
<div> | ||
<h4>Join the Community</h4> | ||
<p>Follow our social profiles, fork us on github and share your thoughts about the rocket.chat app on our | ||
trello board.</p> | ||
<nav> | ||
<a ion-button color="light" target="_blank" href="https://twitter.com/RocketChatApp"><span>Twitter</span></a> | ||
<a ion-button color="light" target="_blank" | ||
href="https://www.facebook.com/RocketChatApp"><span>Facebook</span></a> | ||
<a ion-button color="light" target="_blank" href="https://plus.google.com/+RocketChatApp"><span>Google Plus</span></a> | ||
<a ion-button color="light" target="_blank" href="https://github.com/RocketChat/Rocket.Chat"><span>Github</span></a> | ||
<a ion-button color="light" target="_blank" href="https://www.linkedin.com/company/rocket-chat"><span>LinkedIn</span></a> | ||
</nav> | ||
</div> | ||
|
||
|
||
</ion-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
6 changes: 3 additions & 3 deletions
6
...ents/login-page/login-page.component.html → ...ents/login-page/login-page.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.