From 97e242b6634b34432cff99d152c3e432d4827226 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Fri, 27 Sep 2019 03:22:51 +0100 Subject: [PATCH] avatar component is removed --- .../ViewComponents/AvatarViewComponent.cs | 30 ------------------- src/Yavsc/Views/Manage/Index.cshtml | 3 +- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 src/Yavsc/ViewComponents/AvatarViewComponent.cs diff --git a/src/Yavsc/ViewComponents/AvatarViewComponent.cs b/src/Yavsc/ViewComponents/AvatarViewComponent.cs deleted file mode 100644 index 42bd193a..00000000 --- a/src/Yavsc/ViewComponents/AvatarViewComponent.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Linq; -using Microsoft.AspNet.Mvc; -using Yavsc.Helpers; -using Yavsc.Models; -using Yavsc.ViewModels.Account; - -namespace Yavsc.ViewComponents -{ - public class AvatarViewComponent : ViewComponent - { - ApplicationDbContext dbContext; - public AvatarViewComponent(ApplicationDbContext dbContext) - { - this.dbContext = dbContext; - } - - public IViewComponentResult Invoke ( string userId, string imgFmt ) - { - var user = dbContext.Users.Single(u=>u.Id == userId); - - return View ( "Default", new ShortUserInfo - { - Avatar = dbContext.AvatarUri(userId, imgFmt), - UserName = user.UserName, - UserId = userId - } ); - } - - } -} \ No newline at end of file diff --git a/src/Yavsc/Views/Manage/Index.cshtml b/src/Yavsc/Views/Manage/Index.cshtml index 967e2c42..adc8a353 100755 --- a/src/Yavsc/Views/Manage/Index.cshtml +++ b/src/Yavsc/Views/Manage/Index.cshtml @@ -79,8 +79,7 @@
@SR["Avatar"]:
- - @Component.Invoke("Avatar", User.GetUserId(), ".s") + [@SR["Modify"]]