diff --git a/js/build.js b/js/build.js index 9c38e21..a83e151 100644 --- a/js/build.js +++ b/js/build.js @@ -2354,9 +2354,9 @@ Fliplet().then(function() { var isFriendAvatar = friend ? friend.data[avatarColumnName] : ''; conversation.isChannel = conversation.definition.group && conversation.definition.group.public; - conversation.isGroup = !conversation.isChannel && (participants.length > 2 || (conversation.definition.removedParticipants && conversation.definition.removedParticipants.length > 0)); - conversation.name = conversation.isGroup ? conversation.name || 'Group' : conversationName; - conversation.avatar = participants.length > 2 ? '' : isFriendAvatar; + conversation.name = participants.length >= 2 || conversation.isChannel ? conversation.name || 'Group' : conversationName; + conversation.avatar = participants.length >= 2 ? '' : isFriendAvatar; + conversation.isGroup = !conversation.isChannel && participants.length >= 2; conversation.usersInConversation = conversationName; conversation.nParticipants = participants.length; conversation.absoluteTime = TD(conversation.updatedAt, { format: 'fromNow' }); diff --git a/js/build.templates.js b/js/build.templates.js index f31c1b1..21a47d4 100644 --- a/js/build.templates.js +++ b/js/build.templates.js @@ -1,113 +1,113 @@ this["Fliplet"] = this["Fliplet"] || {}; this["Fliplet"]["Widget"] = this["Fliplet"]["Widget"] || {}; -this["Fliplet"]["Widget"]["Templates"] = this["Fliplet"]["Widget"]["Templates"] || {}; - +this["Fliplet"]["Widget"]["Templates"] = this["Fliplet"]["Widget"]["Templates"] || {}; + this["Fliplet"]["Widget"]["Templates"]["templates.admin-button-group"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { var alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=container.escapeExpression; - return "
\n

" + return "

\r\n

" + alias3((helpers.T || (depth0 && depth0.T) || alias2).call(alias1,"widgets.chat.adminButtonGroup.title",{"name":"T","hash":{},"data":data})) - + "

\n
\n
\n
" + + "

\r\n
\r\n
\r\n
" + alias3((helpers.T || (depth0 && depth0.T) || alias2).call(alias1,"widgets.chat.adminButtonGroup.actions.all",{"name":"T","hash":{},"data":data})) - + "
\n
" + + "
\r\n
" + alias3((helpers.T || (depth0 && depth0.T) || alias2).call(alias1,"widgets.chat.adminButtonGroup.actions.speakers",{"name":"T","hash":{},"data":data})) - + "
\n
" + + "
\r\n
" + alias3((helpers.T || (depth0 && depth0.T) || alias2).call(alias1,"widgets.chat.adminButtonGroup.actions.admins",{"name":"T","hash":{},"data":data})) - + "
\n
\n"; -},"useData":true}); - + + "
\r\n
\r\n"; +},"useData":true}); + this["Fliplet"]["Widget"]["Templates"]["templates.chat-header"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
\n
\n \n \n
\n
\n
{{ name }}
\n {{#unless definition.group.readOnly}}\n {{#if isGroup}}\n
{{ usersInConversation }}
\n {{/if}}\n {{#if isChannel}}\n
{{ nParticipants }}
\n {{/if}}\n {{/unless}}\n
\n
\n{{#if isMuted}}\n \n{{else}}\n \n{{/if}}\n
\n"; -},"useData":true}); - + return "
\r\n
\r\n \r\n \r\n
\r\n
\r\n
{{ name }}
\r\n {{#unless definition.group.readOnly}}\r\n {{#if isGroup}}\r\n
{{ usersInConversation }}
\r\n {{/if}}\r\n {{#if isChannel}}\r\n
{{ nParticipants }}
\r\n {{/if}}\r\n {{/unless}}\r\n
\r\n
\r\n{{#if isMuted}}\r\n \r\n{{else}}\r\n \r\n{{/if}}\r\n
\r\n"; +},"useData":true}); + this["Fliplet"]["Widget"]["Templates"]["templates.contacts-list"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "{{#each this}}\n
{{ @key }}
\n {{#each this}}\n
\n
\n {{#if image}}\n
\n {{/if}}\n {{#if isChannel}}\n \n {{else}}\n \n {{/if}}\n
\n
\n
{{ fullName }}
\n
\n
{{{ title }}}
\n
\n
\n {{#if isPinned}}\n
\n {{/if}}\n
\n {{/each}}\n{{/each}}"; -},"useData":true}); - + return "{{#each this}}\r\n
{{ @key }}
\r\n {{#each this}}\r\n
\r\n
\r\n {{#if image}}\r\n
\r\n {{/if}}\r\n {{#if isChannel}}\r\n \r\n {{else}}\r\n \r\n {{/if}}\r\n
\r\n
\r\n
{{ fullName }}
\r\n
\r\n
{{{ title }}}
\r\n
\r\n
\r\n {{#if isPinned}}\r\n
\r\n {{/if}}\r\n
\r\n {{/each}}\r\n{{/each}}"; +},"useData":true}); + this["Fliplet"]["Widget"]["Templates"]["templates.conversation-content"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { var alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=container.escapeExpression; return "
" + alias3((helpers.T || (depth0 && depth0.T) || alias2).call(alias1,"widgets.chat.conversation.offline",{"name":"T","hash":{},"data":data})) - + "
\n
\n
\n
\n
\n \n
\n
\n
\n
\n \n
\n {{ name }}\n
\n
\n\n
\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n {{ name }}\r\n
\r\n
\r\n\r\n
\r\n \n
\n
\n\n
\n
" + + "\r\n
\r\n
\r\n\r\n
\r\n
" + alias3((helpers.T || (depth0 && depth0.T) || alias2).call(alias1,"widgets.chat.conversation.errors.sendFailed",{"name":"T","hash":{},"data":data})) - + "
\n
" + + "
\r\n
" + alias3((helpers.T || (depth0 && depth0.T) || alias2).call(alias1,"widgets.chat.conversation.sendTo",{"name":"T","hash":{},"data":data})) - + ": {{ name }}
\n
\n \n
\n
\r\n
\r\n \r\n
\r\n \n
\n
\n"; -},"useData":true}); - + + " \r\n
\r\n \r\n
\r\n
\r\n"; +},"useData":true}); + this["Fliplet"]["Widget"]["Templates"]["templates.conversation-item"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
\n
\n
\n
\n \n \n
\n
\n
{{ name }}
\n
\n {{#unless definition.group.readOnly}}\n {{#if isGroup}}\n
{{ usersInConversation }}
\n {{/if}}\n {{#if isChannel}}\n
{{ nParticipants }}
\n {{/if}}\n {{/unless}}\n {{#with lastMessage}}\n
{{ body }}
\n {{/with}}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n {{#if isMuted}}\n \n {{else}}\n \n {{/if}}\n
\n
\n {{#if isGroup}}\n \n {{else}}\n {{#if isChannel}}\n \n {{else}}\n \n {{/if}}\n {{/if}}\n
\n
\n
\n
\n"; -},"useData":true}); - + return "
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
{{ name }}
\r\n
\r\n {{#unless definition.group.readOnly}}\r\n {{#if isGroup}}\r\n
{{ usersInConversation }}
\r\n {{/if}}\r\n {{#if isChannel}}\r\n
{{ nParticipants }}
\r\n {{/if}}\r\n {{/unless}}\r\n {{#with lastMessage}}\r\n
{{ body }}
\r\n {{/with}}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{#if isMuted}}\r\n \r\n {{else}}\r\n \r\n {{/if}}\r\n
\r\n
\r\n {{#if isGroup}}\r\n \r\n {{else}}\r\n {{#if isChannel}}\r\n \r\n {{else}}\r\n \r\n {{/if}}\r\n {{/if}}\r\n
\r\n
\r\n
\r\n
\r\n"; +},"useData":true}); + this["Fliplet"]["Widget"]["Templates"]["templates.conversations-group"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "{{#each this}}\n
\n {{ @key }}\n
\n {{#each this}}\n
\n
\n
\n
\n \n \n
\n
\n
{{ name }}
\n
\n {{#unless definition.group.readOnly}}\n {{#if isGroup}}\n
{{ usersInConversation }}
\n {{/if}}\n {{#if isChannel}}\n
{{ nParticipants }}
\n {{/if}}\n {{/unless}}\n {{#with lastMessage}}\n
{{ body }}
\n {{/with}}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n {{#if isMuted}}\n \n {{else}}\n \n {{/if}}\n
\n
\n {{#if isGroup}}\n \n {{else}}\n {{#if isChannel}}\n \n {{else}}\n \n {{/if}}\n {{/if}}\n
\n
\n
\n
\n {{/each}}\n
\n
\n{{/each}}\n"; -},"useData":true}); - + return "{{#each this}}\r\n
\r\n {{ @key }}\r\n
\r\n {{#each this}}\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
{{ name }}
\r\n
\r\n {{#unless definition.group.readOnly}}\r\n {{#if isGroup}}\r\n
{{ usersInConversation }}
\r\n {{/if}}\r\n {{#if isChannel}}\r\n
{{ nParticipants }}
\r\n {{/if}}\r\n {{/unless}}\r\n {{#with lastMessage}}\r\n
{{ body }}
\r\n {{/with}}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {{#if isMuted}}\r\n \r\n {{else}}\r\n \r\n {{/if}}\r\n
\r\n
\r\n {{#if isGroup}}\r\n \r\n {{else}}\r\n {{#if isChannel}}\r\n \r\n {{else}}\r\n \r\n {{/if}}\r\n {{/if}}\r\n
\r\n
\r\n
\r\n
\r\n {{/each}}\r\n
\r\n
\r\n{{/each}}\r\n"; +},"useData":true}); + this["Fliplet"]["Widget"]["Templates"]["templates.group-contacts-template"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "{{#each this}}\n
\n
\n
\n \n
\n
\n
{{ userName }}
\n
\n
{{ userTitle }}
\n
\n
\n {{#if pinned}}\n
\n {{/if}}\n
\n{{/each}}"; -},"useData":true}); - + return "{{#each this}}\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
{{ userName }}
\r\n
\r\n
{{ userTitle }}
\r\n
\r\n
\r\n {{#if pinned}}\r\n
\r\n {{/if}}\r\n
\r\n{{/each}}"; +},"useData":true}); + this["Fliplet"]["Widget"]["Templates"]["templates.group-tabs"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { var alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=container.escapeExpression; - return "
\n \r\n
\r\n"; +},"useData":true}); + this["Fliplet"]["Widget"]["Templates"]["templates.message-gap"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { return "
"; -},"useData":true}); - +},"useData":true}); + this["Fliplet"]["Widget"]["Templates"]["templates.message-item"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { var alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=container.escapeExpression; - return "
\n
\n
\n
{{ timeAgo }}
\n
\n
\n
\n \n " + return "
\r\n
\r\n
\r\n
{{ timeAgo }}
\r\n
\r\n
\r\n
\r\n \r\n " + alias3((helpers.T || (depth0 && depth0.T) || alias2).call(alias1,"widgets.chat.message.actions.copy",{"name":"T","hash":{},"data":data})) - + "\n
\n {{#if isFromCurrentUser}}\n
\n \n " + + "\r\n
\r\n {{#if isFromCurrentUser}}\r\n
\r\n \r\n " + alias3((helpers.T || (depth0 && depth0.T) || alias2).call(alias1,"widgets.chat.message.actions.edit",{"name":"T","hash":{},"data":data})) - + "\n
\n
\n \n " + + "\r\n
\r\n
\r\n \r\n " + alias3((helpers.T || (depth0 && depth0.T) || alias2).call(alias1,"widgets.chat.message.actions.delete",{"name":"T","hash":{},"data":data})) - + "\n
\n {{/if}}\n
\n
\n
\n {{#unless isFromCurrentUser}}\n {{#if isFromGroup}}\n
{{ name }}
\n {{/if}}\n {{#if isFromChannel}}\n
{{ name }}
\n {{/if}}\n {{/unless}}\n {{#if message.fileType}}\n
\n
" + + "\r\n
\r\n {{/if}}\r\n
\r\n
\r\n
\r\n {{#unless isFromCurrentUser}}\r\n {{#if isFromGroup}}\r\n
{{ name }}
\r\n {{/if}}\r\n {{#if isFromChannel}}\r\n
{{ name }}
\r\n {{/if}}\r\n {{/unless}}\r\n {{#if message.fileType}}\r\n
\r\n
" + alias3((helpers.T || (depth0 && depth0.T) || alias2).call(alias1,"widgets.chat.message.errors.offline",{"name":"T","hash":{},"data":data})) - + "
\n \n
\n {{/if}}\n
\n {{ formatMessage message.body }}\n
\n {{#if message.isEdited}}\n
" + + "
\r\n \r\n
\r\n {{/if}}\r\n
\r\n {{ formatMessage message.body }}\r\n
\r\n {{#if message.isEdited}}\r\n
" + alias3((helpers.T || (depth0 && depth0.T) || alias2).call(alias1,"widgets.chat.message.editSuccess",{"name":"T","hash":{},"data":data})) - + "
\n {{/if}}\n
\n
\n"; -},"useData":true}); - + + "
\r\n {{/if}}\r\n
\r\n
\r\n"; +},"useData":true}); + this["Fliplet"]["Widget"]["Templates"]["templates.message-queue"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
\n
\n \n
\n
\n {{#if message.fileType}}\n
\n
" + return "
\r\n
\r\n \r\n
\r\n
\r\n {{#if message.fileType}}\r\n
\r\n
" + container.escapeExpression((helpers.T || (depth0 && depth0.T) || helpers.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),"widgets.chat.message.errors.offline",{"name":"T","hash":{},"data":data})) - + "
\n \n
\n {{/if}}\n
\n {{ formatMessage message.body }}\n
\n
\n
"; -},"useData":true}); - + + "
\r\n \r\n
\r\n {{/if}}\r\n
\r\n {{ formatMessage message.body }}\r\n
\r\n
\r\n
"; +},"useData":true}); + this["Fliplet"]["Widget"]["Templates"]["templates.new-conversation"] = Handlebars.template({"1":function(container,depth0,helpers,partials,data) { var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; - return "
  • \n \r\n " + alias4(((helper = (helper = helpers.fullName || (depth0 != null ? depth0.fullName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"fullName","hash":{},"data":data}) : helper))) - + "\n
  • \n"; + + "\r\n \r\n"; },"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=container.escapeExpression; - return "
    \n

    " + return "
    \r\n

    " + alias3((helpers.T || (depth0 && depth0.T) || alias2).call(alias1,"widgets.chat.conversation.newConversation.title",{"name":"T","hash":{},"data":data})) - + "

    \n

    " + + "

    \r\n

    " + alias3((helpers.T || (depth0 && depth0.T) || alias2).call(alias1,"widgets.chat.conversation.newConversation.instruction",{"name":"T","hash":{},"data":data})) - + "

    \n\n
      \n" + + "

      \r\n\r\n
        \r\n" + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.contacts : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "
      \n
    \n"; -},"useData":true}); - + + "\r\n
    \r\n"; +},"useData":true}); + this["Fliplet"]["Widget"]["Templates"]["templates.select-contact-bubble"] = Handlebars.template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { - return "
    \n
    \n
    \n \n \n
    \n
    {{ userName }}
    \n
    "; + return "
    \r\n
    \r\n
    \r\n \r\n \r\n
    \r\n
    {{ userName }}
    \r\n
    "; },"useData":true}); \ No newline at end of file