Compare commits

..

14 Commits

Author SHA1 Message Date
Misty (Bot)
7fb032b396 chore: incrementing version number - v1.16.1 2021-01-06 19:17:55 +00:00
Misty (Bot)
14dddbe4e0 Merge commit '171017c38c24fa06fee7333ccf955883e393dfab' into v1.16.x 2021-01-06 19:17:55 +00:00
Julian Lam
171017c38c fix: #9130, remove timestamp prefix from thumbnail names in API response 2021-01-06 12:15:32 -05:00
Barış Soner Uşaklı
8c31afae7d feat: #9173, show installed plugin versions in ./nodebb plugins 2021-01-06 11:52:19 -05:00
Misty (Bot)
afe6d84710 Latest translations and fallbacks 2021-01-06 09:09:57 +00:00
Renovate Bot
e445ae5a7a fix(deps): update dependency autoprefixer to v10.2.0 2021-01-06 04:23:40 +00:00
Julian Lam
b9ba44edd7 fix: #9166 missing relative path in topic thumbs modal and topic list 2021-01-05 13:40:36 -05:00
Renovate Bot
fd045c67c9 fix(deps): update socket.io packages to v3.0.5 2021-01-05 13:38:31 +00:00
Barış Soner Uşaklı
0d7dfeeb86 chore: increase test timeout 2021-01-04 17:09:14 -05:00
Barış Soner Uşaklı
1968bf50f1 fix: #9163, fix total connection count on ACP
sockets.sockets is a JS map in 3.x
2021-01-04 16:58:29 -05:00
Renovate Bot
87e333b44f fix(deps): update dependency nodebb-theme-persona to v10.3.16 2021-01-04 20:20:22 +00:00
Renovate Bot
4524f825d4 fix(deps): update dependency benchpressjs to v2.4.0 2021-01-04 18:52:33 +00:00
psychobunny
1bece2b79e fix(pwa): #9127 service-worker.js missing on subfolder installs 2020-12-18 10:07:38 -05:00
Misty (Bot)
67ccc21760 chore: incrementing version number - v1.16.0 2020-12-17 23:59:26 +00:00
7 changed files with 19 additions and 14 deletions

View File

@@ -2,7 +2,7 @@
"name": "nodebb",
"license": "GPL-3.0",
"description": "NodeBB Forum",
"version": "1.16.1-beta.0",
"version": "1.16.1",
"homepage": "http://www.nodebb.org",
"repository": {
"type": "git",
@@ -39,9 +39,9 @@
"ace-builds": "^1.4.9",
"archiver": "^5.0.0",
"async": "^3.2.0",
"autoprefixer": "10.1.0",
"autoprefixer": "10.2.0",
"bcryptjs": "2.4.3",
"benchpressjs": "2.3.0",
"benchpressjs": "2.4.0",
"body-parser": "^1.19.0",
"bootbox": "4.4.0",
"bootstrap": "^3.4.1",
@@ -101,7 +101,7 @@
"nodebb-plugin-spam-be-gone": "0.7.7",
"nodebb-rewards-essentials": "0.1.4",
"nodebb-theme-lavender": "5.0.17",
"nodebb-theme-persona": "10.3.15",
"nodebb-theme-persona": "10.3.17",
"nodebb-theme-slick": "1.3.7",
"nodebb-theme-vanilla": "11.3.10",
"nodebb-widget-essentials": "5.0.2",
@@ -128,9 +128,9 @@
"sharp": "0.27.0",
"sitemap": "^6.1.0",
"slideout": "1.0.1",
"socket.io": "3.0.4",
"socket.io": "3.0.5",
"socket.io-adapter-cluster": "^1.0.1",
"socket.io-client": "3.0.4",
"socket.io-client": "3.0.5",
"socket.io-redis": "6.0.1",
"sortablejs": "1.10.2",
"spdx-license-list": "^6.1.0",

View File

@@ -175,6 +175,6 @@
"already-blocked": "Cet utilisateur est déjà bloqué",
"already-unblocked": "Cet utilisateur est déjà débloqué",
"no-connection": "Il semble y avoir un problème avec votre connexion Internet",
"socket-reconnect-failed": "Unable to reach the server at this time. Click here to try again, or try again later",
"socket-reconnect-failed": "Serveur inaccessible pour le moment. Cliquez ici pour réessayer ou réessayez plus tard",
"plugin-not-whitelisted": "Impossible d'installer le plug-in – seuls les plugins mis en liste blanche dans le gestionnaire de packages NodeBB peuvent être installés via l'ACP"
}

View File

@@ -77,7 +77,7 @@ async function listPlugins() {
const active = await db.getSortedSetRange('plugins:active', 0, -1);
// Merge the two sets, defer to plugins in `installed` if already present
let combined = installed.concat(active.reduce((memo, cur) => {
const combined = installed.concat(active.reduce((memo, cur) => {
if (!installedList.includes(cur)) {
memo.push({
id: cur,
@@ -90,12 +90,12 @@ async function listPlugins() {
}, []));
// Alphabetical sort
combined = combined.sort((a, b) => (a.id > b.id ? 1 : -1));
combined.sort((a, b) => (a.id > b.id ? 1 : -1));
// Pretty output
process.stdout.write('Active plugins:\n');
combined.forEach((plugin) => {
process.stdout.write('\t* ' + plugin.id + ' (');
process.stdout.write('\t* ' + plugin.id + (plugin.version ? '@' + plugin.version : '') + ' (');
process.stdout.write(plugin.installed ? 'installed'.green : 'not installed'.red);
process.stdout.write(', ');
process.stdout.write(plugin.active ? 'enabled'.green : 'disabled'.yellow);

View File

@@ -131,10 +131,10 @@ SocketRooms.getLocalStats = function () {
topics: {},
};
if (io) {
if (io && io.sockets) {
socketData.onlineGuestCount = Sockets.getCountInRoom('online_guests');
socketData.onlineRegisteredCount = SocketRooms.getOnlineUserCount(io);
socketData.socketCount = Object.keys(io.sockets.sockets).length;
socketData.socketCount = io.sockets.sockets.size;
socketData.users.categories = Sockets.getCountInRoom('categories');
socketData.users.recent = Sockets.getCountInRoom('recent_topics');
socketData.users.unread = Sockets.getCountInRoom('unread_topics');

View File

@@ -31,12 +31,16 @@ Thumbs.get = async function (tids) {
return singular ? null : tids.map(() => []);
}
const hasTimestampPrefix = /^\d+-/;
const upload_url = nconf.get('upload_url');
const sets = tids.map(tid => `${validator.isUUID(String(tid)) ? 'draft' : 'topic'}:${tid}:thumbs`);
const thumbs = await Promise.all(sets.map(set => getThumbs(set)));
let response = thumbs.map((thumbSet, idx) => thumbSet.map(thumb => ({
id: tids[idx],
name: path.basename(thumb),
name: (() => {
const name = path.basename(thumb);
return hasTimestampPrefix.test(name) ? name.slice(14) : name;
})(),
url: thumb.startsWith('http') ? thumb : path.posix.join(upload_url, thumb),
})));

View File

@@ -5,7 +5,7 @@
{{{ each thumbs }}}
<div class="media" data-id="{./id}" data-path="{./url}">
<div class="media-left">
<img class="media-object" src="{./url}" />
<img class="media-object" src="{config.relative_path}{./url}" />
</div>
<div class="media-body">
<p>

View File

@@ -334,6 +334,7 @@ describe('Sorted Set methods', function () {
});
it('should work with big arrays (length > 100) ', async function () {
this.timeout(50000);
const keys = [];
for (let i = 0; i < 400; i++) {
/* eslint-disable no-await-in-loop */