Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
persona-non-google
Commits
1b65a319
Commit
1b65a319
authored
Sep 26, 2021
by
Peter Jaszkowiak
Browse files
deduplicate chat options menu
parent
0b3d999e
Changes
3
Hide whitespace changes
Inline
Side-by-side
templates/chat.tpl
View file @
1b65a319
...
...
@@ -6,30 +6,7 @@
<button
id=
"chat-close-btn"
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</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>
<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>
<!-- IMPORT partials/chats/options.tpl -->
<h4
component=
"chat/room/name"
>
<!-- IF roomName -->
{
roomName
}
<!-- ELSE -->
{
usernames
}
<!-- ENDIF roomName -->
</h4>
</div>
...
...
templates/partials/chats/message-window.tpl
View file @
1b65a319
...
...
@@ -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"
aria-label=
"Close"
data-action=
"close"
><span
aria-hidden=
"true"
>
×
</span></button>
<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>
<!-- IMPORT partials/chats/options.tpl -->
<span
class=
"members"
>
[[modules:chat.chatting_with]]:
{{
{
each
users
}
}}
...
...
templates/partials/chats/options.tpl
0 → 100644
View file @
1b65a319
<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>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment