nodebb-theme-persona 11.3.23 → 11.3.27
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 +6 -23
- package/less/search.less +7 -0
- package/less/topic.less +1 -0
- package/package.json +1 -1
- package/public/modules/quickreply.js +18 -2
- package/public/persona.js +16 -5
- package/templates/chat.tpl +4 -0
- package/templates/chats.tpl +2 -1
- package/templates/partials/chats/message-window.tpl +4 -1
- package/templates/partials/menu.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
|
|
package/less/search.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
|
@@ -36,6 +36,7 @@ $(document).ready(function () {
|
|
|
36
36
|
offset -= 70;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
offset = Math.max(0, offset);
|
|
39
40
|
document.documentElement.style.setProperty('--panel-offset', `${offset}px`);
|
|
40
41
|
}
|
|
41
42
|
|
|
@@ -192,7 +193,7 @@ $(document).ready(function () {
|
|
|
192
193
|
return;
|
|
193
194
|
}
|
|
194
195
|
|
|
195
|
-
require(['pulling', 'storage', 'alerts'], function (Pulling, Storage, alerts) {
|
|
196
|
+
require(['pulling', 'storage', 'alerts', 'search'], function (Pulling, Storage, alerts, search) {
|
|
196
197
|
if (!Pulling) {
|
|
197
198
|
return;
|
|
198
199
|
}
|
|
@@ -354,12 +355,22 @@ $(document).ready(function () {
|
|
|
354
355
|
|
|
355
356
|
searchButton.addClass('hidden');
|
|
356
357
|
searchInputEl.removeClass('hidden').focus();
|
|
357
|
-
searchInputEl.off('blur').on('blur', function () {
|
|
358
|
-
searchInputEl.addClass('hidden');
|
|
359
|
-
searchButton.removeClass('hidden');
|
|
360
|
-
});
|
|
361
358
|
return false;
|
|
362
359
|
});
|
|
360
|
+
searchInputEl.on('blur', function () {
|
|
361
|
+
searchInputEl.addClass('hidden');
|
|
362
|
+
searchButton.removeClass('hidden');
|
|
363
|
+
});
|
|
364
|
+
search.enableQuickSearch({
|
|
365
|
+
searchElements: {
|
|
366
|
+
inputEl: searchInputEl,
|
|
367
|
+
resultEl: $('.navbar-header .navbar-search .quick-search-container'),
|
|
368
|
+
},
|
|
369
|
+
searchOptions: {
|
|
370
|
+
in: config.searchDefaultInQuick,
|
|
371
|
+
},
|
|
372
|
+
});
|
|
373
|
+
|
|
363
374
|
|
|
364
375
|
// add a checkbox in the user settings page
|
|
365
376
|
// so users can swap the sides the menus appear on
|
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 -->
|
|
@@ -13,11 +13,14 @@
|
|
|
13
13
|
{{{ if config.searchEnabled }}}
|
|
14
14
|
<div class="navbar-search visible-xs pull-right">
|
|
15
15
|
<form action="{config.relative_path}/search" method="GET">
|
|
16
|
-
<button type="button" class="btn btn-link"><i class="fa fa-
|
|
16
|
+
<button type="button" class="btn btn-link"><i class="fa fa-lg fa-fw fa-search" title="[[global:header.search]]"></i></button>
|
|
17
17
|
<input autocomplete="off" type="text" class="form-control hidden" name="term" placeholder="[[global:search]]"/>
|
|
18
18
|
<button class="btn btn-primary hidden" type="submit"></button>
|
|
19
19
|
<input type="text" class="hidden" name="in" value="{config.searchDefaultInQuick}" />
|
|
20
20
|
</form>
|
|
21
|
+
<div class="quick-search-container hidden">
|
|
22
|
+
<div class="quick-search-results-container"></div>
|
|
23
|
+
</div>
|
|
21
24
|
</div>
|
|
22
25
|
{{{ end }}}
|
|
23
26
|
|
|
@@ -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 -->
|