mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
#2200 actually fix dupe colors, show 10 topics
This commit is contained in:
@@ -367,7 +367,7 @@ define('admin/general/dashboard', ['semver'], function(semver) {
|
|||||||
var tid = segments[i].tid;
|
var tid = segments[i].tid;
|
||||||
|
|
||||||
if ($.inArray(tid, tids) === -1) {
|
if ($.inArray(tid, tids) === -1) {
|
||||||
usedTopicColors.splice($.inArray(segments[i].color, usedTopicColors), 1);
|
usedTopicColors.splice($.inArray(segments[i].fillColor, usedTopicColors), 1);
|
||||||
graphs.topics.removeData(i);
|
graphs.topics.removeData(i);
|
||||||
} else {
|
} else {
|
||||||
graphs.topics.segments[i].value = topics[tid].value;
|
graphs.topics.segments[i].value = topics[tid].value;
|
||||||
|
|||||||
@@ -125,9 +125,12 @@ SocketMeta.rooms.getAll = function(socket, data, callback) {
|
|||||||
topTenTopics = topTenTopics.concat(scores[mostActive.pop()]);
|
topTenTopics = topTenTopics.concat(scores[mostActive.pop()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
topTenTopics = topTenTopics.slice(0,9);
|
topTenTopics = topTenTopics.slice(0, 10);
|
||||||
|
|
||||||
topics.getTopicsFields(topTenTopics, ['title'], function(err, titles) {
|
topics.getTopicsFields(topTenTopics, ['title'], function(err, titles) {
|
||||||
|
if (err) {
|
||||||
|
return callback(err);
|
||||||
|
}
|
||||||
topTenTopics.forEach(function(tid, id) {
|
topTenTopics.forEach(function(tid, id) {
|
||||||
socketData.topics[tid] = {
|
socketData.topics[tid] = {
|
||||||
value: rooms['/topic_' + tid].length,
|
value: rooms['/topic_' + tid].length,
|
||||||
|
|||||||
Reference in New Issue
Block a user