nodebb-theme-persona 11.3.25 → 11.3.29
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/less/chats.less +9 -23
- package/less/mobile.less +1 -1
- package/less/topic.less +1 -0
- package/package.json +1 -1
- package/public/modules/quickreply.js +18 -2
- package/public/persona.js +1 -0
- package/templates/chat.tpl +4 -0
- package/templates/chats.tpl +2 -1
- package/templates/partials/chats/message-window.tpl +4 -1
- package/templates/partials/slideout-menu.tpl +0 -1
- package/templates/partials/topic/quickreply.tpl +6 -1
package/less/chats.less
CHANGED
|
@@ -27,27 +27,16 @@
|
|
|
27
27
|
[component="chat/nav-wrapper"] {
|
|
28
28
|
flex: 1;
|
|
29
29
|
flex-direction: column;
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
padding: 0px 15px;
|
|
32
31
|
.chats-list {
|
|
33
32
|
flex: 1;
|
|
34
33
|
overflow-y: auto;
|
|
35
34
|
margin-bottom: 0;
|
|
36
|
-
height: ~"calc(100% -
|
|
35
|
+
height: ~"calc(100% - 5em)";
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
.chat-search {
|
|
40
|
-
|
|
41
|
-
border-bottom: 1px solid @gray-dark;
|
|
42
|
-
|
|
43
|
-
input {
|
|
44
|
-
background-color: @gray-dark;
|
|
45
|
-
color: @gray-lighter;
|
|
46
|
-
border-radius: 0;
|
|
47
|
-
border: none;
|
|
48
|
-
height: ~"calc(3em - 2px)";
|
|
49
|
-
}
|
|
50
|
-
|
|
39
|
+
padding-bottom: 15px;
|
|
51
40
|
ul {
|
|
52
41
|
width: 100%;
|
|
53
42
|
}
|
|
@@ -57,7 +46,6 @@
|
|
|
57
46
|
padding: 0;
|
|
58
47
|
overflow-x: hidden;
|
|
59
48
|
overflow-y: auto;
|
|
60
|
-
border-top: 1px solid @gray-lighter;
|
|
61
49
|
|
|
62
50
|
li {
|
|
63
51
|
position: relative;
|
|
@@ -69,8 +57,7 @@
|
|
|
69
57
|
border-left: 1px solid;
|
|
70
58
|
border-right: 1px solid;
|
|
71
59
|
border-bottom: 1px solid;
|
|
72
|
-
border-color:
|
|
73
|
-
background: #fff;
|
|
60
|
+
border-color: @gray-lighter;
|
|
74
61
|
|
|
75
62
|
i {
|
|
76
63
|
position: relative;
|
|
@@ -91,7 +78,7 @@
|
|
|
91
78
|
|
|
92
79
|
[component="chat/main-wrapper"] {
|
|
93
80
|
flex: 3;
|
|
94
|
-
|
|
81
|
+
padding-bottom: 15px;
|
|
95
82
|
.alert {
|
|
96
83
|
margin: 1em;
|
|
97
84
|
}
|
|
@@ -109,9 +96,7 @@
|
|
|
109
96
|
|
|
110
97
|
[component="chat/header"] {
|
|
111
98
|
padding: @panel-heading-padding;
|
|
112
|
-
|
|
113
|
-
border-bottom: none;
|
|
114
|
-
color: @gray-lighter;
|
|
99
|
+
border-bottom: 1px solid @modal-header-border-color;
|
|
115
100
|
|
|
116
101
|
span {
|
|
117
102
|
font-weight: 500;
|
|
@@ -119,13 +104,11 @@
|
|
|
119
104
|
|
|
120
105
|
.close {
|
|
121
106
|
margin-left: 0.5em;
|
|
122
|
-
color: @gray-lighter;
|
|
123
107
|
}
|
|
124
108
|
|
|
125
109
|
.members {
|
|
126
110
|
a {
|
|
127
111
|
font-weight: 600;
|
|
128
|
-
color: @gray-lighter;
|
|
129
112
|
}
|
|
130
113
|
}
|
|
131
114
|
|
|
@@ -609,6 +592,9 @@
|
|
|
609
592
|
.chats-full, .chat-modal {
|
|
610
593
|
height: calc(100vh - var(--panel-offset));
|
|
611
594
|
}
|
|
595
|
+
[component="chat/messages"] {
|
|
596
|
+
width: calc(100vw);
|
|
597
|
+
}
|
|
612
598
|
}
|
|
613
599
|
|
|
614
600
|
[data-action="pop-out"] {
|
package/less/mobile.less
CHANGED
package/less/topic.less
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
define('persona/quickreply', [
|
|
4
|
-
'components', 'composer/autocomplete', 'api', 'alerts',
|
|
5
|
-
], function (components, autocomplete, api, alerts) {
|
|
4
|
+
'components', 'composer/autocomplete', 'api', 'alerts', 'uploadHelpers',
|
|
5
|
+
], function (components, autocomplete, api, alerts, uploadHelpers) {
|
|
6
6
|
var QuickReply = {};
|
|
7
7
|
|
|
8
8
|
QuickReply.init = function () {
|
|
@@ -27,6 +27,22 @@ define('persona/quickreply', [
|
|
|
27
27
|
// data.element.textcomplete(data.strategies, data.options);
|
|
28
28
|
// $('.textcomplete-wrapper').css('height', '100%').find('textarea').css('height', '100%');
|
|
29
29
|
|
|
30
|
+
|
|
31
|
+
uploadHelpers.init({
|
|
32
|
+
dragDropAreaEl: $('[component="topic/quickreply/container"] .quickreply-message'),
|
|
33
|
+
pasteEl: element,
|
|
34
|
+
uploadFormEl: $('[component="topic/quickreply/upload"]'),
|
|
35
|
+
inputEl: element,
|
|
36
|
+
route: '/api/post/upload',
|
|
37
|
+
callback: function (uploads) {
|
|
38
|
+
let text = element.val();
|
|
39
|
+
uploads.forEach((upload) => {
|
|
40
|
+
text = text + (text ? '\n' : '') + (upload.isImage ? '!' : '') + `[${upload.filename}](${upload.url})`;
|
|
41
|
+
});
|
|
42
|
+
element.val(text);
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
|
|
30
46
|
var ready = true;
|
|
31
47
|
components.get('topic/quickreply/button').on('click', function (e) {
|
|
32
48
|
e.preventDefault();
|
package/public/persona.js
CHANGED
package/templates/chat.tpl
CHANGED
|
@@ -21,8 +21,12 @@
|
|
|
21
21
|
<textarea component="chat/input" placeholder="[[modules:chat.placeholder]]" class="form-control chat-input mousetrap" rows="1"></textarea>
|
|
22
22
|
<button class="btn btn-primary" type="button" data-action="send"><i class="fa fa-fw fa-2x fa-paper-plane"></i></button>
|
|
23
23
|
<span component="chat/message/remaining">{maximumChatMessageLength}</span>
|
|
24
|
+
<form component="chat/upload" method="post" enctype="multipart/form-data">
|
|
25
|
+
<input type="file" name="files[]" multiple class="hidden"/>
|
|
26
|
+
</form>
|
|
24
27
|
</div>
|
|
25
28
|
</div>
|
|
29
|
+
<div class="imagedrop"><div>[[topic:composer.drag_and_drop_images]]</div></div>
|
|
26
30
|
</div>
|
|
27
31
|
</div>
|
|
28
32
|
</div>
|
package/templates/chats.tpl
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div class="chats-full">
|
|
2
2
|
<div component="chat/nav-wrapper" data-loaded="<!-- IF roomId -->1<!-- ELSE -->0<!-- END -->">
|
|
3
3
|
<div class="chat-search dropdown">
|
|
4
|
-
<input class="form-control" type="text" component="chat/search" placeholder="[[users:
|
|
4
|
+
<input class="form-control" type="text" component="chat/search" placeholder="[[users:search-user-for-chat]]" data-toggle="dropdown" />
|
|
5
5
|
<ul component="chat/search/list" class="dropdown-menu"></ul>
|
|
6
6
|
</div>
|
|
7
7
|
<ul component="chat/recent" class="chats-list" data-nextstart="{nextStart}">
|
|
@@ -13,4 +13,5 @@
|
|
|
13
13
|
<div component="chat/main-wrapper">
|
|
14
14
|
<!-- IMPORT partials/chats/message-window.tpl -->
|
|
15
15
|
</div>
|
|
16
|
+
<div class="imagedrop"><div>[[topic:composer.drag_and_drop_images]]</div></div>
|
|
16
17
|
</div>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!-- IF roomId -->
|
|
2
2
|
<div component="chat/messages" class="expanded-chat" data-roomid="{roomId}">
|
|
3
3
|
<div component="chat/header">
|
|
4
|
-
<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>
|
|
5
4
|
<button type="button" class="close" aria-label="Close" data-action="close"><span aria-hidden="true">×</span></button>
|
|
5
|
+
<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>
|
|
6
6
|
|
|
7
7
|
<!-- IMPORT partials/chats/options.tpl -->
|
|
8
8
|
<span class="members">
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
<textarea component="chat/input" placeholder="[[modules:chat.placeholder]]" class="form-control chat-input mousetrap" rows="2"></textarea>
|
|
21
21
|
<button class="btn btn-primary" type="button" data-action="send"><i class="fa fa-fw fa-2x fa-paper-plane"></i></button>
|
|
22
22
|
<span component="chat/message/remaining">{maximumChatMessageLength}</span>
|
|
23
|
+
<form component="chat/upload" method="post" enctype="multipart/form-data">
|
|
24
|
+
<input type="file" name="files[]" multiple class="hidden"/>
|
|
25
|
+
</form>
|
|
23
26
|
</div>
|
|
24
27
|
</div>
|
|
25
28
|
<!-- ELSE -->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- IF privileges.topics:reply -->
|
|
2
|
-
<div class="clearfix quick-reply">
|
|
2
|
+
<div component="topic/quickreply/container" class="clearfix quick-reply">
|
|
3
3
|
<div class="icon pull-left hidden-xs">
|
|
4
4
|
<a href="<!-- IF posts.user.userslug -->{config.relative_path}/user/{posts.user.userslug}<!-- ELSE -->#<!-- ENDIF posts.user.userslug -->">
|
|
5
5
|
{buildAvatar(loggedInUser, "46", true, "", "user/picture")}
|
|
@@ -13,8 +13,13 @@
|
|
|
13
13
|
<input type="hidden" name="_csrf" value="{config.csrf_token}" />
|
|
14
14
|
<div class="quickreply-message">
|
|
15
15
|
<textarea name="content" component="topic/quickreply/text" class="form-control" rows="5"></textarea>
|
|
16
|
+
<div class="imagedrop"><div>[[topic:composer.drag_and_drop_images]]</div></div>
|
|
16
17
|
</div>
|
|
17
18
|
<button type="submit" component="topic/quickreply/button" class="btn btn-primary pull-right">[[topic:post-quick-reply]]</button>
|
|
18
19
|
</form>
|
|
20
|
+
<form component="topic/quickreply/upload" method="post" enctype="multipart/form-data">
|
|
21
|
+
<input type="file" name="files[]" multiple class="hidden"/>
|
|
22
|
+
</form>
|
|
23
|
+
|
|
19
24
|
</div>
|
|
20
25
|
<!-- ENDIF privileges.topics:reply -->
|