nodebb-theme-persona 13.2.21 → 13.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scss/chats.scss +12 -1
- package/templates/chat.tpl +3 -3
- package/templates/partials/chats/composer.tpl +2 -2
- package/templates/partials/chats/message-window.tpl +1 -0
- package/templates/partials/chats/message.tpl +9 -5
- package/templates/partials/chats/options.tpl +6 -2
- package/templates/partials/chats/pinned-messages.tpl +35 -0
package/package.json
CHANGED
package/scss/chats.scss
CHANGED
|
@@ -334,6 +334,17 @@ body.page-user-chats {
|
|
|
334
334
|
opacity: 0.3;
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
+
&.pinned {
|
|
338
|
+
.message-body-wrapper .controls {
|
|
339
|
+
[data-action="pin"] {
|
|
340
|
+
display: none;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
[data-action="unpin"] {
|
|
344
|
+
display: inline;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
337
348
|
|
|
338
349
|
.chat-user-image {
|
|
339
350
|
@include user-icon-style(32px, 1.6rem, 50%);
|
|
@@ -393,7 +404,7 @@ body.page-user-chats {
|
|
|
393
404
|
border: 1px solid $gray-200;
|
|
394
405
|
box-shadow: 0 6px 12px rgba(0,0,0,.175);
|
|
395
406
|
|
|
396
|
-
[data-action="restore"] {
|
|
407
|
+
[data-action="restore"], [data-action="unpin"] {
|
|
397
408
|
display: none;
|
|
398
409
|
}
|
|
399
410
|
}
|
package/templates/chat.tpl
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
<div class="modal-dialog">
|
|
3
3
|
<div class="modal-content" component="chat/message/window">
|
|
4
4
|
<div class="modal-header d-flex">
|
|
5
|
-
<div class="fs-6 flex-grow-1" component="chat/room/name" data-icon="{icon}">{{{ if ./roomName }}}<i class="fa {icon} text-muted"></i> {roomName}{{{ else }}}{./chatWithMessage}{{{ end}}}</div>
|
|
6
|
-
<button type="button" class="btn btn-link d-none d-md-block p-2 text-muted align-text-top" data-action="maximize">
|
|
5
|
+
<div class="fs-6 flex-grow-1 fw-semibold tracking-tight text-truncate text-nowrap" component="chat/room/name" data-icon="{icon}">{{{ if ./roomName }}}<i class="fa {icon} text-muted"></i> {roomName}{{{ else }}}{./chatWithMessage}{{{ end}}}</div>
|
|
6
|
+
<button type="button" class="btn btn-link d-none d-md-block p-2 text-muted align-text-top" data-action="maximize" title="[[modules:chat.maximize]]" data-bs-toggle="tooltip" data-bs-placement="bottom">
|
|
7
7
|
<span aria-hidden="true"><i class="fa fa-fw fa-expand"></i></span>
|
|
8
8
|
<span class="sr-only">[[modules:chat.maximize]]</span>
|
|
9
9
|
</button>
|
|
10
|
-
<button type="button" class="btn btn-link d-none d-md-block p-2 text-muted align-text-top" data-action="minimize">
|
|
10
|
+
<button type="button" class="btn btn-link d-none d-md-block p-2 text-muted align-text-top" data-action="minimize" title="[[modules:chat.minimize]]" data-bs-toggle="tooltip" data-bs-placement="bottom">
|
|
11
11
|
<span aria-hidden="true"><i class="fa fa-fw fa-minus"></i></span>
|
|
12
12
|
<span class="sr-only">[[modules:chat.minimize]]</span>
|
|
13
13
|
</button>
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
<div component="chat/composer/replying-to-text"></div> <button component="chat/composer/replying-to-cancel" class="btn-ghost-sm px-2 py-1"><i class="fa fa-times"></i></button>
|
|
4
4
|
</div>
|
|
5
5
|
<div class="w-100 flex-grow-1 flex-nowrap position-relative d-flex rounded-2 border border-secondary p-1 align-items-end">
|
|
6
|
-
<button component="chat/upload/button" class="btn btn-light btn-sm px-2 rounded-1" type="button"><i class="fa fa-fw fa-upload"></i></button>
|
|
6
|
+
<button component="chat/upload/button" class="btn btn-light btn-sm px-2 rounded-1" type="button" title="[[global:upload]]" data-bs-toggle="tooltip"><i class="fa fa-fw fa-upload"></i></button>
|
|
7
7
|
<div class="flex-grow-1 align-self-center">
|
|
8
8
|
<textarea component="chat/input" placeholder="[[modules:chat.placeholder.mobile]]" class="bg-transparent text-body form-control chat-input mousetrap rounded-0 border-0 shadow-none ps-1 py-0" style="min-height: 1.5rem;height:0;max-height:30vh;resize:none;"></textarea>
|
|
9
9
|
</div>
|
|
10
10
|
<div class="d-flex gap-1">
|
|
11
11
|
<div component="chat/message/remaining" class="text-xs text-muted me-1 align-self-center">{maximumChatMessageLength}</div>
|
|
12
|
-
<button class="btn btn-primary btn-sm px-2 rounded-1" type="button" data-action="send"><i class="fa fa-fw fa-paper-plane"></i></button>
|
|
12
|
+
<button class="btn btn-primary btn-sm px-2 rounded-1" type="button" data-action="send" title="[[modules:chat.send]]" data-bs-toggle="tooltip"><i class="fa fa-fw fa-paper-plane"></i></button>
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
15
|
<form class="hidden" component="chat/upload" method="post" enctype="multipart/form-data">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<li component="chat/message" class="chat-message mx-2 pe-2 fw-light clear
|
|
1
|
+
<li component="chat/message" class="chat-message mx-2 pe-2 fw-light clear{{{ if messages.deleted }}} deleted{{{ end }}} {{{ if messages.pinned}}} pinned{{{ end }}}" data-mid="{messages.messageId}" data-uid="{messages.fromuid}" data-self="{messages.self}" data-break="{messages.newSet}" data-timestamp="{messages.timestamp}" data-username="{messages.fromUser.username}">
|
|
2
2
|
|
|
3
3
|
{{{ if messages.parent }}}
|
|
4
4
|
<div class="d-flex ms-4 mb-2 align-items-center">
|
|
@@ -35,11 +35,15 @@
|
|
|
35
35
|
<!-- IMPORT partials/chats/reactions.tpl -->
|
|
36
36
|
<div component="chat/message/controls" class="btn-group controls">
|
|
37
37
|
<!-- IMPORT partials/chats/add-reaction.tpl -->
|
|
38
|
-
<button class="btn btn-sm btn-link" data-action="reply"><i class="fa fa-reply"></i></button>
|
|
38
|
+
<button class="btn btn-sm btn-link" data-action="reply" title="[[topic:reply]]"><i class="fa fa-reply"></i></button>
|
|
39
39
|
{{{ if (isAdminOrGlobalMod || (!config.disableChatMessageEditing && messages.self)) }}}
|
|
40
|
-
<button class="btn btn-sm btn-link" data-action="edit"><i class="fa fa-pencil"></i></button>
|
|
41
|
-
<button class="btn btn-sm btn-link" data-action="delete"><i class="fa fa-
|
|
42
|
-
<button class="btn btn-sm btn-link" data-action="restore"><i class="fa fa-repeat"></i></button>
|
|
40
|
+
<button class="btn btn-sm btn-link" data-action="edit" title="[[topic:edit]]"><i class="fa fa-pencil"></i></button>
|
|
41
|
+
<button class="btn btn-sm btn-link" data-action="delete" title="[[topic:delete]]"><i class="fa fa-trash"></i></button>
|
|
42
|
+
<button class="btn btn-sm btn-link" data-action="restore" title="[[topic:restore]]"><i class="fa fa-repeat"></i></button>
|
|
43
|
+
{{{ end }}}
|
|
44
|
+
{{{ if (isAdminOrGlobalMod || isOwner )}}}
|
|
45
|
+
<button class="btn btn-sm btn-link" data-action="pin" title="[[modules:chat.pin-message]]"><i class="fa fa-thumbtack"></i></button>
|
|
46
|
+
<button class="btn btn-sm btn-link" data-action="unpin" title="[[modules:chat.unpin-message]]"><i class="fa fa-thumbtack fa-rotate-90"></i></button>
|
|
43
47
|
{{{ end }}}
|
|
44
48
|
{{{ if isAdminOrGlobalMod }}}
|
|
45
49
|
<button class="btn btn-sm btn-link chat-ip-button" title="[[modules:chat.show-ip]]"><i class="fa fa-info-circle"></i></button>
|
|
@@ -41,9 +41,12 @@
|
|
|
41
41
|
</ul>
|
|
42
42
|
</div>
|
|
43
43
|
|
|
44
|
+
<!-- pinned messages -->
|
|
45
|
+
<button component="chat/pinned/messages/btn" class="btn btn-sm btn-light" title="[[modules:chat.pinned-messages]]" data-bs-toggle="tooltip" data-bs-placement="bottom">
|
|
46
|
+
<i class="fa fa-thumb-tack text-muted"></i>
|
|
47
|
+
</button>
|
|
44
48
|
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
<!-- manage/options dropdown -->
|
|
47
50
|
<div class="dropdown d-flex" data-manual-tooltip="1" title="[[modules:chat.options]]">
|
|
48
51
|
<button class="btn btn-sm btn-light" data-bs-toggle="dropdown" component="chat/controlsToggle">
|
|
49
52
|
<i class="fa fa-gear text-muted"></i>
|
|
@@ -76,6 +79,7 @@
|
|
|
76
79
|
</ul>
|
|
77
80
|
</div>
|
|
78
81
|
|
|
82
|
+
<!-- users toggle -->
|
|
79
83
|
{{{ if users.length }}}
|
|
80
84
|
<div component="chat/user/list/btn" class="btn btn-sm btn-light d-none d-lg-flex flex-nowrap gap-3 align-items-center" title="[[modules:chat.view-users-list]]" data-bs-toggle="tooltip" data-bs-placement="bottom">
|
|
81
85
|
<div class="d-flex text-nowrap">
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<div component="chat/messages/pinned/container" class="d-flex flex-column expanded-chat border-start hidden" style="min-width:340px; width: 340px;">
|
|
2
|
+
<h3 class="fs-6 p-1 mb-0 text-center text-secondary">[[modules:chat.pinned-messages]]</h3>
|
|
3
|
+
|
|
4
|
+
<div component="chat/messages/pinned/empty" class="text-center p-4 d-flex flex-column">
|
|
5
|
+
<div class="p-4"><i class="fa-solid fa-wind fs-2 text-muted"></i></div>
|
|
6
|
+
<div class="text-xs fw-semibold text-muted">[[modules:chat.no-pinned-messages]]</div>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<ul component="chat/messages/pinned" class="chat-content list-unstyled d-flex flex-column gap-1 p-1 overflow-auto">
|
|
10
|
+
{{{ each messages }}}
|
|
11
|
+
<li component="chat/message" class="chat-message mx-2 pe-2 {{{ if messages.deleted }}} deleted{{{ end }}} {{{ if messages.pinned}}} pinned{{{ end }}} border-top pt-3" data-mid="{messages.messageId}" data-uid="{messages.fromuid}" data-self="{messages.self}" data-timestamp="{messages.timestamp}" data-username="{messages.fromUser.username}" data-index="{./index}">
|
|
12
|
+
|
|
13
|
+
<div class="message-header lh-1 d-flex align-items-center gap-2 text-sm pb-2">
|
|
14
|
+
<a href="{config.relative_path}/user/{messages.fromUser.userslug}" class="text-decoration-none">{buildAvatar(messages.fromUser, "18px", true, "not-responsive")}</a>
|
|
15
|
+
<span class="chat-user fw-semibold"><a href="{config.relative_path}/user/{messages.fromUser.userslug}">{messages.fromUser.displayname}</a></span>
|
|
16
|
+
|
|
17
|
+
<span class="chat-timestamp text-muted timeago" title="{messages.timestampISO}"></span>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="message-body-wrapper hover-parent">
|
|
20
|
+
<div component="chat/message/body" class="message-body ps-0 py-0 overflow-auto text-break">
|
|
21
|
+
{messages.content}
|
|
22
|
+
</div>
|
|
23
|
+
<div component="chat/message/controls" class="position-relative">
|
|
24
|
+
<div class="d-flex border shadow-sm controls position-absolute bg-body hover-d-block end-0" style="bottom:1rem;">
|
|
25
|
+
{{{ if (isAdminOrGlobalMod || isOwner )}}}
|
|
26
|
+
<button class="btn btn-sm btn-link" data-action="pin" title="[[modules:chat.pin-message]]"><i class="fa fa-thumbtack"></i></button>
|
|
27
|
+
<button class="btn btn-sm btn-link" data-action="unpin" title="[[modules:chat.unpin-message]]"><i class="fa fa-thumbtack fa-rotate-90"></i></button>
|
|
28
|
+
{{{ end }}}
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</li>
|
|
33
|
+
{{{ end }}}
|
|
34
|
+
</ul>
|
|
35
|
+
</div>
|