nodebb-plugin-composer-default 10.0.36 → 10.0.38
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
|
@@ -120,17 +120,12 @@ plugin.filterComposerBuild = async function (hookData) {
|
|
|
120
120
|
const { res } = hookData;
|
|
121
121
|
|
|
122
122
|
if (req.query.p) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
try {
|
|
126
|
-
a = url.parse(req.query.p, true, true);
|
|
127
|
-
} catch (e) {
|
|
128
|
-
return helpers.redirect(res, '/');
|
|
129
|
-
}
|
|
123
|
+
try {
|
|
124
|
+
const a = url.parse(req.query.p, true, true);
|
|
130
125
|
return helpers.redirect(res, `/${(a.path || '').replace(/^\/*/, '')}`);
|
|
126
|
+
} catch (e) {
|
|
127
|
+
return helpers.redirect(res, '/');
|
|
131
128
|
}
|
|
132
|
-
res.render('', {});
|
|
133
|
-
return;
|
|
134
129
|
} else if (!req.query.pid && !req.query.tid && !req.query.cid) {
|
|
135
130
|
return helpers.redirect(res, '/');
|
|
136
131
|
}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ define('composer/resize', ['taskbar'], function (taskbar) {
|
|
|
6
6
|
var oldRatio = 0;
|
|
7
7
|
var minimumRatio = 0.3;
|
|
8
8
|
var snapMargin = 0.05;
|
|
9
|
-
var
|
|
9
|
+
var smallMin = 768;
|
|
10
10
|
|
|
11
11
|
var $body = $('body');
|
|
12
12
|
var $window = $(window);
|
|
@@ -59,7 +59,7 @@ define('composer/resize', ['taskbar'], function (taskbar) {
|
|
|
59
59
|
var minHeight = parseInt(style.getPropertyValue('min-height'), 10);
|
|
60
60
|
var adjustedMinimum = Math.max(minHeight / window.innerHeight, minimumRatio);
|
|
61
61
|
|
|
62
|
-
if (bounds.width >=
|
|
62
|
+
if (bounds.width >= smallMin) {
|
|
63
63
|
const boundedDifference = (bounds.height - bounds.boundedHeight) / bounds.height;
|
|
64
64
|
ratio = Math.min(Math.max(ratio, adjustedMinimum + boundedDifference), 1);
|
|
65
65
|
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
@include media-breakpoint-up(
|
|
315
|
+
@include media-breakpoint-up(sm) {
|
|
316
316
|
html.composing {
|
|
317
317
|
.composer {
|
|
318
318
|
left: 15%;
|
|
@@ -321,7 +321,7 @@
|
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
-
@include media-breakpoint-down(
|
|
324
|
+
@include media-breakpoint-down(sm) {
|
|
325
325
|
html.composing {
|
|
326
326
|
.composer {
|
|
327
327
|
height: 100%;
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
-
@include media-breakpoint-up(
|
|
351
|
+
@include media-breakpoint-up(sm) {
|
|
352
352
|
@import './medium';
|
|
353
353
|
}
|
|
354
354
|
|
package/static/scss/medium.scss
CHANGED
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
</ul>
|
|
36
36
|
<div class="d-flex align-items-center gap-1">
|
|
37
37
|
<div class="draft-icon m-2 hidden-xs hidden-sm"></div>
|
|
38
|
-
<button class="btn btn-sm btn-link py-2 text-body fw-semibold" data-action="preview">
|
|
38
|
+
<button class="btn btn-sm btn-link py-2 text-body fw-semibold text-nowrap" 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>
|
|
41
41
|
<span class="d-none d-md-inline hide-text">[[modules:composer.hide_preview]]</span>
|
|
42
42
|
</button>
|
|
43
|
-
<button class="btn btn-sm btn-link py-2 text-body fw-semibold" data-action="help">
|
|
43
|
+
<button class="btn btn-sm btn-link py-2 text-body fw-semibold text-nowrap" data-action="help">
|
|
44
44
|
<i class="fa fa-question"></i>
|
|
45
45
|
<span class="d-none d-md-inline">[[modules:composer.help]]</span>
|
|
46
46
|
</button>
|