nodebb-plugin-composer-default 10.1.9 → 10.2.0
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/controllers.js
CHANGED
package/library.js
CHANGED
|
@@ -23,11 +23,11 @@ const plugin = module.exports;
|
|
|
23
23
|
plugin.socketMethods = socketMethods;
|
|
24
24
|
|
|
25
25
|
plugin.init = async function (data) {
|
|
26
|
+
const { router } = data;
|
|
27
|
+
const routeHelpers = require.main.require('./src/routes/helpers');
|
|
26
28
|
const controllers = require('./controllers');
|
|
27
29
|
SocketPlugins.composer = socketMethods;
|
|
28
|
-
|
|
29
|
-
data.router.get('/admin/plugins/composer-default', data.middleware.admin.buildHeader, controllers.renderAdminPage);
|
|
30
|
-
data.router.get('/api/admin/plugins/composer-default', controllers.renderAdminPage);
|
|
30
|
+
routeHelpers.setupAdminPageRoute(router, '/admin/plugins/composer-default', controllers.renderAdminPage);
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
plugin.appendConfig = async function (config) {
|
package/package.json
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
<div class="col-sm-2 col-12 settings-header">General</div>
|
|
4
|
-
<div class="col-sm-10 col-12">
|
|
5
|
-
<div class="form-check form-switch">
|
|
6
|
-
<input id="composeRouteEnabled" class="form-check-input" type="checkbox" name="composeRouteEnabled" />
|
|
7
|
-
<label for="composeRouteEnabled" class="form-check-label">Use a separate route for the composer</label>
|
|
8
|
-
</div>
|
|
1
|
+
<div class="acp-page-container">
|
|
2
|
+
<!-- IMPORT admin/partials/settings/header.tpl -->
|
|
9
3
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
<div class="row m-0">
|
|
5
|
+
<div id="spy-container" class="col-12 col-md-8 px-0 mb-4" tabindex="0">
|
|
6
|
+
<form role="form" class="composer-default-settings mb-4">
|
|
7
|
+
<div class="form-check form-switch">
|
|
8
|
+
<input id="composeRouteEnabled" class="form-check-input" type="checkbox" name="composeRouteEnabled" />
|
|
9
|
+
<label for="composeRouteEnabled" class="form-check-label">Use a separate route for the composer</label>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div class="form-check form-switch">
|
|
13
|
+
<input type="checkbox" class="form-check-input" id="hidePreviewOnOpen" name="hidePreviewOnOpen" />
|
|
14
|
+
<label for="hidePreviewOnOpen" class="form-check-label">Hide preview on open</label>
|
|
15
|
+
</div>
|
|
16
|
+
</form>
|
|
14
17
|
</div>
|
|
18
|
+
|
|
19
|
+
<!-- IMPORT admin/partials/settings/toc.tpl -->
|
|
15
20
|
</div>
|
|
16
|
-
</
|
|
21
|
+
</div>
|
|
17
22
|
|
|
18
|
-
<!-- IMPORT admin/partials/save_button.tpl -->
|