-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:RocketChat/Rocket.Chat
- Loading branch information
Showing
8 changed files
with
161 additions
and
124 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
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 |
---|---|---|
@@ -1,73 +1,75 @@ | ||
<template name="userInfo"> | ||
{{#with user}} | ||
<div class="about clearfix"> | ||
{{#if ../video}} | ||
{{#if videoActive}} | ||
{{#if rtcLayout3}} | ||
<div id='fullscreendiv' style="width: 100%"> | ||
<video id='videoremote' class="video-remote" src="{{remoteVideoUrl}}" style="width: 100%; align-items: center; margin-bottom: 10px; background-color: #000; transition: width 2s, height 2s, top 2s, left 2s, transform 2s;" autoplay></video> | ||
<video id='videoself' class="video-self" src="{{selfVideoUrl}}" style="width: 250px; position: absolute; top: 21px; right: 31px; border: 1px solid #FFF; background-color: #000; transition: width 2s, height 2s, top 2s, left 2s, transform 2s;" autoplay muted></video> | ||
</div> | ||
{{/if}} | ||
{{#if rtcLayout2}} | ||
<div style="display: flex; flex-direction: row; align-items: center; width: 800px; height: 350px"> | ||
<video id="videoremote" class="video-remote" src="{{remoteVideoUrl}}" style="flex: 1 0; min-width: 380px; height: 285px; margin: 10px; background-color: #000;" autoplay></video> | ||
<video id="videoself" class="video-self" src="{{selfVideoUrl}}" style="flex: 1 0; min-width: 380px; height: 285px; margin: 10px; background-color: #000;" autoplay muted></video> | ||
</div> | ||
{{/if}} | ||
{{#if rtcLayout1}} | ||
<div style="display: flex; flex-direction: column; align-items: center; width: 360px; height: 500px"> | ||
<video class="video-remote" src="{{remoteVideoUrl}}" style="flex: 1 1; width: 320px; margin: 10px; background-color: #000;" autoplay></video> | ||
<video class="video-self" src="{{selfVideoUrl}}" style="flex: 1 1; width: 320px; margin: 10px; background-color: #000;" autoplay muted></video> | ||
</div> | ||
{{/if}} | ||
{{#if noRtcLayout}} | ||
<div> | ||
<video class="video-remote" src="{{remoteVideoUrl}}" style="width: 100%; margin-bottom: 10px; background-color: #000; transition: width 2s, height 2s, top 2s, left 2s, transform 2s;" autoplay></video> | ||
<video class="video-self" src="{{selfVideoUrl}}" style="width: 100px; position: absolute; top: 21px; right: 21px; border: 1px solid #FFF; background-color: #000; transition: width 2s, height 2s, top 2s, left 2s, transform 2s;" autoplay muted></video> | ||
{{#if $.Session.get 'showUserInfo'}} | ||
{{#with user}} | ||
<div class="about clearfix"> | ||
{{#if ../video}} | ||
{{#if videoActive}} | ||
{{#if rtcLayout3}} | ||
<div id='fullscreendiv' style="width: 100%"> | ||
<video id='videoremote' class="video-remote" src="{{remoteVideoUrl}}" style="width: 100%; align-items: center; margin-bottom: 10px; background-color: #000; transition: width 2s, height 2s, top 2s, left 2s, transform 2s;" autoplay></video> | ||
<video id='videoself' class="video-self" src="{{selfVideoUrl}}" style="width: 250px; position: absolute; top: 21px; right: 31px; border: 1px solid #FFF; background-color: #000; transition: width 2s, height 2s, top 2s, left 2s, transform 2s;" autoplay muted></video> | ||
</div> | ||
{{/if}} | ||
{{#if rtcLayout2}} | ||
<div style="display: flex; flex-direction: row; align-items: center; width: 800px; height: 350px"> | ||
<video id="videoremote" class="video-remote" src="{{remoteVideoUrl}}" style="flex: 1 0; min-width: 380px; height: 285px; margin: 10px; background-color: #000;" autoplay></video> | ||
<video id="videoself" class="video-self" src="{{selfVideoUrl}}" style="flex: 1 0; min-width: 380px; height: 285px; margin: 10px; background-color: #000;" autoplay muted></video> | ||
</div> | ||
{{/if}} | ||
{{#if rtcLayout1}} | ||
<div style="display: flex; flex-direction: column; align-items: center; width: 360px; height: 500px"> | ||
<video class="video-remote" src="{{remoteVideoUrl}}" style="flex: 1 1; width: 320px; margin: 10px; background-color: #000;" autoplay></video> | ||
<video class="video-self" src="{{selfVideoUrl}}" style="flex: 1 1; width: 320px; margin: 10px; background-color: #000;" autoplay muted></video> | ||
</div> | ||
{{/if}} | ||
{{#if noRtcLayout}} | ||
<div> | ||
<video class="video-remote" src="{{remoteVideoUrl}}" style="width: 100%; margin-bottom: 10px; background-color: #000; transition: width 2s, height 2s, top 2s, left 2s, transform 2s;" autoplay></video> | ||
<video class="video-self" src="{{selfVideoUrl}}" style="width: 100px; position: absolute; top: 21px; right: 21px; border: 1px solid #FFF; background-color: #000; transition: width 2s, height 2s, top 2s, left 2s, transform 2s;" autoplay muted></video> | ||
</div> | ||
{{/if}} | ||
{{/if}} | ||
{{/if}} | ||
{{/if}} | ||
<div class="thumb"> | ||
{{> avatar username=username}} | ||
</div> | ||
<div class="info"> | ||
<h3>{{username}}</h3> | ||
{{#if isAdmin}} | ||
<div class="thumb"> | ||
{{> avatar username=username}} | ||
</div> | ||
<div class="info"> | ||
<h3 title="{{username}}"><i class="status-{{status}}"></i> {{username}}</h3> | ||
<p>{{name}}</p> | ||
{{#if utc}}<p><i class="icon-clock"></i>{{userTime}} (UTC {{utc}})</p>{{/if}} | ||
{{#each emails}} <p><i class="icon-mail"></i> {{address}}{{#if verified}} <i class="icon-ok"></i>{{/if}}</p> {{/each}} | ||
{{#each phone}} <p><i class="icon-phone"></i> {{phoneNumber}}</p> {{/each}} | ||
{{#if lastLogin}} <p><i class="icon-calendar"></i> {{_ "Last_login"}}: {{lastLogin}}</p> {{/if}} | ||
{{#if services.facebook.id}} <p><i class="icon-facebook"></i><a href="{{services.facebook.link}}" target="_blank">{{services.facebook.name}}</a></p> {{/if}} | ||
{{#if services.github.id}} <p><i class="icon-github-circled"></i><a href="https://www.github.com/{{services.github.username}}" target="_blank">{{services.github.username}}</a></p> {{/if}} | ||
{{#if services.gitlab.id}} <p><i class="icon-gitlab"></i>{{services.gitlab.username}}</p> {{/if}} | ||
{{#if services.google.id}} <p><i class="icon-gplus"></i><a href="https://plus.google.com/{{services.google.id}}" target="_blank">{{services.google.name}}</a></p> {{/if}} | ||
{{#if services.linkedin.id}} <p><i class="icon-linkedin"></i><a href="{{services.linkedin.publicProfileUrl}}" target="_blank">{{linkedinUsername}}</a></p> {{/if}} | ||
{{#if servicesMeteor.id}} <p><i class="icon-meteor"></i>{{servicesMeteor.username}}</p> {{/if}} | ||
{{#if services.twitter.id}} <p><i class="icon-twitter"></i><a href="https://twitter.com/{{services.twitter.screenName}}" target="_blank">{{services.twitter.screenName}}</a></p> {{/if}} | ||
{{/if}} | ||
{{#if isAdmin}} | ||
{{#each emails}} <p><i class="icon-mail"></i> {{address}}{{#if verified}} <i class="icon-ok"></i>{{/if}}</p> {{/each}} | ||
{{#each phone}} <p><i class="icon-phone"></i> {{phoneNumber}}</p> {{/each}} | ||
{{#if lastLogin}} <p><i class="icon-calendar"></i> {{_ "Last_login"}}: {{lastLogin}}</p> {{/if}} | ||
{{#if services.facebook.id}} <p><i class="icon-facebook"></i><a href="{{services.facebook.link}}" target="_blank">{{services.facebook.name}}</a></p> {{/if}} | ||
{{#if services.github.id}} <p><i class="icon-github-circled"></i><a href="https://www.github.com/{{services.github.username}}" target="_blank">{{services.github.username}}</a></p> {{/if}} | ||
{{#if services.gitlab.id}} <p><i class="icon-gitlab"></i>{{services.gitlab.username}}</p> {{/if}} | ||
{{#if services.google.id}} <p><i class="icon-gplus"></i><a href="https://plus.google.com/{{services.google.id}}" target="_blank">{{services.google.name}}</a></p> {{/if}} | ||
{{#if services.linkedin.id}} <p><i class="icon-linkedin"></i><a href="{{services.linkedin.publicProfileUrl}}" target="_blank">{{linkedinUsername}}</a></p> {{/if}} | ||
{{#if servicesMeteor.id}} <p><i class="icon-meteor"></i>{{servicesMeteor.username}}</p> {{/if}} | ||
{{#if services.twitter.id}} <p><i class="icon-twitter"></i><a href="https://twitter.com/{{services.twitter.screenName}}" target="_blank">{{services.twitter.screenName}}</a></p> {{/if}} | ||
{{/if}} | ||
</div> | ||
</div> | ||
</div> | ||
{{/with}} | ||
<nav> | ||
{{#if video}} | ||
{{#unless videoActive}} | ||
<button class='button start-video'><span><i class='icon-videocam'></i> {{_ "Video_Chat"}}</span></button> | ||
{{#if remoteMonitoring}} | ||
<button class='button short monitor-video'><span><i class='icon-videocam'></i> {{_ "Remote"}}</span></button> | ||
<button class='button lightblue setup-video'><span><i class='icon-videocam'></i> {{_ "Setup"}}</span></button> | ||
{{/with}} | ||
<nav> | ||
{{#if video}} | ||
{{#unless videoActive}} | ||
<button class='button start-video'><span><i class='icon-videocam'></i> {{_ "Video_Chat"}}</span></button> | ||
{{#if remoteMonitoring}} | ||
<button class='button short monitor-video'><span><i class='icon-videocam'></i> {{_ "Remote"}}</span></button> | ||
<button class='button lightblue setup-video'><span><i class='icon-videocam'></i> {{_ "Setup"}}</span></button> | ||
{{/if}} | ||
{{else}} | ||
<button class='button red stop-video'><span><i class='icon-videocam'></i> {{_ "Stop_Video"}}</span></button> | ||
{{/unless}} | ||
{{/if}} | ||
{{#if showAll}} | ||
<button class='button secondary back'><span>{{_ "View_All"}} <i class='icon-angle-right'></i></span></button> | ||
{{#if canDirectMessage}} | ||
<button class='button pvt-msg'><span><i class='icon-chat'></i> {{_ "Conversation"}}</span></button> | ||
{{/if}} | ||
{{else}} | ||
<button class='button red stop-video'><span><i class='icon-videocam'></i> {{_ "Stop_Video"}}</span></button> | ||
{{/unless}} | ||
{{/if}} | ||
{{#if showAll}} | ||
<button class='button secondary back'><span>{{_ "View_All"}} <i class='icon-angle-right'></i></span></button> | ||
{{#if canDirectMessage}} | ||
<button class='button pvt-msg'><span><i class='icon-chat'></i> {{_ "Conversation"}}</span></button> | ||
{{/if}} | ||
{{/if}} | ||
</nav> | ||
</nav> | ||
{{/if}} | ||
</template> |
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,44 @@ | ||
Meteor.publish 'fullUserData', (filter, limit) -> | ||
unless @userId | ||
return @ready() | ||
|
||
user = Meteor.users.findOne @userId | ||
|
||
fields = | ||
name: 1 | ||
username: 1 | ||
status: 1 | ||
utcOffset: 1 | ||
|
||
if user.admin is true | ||
fields = _.extend fields, | ||
emails: 1 | ||
phone: 1 | ||
statusConnection: 1 | ||
admin: 1 | ||
lastLogin: 1 | ||
active: 1 | ||
services: 1 | ||
else | ||
limit = 1 | ||
|
||
filter = s.trim filter | ||
|
||
if not filter and limit is 1 | ||
return @ready() | ||
|
||
if filter | ||
if limit is 1 | ||
query = { username: filter } | ||
else | ||
filterReg = new RegExp filter, "i" | ||
query = { $or: [ { username: filterReg }, { name: filterReg }, { "emails.address": filterReg } ] } | ||
else | ||
query = {} | ||
|
||
console.log '[publish] fullUserData'.green, filter, limit | ||
|
||
Meteor.users.find query, | ||
fields: fields | ||
limit: limit | ||
sort: { username: 1 } |
This file was deleted.
Oops, something went wrong.