nodebb-plugin-composer-default 10.0.42 → 10.0.43

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/library.js CHANGED
@@ -96,6 +96,7 @@ plugin.getFormattingOptions = async function () {
96
96
  name: 'thumbs',
97
97
  title: '[[topic:composer.thumb_title]]',
98
98
  className: 'fa fa-address-card-o',
99
+ badge: true,
99
100
  visibility: {
100
101
  ...defaultVisibility,
101
102
  reply: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-composer-default",
3
- "version": "10.0.42",
3
+ "version": "10.0.43",
4
4
  "description": "Default composer for NodeBB",
5
5
  "main": "library.js",
6
6
  "repository": {
@@ -867,7 +867,9 @@ define('composer', [
867
867
 
868
868
  if (thumbs.length) {
869
869
  const formatEl = postContainer.find('[data-format="thumbs"]');
870
- formatEl.attr('data-count', thumbs.length);
870
+ formatEl.find('.badge')
871
+ .text(thumbs.length)
872
+ .toggleClass('hidden', !thumbs.length);
871
873
  }
872
874
  });
873
875
  }
@@ -77,23 +77,6 @@
77
77
  color: $gray-200;
78
78
  }
79
79
  }
80
-
81
- .formatting-group {
82
- li {
83
- &[data-format="thumbs"][data-count]:after {
84
- content: attr(data-count);
85
- background: $info;
86
- color: $white;
87
- font-weight: 600;
88
- position: absolute;
89
- top: 5px;
90
- left: 2.5em;
91
- padding: 0px 5px;
92
- border-radius: 5px;
93
- font-size: 0.75em;
94
- }
95
- }
96
- }
97
80
  }
98
81
 
99
82
  .tags-container {
@@ -6,8 +6,11 @@
6
6
  {{{ else }}}
7
7
  {{{ if (./visibility.desktop && ((isTopicOrMain && ./visibility.main) || (!isTopicOrMain && ./visibility.reply))) }}}
8
8
  <li class="small">
9
- <a href="#" class="btn btn-sm btn-link text-reset" tabindex="-1" data-format="{./name}" title="{./title}">
9
+ <a href="#" class="btn btn-sm btn-link text-reset position-relative" tabindex="-1" data-format="{./name}" title="{./title}">
10
10
  <i class="{./className}"></i>
11
+ {{{ if ./badge }}}
12
+ <span class="px-1 position-absolute top-0 start-100 translate-middle-x badge rounded text-bg-info"></span>
13
+ {{{ end }}}
11
14
  </a>
12
15
  </li>
13
16
  {{{ end }}}