|
|
|
@ -1,8 +1,6 @@ |
|
|
|
|
<template name="messageBox"> |
|
|
|
|
<div class="rc-message-box rc-new"> |
|
|
|
|
{{#if subscribed}} |
|
|
|
|
|
|
|
|
|
{{> messagePopupConfig getPopupConfig}} |
|
|
|
|
{{#with usersTyping}} |
|
|
|
|
<div class="rc-message-box__typing"> |
|
|
|
|
<b class="rc-message-box__typing__user">{{users}}</b> |
|
|
|
@ -21,191 +19,95 @@ |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
{{/with}} |
|
|
|
|
<div class="rc-message-box__container"> |
|
|
|
|
<div class="rc-message-box__icon emoji-picker-icon"> |
|
|
|
|
<svg class="rc-input__icon-svg rc-input__icon-svg--smile"> |
|
|
|
|
<use xlink:href="#icon-smile"></use> |
|
|
|
|
</svg> |
|
|
|
|
</div> |
|
|
|
|
<textarea autofocus dir="auto" name="msg" maxlength="{{maxMessageLength}}" placeholder="{{_ 'Message'}}" rows="1" class="rc-message-box__textarea js-input-message autogrow-short"></textarea> |
|
|
|
|
{{# if sendIcon}} |
|
|
|
|
<div class="rc-message-box__icon js-send"> |
|
|
|
|
{{#if allowedToSend}} |
|
|
|
|
{{> messagePopupConfig getPopupConfig}} |
|
|
|
|
<div class="rc-message-box__container"> |
|
|
|
|
<div class="rc-message-box__icon emoji-picker-icon"> |
|
|
|
|
<svg class="rc-input__icon-svg rc-input__icon-svg--smile"> |
|
|
|
|
<use xlink:href="#icon-send"></use> |
|
|
|
|
<use xlink:href="#icon-smile"></use> |
|
|
|
|
</svg> |
|
|
|
|
</div> |
|
|
|
|
{{else}} |
|
|
|
|
<label class="rc-message-box__action-label" for="rc-message-box__action-input" data-popover="label"> |
|
|
|
|
<input id="rc-message-box__action-input" type="checkbox" class="rc-popover-anchor" data-popover="anchor"> |
|
|
|
|
<div class="rc-popover js-message-actions" data-popover="popover"> |
|
|
|
|
<div class="rc-popover__content"> |
|
|
|
|
{{# each column in columns }} |
|
|
|
|
<div class="rc-popover__column"> |
|
|
|
|
{{#each group in column }} |
|
|
|
|
<div class="rc-popover__column-wrapper"> |
|
|
|
|
<h3 class="rc-popover__title">{{_ group.name}}</h3> |
|
|
|
|
<ul class="rc-popover__list"> |
|
|
|
|
{{# each group.actions }} |
|
|
|
|
<li class="rc-popover__item" data-action="open" data-open="account"> |
|
|
|
|
<span class="rc-popover__icon"> |
|
|
|
|
{{#if icon}} |
|
|
|
|
<svg class="rc-popover__icon-element rc-popover__icon-element--{{icon}}"> |
|
|
|
|
<use xlink:href="#icon-{{icon}}"></use> |
|
|
|
|
</svg> |
|
|
|
|
{{/if}} |
|
|
|
|
</span> |
|
|
|
|
<span class="rc-popover__item-text">{{_ label}}</span> |
|
|
|
|
</li> |
|
|
|
|
{{/each}} |
|
|
|
|
</ul> |
|
|
|
|
</div> |
|
|
|
|
{{/each}} |
|
|
|
|
</div> |
|
|
|
|
{{/each}} |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{{#if columns}} |
|
|
|
|
<div class="rc-message-box__icon"> |
|
|
|
|
<svg class="rc-input__icon-svg rc-input__icon-svg--plus"> |
|
|
|
|
<use xlink:href="#icon-plus"></use> |
|
|
|
|
</svg> |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
</label> |
|
|
|
|
|
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
<div class="rc-message-box__toolbar-markdown"> |
|
|
|
|
<!-- {{#if allowedToSend}} |
|
|
|
|
{{#if showFormattingTips}} |
|
|
|
|
<div class="formatting-tips" aria-hidden="true" dir="auto"> |
|
|
|
|
{{#if showMarkdown}} |
|
|
|
|
<b>*{{_ "bold"}}*</b> |
|
|
|
|
<i>_{{_ "italics"}}_</i> |
|
|
|
|
<span>~<strike>{{_ "strike"}}</strike>~</span> |
|
|
|
|
{{/if}} |
|
|
|
|
{{#if showMarkdownCode}} |
|
|
|
|
<code class="code-colors inline">`{{_ "inline_code"}}`</code> |
|
|
|
|
<code class="code-colors inline"><span class="hidden-br"><br></span>```<span class="hidden-br"><br></span><i class="icon-level-down"></i>{{_ "multi"}}<span class="hidden-br"><br></span><i class="icon-level-down"></i>{{_ "line"}}<span class="hidden-br"><br></span><i class="icon-level-down"></i>```</code> |
|
|
|
|
{{/if}} |
|
|
|
|
{{#if katexSyntax}} |
|
|
|
|
<span><a href="https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX" target="_blank">{{katexSyntax}}</a></span> |
|
|
|
|
{{/if}} |
|
|
|
|
{{#if showMarkdown}} |
|
|
|
|
<q><span class="hidden-br"><br></span>>{{_ "quote"}}</q> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
{{/if}} --> |
|
|
|
|
{{#each mdButtons}} |
|
|
|
|
<button class="rc-message-box__toolbar-markdown-item rc-tooltip js-md" aria-label={{_ label}}> |
|
|
|
|
<svg class="rc-message-box__toolbar-markdown-icon rc-message-box__toolbar-markdown-icon--{{label}}"> |
|
|
|
|
<use xlink:href="#icon-md-{{label}}"></use> |
|
|
|
|
</svg> |
|
|
|
|
</button> |
|
|
|
|
{{/each}} |
|
|
|
|
</div> |
|
|
|
|
<form class="message-form" method="post" style="display:none;" action="/"> |
|
|
|
|
{{> messagePopupConfig getPopupConfig}} |
|
|
|
|
|
|
|
|
|
{{#if allowedToSend}} |
|
|
|
|
<div class="message-input border-component-color"> |
|
|
|
|
|
|
|
|
|
<div class="input-message-container"> |
|
|
|
|
|
|
|
|
|
<!-- <textarea dir="auto" name="msg" maxlength="{{maxMessageLength}}" class="message-form-text input-message autogrow-short" placeholder="{{_ 'Message'}}"></textarea> --> |
|
|
|
|
|
|
|
|
|
<div class="inner-left-toolbar"> |
|
|
|
|
<i class="emoji-picker-icon icon-people secondary-font-color"></i> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<textarea autofocus dir="auto" name="msg" maxlength="{{maxMessageLength}}" placeholder="{{_ 'Message'}}" rows="1" class="rc-message-box__textarea js-input-message autogrow-short"></textarea> |
|
|
|
|
{{# if sendIcon}} |
|
|
|
|
<div class="rc-message-box__icon js-send"> |
|
|
|
|
<svg class="rc-input__icon-svg rc-input__icon-svg--smile"> |
|
|
|
|
<use xlink:href="#icon-send"></use> |
|
|
|
|
</svg> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
{{#unless showSend}} |
|
|
|
|
|
|
|
|
|
<div class="share-items {{groupAttachHidden}}"> |
|
|
|
|
|
|
|
|
|
{{#if fileUploadEnabled}} |
|
|
|
|
|
|
|
|
|
<div class="message-buttons file"> |
|
|
|
|
<i class="icon-attach file"></i> |
|
|
|
|
<input type="file" accept="{{fileUploadAllowedMediaTypes}}"> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
{{#if showMic}} |
|
|
|
|
<div class="message-buttons mic-button"> |
|
|
|
|
<div class="mic"> |
|
|
|
|
<i class="icon-mic" aria-label="{{_ "Record"}}"></i> |
|
|
|
|
</div> |
|
|
|
|
<div class="stop-mic hidden"> |
|
|
|
|
<i class="icon-stop" aria-label="{{_ "Stop_Recording"}}"></i> |
|
|
|
|
{{else}} |
|
|
|
|
<label class="rc-message-box__action-label" for="rc-message-box__action-input" data-popover="label"> |
|
|
|
|
<input id="rc-message-box__action-input" type="checkbox" class="rc-popover-anchor" data-popover="anchor"> |
|
|
|
|
<div class="rc-popover js-message-actions" data-popover="popover"> |
|
|
|
|
<div class="rc-popover__content"> |
|
|
|
|
{{# each column in columns }} |
|
|
|
|
<div class="rc-popover__column"> |
|
|
|
|
{{#each group in column }} |
|
|
|
|
<div class="rc-popover__column-wrapper"> |
|
|
|
|
<h3 class="rc-popover__title">{{_ group.name}}</h3> |
|
|
|
|
<ul class="rc-popover__list"> |
|
|
|
|
{{# each group.actions }} |
|
|
|
|
<li class="rc-popover__item" data-action="open" data-open="account"> |
|
|
|
|
<span class="rc-popover__icon"> |
|
|
|
|
{{#if icon}} |
|
|
|
|
<svg class="rc-popover__icon-element rc-popover__icon-element--{{icon}}"> |
|
|
|
|
<use xlink:href="#icon-{{icon}}"></use> |
|
|
|
|
</svg> |
|
|
|
|
{{/if}} |
|
|
|
|
</span> |
|
|
|
|
<span class="rc-popover__item-text">{{_ label}}</span> |
|
|
|
|
</li> |
|
|
|
|
{{/each}} |
|
|
|
|
</ul> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
|
|
|
|
|
{{#if showVRec}} |
|
|
|
|
<div class="message-buttons video-button"> |
|
|
|
|
<i class="icon-videocam" aria-label="{{_ "Record"}}"></i> |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
|
|
|
|
|
{{/if}} |
|
|
|
|
|
|
|
|
|
{{#if showLocation}} |
|
|
|
|
<div class="message-buttons location-button"> |
|
|
|
|
<i class="icon-location"></i> |
|
|
|
|
{{/each}} |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
|
|
|
|
|
{{#if showSandstorm}} |
|
|
|
|
<div class="message-buttons sandstorm-offer"> |
|
|
|
|
<i class="icon-plus" title="{{_ "Sandstorm_Powerbox_Share"}}"></i> |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
|
|
|
|
|
{{/each}} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
{{#if groupAttachHidden}} |
|
|
|
|
<div class="message-buttons share"> |
|
|
|
|
<i class="icon-plus"></i> |
|
|
|
|
</div> |
|
|
|
|
{{#if columns}} |
|
|
|
|
<div class="rc-message-box__icon"> |
|
|
|
|
<svg class="rc-input__icon-svg rc-input__icon-svg--plus"> |
|
|
|
|
<use xlink:href="#icon-plus"></use> |
|
|
|
|
</svg> |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
</label> |
|
|
|
|
|
|
|
|
|
{{/unless}} |
|
|
|
|
|
|
|
|
|
{{#if showSend}} |
|
|
|
|
<div class="message-buttons send-button"> |
|
|
|
|
<i class="icon-paper-plane" aria-label="{{_ "Send"}}"></i> |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
{{else}} |
|
|
|
|
<div class="stream-info"> |
|
|
|
|
{{#if isBlockedOrBlocker}} |
|
|
|
|
{{_ "room_is_blocked"}} |
|
|
|
|
{{else}} |
|
|
|
|
{{_ "room_is_read_only"}} |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
|
|
|
|
|
<div class="editing-commands" aria-hidden="true" dir="auto"> |
|
|
|
|
<div class="editing-commands-cancel">{{_ 'Esc_to'}} <button type="button">{{_ 'Cancel_message_input'}}</button></div> |
|
|
|
|
<div class="editing-commands-save">{{_ 'Enter_to'}} <button type="button">{{_ 'Save_changes'}}</button></div> |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
<div class="rc-message-box__toolbar-markdown"> |
|
|
|
|
<!--{{#if katexSyntax}} |
|
|
|
|
<span><a href="https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX" target="_blank">{{katexSyntax}}</a></span> |
|
|
|
|
{{/if}}--> |
|
|
|
|
{{#each mdButtons}} |
|
|
|
|
<button class="rc-message-box__toolbar-markdown-item rc-tooltip js-md" aria-label={{_ label}}> |
|
|
|
|
<svg class="rc-message-box__toolbar-markdown-icon rc-message-box__toolbar-markdown-icon--{{label}}"> |
|
|
|
|
<use xlink:href="#icon-md-{{label}}"></use> |
|
|
|
|
</svg> |
|
|
|
|
</button> |
|
|
|
|
{{/each}} |
|
|
|
|
</div> |
|
|
|
|
{{else}} |
|
|
|
|
<div class="stream-info"> |
|
|
|
|
{{#if isBlockedOrBlocker}} |
|
|
|
|
{{_ "room_is_blocked"}} |
|
|
|
|
{{else}} |
|
|
|
|
{{_ "room_is_read_only"}} |
|
|
|
|
{{/if}} |
|
|
|
|
</div> |
|
|
|
|
</form> |
|
|
|
|
{{/if}} |
|
|
|
|
{{else}} |
|
|
|
|
{{#with notSubscribedTpl}} |
|
|
|
|
{{> Template.dynamic . }} |
|
|
|
|
{{else}} |
|
|
|
|
{{#if canJoin}} |
|
|
|
|
<div> |
|
|
|
|
{{{_ "you_are_in_preview_mode_of" room_name=roomName}}} |
|
|
|
|
{{#if joinCodeRequired}} |
|
|
|
|
<input type="text" name="joinCode" placeholder="{{_ 'Code'}}" style="width: 100px"> |
|
|
|
|
{{/if}} |
|
|
|
|
<button class="button join"><span><i class="icon-login"></i> {{_ "join"}}</span></button> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
|
{{{_ "you_are_in_preview_mode_of" room_name=roomName}}} |
|
|
|
|
{{#if joinCodeRequired}} |
|
|
|
|
<input type="text" name="joinCode" placeholder="{{_ 'Code'}}" style="width: 100px"> |
|
|
|
|
{{/if}} |
|
|
|
|
<button class="button join"><span><i class="icon-login"></i> {{_ "join"}}</span></button> |
|
|
|
|
</div> |
|
|
|
|
{{/if}} |
|
|
|
|
{{#if anonymousRead}} |
|
|
|
|
<div> |
|
|
|
|