nodebb-theme-harmony 1.0.0-beta.110 → 1.0.0-beta.111
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 +19 -0
- package/package.json +1 -1
- package/scss/chats.scss +13 -0
- package/templates/partials/chats/recent_room.tpl +3 -3
package/library.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const nconf = require.main.require('nconf');
|
|
3
4
|
const meta = require.main.require('./src/meta');
|
|
4
5
|
const _ = require.main.require('lodash');
|
|
5
6
|
const user = require.main.require('./src/user');
|
|
@@ -29,8 +30,26 @@ library.init = async function (params) {
|
|
|
29
30
|
middleware.canViewUsers,
|
|
30
31
|
middleware.checkAccountPermissions,
|
|
31
32
|
], controllers.renderThemeSettings);
|
|
33
|
+
|
|
34
|
+
if (nconf.get('isPrimary') && process.env.NODE_ENV === 'production') {
|
|
35
|
+
setTimeout(buildSkins, 0);
|
|
36
|
+
}
|
|
32
37
|
};
|
|
33
38
|
|
|
39
|
+
async function buildSkins() {
|
|
40
|
+
try {
|
|
41
|
+
const plugins = require.main.require('./src/plugins');
|
|
42
|
+
await plugins.prepareForBuild(['client side styles']);
|
|
43
|
+
for (const skin of meta.css.supportedSkins) {
|
|
44
|
+
// eslint-disable-next-line no-await-in-loop
|
|
45
|
+
await meta.css.buildBundle(`client-${skin}`, true);
|
|
46
|
+
}
|
|
47
|
+
require.main.require('./src/meta/minifier').killAll();
|
|
48
|
+
} catch (err) {
|
|
49
|
+
console.error(err.stack);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
34
53
|
library.addAdminNavigation = async function (header) {
|
|
35
54
|
header.plugins.push({
|
|
36
55
|
route: '/plugins/harmony',
|
package/package.json
CHANGED
package/scss/chats.scss
CHANGED
|
@@ -4,6 +4,19 @@
|
|
|
4
4
|
max-width: 100%;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
.stacked-avatars {
|
|
8
|
+
width: 32px;
|
|
9
|
+
height: 32px;
|
|
10
|
+
span:first-child {
|
|
11
|
+
top: 0;
|
|
12
|
+
left: 8px;
|
|
13
|
+
}
|
|
14
|
+
span:last-child {
|
|
15
|
+
left: 0;
|
|
16
|
+
top: 8px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
7
20
|
body.page-user-chats {
|
|
8
21
|
overflow: hidden;
|
|
9
22
|
[data-widget-area="footer"] {
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
<a class="stretched-link" href="{config.relative_path}/me/chats/{./roomId}"></a>
|
|
6
6
|
{{{ if ./users.length }}}
|
|
7
7
|
{{{ if ./groupChat}}}
|
|
8
|
-
<div class="position-relative
|
|
9
|
-
<span class="text-decoration-none position-absolute
|
|
10
|
-
<span class="text-decoration-none position-absolute
|
|
8
|
+
<div class="position-relative stacked-avatars">
|
|
9
|
+
<span class="text-decoration-none position-absolute" href="{config.relative_path}/user/{./users.1.userslug}">{buildAvatar(./users.1, "24px", true)}</span>
|
|
10
|
+
<span class="text-decoration-none position-absolute" href="{config.relative_path}/user/{./users.0.userslug}" >{buildAvatar(./users.0, "24px", true)}</span>
|
|
11
11
|
</div>
|
|
12
12
|
{{{ else }}}
|
|
13
13
|
<span href="{config.relative_path}/user/{./users.0.userslug}" class="text-decoration-none">{buildAvatar(./users.0, "32px", true)}</span>
|