@@ -59,6 +59,7 @@ namespace Teknik.IdentityServer.Controllers | |||
[HttpGet] | |||
public async Task<IActionResult> Login(string returnUrl) | |||
{ | |||
ViewBag.Title = $"Sign in"; | |||
// build a model so we know what to show on the login page | |||
var vm = await _account.BuildLoginViewModelAsync(returnUrl); | |||
@@ -142,6 +143,7 @@ namespace Teknik.IdentityServer.Controllers | |||
[HttpGet] | |||
public async Task<IActionResult> LoginWith2fa(bool rememberMe, string returnUrl = null) | |||
{ | |||
ViewBag.Title = "Two-Factor Authentication"; | |||
// Ensure the user has gone through the username & password screen first | |||
var user = await _signInManager.GetTwoFactorAuthenticationUserAsync(); | |||
@@ -193,6 +195,7 @@ namespace Teknik.IdentityServer.Controllers | |||
[HttpGet] | |||
public async Task<IActionResult> LoginWithRecoveryCode(string returnUrl = null) | |||
{ | |||
ViewBag.Title = "Two-Factor Recovery Code"; | |||
// Ensure the user has gone through the username & password screen first | |||
var user = await _signInManager.GetTwoFactorAuthenticationUserAsync(); | |||
if (user == null) | |||
@@ -242,12 +245,14 @@ namespace Teknik.IdentityServer.Controllers | |||
[HttpGet] | |||
public IActionResult Lockout() | |||
{ | |||
ViewBag.Title = "Locked Out"; | |||
return View(); | |||
} | |||
[HttpGet] | |||
public IActionResult Banned() | |||
{ | |||
ViewBag.Title = "Banned"; | |||
return View(); | |||
} | |||
@@ -257,6 +262,7 @@ namespace Teknik.IdentityServer.Controllers | |||
[HttpGet] | |||
public async Task<IActionResult> Logout(string logoutId) | |||
{ | |||
ViewBag.Title = "Logout"; | |||
// build a model so the logout page knows what to display | |||
var vm = await _account.BuildLogoutViewModelAsync(logoutId); | |||
@@ -37,6 +37,7 @@ namespace Teknik.IdentityServer.Controllers | |||
[HttpGet] | |||
public async Task<IActionResult> Index(string returnUrl) | |||
{ | |||
ViewBag.Title = "Application Consent"; | |||
var vm = await _consent.BuildViewModelAsync(returnUrl); | |||
if (vm != null) | |||
{ |
@@ -23,7 +23,7 @@ namespace Teknik.IdentityServer.Controllers | |||
_logger = logger; | |||
_config = config; | |||
ViewBag.Title = "Teknik Authentication"; | |||
ViewBag.Title = string.Empty; | |||
ViewBag.Description = "Teknik Authentication Service"; | |||
} | |||
@@ -44,7 +44,7 @@ namespace Teknik.IdentityServer.Controllers | |||
public IActionResult HttpGeneral(int statusCode) | |||
{ | |||
ViewBag.Title = statusCode + " - " + _config.Title; | |||
ViewBag.Title = statusCode; | |||
LogError(LogLevel.Error, "HTTP Error Code: " + statusCode); | |||
@@ -59,7 +59,7 @@ namespace Teknik.IdentityServer.Controllers | |||
{ | |||
Response.StatusCode = StatusCodes.Status401Unauthorized; | |||
ViewBag.Title = "401 - " + _config.Title; | |||
ViewBag.Title = "401"; | |||
ViewBag.Description = "Unauthorized"; | |||
LogError(LogLevel.Error, "Unauthorized"); | |||
@@ -75,7 +75,7 @@ namespace Teknik.IdentityServer.Controllers | |||
{ | |||
Response.StatusCode = StatusCodes.Status403Forbidden; | |||
ViewBag.Title = "403 - " + _config.Title; | |||
ViewBag.Title = "403"; | |||
ViewBag.Description = "Access Denied"; | |||
LogError(LogLevel.Error, "Access Denied"); | |||
@@ -91,7 +91,7 @@ namespace Teknik.IdentityServer.Controllers | |||
{ | |||
Response.StatusCode = StatusCodes.Status404NotFound; | |||
ViewBag.Title = "404 - " + _config.Title; | |||
ViewBag.Title = "404"; | |||
ViewBag.Description = "Uh Oh, can't find it!"; | |||
LogError(LogLevel.Warning, "Page Not Found"); | |||
@@ -117,7 +117,7 @@ namespace Teknik.IdentityServer.Controllers | |||
Response.StatusCode = StatusCodes.Status500InternalServerError; | |||
ViewBag.Title = "500 - " + _config.Title; | |||
ViewBag.Title = "500"; | |||
ViewBag.Description = "Something Borked"; | |||
LogError(LogLevel.Error, "Server Error", exception); | |||
@@ -136,7 +136,7 @@ namespace Teknik.IdentityServer.Controllers | |||
Response.StatusCode = StatusCodes.Status500InternalServerError; | |||
ViewBag.Title = "Identity Error - " + _config.Title; | |||
ViewBag.Title = "Identity Error"; | |||
ViewBag.Description = "The Identity Service threw an error"; | |||
LogError(LogLevel.Error, "Identity Error: " + message.Error); |
@@ -41,6 +41,7 @@ namespace Teknik.IdentityServer.Controllers | |||
[HttpGet] | |||
public async Task<IActionResult> Index() | |||
{ | |||
ViewBag.Title = "Granted Applications"; | |||
return View("Index", await BuildViewModelAsync()); | |||
} | |||
@@ -32,4 +32,16 @@ | |||
<ProjectReference Include="..\Logging\Logging.csproj" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<None Update="Images\favicon.ico"> | |||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |||
</None> | |||
<None Update="Images\logo-black.svg"> | |||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |||
</None> | |||
<None Update="Images\logo-blue.svg"> | |||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |||
</None> | |||
</ItemGroup> | |||
</Project> |
@@ -29,7 +29,16 @@ | |||
<meta name="wot-verification" content="e858b91d99b767ad70db" /> | |||
<!-- Main Page Title --> | |||
<title>@ViewBag.Title</title> | |||
<title> | |||
@if (string.IsNullOrEmpty(ViewBag.Title)) | |||
{ | |||
<text>@Config.Title</text> | |||
} | |||
else | |||
{ | |||
<text>@ViewBag.Title | @Config.Title</text> | |||
} | |||
</title> | |||
<!-- Favicon --> | |||
<link href="~/images/favicon.ico" rel="shortcut icon" type="image/x-icon" /> |
@@ -24,7 +24,7 @@ namespace Teknik.Areas.About.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Index([FromServices] Config config) | |||
{ | |||
ViewBag.Title = "About - " + config.Title; | |||
ViewBag.Title = "About"; | |||
ViewBag.Description = "What is Teknik?"; | |||
return View(new AboutViewModel()); |
@@ -24,7 +24,7 @@ namespace Teknik.Areas.Abuse.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ | |||
ViewBag.Title = "Abuse Reporting - " + _config.Title; | |||
ViewBag.Title = "Abuse Reporting"; | |||
ViewBag.Description = "Methods for reporting abuse reports to Teknik Services."; | |||
return View(new AbuseViewModel()); |
@@ -36,7 +36,7 @@ namespace Teknik.Areas.Blog.Controllers | |||
// The blog is the main site's blog | |||
if (string.IsNullOrEmpty(username)) | |||
{ | |||
ViewBag.Title = _config.BlogConfig.Title + " - " + _config.Title; | |||
ViewBag.Title = _config.BlogConfig.Title; | |||
ViewBag.Description = _config.BlogConfig.Description; | |||
bool isAuth = User.IsInRole("Admin"); | |||
model = new BlogViewModel(); | |||
@@ -78,10 +78,10 @@ namespace Teknik.Areas.Blog.Controllers | |||
// find the blog specified | |||
if (blog != null) | |||
{ | |||
ViewBag.Title = blog.User.Username + "'s Blog - " + _config.Title; | |||
ViewBag.Title = blog.User.Username + "'s Blog"; | |||
if (!string.IsNullOrEmpty(blog.User.BlogSettings.Title)) | |||
{ | |||
ViewBag.Title = blog.User.BlogSettings.Title + " - " + ViewBag.Title; | |||
ViewBag.Title = blog.User.BlogSettings.Title; | |||
} | |||
ViewBag.Description = blog.User.BlogSettings.Description; | |||
bool isAuth = User.IsInRole("Admin"); | |||
@@ -141,17 +141,17 @@ namespace Teknik.Areas.Blog.Controllers | |||
if (post.System) | |||
{ | |||
ViewBag.Title = model.Title + " - " + _config.BlogConfig.Title + " - " + _config.Title; | |||
ViewBag.Title = model.Title + " | " + _config.BlogConfig.Title; | |||
ViewBag.Description = _config.BlogConfig.Description; | |||
} | |||
else | |||
{ | |||
ViewBag.Title = username + "'s Blog - " + _config.Title; | |||
ViewBag.Title = username + "'s Blog"; | |||
if (!string.IsNullOrEmpty(post.Blog.User.BlogSettings.Title)) | |||
{ | |||
ViewBag.Title = post.Blog.User.BlogSettings.Title + " - " + ViewBag.Title; | |||
ViewBag.Title = post.Blog.User.BlogSettings.Title + " | " + ViewBag.Title; | |||
} | |||
ViewBag.Title = model.Title + " - " + ViewBag.Title; | |||
ViewBag.Title = model.Title + " | " + ViewBag.Title; | |||
ViewBag.Description = post.Blog.User.BlogSettings.Description; | |||
} | |||
return View("~/Areas/Blog/Views/Blog/ViewPost.cshtml", model); | |||
@@ -180,12 +180,12 @@ namespace Teknik.Areas.Blog.Controllers | |||
model = new BlogViewModel(blog); | |||
if (blog.User.Username == Constants.SERVERUSER) | |||
{ | |||
ViewBag.Title = "Create Post - " + _config.BlogConfig.Title + " - " + _config.Title; | |||
ViewBag.Title = "Create Post | " + _config.BlogConfig.Title; | |||
ViewBag.Description = _config.BlogConfig.Description; | |||
} | |||
else | |||
{ | |||
ViewBag.Title = username + "'s Blog - " + _config.Title; | |||
ViewBag.Title = username + "'s Blog | " + _config.Title; | |||
if (!string.IsNullOrEmpty(blog.User.BlogSettings.Title)) | |||
{ | |||
ViewBag.Title = blog.User.BlogSettings.Title + " - " + ViewBag.Title; | |||
@@ -223,17 +223,17 @@ namespace Teknik.Areas.Blog.Controllers | |||
if (post.System) | |||
{ | |||
ViewBag.Title = "Edit Post - " + model.Title + " - " + _config.BlogConfig.Title + " - " + _config.Title; | |||
ViewBag.Title = "Edit Post | " + model.Title + " | " + _config.BlogConfig.Title; | |||
ViewBag.Description = _config.BlogConfig.Description; | |||
} | |||
else | |||
{ | |||
ViewBag.Title = username + "'s Blog - " + _config.Title; | |||
ViewBag.Title = username + "'s Blog"; | |||
if (!string.IsNullOrEmpty(post.Blog.User.BlogSettings.Title)) | |||
{ | |||
ViewBag.Title = post.Blog.User.BlogSettings.Title + " - " + ViewBag.Title; | |||
ViewBag.Title = post.Blog.User.BlogSettings.Title + " | " + ViewBag.Title; | |||
} | |||
ViewBag.Title = "Edit Post - " + model.Title + " - " + ViewBag.Title; | |||
ViewBag.Title = "Edit Post | " + model.Title + " | " + ViewBag.Title; | |||
ViewBag.Description = post.Blog.User.BlogSettings.Description; | |||
} | |||
return View("~/Areas/Blog/Views/Blog/EditPost.cshtml", model); |
@@ -28,7 +28,7 @@ namespace Teknik.Areas.Contact.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ | |||
ViewBag.Title = "Contact - " + _config.Title; | |||
ViewBag.Title = "Contact Us"; | |||
ViewBag.Description = "Contact Teknik Support"; | |||
return View(new ContactViewModel()); |
@@ -46,7 +46,7 @@ namespace Teknik.Areas.Error.Controllers | |||
[AllowAnonymous] | |||
public IActionResult HttpGeneral(int statusCode) | |||
{ | |||
ViewBag.Title = statusCode + " - " + _config.Title; | |||
ViewBag.Title = statusCode; | |||
LogError(LogLevel.Error, "HTTP Error Code: " + statusCode); | |||
@@ -61,7 +61,7 @@ namespace Teknik.Areas.Error.Controllers | |||
{ | |||
Response.StatusCode = StatusCodes.Status401Unauthorized; | |||
ViewBag.Title = "401 - " + _config.Title; | |||
ViewBag.Title = "401"; | |||
ViewBag.Description = "Unauthorized"; | |||
LogError(LogLevel.Error, "Unauthorized"); | |||
@@ -77,7 +77,7 @@ namespace Teknik.Areas.Error.Controllers | |||
{ | |||
Response.StatusCode = StatusCodes.Status403Forbidden; | |||
ViewBag.Title = "403 - " + _config.Title; | |||
ViewBag.Title = "403"; | |||
ViewBag.Description = "Access Denied"; | |||
LogError(LogLevel.Error, "Access Denied"); | |||
@@ -93,7 +93,7 @@ namespace Teknik.Areas.Error.Controllers | |||
{ | |||
Response.StatusCode = StatusCodes.Status404NotFound; | |||
ViewBag.Title = "404 - " + _config.Title; | |||
ViewBag.Title = "404"; | |||
ViewBag.Description = "Uh Oh, can't find it!"; | |||
LogError(LogLevel.Warning, "Page Not Found"); | |||
@@ -124,7 +124,7 @@ namespace Teknik.Areas.Error.Controllers | |||
Response.StatusCode = StatusCodes.Status500InternalServerError; | |||
ViewBag.Title = "500 - " + _config.Title; | |||
ViewBag.Title = "500"; | |||
ViewBag.Description = "Something Borked"; | |||
LogError(LogLevel.Error, "Server Error", exception); |
@@ -20,7 +20,7 @@ namespace Teknik.Areas.FAQ.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ | |||
ViewBag.Title = "Frequently Asked Questions - " + _config.Title; | |||
ViewBag.Title = "Frequently Asked Questions"; | |||
FAQViewModel model = new FAQViewModel(); | |||
return View(model); | |||
} |
@@ -21,7 +21,7 @@ namespace Teknik.Areas.Help.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ | |||
ViewBag.Title = "Help - " + _config.Title; | |||
ViewBag.Title = "Help"; | |||
HelpViewModel model = new HelpViewModel(); | |||
return View(model); | |||
} | |||
@@ -32,12 +32,12 @@ namespace Teknik.Areas.Help.Controllers | |||
HelpViewModel model = new HelpViewModel(); | |||
if (string.IsNullOrEmpty(version) && string.IsNullOrEmpty(service)) | |||
{ | |||
ViewBag.Title = "API Help - " + _config.Title; | |||
ViewBag.Title = "API Help"; | |||
return View("~/Areas/Help/Views/Help/API/API.cshtml", model); | |||
} | |||
else if(!string.IsNullOrEmpty(version) && !string.IsNullOrEmpty(service)) | |||
{ | |||
ViewBag.Title = service + " API " + version + " Help - " + _config.Title; | |||
ViewBag.Title = service + " API " + version + " Help"; | |||
return View("~/Areas/Help/Views/Help/API/" + version + "/" + service + ".cshtml", model); | |||
} | |||
return new StatusCodeResult(StatusCodes.Status404NotFound); | |||
@@ -46,7 +46,7 @@ namespace Teknik.Areas.Help.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Blog() | |||
{ | |||
ViewBag.Title = "Blogging Help - " + _config.Title; | |||
ViewBag.Title = "Blogging Help"; | |||
HelpViewModel model = new HelpViewModel(); | |||
return View("~/Areas/Help/Views/Help/Blog.cshtml", model); | |||
} | |||
@@ -54,7 +54,7 @@ namespace Teknik.Areas.Help.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Git() | |||
{ | |||
ViewBag.Title = "Git Service Help - " + _config.Title; | |||
ViewBag.Title = "Git Service Help"; | |||
HelpViewModel model = new HelpViewModel(); | |||
return View("~/Areas/Help/Views/Help/Git.cshtml", model); | |||
} | |||
@@ -62,7 +62,7 @@ namespace Teknik.Areas.Help.Controllers | |||
[AllowAnonymous] | |||
public IActionResult IRC() | |||
{ | |||
ViewBag.Title = "IRC Server Help - " + _config.Title; | |||
ViewBag.Title = "IRC Server Help "; | |||
HelpViewModel model = new HelpViewModel(); | |||
return View("~/Areas/Help/Views/Help/IRC.cshtml", model); | |||
} | |||
@@ -70,7 +70,7 @@ namespace Teknik.Areas.Help.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Mail() | |||
{ | |||
ViewBag.Title = "Mail Server Help - " + _config.Title; | |||
ViewBag.Title = "Mail Server Help"; | |||
HelpViewModel model = new HelpViewModel(); | |||
return View("~/Areas/Help/Views/Help/Mail.cshtml", model); | |||
} | |||
@@ -78,7 +78,7 @@ namespace Teknik.Areas.Help.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Markdown() | |||
{ | |||
ViewBag.Title = "Markdown Help - " + _config.Title; | |||
ViewBag.Title = "Markdown Help"; | |||
HelpViewModel model = new HelpViewModel(); | |||
return View("~/Areas/Help/Views/Help/Markdown.cshtml", model); | |||
} | |||
@@ -86,7 +86,7 @@ namespace Teknik.Areas.Help.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Mumble() | |||
{ | |||
ViewBag.Title = "Mumble Server Help - " + _config.Title; | |||
ViewBag.Title = "Mumble Server Help"; | |||
HelpViewModel model = new HelpViewModel(); | |||
return View("~/Areas/Help/Views/Help/Mumble.cshtml", model); | |||
} | |||
@@ -94,7 +94,7 @@ namespace Teknik.Areas.Help.Controllers | |||
[AllowAnonymous] | |||
public IActionResult RSS() | |||
{ | |||
ViewBag.Title = "RSS Help - " + _config.Title; | |||
ViewBag.Title = "RSS Help"; | |||
HelpViewModel model = new HelpViewModel(); | |||
return View("~/Areas/Help/Views/Help/RSS.cshtml", model); | |||
} | |||
@@ -102,7 +102,7 @@ namespace Teknik.Areas.Help.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Tools() | |||
{ | |||
ViewBag.Title = "Tool Help - " + _config.Title; | |||
ViewBag.Title = "Tool Help"; | |||
HelpViewModel model = new HelpViewModel(); | |||
return View("~/Areas/Help/Views/Help/Tools.cshtml", model); | |||
} | |||
@@ -110,7 +110,7 @@ namespace Teknik.Areas.Help.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Upload() | |||
{ | |||
ViewBag.Title = "Upload Service Help - " + _config.Title; | |||
ViewBag.Title = "Upload Service Help"; | |||
HelpViewModel model = new HelpViewModel(); | |||
return View("~/Areas/Help/Views/Help/Upload.cshtml", model); | |||
} |
@@ -42,8 +42,7 @@ namespace Teknik.Areas.Home.Controllers | |||
model.SitePosts = lastSite; | |||
model.Podcasts = lastPods; | |||
ViewBag.Title = _config.Title; | |||
return View(model); | |||
} | |||
} |
@@ -33,7 +33,7 @@ namespace Teknik.Areas.Paste.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ | |||
ViewBag.Title = "Paste - " + _config.Title; | |||
ViewBag.Title = "Pastebin"; | |||
ViewBag.Description = "Paste your code or text easily and securely. Set an expiration, set a password, or leave it open for the world to see."; | |||
PasteCreateViewModel model = new PasteCreateViewModel(); | |||
return View(model); | |||
@@ -45,7 +45,7 @@ namespace Teknik.Areas.Paste.Controllers | |||
Models.Paste paste = _dbContext.Pastes.Where(p => p.Url == url).FirstOrDefault(); | |||
if (paste != null) | |||
{ | |||
ViewBag.Title = ((string.IsNullOrEmpty(paste.Title)) ? string.Empty : paste.Title + " - ") + _config.Title + " Paste"; | |||
ViewBag.Title = paste.Title + " | Pastebin"; | |||
ViewBag.Description = "Paste your code or text easily and securely. Set an expiration, set a password, or leave it open for the world to see."; | |||
// Increment Views | |||
paste.Views += 1; |
@@ -19,7 +19,7 @@ | |||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |||
<meta name="description" content="@Config.Description" /> | |||
<meta name="author" content="@Config.Author" /> | |||
<title>@ViewBag.Title</title> | |||
<title>@ViewBag.Title | @Config.Title</title> | |||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon" /> | |||
<bundle src="css/paste.view.min.css" append-version="true"></bundle> |
@@ -36,7 +36,7 @@ namespace Teknik.Areas.Podcast.Controllers | |||
model.Description = _config.PodcastConfig.Description; | |||
try | |||
{ | |||
ViewBag.Title = _config.PodcastConfig.Title + " - " + _config.Title; | |||
ViewBag.Title = _config.PodcastConfig.Title; | |||
ViewBag.Description = _config.PodcastConfig.Description; | |||
bool editor = User.IsInRole("Podcast"); | |||
var foundPodcasts = _dbContext.Podcasts.Where(p => (p.Published || editor)).FirstOrDefault(); | |||
@@ -73,7 +73,7 @@ namespace Teknik.Areas.Podcast.Controllers | |||
{ | |||
model = new PodcastViewModel(foundPodcast); | |||
ViewBag.Title = model.Title + " - Teknikast - " + _config.Title; | |||
ViewBag.Title = model.Title + " | Teknikast"; | |||
return View("~/Areas/Podcast/Views/Podcast/ViewPodcast.cshtml", model); | |||
} | |||
model.Error = true; |
@@ -20,7 +20,7 @@ namespace Teknik.Areas.Privacy.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ | |||
ViewBag.Title = "Privacy Policy - " + _config.Title; | |||
ViewBag.Title = "Privacy Policy"; | |||
ViewBag.Description = "Teknik privacy policy."; | |||
return View(new PrivacyViewModel()); |
@@ -26,7 +26,7 @@ namespace Teknik.Areas.Shortener.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ | |||
ViewBag.Title = "Url Shortener - " + _config.Title; | |||
ViewBag.Title = "Url Shortener"; | |||
ShortenViewModel model = new ShortenViewModel(); | |||
return View(model); | |||
} | |||
@@ -97,7 +97,7 @@ namespace Teknik.Areas.Shortener.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Verify() | |||
{ | |||
ViewBag.Title = "Url Shortener Verification - " + _config.Title; | |||
ViewBag.Title = "Url Shortener Verification"; | |||
return View(); | |||
} | |||
} |
@@ -26,7 +26,7 @@ namespace Teknik.Areas.Stats.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ | |||
ViewBag.Title = "System Statistics - " + _config.Title; | |||
ViewBag.Title = "System Statistics"; | |||
ViewBag.Description = "Current statistics for the services."; | |||
StatsViewModel model = new StatsViewModel(); |
@@ -20,7 +20,7 @@ namespace Teknik.Areas.TOS.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ | |||
ViewBag.Title = "Terms of Service - " + _config.Title; | |||
ViewBag.Title = "Terms of Service"; | |||
ViewBag.Description = "Teknik Terms of Service."; | |||
return View(new TOSViewModel()); |
@@ -35,7 +35,7 @@ namespace Teknik.Areas.Upload.Controllers | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ | |||
ViewBag.Title = "Teknik Upload - End to End Encryption"; | |||
ViewBag.Title = "Upload Files"; | |||
UploadViewModel model = new UploadViewModel(); | |||
model.CurrentSub = Subdomain; | |||
Users.Models.User user = UserHelper.GetUser(_dbContext, User.Identity.Name); | |||
@@ -175,7 +175,7 @@ namespace Teknik.Areas.Upload.Controllers | |||
{ | |||
if (_config.UploadConfig.DownloadEnabled) | |||
{ | |||
ViewBag.Title = "Teknik Download - " + file; | |||
ViewBag.Title = "Download " + file; | |||
string fileName = string.Empty; | |||
string url = string.Empty; | |||
string key = string.Empty; | |||
@@ -462,7 +462,7 @@ namespace Teknik.Areas.Upload.Controllers | |||
[AllowAnonymous] | |||
public IActionResult DeleteByKey(string file, string key) | |||
{ | |||
ViewBag.Title = "File Delete - " + file + " - " + _config.Title; | |||
ViewBag.Title = "File Delete | " + file ; | |||
Models.Upload upload = _dbContext.Uploads.Where(up => up.Url == file).FirstOrDefault(); | |||
if (upload != null) | |||
{ |
@@ -96,7 +96,7 @@ namespace Teknik.Areas.Users.Controllers | |||
[AllowAnonymous] | |||
public IActionResult GetPremium() | |||
{ | |||
ViewBag.Title = "Get a Premium Account - " + _config.Title; | |||
ViewBag.Title = "Get a Premium Account"; | |||
GetPremiumViewModel model = new GetPremiumViewModel(); | |||
@@ -193,7 +193,7 @@ namespace Teknik.Areas.Users.Controllers | |||
} | |||
ProfileViewModel model = new ProfileViewModel(); | |||
ViewBag.Title = "User Does Not Exist - " + _config.Title; | |||
ViewBag.Title = "User Does Not Exist"; | |||
ViewBag.Description = "The User does not exist"; | |||
try | |||
@@ -202,7 +202,7 @@ namespace Teknik.Areas.Users.Controllers | |||
if (user != null) | |||
{ | |||
ViewBag.Title = username + "'s Profile - " + _config.Title; | |||
ViewBag.Title = username + "'s Profile"; | |||
ViewBag.Description = "Viewing " + username + "'s Profile"; | |||
model.UserID = user.UserId; | |||
@@ -247,7 +247,7 @@ namespace Teknik.Areas.Users.Controllers | |||
string username = User.Identity.Name; | |||
ViewServiceDataViewModel model = new ViewServiceDataViewModel(); | |||
ViewBag.Title = "User Does Not Exist - " + _config.Title; | |||
ViewBag.Title = "User Does Not Exist"; | |||
ViewBag.Description = "The User does not exist"; | |||
try | |||
@@ -256,7 +256,7 @@ namespace Teknik.Areas.Users.Controllers | |||
if (user != null) | |||
{ | |||
ViewBag.Title = "Service Data - " + _config.Title; | |||
ViewBag.Title = "Service Data"; | |||
ViewBag.Description = "Viewing all of your service data"; | |||
model.Uploads = _dbContext.Uploads.Where(u => u.UserId == user.UserId).OrderByDescending(u => u.DateUploaded).ToList(); | |||
@@ -292,7 +292,7 @@ namespace Teknik.Areas.Users.Controllers | |||
if (user != null) | |||
{ | |||
ViewBag.Title = "Profile Settings - " + _config.Title; | |||
ViewBag.Title = "Profile Settings"; | |||
ViewBag.Description = "Your " + _config.Title + " Profile Settings"; | |||
ProfileSettingsViewModel model = new ProfileSettingsViewModel(); | |||
@@ -316,7 +316,7 @@ namespace Teknik.Areas.Users.Controllers | |||
if (user != null) | |||
{ | |||
ViewBag.Title = "Account Settings - " + _config.Title; | |||
ViewBag.Title = "Account Settings"; | |||
ViewBag.Description = "Your " + _config.Title + " Account Settings"; | |||
AccountSettingsViewModel model = new AccountSettingsViewModel(); | |||
@@ -337,7 +337,7 @@ namespace Teknik.Areas.Users.Controllers | |||
if (user != null) | |||
{ | |||
ViewBag.Title = "Security Settings - " + _config.Title; | |||
ViewBag.Title = "Security Settings"; | |||
ViewBag.Description = "Your " + _config.Title + " Security Settings"; | |||
SecuritySettingsViewModel model = new SecuritySettingsViewModel(); | |||
@@ -379,7 +379,7 @@ namespace Teknik.Areas.Users.Controllers | |||
if (user != null) | |||
{ | |||
ViewBag.Title = "Developer Settings - " + _config.Title; | |||
ViewBag.Title = "Developer Settings"; | |||
ViewBag.Description = "Your " + _config.Title + " Developer Settings"; | |||
DeveloperSettingsViewModel model = new DeveloperSettingsViewModel(); | |||
@@ -426,7 +426,7 @@ namespace Teknik.Areas.Users.Controllers | |||
if (user != null) | |||
{ | |||
ViewBag.Title = "Invite Settings - " + _config.Title; | |||
ViewBag.Title = "Invite Settings"; | |||
ViewBag.Description = "Your " + _config.Title + " Invite Settings"; | |||
InviteSettingsViewModel model = new InviteSettingsViewModel(); | |||
@@ -471,7 +471,7 @@ namespace Teknik.Areas.Users.Controllers | |||
if (user != null) | |||
{ | |||
ViewBag.Title = "Blog Settings - " + _config.Title; | |||
ViewBag.Title = "Blog Settings"; | |||
ViewBag.Description = "Your " + _config.Title + " Blog Settings"; | |||
BlogSettingsViewModel model = new BlogSettingsViewModel(); | |||
@@ -494,7 +494,7 @@ namespace Teknik.Areas.Users.Controllers | |||
if (user != null) | |||
{ | |||
ViewBag.Title = "Upload Settings - " + _config.Title; | |||
ViewBag.Title = "Upload Settings"; | |||
ViewBag.Description = "Your " + _config.Title + " Upload Settings"; | |||
UploadSettingsViewModel model = new UploadSettingsViewModel(); | |||
@@ -515,7 +515,7 @@ namespace Teknik.Areas.Users.Controllers | |||
[AllowAnonymous] | |||
public async Task<IActionResult> ViewRawPGP(string username) | |||
{ | |||
ViewBag.Title = username + "'s Public Key - " + _config.Title; | |||
ViewBag.Title = username + "'s Public Key"; | |||
ViewBag.Description = "The PGP public key for " + username; | |||
IdentityUserInfo userClaims = await IdentityHelper.GetIdentityUserInfo(_config, username); |
@@ -44,7 +44,7 @@ namespace Teknik.Areas.Vault.Controllers | |||
_dbContext.Entry(foundVault).State = EntityState.Modified; | |||
_dbContext.SaveChanges(); | |||
ViewBag.Title = foundVault.Title + " - Teknik Vault"; | |||
ViewBag.Title = foundVault.Title + " | Vault"; | |||
VaultViewModel model = new VaultViewModel(); | |||
model.CurrentSub = Subdomain; | |||
@@ -189,7 +189,7 @@ namespace Teknik.Areas.Vault.Controllers | |||
{ | |||
if (foundVault.User.Username == User.Identity.Name) | |||
{ | |||
ViewBag.Title = "Edit Vault - " + foundVault.Title; | |||
ViewBag.Title = "Edit Vault | " + foundVault.Title; | |||
ModifyVaultViewModel model = new ModifyVaultViewModel(); | |||
model.CurrentSub = Subdomain; |
@@ -43,7 +43,7 @@ namespace Teknik.Controllers | |||
_config = config; | |||
_dbContext = dbContext; | |||
ViewBag.Title = _config.Title; | |||
ViewBag.Title = string.Empty; | |||
ViewBag.Description = _config.Description; | |||
} | |||
@@ -26,7 +26,16 @@ | |||
</script> | |||
<!-- Main Page Title --> | |||
<title>@ViewBag.Title</title> | |||
<title> | |||
@if (string.IsNullOrEmpty(ViewBag.Title)) | |||
{ | |||
<text>@Config.Title</text> | |||
} | |||
else | |||
{ | |||
<text>@ViewBag.Title | @Config.Title</text> | |||
} | |||
</title> | |||
<!-- Favicon --> | |||
<link href="@Url.SubRouteUrl("www", "Default.Favicon")" rel="shortcut icon" type="image/x-icon" /> |