mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 09:36:16 +01:00
refactor: remove general menu from ACP (#8347)
* refactor: remove general menu from ACP * fix: incorrect translation keys, fixed tests
This commit is contained in:
@@ -24,7 +24,7 @@ dashboardController.get = async function (req, res) {
|
||||
]);
|
||||
const version = nconf.get('version');
|
||||
|
||||
res.render('admin/general/dashboard', {
|
||||
res.render('admin/dashboard', {
|
||||
version: version,
|
||||
lookupFailed: latestVersion === null,
|
||||
latestVersion: latestVersion,
|
||||
@@ -41,14 +41,14 @@ async function getNotices() {
|
||||
const notices = [
|
||||
{
|
||||
done: !meta.reloadRequired,
|
||||
doneText: '[[admin/general/dashboard:restart-not-required]]',
|
||||
notDoneText: '[[admin/general/dashboard:restart-required]]',
|
||||
doneText: '[[admin/dashboard:restart-not-required]]',
|
||||
notDoneText: '[[admin/dashboard:restart-required]]',
|
||||
},
|
||||
{
|
||||
done: plugins.hasListeners('filter:search.query'),
|
||||
doneText: '[[admin/general/dashboard:search-plugin-installed]]',
|
||||
notDoneText: '[[admin/general/dashboard:search-plugin-not-installed]]',
|
||||
tooltip: '[[admin/general/dashboard:search-plugin-tooltip]]',
|
||||
doneText: '[[admin/dashboard:search-plugin-installed]]',
|
||||
notDoneText: '[[admin/dashboard:search-plugin-not-installed]]',
|
||||
tooltip: '[[admin/dashboard:search-plugin-tooltip]]',
|
||||
link: '/admin/extend/plugins',
|
||||
},
|
||||
];
|
||||
@@ -56,7 +56,7 @@ async function getNotices() {
|
||||
if (global.env !== 'production') {
|
||||
notices.push({
|
||||
done: false,
|
||||
notDoneText: '[[admin/general/dashboard:running-in-development]]',
|
||||
notDoneText: '[[admin/dashboard:running-in-development]]',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -120,10 +120,10 @@ async function getStats() {
|
||||
getStatsForSet('posts:pid', 'postCount'),
|
||||
getStatsForSet('topics:tid', 'topicCount'),
|
||||
]);
|
||||
results[0].name = '[[admin/general/dashboard:unique-visitors]]';
|
||||
results[1].name = '[[admin/general/dashboard:new-users]]';
|
||||
results[2].name = '[[admin/general/dashboard:posts]]';
|
||||
results[3].name = '[[admin/general/dashboard:topics]]';
|
||||
results[0].name = '[[admin/dashboard:unique-visitors]]';
|
||||
results[1].name = '[[admin/dashboard:new-users]]';
|
||||
results[2].name = '[[admin/dashboard:posts]]';
|
||||
results[3].name = '[[admin/dashboard:topics]]';
|
||||
cache.set('admin:stats', results, 600000);
|
||||
return results;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user