From b75c5c78396c598a03aae4118528ad4750e891f7 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Tue, 1 Nov 2016 23:21:03 +0100 Subject: [PATCH] only anonymous need an user name --- Yavsc/Controllers/HomeController.cs | 3 +- Yavsc/Views/Home/Chat.cshtml | 66 ++++++++++++++++++++++++++--- 2 files changed, 61 insertions(+), 8 deletions(-) diff --git a/Yavsc/Controllers/HomeController.cs b/Yavsc/Controllers/HomeController.cs index 7563992a..1bd7e4e2 100644 --- a/Yavsc/Controllers/HomeController.cs +++ b/Yavsc/Controllers/HomeController.cs @@ -51,10 +51,11 @@ namespace Yavsc.Controllers public ActionResult Chat() { if (User.Identity.IsAuthenticated) { + ViewBag.IsAuthenticated=true; string uid = User.GetUserId(); ViewBag.Contacts = DbContext.Contacts.Where(c=>c.OwnerId == uid) ; - } + } else ViewBag.IsAuthenticated=false; return View(); } diff --git a/Yavsc/Views/Home/Chat.cshtml b/Yavsc/Views/Home/Chat.cshtml index 01e237aa..7451cc07 100644 --- a/Yavsc/Views/Home/Chat.cshtml +++ b/Yavsc/Views/Home/Chat.cshtml @@ -9,9 +9,8 @@ font-family: monospace; } .notif { - color: black; + color: grey; font-family: monospace; - font-style: italic; } .pv { color: black; @@ -33,9 +32,14 @@ } } + + + + @section scripts { @@ -46,6 +50,10 @@