Beispiel #1
0
        public IActionResult Index()
        {
            var model = new OverviewViewModel
            {
                BotIsRunning = _bot.IsRunning(),
                LogBuffer    = _logger.GetLatest(10)
            };

            var botAccount = _bot.GetActiveBotAccount();

            if (botAccount != null)
            {
                model.ActiveAccount = new BotAccountViewModel
                {
                    AvatarUrl = botAccount.AvatarUrl,
                    Name      = botAccount.Name
                };
            }

            return(View(model));
        }