nodebb-theme-harmony 3.2.5 → 3.2.7
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
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const os = nodebb.require('os');
|
|
3
4
|
const nconf = nodebb.require('nconf');
|
|
5
|
+
|
|
4
6
|
const meta = nodebb.require('./src/meta');
|
|
5
7
|
const _ = nodebb.require('lodash');
|
|
6
8
|
const user = nodebb.require('./src/user');
|
|
@@ -35,7 +37,8 @@ library.init = async function (params) {
|
|
|
35
37
|
middleware.checkAccountPermissions,
|
|
36
38
|
], controllers.renderThemeSettings);
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
const cpuCountOk = os.cpus().length > 2; // save resources on low-cpu deployments; don't proactively build
|
|
41
|
+
if (cpuCountOk && nconf.get('isPrimary') && process.env.NODE_ENV === 'production' && !process.env.CI) {
|
|
39
42
|
setTimeout(buildSkins, 0);
|
|
40
43
|
}
|
|
41
44
|
};
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<div component="brand/wrapper" class="d-flex align-items-center gap-3 p-2 rounded-1 align-content-stretch ">
|
|
6
6
|
{{{ if brand:logo }}}
|
|
7
7
|
<a component="brand/anchor" href="{{{ if brand:logo:url }}}{brand:logo:url}{{{ else }}}{relative_path}/{{{ end }}}" title="{{tx("global:header.brand-logo")}}">
|
|
8
|
-
<img component="brand/logo" alt="{{{ if brand:logo:alt }}}{brand:logo:alt}{{{ else }}}{{tx("global:header.brand-logo")}}{{{ end }}}" class="{brand:logo:display}" src="{brand:logo}
|
|
8
|
+
<img component="brand/logo" alt="{{{ if brand:logo:alt }}}{brand:logo:alt}{{{ else }}}{{tx("global:header.brand-logo")}}{{{ end }}}" class="{brand:logo:display}" src="{{cacheBustedUrl(brand:logo, brand:logo:updatedAt)}}" />
|
|
9
9
|
</a>
|
|
10
10
|
{{{ end }}}
|
|
11
11
|
|