notherbase-fs 1.0.32 → 1.0.36
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/main.js +12 -1
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -4,6 +4,15 @@ let router;
|
|
|
4
4
|
let dir;
|
|
5
5
|
|
|
6
6
|
let explore = function explore(route, options) {
|
|
7
|
+
options = {
|
|
8
|
+
styles: [],
|
|
9
|
+
externalStyles: [],
|
|
10
|
+
scripts: [],
|
|
11
|
+
needsKey: "",
|
|
12
|
+
dropOff: "",
|
|
13
|
+
...options
|
|
14
|
+
};
|
|
15
|
+
|
|
7
16
|
options.styles = options.styles.map(style => {
|
|
8
17
|
style = `${dir}/styles/${style}`;
|
|
9
18
|
return style;
|
|
@@ -29,12 +38,13 @@ let explore = function explore(route, options) {
|
|
|
29
38
|
if (foundInventory.items[i].item.name === options.needsKey) hasKey = true;
|
|
30
39
|
}
|
|
31
40
|
|
|
32
|
-
if (!hasKey) res.redirect(dropOff);
|
|
41
|
+
if (!hasKey) res.redirect(options.dropOff);
|
|
33
42
|
else res.render(`explorer`,
|
|
34
43
|
{
|
|
35
44
|
siteTitle: "NotherBase",
|
|
36
45
|
user: req.session.currentUserFull,
|
|
37
46
|
styles: options.styles,
|
|
47
|
+
externalStyles: options.externalStyles,
|
|
38
48
|
main: options.main,
|
|
39
49
|
scripts: options.scripts,
|
|
40
50
|
pov: req.query.pov,
|
|
@@ -47,6 +57,7 @@ let explore = function explore(route, options) {
|
|
|
47
57
|
siteTitle: "NotherBase",
|
|
48
58
|
user: req.session.currentUserFull,
|
|
49
59
|
styles: options.styles,
|
|
60
|
+
externalStyles: options.externalStyles,
|
|
50
61
|
main: options.main,
|
|
51
62
|
scripts: options.scripts,
|
|
52
63
|
pov: req.query.pov,
|