Browse Source

Standardized the titles for all of the pages.

tags/3.0.0^2
Teknikode 8 months ago
parent
commit
4892e01630
27 changed files with 111 additions and 74 deletions
  1. 6
    0
      IdentityServer/Controllers/AccountController.cs
  2. 1
    0
      IdentityServer/Controllers/ConsentController.cs
  3. 1
    1
      IdentityServer/Controllers/DefaultController.cs
  4. 6
    6
      IdentityServer/Controllers/ErrorController.cs
  5. 1
    0
      IdentityServer/Controllers/GrantsController.cs
  6. 12
    0
      IdentityServer/IdentityServer.csproj
  7. 10
    1
      IdentityServer/Views/Shared/_Layout.cshtml
  8. 1
    1
      Teknik/Areas/About/Controllers/AboutController.cs
  9. 1
    1
      Teknik/Areas/Abuse/Controllers/AbuseController.cs
  10. 13
    13
      Teknik/Areas/Blog/Controllers/BlogController.cs
  11. 1
    1
      Teknik/Areas/Contact/Controllers/ContactController.cs
  12. 5
    5
      Teknik/Areas/Error/Controllers/ErrorController.cs
  13. 1
    1
      Teknik/Areas/FAQ/Controllers/FAQController.cs
  14. 12
    12
      Teknik/Areas/Help/Controllers/HelpController.cs
  15. 1
    2
      Teknik/Areas/Home/Controllers/HomeController.cs
  16. 2
    2
      Teknik/Areas/Paste/Controllers/PasteController.cs
  17. 1
    1
      Teknik/Areas/Paste/Views/Paste/Simple.cshtml
  18. 2
    2
      Teknik/Areas/Podcast/Controllers/PodcastController.cs
  19. 1
    1
      Teknik/Areas/Privacy/Controllers/PrivacyController.cs
  20. 2
    2
      Teknik/Areas/Shortener/Controllers/ShortenerController.cs
  21. 1
    1
      Teknik/Areas/Stats/Controllers/StatsController.cs
  22. 1
    1
      Teknik/Areas/TOS/Controllers/TOSController.cs
  23. 3
    3
      Teknik/Areas/Upload/Controllers/UploadController.cs
  24. 13
    13
      Teknik/Areas/User/Controllers/UserController.cs
  25. 2
    2
      Teknik/Areas/Vault/Controllers/VaultController.cs
  26. 1
    1
      Teknik/Controllers/DefaultController.cs
  27. 10
    1
      Teknik/Views/Shared/_Layout.cshtml

+ 6
- 0
IdentityServer/Controllers/AccountController.cs View File

@@ -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);


+ 1
- 0
IdentityServer/Controllers/ConsentController.cs View File

@@ -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)
{

+ 1
- 1
IdentityServer/Controllers/DefaultController.cs View File

@@ -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";
}


+ 6
- 6
IdentityServer/Controllers/ErrorController.cs View File

@@ -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);

+ 1
- 0
IdentityServer/Controllers/GrantsController.cs View File

@@ -41,6 +41,7 @@ namespace Teknik.IdentityServer.Controllers
[HttpGet]
public async Task<IActionResult> Index()
{
ViewBag.Title = "Granted Applications";
return View("Index", await BuildViewModelAsync());
}


+ 12
- 0
IdentityServer/IdentityServer.csproj View File

@@ -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>

+ 10
- 1
IdentityServer/Views/Shared/_Layout.cshtml View File

@@ -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" />

+ 1
- 1
Teknik/Areas/About/Controllers/AboutController.cs View File

@@ -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());

+ 1
- 1
Teknik/Areas/Abuse/Controllers/AbuseController.cs View File

@@ -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());

+ 13
- 13
Teknik/Areas/Blog/Controllers/BlogController.cs View File

@@ -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);

+ 1
- 1
Teknik/Areas/Contact/Controllers/ContactController.cs View File

@@ -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());

+ 5
- 5
Teknik/Areas/Error/Controllers/ErrorController.cs View File

@@ -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);

+ 1
- 1
Teknik/Areas/FAQ/Controllers/FAQController.cs View File

@@ -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);
}

+ 12
- 12
Teknik/Areas/Help/Controllers/HelpController.cs View File

@@ -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);
}

+ 1
- 2
Teknik/Areas/Home/Controllers/HomeController.cs View File

@@ -42,8 +42,7 @@ namespace Teknik.Areas.Home.Controllers

model.SitePosts = lastSite;
model.Podcasts = lastPods;

ViewBag.Title = _config.Title;
return View(model);
}
}

+ 2
- 2
Teknik/Areas/Paste/Controllers/PasteController.cs View File

@@ -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;

+ 1
- 1
Teknik/Areas/Paste/Views/Paste/Simple.cshtml View File

@@ -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>

+ 2
- 2
Teknik/Areas/Podcast/Controllers/PodcastController.cs View File

@@ -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;

+ 1
- 1
Teknik/Areas/Privacy/Controllers/PrivacyController.cs View File

@@ -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());

+ 2
- 2
Teknik/Areas/Shortener/Controllers/ShortenerController.cs View File

@@ -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();
}
}

+ 1
- 1
Teknik/Areas/Stats/Controllers/StatsController.cs View File

@@ -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();

+ 1
- 1
Teknik/Areas/TOS/Controllers/TOSController.cs View File

@@ -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());

+ 3
- 3
Teknik/Areas/Upload/Controllers/UploadController.cs View File

@@ -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)
{

+ 13
- 13
Teknik/Areas/User/Controllers/UserController.cs View File

@@ -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);

+ 2
- 2
Teknik/Areas/Vault/Controllers/VaultController.cs View File

@@ -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;

+ 1
- 1
Teknik/Controllers/DefaultController.cs View File

@@ -43,7 +43,7 @@ namespace Teknik.Controllers
_config = config;
_dbContext = dbContext;

ViewBag.Title = _config.Title;
ViewBag.Title = string.Empty;
ViewBag.Description = _config.Description;
}


+ 10
- 1
Teknik/Views/Shared/_Layout.cshtml View File

@@ -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" />

Loading…
Cancel
Save