diff --git a/Controllers/UsersController.cs b/Controllers/UsersController.cs index f8c3fe4..6847b78 100644 --- a/Controllers/UsersController.cs +++ b/Controllers/UsersController.cs @@ -20,7 +20,13 @@ public class UsersController : Controller { return _db.Users != null ? View(await _db.Users.Include(u => u.Accounts).ToListAsync()) : - Problem("Entity set '_db.Users' is null."); + Problem("Entity set '_db.Users' is null."); + } + public async Task Details(Guid id) + { + return _db.Users != null ? + View(await _db.Users.Include(u => u.Accounts).FirstAsync(u => u.Id == id)) : + Problem("Entity set '_db.Users' is null."); } [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] diff --git a/Views/Users/Details.cshtml b/Views/Users/Details.cshtml new file mode 100644 index 0000000..bbda543 --- /dev/null +++ b/Views/Users/Details.cshtml @@ -0,0 +1,21 @@ +@model User +@{ + ViewData["Title"] = "User details"; +} + +User @Model.DisplayName
+ +
+ +
+ +
+@foreach (var acc in Model.Accounts) +{ + +} +
diff --git a/Views/Users/Index.cshtml b/Views/Users/Index.cshtml index bb35553..8002ee5 100644 --- a/Views/Users/Index.cshtml +++ b/Views/Users/Index.cshtml @@ -30,9 +30,7 @@ @Html.DisplayFor(modelItem => item.Accounts.Count)x - Edit | - Details | - Delete + Details } diff --git a/wwwroot/css/site.css b/wwwroot/css/site.css index f8a013d..b159833 100644 --- a/wwwroot/css/site.css +++ b/wwwroot/css/site.css @@ -19,4 +19,16 @@ html { body { margin-bottom: 60px; +} +.account .protocol-icon{ + display:inline-block; + width: 32px; + height: 32px; + background-size: 32px; +} +.account.discord .protocol-icon{ + background-image: url("../imgs/discord_logo1600.png"); +} +.account.twitch .protocol-icon{ + background-image: url("../imgs/twitch.png"); } \ No newline at end of file diff --git a/wwwroot/imgs/discord_logo1600.png b/wwwroot/imgs/discord_logo1600.png new file mode 100644 index 0000000..2f99acc Binary files /dev/null and b/wwwroot/imgs/discord_logo1600.png differ diff --git a/wwwroot/imgs/twitch.png b/wwwroot/imgs/twitch.png new file mode 100644 index 0000000..35ae325 Binary files /dev/null and b/wwwroot/imgs/twitch.png differ