1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

add page list to manager so we can inject pages into the layout view

This commit is contained in:
RaidMax
2018-08-03 17:10:20 -05:00
parent c44ff8e46a
commit 7956a8cfba
9 changed files with 80 additions and 5 deletions

View File

@ -13,6 +13,8 @@ using SharedLibraryCore.Services;
using IW4MAdmin.Plugins.Stats.Config;
using IW4MAdmin.Plugins.Stats.Helpers;
using IW4MAdmin.Plugins.Stats.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Routing;
namespace IW4MAdmin.Plugins.Stats
{
@ -104,6 +106,14 @@ namespace IW4MAdmin.Plugins.Stats
await Config.Save();
}
// register the topstats page
// todo:generate the URL/Location instead of hardcoding
manager.GetPageList()
.Pages.Add(
Utilities.CurrentLocalization.LocalizationIndex["PLUGINS_STATS_COMMANDS_TOP_TEXT"],
"/Stats/TopPlayersAsync");
// meta data info
async Task<List<ProfileMeta>> getStats(int clientId)
{