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 #4 from tomermoshe/channel-component
channel-component
Showing
18 changed files
with
176 additions
and
53 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
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
11 changes: 11 additions & 0 deletions
11
src/app/components/channel-item/channel-item.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div class="channel-item" (click)="gotoChannel(channel.title)"> | ||
<span class="channel-title"> | ||
<i class="channel-icon fa" [ngClass]="['fa-' + channelSymbol]" aria-hidden="true"></i> | ||
<span>{{channel.title}}</span> | ||
</span> | ||
<span> | ||
<i class="fa fa-eye-slash hide-channel-icon" aria-hidden="true" (click)="hideChannel()"></i> | ||
<i class="fa fa-sign-out exit-channel-icon" aria-hidden="true" (click)="exitChannel()"></i> | ||
</span> | ||
</div> | ||
|
38 changes: 38 additions & 0 deletions
38
src/app/components/channel-item/channel-item.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.channel-item { | ||
display: flex; | ||
justify-content: space-between; | ||
font-size: 15px; | ||
padding: 5px 10px 5px 5px; | ||
} | ||
|
||
.channel-item:hover { | ||
background-color: rgba(0,0,0,0.2); | ||
} | ||
|
||
.channel-icon { | ||
color: rgba(255, 255, 255, 0.3); | ||
font-size: 14px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 16px; | ||
margin: 3px; | ||
} | ||
|
||
.channel-title { | ||
display: flex; | ||
justify-content: space-around; | ||
align-items: center; | ||
} | ||
|
||
.hide-channel-icon, .exit-channel-icon { | ||
font-size: 14px; | ||
color: rgba(255, 255, 255, 0.3); | ||
&:hover { | ||
color: rgba(255, 255, 255, 0.6); | ||
} | ||
} | ||
|
||
.hide-channel-icon { | ||
margin-right: 10px; | ||
} |
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,42 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { ActivatedRoute, Router } from '@angular/router'; | ||
|
||
@Component({ | ||
selector: 'channel-item', | ||
templateUrl: './channel-item.component.html', | ||
styleUrls: ['./channel-item.component.scss'] | ||
}) | ||
export class ChannelItemComponent implements OnInit { | ||
@Input() | ||
channel: any; | ||
channelSymbol: string; | ||
|
||
|
||
constructor(private router: Router, private route: ActivatedRoute) { | ||
} | ||
|
||
gotoChannel(channelId) { | ||
this.router.navigate(['channel', channelId], { relativeTo: this.route }); | ||
} | ||
|
||
ngOnInit(): void { | ||
if (this.channel.direct) { | ||
this.channelSymbol = 'at'; | ||
} | ||
else if (this.channel.privateChannel) { | ||
this.channelSymbol = 'lock'; | ||
} | ||
else { | ||
this.channelSymbol = 'hashtag'; | ||
} | ||
} | ||
|
||
exitChannel() { | ||
|
||
} | ||
|
||
hideChannel() { | ||
|
||
} | ||
|
||
} |
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
25 changes: 25 additions & 0 deletions
25
src/app/components/channel-view/channel-view.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.channel-view-header { | ||
display: flex; | ||
flex-direction: row-reverse; | ||
} | ||
|
||
.menu-button { | ||
width: 48px; | ||
} | ||
|
||
.menu-button:hover{ | ||
background-color: rgb(200,200,200); | ||
} | ||
|
||
.message-row { | ||
display: flex; | ||
} | ||
|
||
.message-input { | ||
|
||
} | ||
|
||
.send-button { | ||
background: #f4f4f4; | ||
width: 48px; | ||
} |
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 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: 7 additions & 2 deletions
9
src/app/components/chat/chat.component.scss → ...onents/chat-page/chat-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
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 |
---|---|---|
|
@@ -20,5 +20,8 @@ | |
} | ||
|
||
.login-logo{ | ||
width: 50%; | ||
width: 80%; | ||
@media (min-width: 600px) { | ||
width: 50%; | ||
} | ||
} |
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