nodebb-plugin-composer-default 10.0.30 → 10.0.31

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-composer-default",
3
- "version": "10.0.30",
3
+ "version": "10.0.31",
4
4
  "description": "Default composer for NodeBB",
5
5
  "main": "library.js",
6
6
  "repository": {
@@ -74,8 +74,11 @@ define('composer/preview', ['hooks'], function (hooks) {
74
74
  previewContainer.classList.toggle('hide', !show);
75
75
  writeContainer.classList.toggle('w-50', show);
76
76
  writeContainer.classList.toggle('w-100', !show);
77
-
78
- localStorage[show ? 'removeItem' : 'setItem']('composer:previewToggled', true);
77
+ if (show) {
78
+ localStorage.setItem('composer:previewToggled', true);
79
+ } else {
80
+ localStorage.removeItem('composer:previewToggled');
81
+ }
79
82
  }
80
83
  showText.classList.toggle('hide', show);
81
84
  hideText.classList.toggle('hide', !show);
@@ -271,7 +271,7 @@ define('composer', [
271
271
  toPid: data.toPid,
272
272
  title: data.title,
273
273
  body: translated,
274
- modified: !!((data.title && data.title.length) || (translated && translated.length)),
274
+ modified: !!(translated && translated.length),
275
275
  isMain: false,
276
276
  });
277
277
  });
@@ -33,8 +33,8 @@
33
33
  <input type="file" id="files" name="files[]" multiple class="gte-ie9 hide"/>
34
34
  </form>
35
35
  </ul>
36
- <div class="d-flex gap-1">
37
- <div class="draft-icon mx-2 hidden-xs hidden-sm"></div>
36
+ <div class="d-flex align-items-center gap-1">
37
+ <div class="draft-icon m-2 hidden-xs hidden-sm"></div>
38
38
  <button class="btn btn-sm btn-link py-2 text-body fw-semibold" data-action="preview">
39
39
  <i class="fa fa-eye"></i>
40
40
  <span class="d-none d-md-inline show-text">[[modules:composer.show_preview]]</span>