nodebb-theme-persona 11.3.33 → 11.3.37

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 CHANGED
@@ -245,6 +245,7 @@
245
245
  .teaser-timestamp {
246
246
  font-size: 10px;
247
247
  margin-top: 10px;
248
+ margin-right: 10px;
248
249
  }
249
250
 
250
251
  a {
package/less/header.less CHANGED
@@ -31,6 +31,11 @@
31
31
  display: block;
32
32
  min-height: 32px;
33
33
  }
34
+ .relTime {
35
+ font-size: 10px;
36
+ margin-top: 10px;
37
+ margin-right: 10px;
38
+ }
34
39
  }
35
40
 
36
41
  .mark-read {
package/less/mobile.less CHANGED
@@ -179,10 +179,16 @@
179
179
  white-space: nowrap;
180
180
  text-overflow: ellipsis;
181
181
  }
182
+ .teaser-timestamp {
183
+ margin-right: 10px;
184
+ }
182
185
  }
183
186
  }
184
187
 
185
188
  .menu-section {
189
+ .notification-list-mobile li .text {
190
+ display: block;
191
+ }
186
192
  .chat-list, .notification-list-mobile {
187
193
  .user-link {
188
194
  display: inline;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-theme-persona",
3
- "version": "11.3.33",
3
+ "version": "11.3.37",
4
4
  "nbbpm": {
5
5
  "compatibility": "^1.18.0"
6
6
  },
package/public/persona.js CHANGED
@@ -45,42 +45,49 @@ $(document).ready(function () {
45
45
  if (!$.fn.autoHidingNavbar) {
46
46
  return;
47
47
  }
48
- var env = utils.findBootstrapEnvironment();
49
- // if env didn't change don't destroy and recreate
50
- if (env === lastBSEnv) {
51
- return;
52
- }
53
- lastBSEnv = env;
54
- var navbarEl = $('.navbar-fixed-top');
55
- navbarEl.autoHidingNavbar('destroy').removeData('plugin_autoHidingNavbar');
56
- navbarEl.css('top', '');
57
-
58
- if (env === 'xs' || env === 'sm') {
59
- navbarEl.autoHidingNavbar({
60
- showOnBottom: false,
61
- });
62
- }
63
48
 
64
- function fixTopCss(topValue) {
65
- if (ajaxify.data.template.topic) {
66
- $('.topic .topic-header').css({ top: topValue });
67
- } else {
68
- var topicListHeader = $('.topic-list-header');
69
- if (topicListHeader.length) {
70
- topicListHeader.css({ top: topValue });
71
- }
49
+ require(['hooks'], (hooks) => {
50
+ var env = utils.findBootstrapEnvironment();
51
+ // if env didn't change don't destroy and recreate
52
+ if (env === lastBSEnv) {
53
+ return;
72
54
  }
73
- }
55
+ lastBSEnv = env;
56
+ var navbarEl = $('.navbar-fixed-top');
57
+ navbarEl.autoHidingNavbar('destroy').removeData('plugin_autoHidingNavbar');
58
+ navbarEl.css('top', '');
59
+
60
+ hooks.fire('filter:persona.configureNavbarHiding', {
61
+ resizeEnvs: ['xs', 'sm'],
62
+ }).then(({ resizeEnvs }) => {
63
+ if (resizeEnvs.includes(env)) {
64
+ navbarEl.autoHidingNavbar({
65
+ showOnBottom: false,
66
+ });
67
+ }
74
68
 
75
- navbarEl.off('show.autoHidingNavbar')
76
- .on('show.autoHidingNavbar', function () {
77
- fixTopCss('');
78
- });
69
+ function fixTopCss(topValue) {
70
+ if (ajaxify.data.template.topic) {
71
+ $('.topic .topic-header').css({ top: topValue });
72
+ } else {
73
+ var topicListHeader = $('.topic-list-header');
74
+ if (topicListHeader.length) {
75
+ topicListHeader.css({ top: topValue });
76
+ }
77
+ }
78
+ }
79
79
 
80
- navbarEl.off('hide.autoHidingNavbar')
81
- .on('hide.autoHidingNavbar', function () {
82
- fixTopCss('0px');
80
+ navbarEl.off('show.autoHidingNavbar')
81
+ .on('show.autoHidingNavbar', function () {
82
+ fixTopCss('');
83
+ });
84
+
85
+ navbarEl.off('hide.autoHidingNavbar')
86
+ .on('hide.autoHidingNavbar', function () {
87
+ fixTopCss('0px');
88
+ });
83
89
  });
90
+ });
84
91
  }
85
92
 
86
93
  function setupNProgress() {
@@ -283,15 +290,6 @@ $(document).ready(function () {
283
290
  });
284
291
 
285
292
  if (chatMenuVisible) {
286
- chatsSlideout.on('opened', function loadNotifications() {
287
- require(['notifications'], function (notifications) {
288
- const notifList = $('#chats-menu [data-section="notifications"] ul');
289
- notifications.loadNotifications(notifList, function () {
290
- notifList.find('.deco-none').removeClass('deco-none');
291
- });
292
- });
293
- });
294
-
295
293
  navSlideout.on('beforeopen', function () {
296
294
  chatsSlideout.close();
297
295
  chatsSlideout.disable();
@@ -314,11 +312,15 @@ $(document).ready(function () {
314
312
  }
315
313
  });
316
314
 
317
- // right slideout chats menu
315
+ // right slideout notifications & chats menu
318
316
 
319
- function loadChats() {
320
- require(['chat'], function (chat) {
321
- chat.loadChatsDropdown($('#chats-menu .chat-list'));
317
+ function loadNotificationsAndChats() {
318
+ require(['notifications', 'chat'], function (notifications, chat) {
319
+ const notifList = $('#chats-menu [data-section="notifications"] ul');
320
+ notifications.loadNotifications(notifList, function () {
321
+ notifList.find('.deco-none').removeClass('deco-none');
322
+ chat.loadChatsDropdown($('#chats-menu .chat-list'));
323
+ });
322
324
  });
323
325
  }
324
326
 
@@ -332,7 +334,7 @@ $(document).ready(function () {
332
334
  });
333
335
 
334
336
  chatsSlideout
335
- .on('opened', loadChats)
337
+ .on('opened', loadNotificationsAndChats)
336
338
  .on('beforeopen', function () {
337
339
  navSlideout.close().disable();
338
340
  })
@@ -12,7 +12,7 @@
12
12
  <input type="hidden" name="tid" value="{tid}" />
13
13
  <input type="hidden" name="_csrf" value="{config.csrf_token}" />
14
14
  <div class="quickreply-message">
15
- <textarea name="content" component="topic/quickreply/text" class="form-control" rows="5"></textarea>
15
+ <textarea name="content" component="topic/quickreply/text" class="form-control" rows="5" placeholder="[[modules:composer.textarea.placeholder]]"></textarea>
16
16
  <div class="imagedrop"><div>[[topic:composer.drag_and_drop_images]]</div></div>
17
17
  </div>
18
18
  <button type="submit" component="topic/quickreply/button" class="btn btn-primary pull-right">[[topic:post-quick-reply]]</button>
@@ -36,7 +36,11 @@
36
36
  {{{ if !feeds:disableRSS }}}
37
37
  {{{ if rssFeedUrl }}}<a class="hidden-xs" target="_blank" href="{rssFeedUrl}"><i class="fa fa-rss-square"></i></a>{{{ end }}}
38
38
  {{{ end }}}
39
+ {{{ if browsingUsers }}}
40
+ <div class="inline-block hidden-xs">
39
41
  <!-- IMPORT partials/topic/browsing-users.tpl -->
42
+ </div>
43
+ {{{ end }}}
40
44
 
41
45
  <!-- IMPORT partials/post_bar.tpl -->
42
46
  </div>
@@ -71,6 +75,13 @@
71
75
  {{{end}}}
72
76
  </ul>
73
77
 
78
+ {{{ if browsingUsers }}}
79
+ <div class="visible-xs">
80
+ <!-- IMPORT partials/topic/browsing-users.tpl -->
81
+ <hr/>
82
+ </div>
83
+ {{{ end }}}
84
+
74
85
  <!-- IF config.enableQuickReply -->
75
86
  <!-- IMPORT partials/topic/quickreply.tpl -->
76
87
  <!-- ENDIF config.enableQuickReply -->
@@ -1,13 +0,0 @@
1
- <div component="topic/browsing-users" class="inline-block hidden-xs">
2
- {{{each browsingUsers}}}
3
- <div class="pull-left" data-uid="{browsingUsers.uid}">
4
- <a href="<!-- IF browsingUsers.userslug -->{config.relative_path}/user/{browsingUsers.userslug}<!-- ELSE -->#<!-- ENDIF browsingUsers.userslug -->">
5
- <!-- IF browsingUsers.picture -->
6
- <img class="avatar avatar-sm avatar-rounded" component="user/picture" src="{browsingUsers.picture}" align="left" itemprop="image" title="{browsingUsers.username}"/>
7
- <!-- ELSE -->
8
- <div class="avatar avatar-sm avatar-rounded" component="user/picture" title="{browsingUsers.username}" style="background-color: {browsingUsers.icon:bgColor};">{browsingUsers.icon:text}</div>
9
- <!-- ENDIF browsingUsers.picture -->
10
- </a>
11
- </div>
12
- {{{end}}}
13
- </div>