@page "{user}" @using RTMPDash.DataModels @model ProfileModel @{ ViewData["Title"] = "View"; var db = new AppDb.DbConn(); if (!db.Users.Any(p => p.Username == Model.User)) { Response.Redirect("/"); return; } var user = db.Users.First(p => p.Username == Model.User); var live = StreamUtils.IsLive(user.Username); var pronounAdditional = user.PronounSubject == "they" ? "are" : "is"; // TODO make this configurable too }

Welcome to @Model.User's page!

@if (live) { @if (!string.IsNullOrWhiteSpace(user.ChatUrl)) {

@user.PronounSubject.FirstCharToUpper() @pronounAdditional currently live! @user.PronounPossessive.FirstCharToUpper() stream chat is located here.

} else {

@user.PronounSubject.FirstCharToUpper() @pronounAdditional currently live! @user.PronounSubject.FirstCharToUpper() have not specified a stream chat URL, so enjoy @user.PronounPossessive content!

}
Source @if (user.AllowRestream) { if ((user.RestreamUrls ?? "").Contains(",")) { Twitch Restream YouTube Restream } else if (!string.IsNullOrWhiteSpace(user.RestreamUrls)) { Twitch Restream } }
} else { if (!string.IsNullOrWhiteSpace(user.AnnouncementUrl)) {

@user.PronounSubject.FirstCharToUpper() @pronounAdditional not currently live. @user.PronounSubject.FirstCharToUpper() have indicated that @user.PronounSubject will announce their streams here.

} else {

@user.PronounSubject.FirstCharToUpper() @pronounAdditional not currently live. @user.PronounSubject.FirstCharToUpper() have not specified an announcement URL, so check back later!

} }