deduplicate chat options menu

main
Peter Jaszkowiak 3 years ago
parent 0b3d999e19
commit 1b65a31924

@ -6,30 +6,7 @@
<button id="chat-close-btn" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <button id="chat-close-btn" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<button type="button" class="close hidden-xs hidden-sm" data-action="maximize"><span aria-hidden="true"><i class="fa fa-expand"></i></span><span class="sr-only">[[modules:chat.maximize]]</span></button> <button type="button" class="close hidden-xs hidden-sm" data-action="maximize"><span aria-hidden="true"><i class="fa fa-expand"></i></span><span class="sr-only">[[modules:chat.maximize]]</span></button>
<button type="button" class="close hidden-xs hidden-sm" data-action="minimize"><span aria-hidden="true"><i class="fa fa-minus"></i></span><span class="sr-only">[[modules:chat.minimize]]</span></button> <button type="button" class="close hidden-xs hidden-sm" data-action="minimize"><span aria-hidden="true"><i class="fa fa-minus"></i></span><span class="sr-only">[[modules:chat.minimize]]</span></button>
<div class="dropdown pull-right"> <!-- IMPORT partials/chats/options.tpl -->
<button class="close" data-toggle="dropdown" component="chat/controlsToggle"><i class="fa fa-gear"></i></button>
<ul class="dropdown-menu dropdown-menu-right pull-right" component="chat/controls">
<li class="dropdown-header">[[modules:chat.options]]</li>
<li>
<a href="#" data-action="members"><i class="fa fa-fw fa-cog"></i> [[modules:chat.manage-room]]</a>
</li>
<li>
<a href="#" data-action="rename"><i class="fa fa-fw fa-edit"></i> [[modules:chat.rename-room]]</a>
</li>
<li>
<a href="#" data-action="leave"><i class="fa fa-fw fa-sign-out"></i> [[modules:chat.leave]]</a>
</li>
<!-- IF users.length -->
<li role="separator" class="divider"></li>
<li class="dropdown-header">[[modules:chat.in-room]]</li>
{{{each users}}}
<li>
<a href="{config.relative_path}/uid/{../uid}">{buildAvatar(users, "sm", true)} {../username}</a>
</li>
{{{end}}}
<!-- END -->
</ul>
</div>
<h4 component="chat/room/name"><!-- IF roomName -->{roomName}<!-- ELSE -->{usernames}<!-- ENDIF roomName --></h4> <h4 component="chat/room/name"><!-- IF roomName -->{roomName}<!-- ELSE -->{usernames}<!-- ENDIF roomName --></h4>
</div> </div>

@ -4,30 +4,7 @@
<button type="button" class="close" data-action="pop-out"><span aria-hidden="true"><i class="fa fa-compress"></i></span><span class="sr-only">[[modules:chat.pop-out]]</span></button> <button type="button" class="close" data-action="pop-out"><span aria-hidden="true"><i class="fa fa-compress"></i></span><span class="sr-only">[[modules:chat.pop-out]]</span></button>
<button type="button" class="close" aria-label="Close" data-action="close"><span aria-hidden="true">&times;</span></button> <button type="button" class="close" aria-label="Close" data-action="close"><span aria-hidden="true">&times;</span></button>
<div class="dropdown pull-right"> <!-- IMPORT partials/chats/options.tpl -->
<button class="close" data-toggle="dropdown" component="chat/controlsToggle"><i class="fa fa-gear"></i></button>
<ul class="dropdown-menu dropdown-menu-right pull-right" component="chat/controls">
<li class="dropdown-header">[[modules:chat.options]]</li>
<li>
<a href="#" data-action="members"><i class="fa fa-fw fa-cog"></i> [[modules:chat.manage-room]]</a>
</li>
<li>
<a href="#" data-action="rename"><i class="fa fa-fw fa-edit"></i> [[modules:chat.rename-room]]</a>
</li>
<li>
<a href="#" data-action="leave"><i class="fa fa-fw fa-sign-out"></i> [[modules:chat.leave]]</a>
</li>
<!-- IF users.length -->
<li role="separator" class="divider"></li>
<li class="dropdown-header">[[modules:chat.in-room]]</li>
{{{each users}}}
<li>
<a href="{config.relative_path}/uid/{../uid}">{buildAvatar(users, "sm", true)} {../username}</a>
</li>
{{{end}}}
<!-- END -->
</ul>
</div>
<span class="members"> <span class="members">
[[modules:chat.chatting_with]]: [[modules:chat.chatting_with]]:
{{{each users}}} {{{each users}}}

@ -0,0 +1,24 @@
<div class="dropdown pull-right">
<button class="close" data-toggle="dropdown" component="chat/controlsToggle"><i class="fa fa-gear"></i></button>
<ul class="dropdown-menu dropdown-menu-right pull-right" component="chat/controls">
<li class="dropdown-header">[[modules:chat.options]]</li>
<li>
<a href="#" data-action="members"><i class="fa fa-fw fa-cog"></i> [[modules:chat.manage-room]]</a>
</li>
<li>
<a href="#" data-action="rename"><i class="fa fa-fw fa-edit"></i> [[modules:chat.rename-room]]</a>
</li>
<li>
<a href="#" data-action="leave"><i class="fa fa-fw fa-sign-out"></i> [[modules:chat.leave]]</a>
</li>
<!-- IF users.length -->
<li role="separator" class="divider"></li>
<li class="dropdown-header">[[modules:chat.in-room]]</li>
{{{each users}}}
<li>
<a href="{config.relative_path}/uid/{../uid}">{buildAvatar(users, "sm", true)} {../username}</a>
</li>
{{{end}}}
<!-- END -->
</ul>
</div>
Loading…
Cancel
Save