Skip to content
Snippets Groups Projects
Commit 278fb134 authored by Marcelo Schmidt's avatar Marcelo Schmidt
Browse files

Create channel settings tab bar icon

parent c0948365
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,7 @@ rocketchat:slashcommands-leave
rocketchat:spotify
rocketchat:statistics
rocketchat:webrtc
rocketchat:channel-settings
#rocketchat:chatops
#rocketchat:livechat
#rocketchat:hubot
......
......@@ -125,6 +125,7 @@ reload@1.1.4
retry@1.0.4
rocketchat:authorization@0.0.1
rocketchat:autolinker@0.0.1
rocketchat:channel-settings@0.0.1
rocketchat:chatops@0.0.1
rocketchat:colors@0.0.1
rocketchat:custom-oauth@1.0.0
......
.flex-tab {
.channel-settings {
margin-top: 60px;
padding: 20px;
form {
label {
}
}
.submit {
margin-top: 30px;
text-align: center;
}
}
}
Meteor.startup ->
RocketChat.callbacks.add 'enter-room', ->
RocketChat.TabBar.addButton
id: 'channel-settings'
i18nTitle: 'Channel_Settings'
icon: 'octicon octicon-gear'
template: 'channelSettings'
order: 0
, RocketChat.callbacks.priority.MEDIUM, 'enter-room-tabbar-channel-settings'
Template.channelSettings.helpers
notDirect: ->
return ChatRoom.findOne(@rid).t isnt 'd'
roomType: ->
return ChatRoom.findOne(@rid).t
Template.channelSettings.onCreated ->
<template name="channelSettings">
<div class="control">
<div class="header">
<h2>{{_ "Room_Settings"}}</h2>
</div>
</div>
<div class="channel-settings scrollable">
<form>
<fieldset>
{{#if notDirect}}
<div class="input-line double-col">
<label>{{_ "Room_Type"}}</label>
<div>
<label><input type="radio" name="roomType" value="c" checked="{{$eq roomType 'c'}}" /> {{_ "Channel"}}</label>
<label><input type="radio" name="roomType" value="p" checked="{{$eq roomType 'p'}}" /> {{_ "Private_Group"}}</label>
</div>
</div>
{{/if}}
</fieldset>
<div class="submit">
<button class="button save"><i class="icon-send"></i><span>{{_ "Save_changes"}}</span></button>
</div>
</form>
</div>
</template>
{
"Channel": "Channel",
"Private_Group": "Private Group",
"Room_Type": "Room Type",
"Room_Settings": "Room Settings"
}
Package.describe({
name: 'rocketchat:channel-settings',
version: '0.0.1',
summary: 'Channel Settings Panel',
git: ''
});
Package.onUse(function(api) {
api.versionsFrom('1.0');
api.use([
'coffeescript',
'templating',
'less@2.5.0',
'rocketchat:lib@0.0.1'
]);
api.addFiles([
'client/tabBar.coffee',
'client/views/channelSettings.html',
'client/views/channelSettings.coffee',
'client/stylesheets/channel-settings.less',
], 'client');
// TAPi18n
var _ = Npm.require('underscore');
var fs = Npm.require('fs');
tapi18nFiles = _.compact(_.map(fs.readdirSync('packages/rocketchat-channel-settings/i18n'), function(filename) {
if (fs.statSync('packages/rocketchat-channel-settings/i18n/' + filename).size > 16) {
return 'i18n/' + filename;
}
}));
api.use('tap:i18n@1.6.1');
api.imply('tap:i18n');
api.addFiles(tapi18nFiles);
});
Package.onTest(function(api) {
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment