Browse Source

Moved Helpers and Configuration into separate projects. Updated all references to use them as well.

tags/2.0.6
Teknikode 2 years ago
parent
commit
56b0063dce
100 changed files with 3012 additions and 856 deletions
  1. 5
    4
      ServerMaint/Program.cs
  2. 12
    4
      ServerMaint/ServerMaint.csproj
  3. 2
    2
      ServerMaint/packages.config
  4. 20
    0
      Teknik.sln
  5. 1
    1
      Teknik/App_Start/BundleConfig.cs
  6. 1
    1
      Teknik/App_Start/SubdomainRoute.cs
  7. 1
    1
      Teknik/Areas/API/Controllers/APIController.cs
  8. 1
    1
      Teknik/Areas/API/Controllers/APIv1Controller.cs
  9. 2
    0
      Teknik/Areas/About/Views/About/Index.cshtml
  10. 1
    1
      Teknik/Areas/Admin/AdminAreaRegistration.cs
  11. 1
    1
      Teknik/Areas/Admin/Views/Admin/Dashboard.cshtml
  12. 1
    1
      Teknik/Areas/Admin/Views/Admin/Search.cshtml
  13. 2
    0
      Teknik/Areas/Admin/Views/Admin/SearchResult.cshtml
  14. 2
    0
      Teknik/Areas/Admin/Views/Admin/UserInfo.cshtml
  15. 1
    1
      Teknik/Areas/Blog/BlogAreaRegistration.cs
  16. 2
    1
      Teknik/Areas/Blog/Controllers/BlogController.cs
  17. 1
    1
      Teknik/Areas/Blog/Views/Blog/Blog.cshtml
  18. 1
    1
      Teknik/Areas/Blog/Views/Blog/Comment.cshtml
  19. 1
    1
      Teknik/Areas/Blog/Views/Blog/EditPost.cshtml
  20. 1
    1
      Teknik/Areas/Blog/Views/Blog/NewPost.cshtml
  21. 1
    1
      Teknik/Areas/Blog/Views/Blog/Post.cshtml
  22. 1
    1
      Teknik/Areas/Blog/Views/Blog/ViewPost.cshtml
  23. 1
    1
      Teknik/Areas/Contact/ContactAreaRegistration.cs
  24. 2
    0
      Teknik/Areas/Contact/Views/Contact/Index.cshtml
  25. 1
    0
      Teknik/Areas/Dev/Controllers/DevController.cs
  26. 1
    1
      Teknik/Areas/Error/Controllers/ErrorController.cs
  27. 1
    1
      Teknik/Areas/Error/Views/Error/Exception.cshtml
  28. 2
    0
      Teknik/Areas/Error/Views/Error/General.cshtml
  29. 2
    0
      Teknik/Areas/Error/Views/Error/Http403.cshtml
  30. 2
    0
      Teknik/Areas/Error/Views/Error/Http404.cshtml
  31. 1
    1
      Teknik/Areas/Error/Views/Error/Http500.cshtml
  32. 1
    1
      Teknik/Areas/Help/HelpAreaRegistration.cs
  33. 2
    0
      Teknik/Areas/Help/Views/Help/API/API.cshtml
  34. 1
    1
      Teknik/Areas/Help/Views/Help/API/v1/Paste.cshtml
  35. 2
    0
      Teknik/Areas/Help/Views/Help/API/v1/Shorten.cshtml
  36. 2
    0
      Teknik/Areas/Help/Views/Help/API/v1/Upload.cshtml
  37. 2
    0
      Teknik/Areas/Help/Views/Help/Index.cshtml
  38. 2
    0
      Teknik/Areas/Help/Views/Help/Mail.cshtml
  39. 1
    1
      Teknik/Areas/Home/Controllers/HomeController.cs
  40. 1
    2
      Teknik/Areas/Home/HomeAreaRegistration.cs
  41. 1
    1
      Teknik/Areas/Home/Views/Home/Index.cshtml
  42. 2
    2
      Teknik/Areas/Paste/Controllers/PasteController.cs
  43. 1
    1
      Teknik/Areas/Paste/PasteAreaRegistration.cs
  44. 1
    1
      Teknik/Areas/Paste/PasteHelper.cs
  45. 2
    0
      Teknik/Areas/Paste/Views/Paste/Full.cshtml
  46. 1
    1
      Teknik/Areas/Paste/Views/Paste/Index.cshtml
  47. 2
    0
      Teknik/Areas/Paste/Views/Paste/PasswordNeeded.cshtml
  48. 1
    0
      Teknik/Areas/Podcast/Controllers/PodcastController.cs
  49. 1
    1
      Teknik/Areas/Podcast/PodcastAreaRegistration.cs
  50. 1
    1
      Teknik/Areas/Podcast/Views/Podcast/Comment.cshtml
  51. 2
    0
      Teknik/Areas/Podcast/Views/Podcast/Main.cshtml
  52. 1
    1
      Teknik/Areas/Podcast/Views/Podcast/Podcast.cshtml
  53. 2
    0
      Teknik/Areas/Podcast/Views/Podcast/ViewPodcast.cshtml
  54. 0
    1
      Teknik/Areas/Privacy/Views/Privacy/Index.cshtml
  55. 2
    1
      Teknik/Areas/RSS/Controllers/RSSController.cs
  56. 1
    0
      Teknik/Areas/Shortener/Controllers/ShortenerController.cs
  57. 1
    1
      Teknik/Areas/Shortener/Shortener.cs
  58. 1
    1
      Teknik/Areas/Shortener/ShortenerAreaRegistration.cs
  59. 2
    0
      Teknik/Areas/Shortener/Views/Shortener/Index.cshtml
  60. 2
    0
      Teknik/Areas/Stream/Views/Stream/Index.cshtml
  61. 0
    1
      Teknik/Areas/TOS/Views/TOS/Index.cshtml
  62. 1
    1
      Teknik/Areas/Transparency/TransparencyAreaRegistration.cs
  63. 1
    2
      Teknik/Areas/Upload/Controllers/UploadController.cs
  64. 1
    1
      Teknik/Areas/Upload/UploadAreaRegistration.cs
  65. 3
    3
      Teknik/Areas/Upload/Uploader.cs
  66. 22
    24
      Teknik/Areas/User/Controllers/UserController.cs
  67. 1
    1
      Teknik/Areas/User/UserAreaRegistration.cs
  68. 2
    2
      Teknik/Areas/User/Utility/UserHelper.cs
  69. 1
    1
      Teknik/Areas/User/ViewModels/LoginViewModel.cs
  70. 1
    1
      Teknik/Areas/User/ViewModels/RegisterViewModel.cs
  71. 0
    3
      Teknik/Areas/User/Views/User/Index.cshtml
  72. 2
    0
      Teknik/Areas/User/Views/User/Login.cshtml
  73. 2
    0
      Teknik/Areas/User/Views/User/Register.cshtml
  74. 2
    0
      Teknik/Areas/User/Views/User/ResetPassword.cshtml
  75. 2
    0
      Teknik/Areas/User/Views/User/ResetPasswordVerification.cshtml
  76. 1
    1
      Teknik/Areas/User/Views/User/Settings.cshtml
  77. 1
    1
      Teknik/Areas/User/Views/User/TwoFactorCheck.cshtml
  78. 1
    0
      Teknik/Areas/User/Views/User/_LoginPartial.cshtml
  79. 1
    1
      Teknik/Areas/Vault/VaultAreaRegistration.cs
  80. 1
    1
      Teknik/Areas/Vault/Views/Vault/ViewVault.cshtml
  81. 1
    1
      Teknik/Attributes/TeknikAuthorizeAttribute.cs
  82. 141
    3
      Teknik/Content/font-awesome.css
  83. 2
    2
      Teknik/Content/font-awesome.min.css
  84. 1
    7
      Teknik/Controllers/DefaultController.cs
  85. 2
    1
      Teknik/Filters/TrackDownload.cs
  86. 1
    2
      Teknik/Filters/TrackLink.cs
  87. 2
    1
      Teknik/Filters/TrackPageView.cs
  88. 1
    8
      Teknik/Global.asax.cs
  89. 1
    3
      Teknik/Migrations/Configuration.cs
  90. 2
    2
      Teknik/Scripts/jquery.validate-vsdoc.js
  91. 4
    4
      Teknik/Scripts/jquery.validate.js
  92. 2
    2
      Teknik/Scripts/jquery.validate.min.js
  93. 20
    44
      Teknik/Teknik.csproj
  94. 1
    1
      Teknik/ViewModels/ViewModelBase.cs
  95. 1
    1
      Teknik/Views/Shared/_Layout.cshtml
  96. 1
    1
      Teknik/Views/Shared/_Navbar.cshtml
  97. BIN
      Teknik/fonts/FontAwesome.otf
  98. BIN
      Teknik/fonts/fontawesome-webfont.eot
  99. 2668
    682
      Teknik/fonts/fontawesome-webfont.svg
  100. 0
    0
      Teknik/fonts/fontawesome-webfont.ttf

+ 5
- 4
ServerMaint/Program.cs View File

@@ -13,8 +13,9 @@ using Teknik.Areas.Upload.Models;
using Teknik.Areas.Users.Models;
using Teknik.Areas.Users.Utility;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.Utilities;

namespace ServerMaint
{
@@ -149,7 +150,7 @@ namespace ServerMaint
}

// We have the data, let's scan it
ClamScanResult scanResult = clam.SendAndScanFile(data);
ClamScanResult scanResult = clam.SendAndScanFileAsync(data).Result;

switch (scanResult.Result)
{
@@ -552,7 +553,7 @@ Thank you for your continued use of Teknik!
{
string email = UserHelper.GetUserEmailAddress(config, user.Username);
// We need to check the actual git database
MysqlDatabase mySQL = new MysqlDatabase(config.GitConfig.Database);
MysqlDatabase mySQL = new MysqlDatabase(config.GitConfig.Database.Server, config.GitConfig.Database.Database, config.GitConfig.Database.Username, config.GitConfig.Database.Password, config.GitConfig.Database.Port);
string sql = @"SELECT * FROM gogs.repository
LEFT JOIN gogs.action ON gogs.user.id = gogs.action.act_user_id
WHERE gogs.user.login_name = {0}";
@@ -610,7 +611,7 @@ Thank you for your continued use of Teknik!
List<User> curUsers = db.Users.ToList();

// We need to check the actual git database
MysqlDatabase mySQL = new MysqlDatabase(config.GitConfig.Database);
MysqlDatabase mySQL = new MysqlDatabase(config.GitConfig.Database.Server, config.GitConfig.Database.Database, config.GitConfig.Database.Username, config.GitConfig.Database.Password, config.GitConfig.Database.Port);
string sql = @"SELECT gogs.user.login_name AS login_name, gogs.user.lower_name AS username FROM gogs.user";
var results = mySQL.Query(sql);


+ 12
- 4
ServerMaint/ServerMaint.csproj View File

@@ -76,8 +76,8 @@
<HintPath>..\packages\Microsoft.AspNet.Identity.EntityFramework.2.2.1\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nClam, Version=2.0.6.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\nClam.2.0.6.0\lib\net40-Client\nClam.dll</HintPath>
<Reference Include="nClam, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\nClam.3.0.0\lib\net45\nClam.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
@@ -107,6 +107,14 @@
<Project>{b20317cd-76c6-4a7b-bce1-e4bef8e4f964}</Project>
<Name>Teknik</Name>
</ProjectReference>
<ProjectReference Include="..\Utilities\Configuration\Configuration.csproj">
<Project>{f0da1b67-af92-4b4a-8669-7e81645ff996}</Project>
<Name>Configuration</Name>
</ProjectReference>
<ProjectReference Include="..\Utilities\Utilities\Utilities.csproj">
<Project>{F45DE6FC-3754-4954-A20A-4277362CC6C1}</Project>
<Name>Utilities</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
@@ -136,12 +144,12 @@
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\GitVersionTask.3.6.4\build\dotnet\GitVersionTask.targets" Condition="Exists('..\packages\GitVersionTask.3.6.4\build\dotnet\GitVersionTask.targets')" />
<Import Project="..\packages\GitVersionTask.3.6.5\build\dotnet\GitVersionTask.targets" Condition="Exists('..\packages\GitVersionTask.3.6.5\build\dotnet\GitVersionTask.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\GitVersionTask.3.6.4\build\dotnet\GitVersionTask.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GitVersionTask.3.6.4\build\dotnet\GitVersionTask.targets'))" />
<Error Condition="!Exists('..\packages\GitVersionTask.3.6.5\build\dotnet\GitVersionTask.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GitVersionTask.3.6.5\build\dotnet\GitVersionTask.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

+ 2
- 2
ServerMaint/packages.config View File

@@ -3,10 +3,10 @@
<package id="BouncyCastle" version="1.8.1" targetFramework="net452" />
<package id="CommandLineParser" version="1.9.71" targetFramework="net452" />
<package id="EntityFramework" version="6.1.3" targetFramework="net452" />
<package id="GitVersionTask" version="3.6.4" targetFramework="net452" developmentDependency="true" />
<package id="GitVersionTask" version="3.6.5" targetFramework="net462" developmentDependency="true" />
<package id="Inferno" version="1.4.0" targetFramework="net452" />
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net452" />
<package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net452" />
<package id="nClam" version="2.0.6.0" targetFramework="net452" />
<package id="nClam" version="3.0.0" targetFramework="net462" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
</packages>

+ 20
- 0
Teknik.sln View File

@@ -20,6 +20,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utilities", "Utilities\Util
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Logging", "Utilities\Logging\Logging.csproj", "{77E865FD-F08B-4F07-9676-BC2FDCC7244C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Piwik", "Utilities\Piwik\Piwik.csproj", "{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Configuration", "Utilities\Configuration\Configuration.csproj", "{F0DA1B67-AF92-4B4A-8669-7E81645FF996}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -61,6 +65,22 @@ Global
{77E865FD-F08B-4F07-9676-BC2FDCC7244C}.Release|Any CPU.Build.0 = Release|Any CPU
{77E865FD-F08B-4F07-9676-BC2FDCC7244C}.Release|x64.ActiveCfg = Release|Any CPU
{77E865FD-F08B-4F07-9676-BC2FDCC7244C}.Release|x64.Build.0 = Release|Any CPU
{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}.Debug|x64.ActiveCfg = Debug|Any CPU
{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}.Debug|x64.Build.0 = Debug|Any CPU
{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}.Release|Any CPU.Build.0 = Release|Any CPU
{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}.Release|x64.ActiveCfg = Release|Any CPU
{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}.Release|x64.Build.0 = Release|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Debug|x64.ActiveCfg = Debug|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Debug|x64.Build.0 = Debug|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Release|Any CPU.Build.0 = Release|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Release|x64.ActiveCfg = Release|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

+ 1
- 1
Teknik/App_Start/BundleConfig.cs View File

@@ -1,7 +1,7 @@
using System.Web;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;

namespace Teknik
{

+ 1
- 1
Teknik/App_Start/SubdomainRoute.cs View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Teknik.Helpers;
using Teknik.Utilities;

namespace Teknik
{

+ 1
- 1
Teknik/Areas/API/Controllers/APIController.cs View File

@@ -7,7 +7,7 @@ using System.Web;
using System.Web.Mvc;
using Teknik.Areas.Upload;
using Teknik.Controllers;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;

namespace Teknik.Areas.API.Controllers

+ 1
- 1
Teknik/Areas/API/Controllers/APIv1Controller.cs View File

@@ -8,7 +8,7 @@ using System.Web.Mvc;
using Teknik.Areas.Upload;
using Teknik.Areas.Paste;
using Teknik.Controllers;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using System.Text;
using Teknik.Areas.Shortener.Models;

+ 2
- 0
Teknik/Areas/About/Views/About/Index.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.About.ViewModels.AboutViewModel

@using Teknik.Utilities

<div class="container">
<div class="row">
<div class="col-ms-12">

+ 1
- 1
Teknik/Areas/Admin/AdminAreaRegistration.cs View File

@@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;

namespace Teknik.Areas.Admin
{

+ 1
- 1
Teknik/Areas/Admin/Views/Admin/Dashboard.cshtml View File

@@ -1,6 +1,6 @@
@model Teknik.Areas.Admin.ViewModels.DashboardViewModel

@using Teknik.Helpers
@using Teknik.Utilities

<div class="container">
<div class="row">

+ 1
- 1
Teknik/Areas/Admin/Views/Admin/Search.cshtml View File

@@ -1,6 +1,6 @@
@model Teknik.Areas.Admin.ViewModels.SearchViewModel

@using Teknik.Helpers
@using Teknik.Utilities

<script>
// We need to define the action URLs for the script

+ 2
- 0
Teknik/Areas/Admin/Views/Admin/SearchResult.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Admin.ViewModels.SearchResultViewModel

@using Teknik.Utilities

<div class="row">
<div class="row">
<div class="col-sm-3">

+ 2
- 0
Teknik/Areas/Admin/Views/Admin/UserInfo.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Admin.ViewModels.UserInfoViewModel

@using Teknik.Utilities

<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<a href="@Url.SubRouteUrl("user", "User.Index", new { username = Model.Username })">@Model.Username</a>

+ 1
- 1
Teknik/Areas/Blog/BlogAreaRegistration.cs View File

@@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;

namespace Teknik.Areas.Blog
{

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

@@ -12,8 +12,9 @@ using Teknik.Areas.Users.Models;
using Teknik.Areas.Users.Utility;
using Teknik.Controllers;
using Teknik.Filters;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.Utilities;

namespace Teknik.Areas.Blog.Controllers
{

+ 1
- 1
Teknik/Areas/Blog/Views/Blog/Blog.cshtml View File

@@ -1,6 +1,6 @@
@model Teknik.Areas.Blog.ViewModels.BlogViewModel

@using Teknik.Helpers
@using Teknik.Utilities

<script>
// We need to define the action URLs for the script

+ 1
- 1
Teknik/Areas/Blog/Views/Blog/Comment.cshtml View File

@@ -1,6 +1,6 @@
@model Teknik.Areas.Blog.ViewModels.CommentViewModel

@using Teknik.Helpers
@using Teknik.Utilities

<hr>
<div class="row">

+ 1
- 1
Teknik/Areas/Blog/Views/Blog/EditPost.cshtml View File

@@ -1,6 +1,6 @@
@model Teknik.Areas.Blog.ViewModels.PostViewModel

@using Teknik.Helpers
@using Teknik.Utilities

<script>
// We need to define the action URLs for the script

+ 1
- 1
Teknik/Areas/Blog/Views/Blog/NewPost.cshtml View File

@@ -1,6 +1,6 @@
@model Teknik.Areas.Blog.ViewModels.BlogViewModel

@using Teknik.Helpers
@using Teknik.Utilities

<script>
// We need to define the action URLs for the script

+ 1
- 1
Teknik/Areas/Blog/Views/Blog/Post.cshtml View File

@@ -1,6 +1,6 @@
@model Teknik.Areas.Blog.ViewModels.PostViewModel

@using Teknik.Helpers
@using Teknik.Utilities

<div class="row">
<div class="col-sm-10 col-sm-offset-1">

+ 1
- 1
Teknik/Areas/Blog/Views/Blog/ViewPost.cshtml View File

@@ -1,6 +1,6 @@
@model Teknik.Areas.Blog.ViewModels.PostViewModel

@using Teknik.Helpers
@using Teknik.Utilities

<script>
// We need to define the action URLs for the script

+ 1
- 1
Teknik/Areas/Contact/ContactAreaRegistration.cs View File

@@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;

namespace Teknik.Areas.Contact
{

+ 2
- 0
Teknik/Areas/Contact/Views/Contact/Index.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Contact.ViewModels.ContactViewModel

@using Teknik.Utilities

@Scripts.Render("~/bundles/contact")
<div class="container">
<div class="row">

+ 1
- 0
Teknik/Areas/Dev/Controllers/DevController.cs View File

@@ -5,6 +5,7 @@ using System.Web;
using System.Web.Mvc;
using Teknik.Controllers;
using Teknik.Filters;
using Teknik.Utilities;

namespace Teknik.Areas.Dev.Controllers
{

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

@@ -8,7 +8,7 @@ using System.Web.Mvc;
using Teknik.Areas.Error.ViewModels;
using Teknik.Controllers;
using Teknik.Filters;
using Teknik.Helpers;
using Teknik.Utilities;

namespace Teknik.Areas.Error.Controllers
{

+ 1
- 1
Teknik/Areas/Error/Views/Error/Exception.cshtml View File

@@ -1,6 +1,6 @@
@model Teknik.Areas.Error.ViewModels.ErrorViewModel

@using Teknik.Helpers
@using Teknik.Utilities

<div class="container">
<div class="row">

+ 2
- 0
Teknik/Areas/Error/Views/Error/General.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Error.ViewModels.ErrorViewModel

@using Teknik.Utilities

<div class="container">
<div class="row">
<div class="col-md-12">

+ 2
- 0
Teknik/Areas/Error/Views/Error/Http403.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Error.ViewModels.ErrorViewModel

@using Teknik.Utilities

<div class="container">
<div class="row">
<div class="col-md-12">

+ 2
- 0
Teknik/Areas/Error/Views/Error/Http404.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Error.ViewModels.ErrorViewModel

@using Teknik.Utilities

<div class="container">
<div class="row">
<div class="col-md-12">

+ 1
- 1
Teknik/Areas/Error/Views/Error/Http500.cshtml View File

@@ -1,6 +1,6 @@
@model Teknik.Areas.Error.ViewModels.ErrorViewModel

@using Teknik.Helpers
@using Teknik.Utilities

<div class="container">
<div class="row">

+ 1
- 1
Teknik/Areas/Help/HelpAreaRegistration.cs View File

@@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;

namespace Teknik.Areas.Help
{

+ 2
- 0
Teknik/Areas/Help/Views/Help/API/API.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Help.ViewModels.HelpViewModel

@using Teknik.Utilities

@Styles.Render("~/Content/help");

<div class="container">

+ 1
- 1
Teknik/Areas/Help/Views/Help/API/v1/Paste.cshtml View File

@@ -1,6 +1,6 @@
@model Teknik.Areas.Help.ViewModels.HelpViewModel

@using Teknik.Helpers
@using Teknik.Utilities
@using Teknik.Pygments

@Styles.Render("~/Content/help");

+ 2
- 0
Teknik/Areas/Help/Views/Help/API/v1/Shorten.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Help.ViewModels.HelpViewModel

@using Teknik.Utilities

@Styles.Render("~/Content/help");

<div class="container">

+ 2
- 0
Teknik/Areas/Help/Views/Help/API/v1/Upload.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Help.ViewModels.HelpViewModel

@using Teknik.Utilities

@Styles.Render("~/Content/help");

<div class="container">

+ 2
- 0
Teknik/Areas/Help/Views/Help/Index.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Help.ViewModels.HelpViewModel

@using Teknik.Utilities

<div class="container">
<div class="row">
<div class="col-sm-10 col-sm-offset-1">

+ 2
- 0
Teknik/Areas/Help/Views/Help/Mail.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Help.ViewModels.HelpViewModel

@using Teknik.Utilities

<div class="container">
<div class="row">
<h2><b>Mail</b></h2>

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

@@ -7,7 +7,7 @@ using Teknik.Areas.Podcast.Models;
using Teknik.Areas.Blog.Models;
using Teknik.Areas.Home.ViewModels;
using Teknik.Controllers;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.Filters;


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

@@ -1,10 +1,9 @@
using System.Collections.Generic;
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik;
using Teknik.Configuration;
using Teknik.Controllers;
using Teknik.Helpers;
using Teknik.Utilities;

namespace Teknik.Areas.Home
{

+ 1
- 1
Teknik/Areas/Home/Views/Home/Index.cshtml View File

@@ -2,7 +2,7 @@

@using Teknik.Areas.Blog.Models
@using Teknik.Areas.Podcast.Models
@using Teknik.Helpers
@using Teknik.Utilities

@{
string logoPath = "/Images/logo-blue.svg";

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

@@ -12,7 +12,7 @@ using Teknik.Areas.Paste.ViewModels;
using Teknik.Areas.Users.Utility;
using Teknik.Controllers;
using Teknik.Filters;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.Utilities;

@@ -69,7 +69,7 @@ namespace Teknik.Areas.Paste.Controllers
string hash = string.Empty;
if (!string.IsNullOrEmpty(password))
{
byte[] passBytes = Helpers.SHA384.Hash(paste.Key, password);
byte[] passBytes = Utilities.SHA384.Hash(paste.Key, password);
hash = passBytes.ToHex();
// We need to convert old pastes to the new password scheme
if (paste.Transfers.ToList().Exists(t => t.Type == TransferTypes.ASCIIPassword))

+ 1
- 1
Teknik/Areas/Paste/PasteAreaRegistration.cs View File

@@ -3,7 +3,7 @@ using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Controllers;
using Teknik.Helpers;
using Teknik.Utilities;

namespace Teknik.Areas.Paste
{

+ 1
- 1
Teknik/Areas/Paste/PasteHelper.cs View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Web;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.Utilities;


+ 2
- 0
Teknik/Areas/Paste/Views/Paste/Full.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Paste.ViewModels.PasteViewModel

@using Teknik.Utilities

@Styles.Render("~/Content/paste")
@Scripts.Render("~/bundles/paste")


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

@@ -1,6 +1,6 @@
@model Teknik.Areas.Paste.ViewModels.PasteCreateViewModel

@using Teknik.Helpers
@using Teknik.Utilities
@using Teknik.Pygments

@Styles.Render("~/Content/paste")

+ 2
- 0
Teknik/Areas/Paste/Views/Paste/PasswordNeeded.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Paste.ViewModels.PasswordViewModel

@using Teknik.Utilities

<div class="container">
<div class="row text-center">
<div class="col-sm-6 col-sm-offset-3">

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

@@ -11,6 +11,7 @@ using Teknik.Areas.Users.Utility;
using Teknik.Controllers;
using Teknik.Filters;
using Teknik.Models;
using Teknik.Utilities;

namespace Teknik.Areas.Podcast.Controllers
{

+ 1
- 1
Teknik/Areas/Podcast/PodcastAreaRegistration.cs View File

@@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;

namespace Teknik.Areas.Podcast
{

+ 1
- 1
Teknik/Areas/Podcast/Views/Podcast/Comment.cshtml View File

@@ -1,6 +1,6 @@
@model Teknik.Areas.Blog.ViewModels.CommentViewModel

@using Teknik.Helpers
@using Teknik.Utilities

<hr>
<div class="row">

+ 2
- 0
Teknik/Areas/Podcast/Views/Podcast/Main.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Podcast.ViewModels.MainViewModel

@using Teknik.Utilities

<script>
// We need to define the action URLs for the script


+ 1
- 1
Teknik/Areas/Podcast/Views/Podcast/Podcast.cshtml View File

@@ -1,7 +1,7 @@
@model Teknik.Areas.Podcast.ViewModels.PodcastViewModel

@using Teknik.Areas.Podcast.Models
@using Teknik.Helpers
@using Teknik.Utilities

<div class="row">
<div class="col-sm-10 col-sm-offset-1">

+ 2
- 0
Teknik/Areas/Podcast/Views/Podcast/ViewPodcast.cshtml View File

@@ -1,4 +1,6 @@
@model Teknik.Areas.Podcast.ViewModels.PodcastViewModel

@using Teknik.Utilities
<script>
// We need to define the action URLs for the script

+ 0
- 1
Teknik/Areas/Privacy/Views/Privacy/Index.cshtml View File

@@ -1,6 +1,5 @@
@model Teknik.Areas.Privacy.ViewModels.PrivacyViewModel

@using Teknik.Models
<div class="container">
<div class="row">
<div class="col-xs-10">

+ 2
- 1
Teknik/Areas/RSS/Controllers/RSSController.cs View File

@@ -9,8 +9,9 @@ using System.Xml.Linq;
using Teknik.Areas.Blog.Models;
using Teknik.Controllers;
using Teknik.Filters;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.Utilities;

namespace Teknik.Areas.RSS.Controllers
{

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

@@ -9,6 +9,7 @@ using Teknik.Areas.Users.Utility;
using Teknik.Controllers;
using Teknik.Filters;
using Teknik.Models;
using Teknik.Utilities;

namespace Teknik.Areas.Shortener.Controllers
{

+ 1
- 1
Teknik/Areas/Shortener/Shortener.cs View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Teknik.Areas.Shortener.Models;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.Utilities;


+ 1
- 1
Teknik/Areas/Shortener/ShortenerAreaRegistration.cs View File

@@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;

namespace Teknik.Areas.Shortener
{

+ 2
- 0
Teknik/Areas/Shortener/Views/Shortener/Index.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Shortener.ViewModels.ShortenViewModel

@using Teknik.Utilities

@Scripts.Render("~/bundles/shortener")

<div class="container">

+ 2
- 0
Teknik/Areas/Stream/Views/Stream/Index.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Stream.ViewModels.StreamViewModel

@using Teknik.Utilities

<div class="container">
@if (Model.Config.StreamConfig.Enabled)
{

+ 0
- 1
Teknik/Areas/TOS/Views/TOS/Index.cshtml View File

@@ -1,6 +1,5 @@
@model Teknik.Areas.TOS.ViewModels.TOSViewModel

@using Teknik.Models
<div class="container">
<div class="row">
<div class="col-xs-10">

+ 1
- 1
Teknik/Areas/Transparency/TransparencyAreaRegistration.cs View File

@@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;

namespace Teknik.Areas.Transparency
{

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

@@ -15,9 +15,8 @@ using Teknik.Areas.Upload.ViewModels;
using Teknik.Areas.Users.Utility;
using Teknik.Controllers;
using Teknik.Filters;
using Teknik.Helpers;
using Teknik.Models;
using Teknik.Utilities;
using Teknik.Models;

namespace Teknik.Areas.Upload.Controllers
{

+ 1
- 1
Teknik/Areas/Upload/UploadAreaRegistration.cs View File

@@ -3,7 +3,7 @@ using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Controllers;
using Teknik.Helpers;
using Teknik.Utilities;

namespace Teknik.Areas.Upload
{

+ 3
- 3
Teknik/Areas/Upload/Uploader.cs View File

@@ -5,7 +5,7 @@ using System.Web;
using System.IO;
using Teknik.Configuration;
using Teknik.Models;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Utilities;

namespace Teknik.Areas.Upload
@@ -39,14 +39,14 @@ namespace Teknik.Areas.Upload
}

// Generate a unique file name that does not currently exist
string filePath = Utility.GenerateUniqueFileName(config.UploadConfig.UploadDirectory, config.UploadConfig.FileExtension, 10);
string filePath = FileHelper.GenerateUniqueFileName(config.UploadConfig.UploadDirectory, config.UploadConfig.FileExtension, 10);
string fileName = Path.GetFileName(filePath);

// once we have the filename, lets save the file
File.WriteAllBytes(filePath, file);

// Generate a unique url
string extension = (config.UploadConfig.IncludeExtension) ? Utility.GetDefaultExtension(contentType, defaultExtension) : string.Empty;
string extension = (config.UploadConfig.IncludeExtension) ? FileHelper.GetDefaultExtension(contentType, defaultExtension) : string.Empty;
string url = StringHelper.RandomString(config.UploadConfig.UrlLength) + extension;
while (db.Uploads.Where(u => u.Url == url).FirstOrDefault() != null)
{

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

@@ -2,26 +2,18 @@
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Runtime.InteropServices;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using Teknik.Areas.Shortener.Models;
using Teknik.Areas.Blog.Models;
using Teknik.Areas.Error.Controllers;
using Teknik.Areas.Error.ViewModels;
using Teknik.Areas.Users.Models;
using Teknik.Areas.Users.ViewModels;
using Teknik.Controllers;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.ViewModels;
using System.Windows;
using System.Net;
using Teknik.Areas.Users.Utility;
using Teknik.Filters;
using Teknik.Utilities;
using QRCoder;
using System.Text;
using TwoStepsAuthenticator;
using System.Drawing;

@@ -596,6 +588,7 @@ namespace Teknik.Areas.Users.Controllers
// The password reset code is valid, let's get their user account for this session
User user = UserHelper.GetUser(db, username);
Session["AuthenticatedUser"] = user;
Session["AuthCode"] = code;
}

ResetPasswordVerificationViewModel model = new ResetPasswordVerificationViewModel();
@@ -613,24 +606,29 @@ namespace Teknik.Areas.Users.Controllers
{
try
{
User user = (User)Session["AuthenticatedUser"];
if (user != null)
string code = Session["AuthCode"].ToString();
if (!string.IsNullOrEmpty(code))
{
if (string.IsNullOrEmpty(password))
{
return Json(new { error = "Password must not be empty" });
}
if (password != confirmPassword)
User user = (User)Session["AuthenticatedUser"];
if (user != null)
{
return Json(new { error = "Passwords must match" });
}
if (string.IsNullOrEmpty(password))
{
return Json(new { error = "Password must not be empty" });
}
if (password != confirmPassword)
{
return Json(new { error = "Passwords must match" });
}

User newUser = UserHelper.GetUser(db, user.Username);
UserHelper.EditAccount(db, Config, newUser, true, password);
User newUser = UserHelper.GetUser(db, user.Username);
UserHelper.EditAccount(db, Config, newUser, true, password);

return Json(new { result = true });
return Json(new { result = true });
}
return Json(new { error = "User does not exist" });
}
return Json(new { error = "User does not exist" });
return Json(new { error = "Invalid Code" });
}
catch (Exception ex)
{
@@ -742,7 +740,7 @@ namespace Teknik.Areas.Users.Controllers
QRCodeData qrCodeData = qrGenerator.CreateQrCode(ProvisionUrl, QRCodeGenerator.ECCLevel.Q);
QRCode qrCode = new QRCode(qrCodeData);
Bitmap qrCodeImage = qrCode.GetGraphic(20);
return File(Helpers.Utility.ImageToByte(qrCodeImage), "image/png");
return File(ByteHelper.ImageToByte(qrCodeImage), "image/png");
}

[HttpPost]

+ 1
- 1
Teknik/Areas/User/UserAreaRegistration.cs View File

@@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;

namespace Teknik.Areas.Users
{

+ 2
- 2
Teknik/Areas/User/Utility/UserHelper.cs View File

@@ -15,7 +15,7 @@ using Teknik.Areas.Blog.Models;
using Teknik.Areas.Shortener.Models;
using Teknik.Areas.Users.Models;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.Utilities;

@@ -738,7 +738,7 @@ If you recieved this email and you did not reset your password, you can ignore t
{
string email = GetUserEmailAddress(config, username);
// We need to check the actual git database
MysqlDatabase mySQL = new MysqlDatabase(config.GitConfig.Database);
MysqlDatabase mySQL = new MysqlDatabase(config.GitConfig.Database.Server, config.GitConfig.Database.Database, config.GitConfig.Database.Username, config.GitConfig.Database.Password, config.GitConfig.Database.Port);
string sql = @"SELECT
CASE
WHEN MAX(gogs.action.created) >= MAX(gogs.user.updated) THEN MAX(gogs.action.created)

+ 1
- 1
Teknik/Areas/User/ViewModels/LoginViewModel.cs View File

@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Security;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.ViewModels;


+ 1
- 1
Teknik/Areas/User/ViewModels/RegisterViewModel.cs View File

@@ -1,7 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Teknik.Areas.Users.Models;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.ViewModels;


+ 0
- 3
Teknik/Areas/User/Views/User/Index.cshtml View File

@@ -1,9 +1,6 @@
@model Teknik.Areas.Users.ViewModels.ProfileViewModel

@using Teknik.Helpers
@using Teknik.Utilities
@using Teknik.Areas.Paste
@using Teknik.Areas.Upload

<div class="container">
@if (!Model.Error)

+ 2
- 0
Teknik/Areas/User/Views/User/Login.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Users.ViewModels.LoginViewModel

@using Teknik.Utilities

@if (Model.Config.UserConfig.LoginEnabled)
{
<div class="row">

+ 2
- 0
Teknik/Areas/User/Views/User/Register.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Users.ViewModels.RegisterViewModel

@using Teknik.Utilities

@if (Model.Config.UserConfig.RegistrationEnabled)
{
<div class="row">

+ 2
- 0
Teknik/Areas/User/Views/User/ResetPassword.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Users.ViewModels.ResetPasswordViewModel

@using Teknik.Utilities

@Scripts.Render("~/bundles/user")

<div class="container">

+ 2
- 0
Teknik/Areas/User/Views/User/ResetPasswordVerification.cshtml View File

@@ -1,5 +1,7 @@
@model Teknik.Areas.Users.ViewModels.ResetPasswordVerificationViewModel

@using Teknik.Utilities

@Scripts.Render("~/bundles/user")

<div class="container">

+ 1
- 1
Teknik/Areas/User/Views/User/Settings.cshtml View File

@@ -1,6 +1,6 @@
@model Teknik.Areas.Users.ViewModels.SettingsViewModel

@using Teknik.Helpers
@using Teknik.Utilities

<script>
var homeUrl = '@Url.SubRouteUrl("www", "Home.Index")';

+ 1
- 1
Teknik/Areas/User/Views/User/TwoFactorCheck.cshtml View File

@@ -1,6 +1,6 @@
@model Teknik.Areas.Users.ViewModels.TwoFactorViewModel

@using Teknik.Helpers
@using Teknik.Utilities

<script>
var confirmAuthCodeURL = '@Url.SubRouteUrl("user", "User.Action", new { action = "ConfirmAuthenticatorCode" })';

+ 1
- 0
Teknik/Areas/User/Views/User/_LoginPartial.cshtml View File

@@ -1,5 +1,6 @@
@model Teknik.ViewModels.ViewModelBase

@using Teknik.Utilities
@using Microsoft.AspNet.Identity

@if (Model.Config.UserConfig.RegistrationEnabled || Model.Config.UserConfig.LoginEnabled)

+ 1
- 1
Teknik/Areas/Vault/VaultAreaRegistration.cs View File

@@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;

namespace Teknik.Areas.Vault
{

+ 1
- 1
Teknik/Areas/Vault/Views/Vault/ViewVault.cshtml View File

@@ -1,6 +1,6 @@
@model Teknik.Areas.Vault.ViewModels.VaultViewModel

@using Teknik.Helpers
@using Teknik.Utilities

<div class="container">
<p>Coming Soon!</p>

+ 1
- 1
Teknik/Attributes/TeknikAuthorizeAttribute.cs View File

@@ -5,7 +5,7 @@ using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Teknik.Areas.Error.Controllers;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Areas.Users.Controllers;

namespace Teknik.Attributes

+ 141
- 3
Teknik/Content/font-awesome.css View File

@@ -1,13 +1,13 @@
/*!
* Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/
/* FONT PATH
* -------------------------- */
@font-face {
font-family: 'FontAwesome';
src: url('../fonts/fontawesome-webfont.eot?v=4.6.3');
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.6.3') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.6.3') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.6.3') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.6.3') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular') format('svg');
src: url('../fonts/fontawesome-webfont.eot?v=4.7.0');
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}
@@ -1832,6 +1832,7 @@
content: "\f23e";
}
.fa-battery-4:before,
.fa-battery:before,
.fa-battery-full:before {
content: "\f240";
}
@@ -2178,6 +2179,143 @@
.fa-font-awesome:before {
content: "\f2b4";
}
.fa-handshake-o:before {
content: "\f2b5";
}
.fa-envelope-open:before {
content: "\f2b6";
}
.fa-envelope-open-o:before {
content: "\f2b7";
}
.fa-linode:before {
content: "\f2b8";
}
.fa-address-book:before {
content: "\f2b9";
}
.fa-address-book-o:before {
content: "\f2ba";
}
.fa-vcard:before,
.fa-address-card:before {
content: "\f2bb";
}
.fa-vcard-o:before,
.fa-address-card-o:before {
content: "\f2bc";
}
.fa-user-circle:before {
content: "\f2bd";
}
.fa-user-circle-o:before {
content: "\f2be";
}
.fa-user-o:before {
content: "\f2c0";
}
.fa-id-badge:before {
content: "\f2c1";
}
.fa-drivers-license:before,
.fa-id-card:before {
content: "\f2c2";
}
.fa-drivers-license-o:before,
.fa-id-card-o:before {
content: "\f2c3";
}
.fa-quora:before {
content: "\f2c4";
}
.fa-free-code-camp:before {
content: "\f2c5";
}
.fa-telegram:before {
content: "\f2c6";
}
.fa-thermometer-4:before,
.fa-thermometer:before,
.fa-thermometer-full:before {
content: "\f2c7";
}
.fa-thermometer-3:before,
.fa-thermometer-three-quarters:before {
content: "\f2c8";
}
.fa-thermometer-2:before,
.fa-thermometer-half:before {
content: "\f2c9";
}
.fa-thermometer-1:before,
.fa-thermometer-quarter:before {
content: "\f2ca";
}
.fa-thermometer-0:before,
.fa-thermometer-empty:before {
content: "\f2cb";
}
.fa-shower:before {
content: "\f2cc";
}
.fa-bathtub:before,
.fa-s15:before,
.fa-bath:before {
content: "\f2cd";
}
.fa-podcast:before {
content: "\f2ce";
}
.fa-window-maximize:before {
content: "\f2d0";
}
.fa-window-minimize:before {
content: "\f2d1";
}
.fa-window-restore:before {
content: "\f2d2";
}
.fa-times-rectangle:before,
.fa-window-close:before {
content: "\f2d3";
}
.fa-times-rectangle-o:before,
.fa-window-close-o:before {
content: "\f2d4";
}
.fa-bandcamp:before {
content: "\f2d5";
}
.fa-grav:before {
content: "\f2d6";
}
.fa-etsy:before {
content: "\f2d7";
}
.fa-imdb:before {
content: "\f2d8";
}
.fa-ravelry:before {
content: "\f2d9";
}
.fa-eercast:before {
content: "\f2da";
}
.fa-microchip:before {
content: "\f2db";
}
.fa-snowflake-o:before {
content: "\f2dc";
}
.fa-superpowers:before {
content: "\f2dd";
}
.fa-wpexplorer:before {
content: "\f2de";
}
.fa-meetup:before {
content: "\f2e0";
}
.sr-only {
position: absolute;
width: 1px;

+ 2
- 2
Teknik/Content/font-awesome.min.css
File diff suppressed because it is too large
View File


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

@@ -1,17 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Teknik.Areas.Error.Controllers;
using Teknik.Areas.Error.ViewModels;
using Teknik.Configuration;

using Piwik.Tracker;
using Teknik.Filters;
using Teknik.Helpers;
using Teknik.ViewModels;
using Teknik.Utilities;

namespace Teknik.Controllers
{

+ 2
- 1
Teknik/Filters/TrackDownload.cs View File

@@ -7,7 +7,8 @@ using System.Web;
using System.Web.Mvc;
using System.Web.UI;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Piwik;

namespace Teknik.Filters
{

+ 1
- 2
Teknik/Filters/TrackLink.cs View File

@@ -5,9 +5,8 @@ using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using System.Web.UI;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Piwik;

namespace Teknik.Filters
{

+ 2
- 1
Teknik/Filters/TrackPageView.cs View File

@@ -7,7 +7,8 @@ using System.Web;
using System.Web.Mvc;
using System.Web.UI;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Piwik;

namespace Teknik.Filters
{

+ 1
- 8
Teknik/Global.asax.cs View File

@@ -8,18 +8,11 @@ using System.Web.Routing;
using Teknik.Models;
using System.Data.Entity;
using System.Web.Security;
using Teknik.Migrations;
using System.Data.Entity.Migrations;
using Teknik.Areas.Users.Models;
using System.ComponentModel;
using Teknik.Areas.Error.Controllers;
using System.Web.Helpers;
using System.Diagnostics;
using System.Collections.Specialized;
using Teknik.Configuration;
using Piwik.Tracker;
using System.Web.UI;
using Teknik.Helpers;
using Teknik.Utilities;

namespace Teknik
{

+ 1
- 3
Teknik/Migrations/Configuration.cs View File

@@ -1,9 +1,6 @@
namespace Teknik.Migrations
{
using Areas.Paste;
using Areas.Upload;
using Areas.Users.Utility;
using Helpers;
using System;
using System.Collections.Generic;
using System.Data.Entity;
@@ -12,6 +9,7 @@ namespace Teknik.Migrations
using System.Linq;
using System.Net;
using Teknik.Configuration;
using Utilities;

internal sealed class Configuration : DbMigrationsConfiguration<Models.TeknikEntities>
{

+ 2
- 2
Teknik/Scripts/jquery.validate-vsdoc.js View File

@@ -4,7 +4,7 @@
* intended to be used only for design-time IntelliSense. Please use the
* standard jQuery library for all production use.
*
* Comment version: 1.15.0
* Comment version: 1.16.0
*/

/*
@@ -15,7 +15,7 @@
* for informational purposes only and are not the license terms under
* which Microsoft distributed this file.
*
* jQuery Validation Plugin - v1.15.0 - 2/4/2013
* jQuery Validation Plugin - v1.16.0 - 12/5/2016
* https://github.com/jzaefferer/jquery-validation
* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT
*

+ 4
- 4
Teknik/Scripts/jquery.validate.js View File

@@ -1,5 +1,5 @@
/*!
* jQuery Validation Plugin v1.15.1
* jQuery Validation Plugin v1.16.0
*
* http://jqueryvalidation.org/
*
@@ -204,7 +204,7 @@ $.extend( $.fn, {
} );

// Custom selectors
$.extend( $.expr[ ":" ], {
$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support

// http://jqueryvalidation.org/blank-selector/
blank: function( a ) {
@@ -417,7 +417,7 @@ $.extend( $.validator, {
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " +
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " +
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " +
"[type='radio'], [type='checkbox'], [contenteditable]", delegate )
"[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate )

// Support: Chrome, oldIE
// "select" is provided as event.target when clicking a option
@@ -1570,5 +1570,5 @@ if ( $.ajaxPrefilter ) {
return ajax.apply( this, arguments );
};
}
return $;
}));

+ 2
- 2
Teknik/Scripts/jquery.validate.min.js
File diff suppressed because it is too large
View File


+ 20
- 44
Teknik/Teknik.csproj View File

@@ -73,8 +73,8 @@
<HintPath>..\packages\Microsoft.AspNet.Identity.EntityFramework.2.2.1\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.KeyVault.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll</HintPath>
<Reference Include="Microsoft.Azure.KeyVault.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Azure.KeyVault.Core.2.0.4\lib\net45\Microsoft.Azure.KeyVault.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
@@ -95,8 +95,8 @@
<Private>True</Private>
</Reference>
<Reference Include="PresentationFramework" />
<Reference Include="QRCoder, Version=1.2.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\QRCoder.1.2.2\lib\net40\QRCoder.dll</HintPath>
<Reference Include="QRCoder, Version=1.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\QRCoder.1.2.3\lib\net40\QRCoder.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SecurityDriven.Inferno, Version=1.4.0.0, Culture=neutral, processorArchitecture=MSIL">
@@ -167,7 +167,7 @@
<Private>True</Private>
</Reference>
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\QRCoder.1.2.2\lib\net40\UnityEngine.dll</HintPath>
<HintPath>..\packages\QRCoder.1.2.3\lib\net40\UnityEngine.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="WebGrease, Version=1.6.5135.21930, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -241,9 +241,7 @@
<Compile Include="Areas\User\Models\TrustedDevice.cs" />
<Compile Include="Areas\User\ViewModels\TwoFactorViewModel.cs" />
<Compile Include="Attributes\TeknikAuthorizeAttribute.cs" />
<Compile Include="Configuration\LoggingConfig.cs" />
<Compile Include="Filters\CORSActionFilter.cs" />
<Compile Include="Helpers\BundleExtensions.cs" />
<Compile Include="Models\TransferTypes.cs" />
<Compile Include="Areas\User\Models\UploadSettings.cs" />
<Compile Include="Areas\User\Models\UserSettings.cs" />
@@ -291,22 +289,7 @@
<Compile Include="Areas\Vault\VaultAreaRegistration.cs" />
<Compile Include="Areas\Vault\ViewModels\VaultViewModel.cs" />
<Compile Include="Attributes\EntityAttribute.cs" />
<Compile Include="Configuration\PiwikConfig.cs" />
<Compile Include="Configuration\ShortenerConfig.cs" />
<Compile Include="Configuration\TransparencyConfig.cs" />
<Compile Include="Configuration\StreamConfig.cs" />
<Compile Include="Configuration\ApiConfig.cs" />
<Compile Include="Configuration\DatabaseConfig.cs" />
<Compile Include="Configuration\EmailConfig.cs" />
<Compile Include="Configuration\GitConfig.cs" />
<Compile Include="Configuration\PodcastConfig.cs" />
<Compile Include="Configuration\BlogConfig.cs" />
<Compile Include="Configuration\Config.cs" />
<Compile Include="Areas\Blog\Controllers\BlogController.cs" />
<Compile Include="Configuration\PasteConfig.cs" />
<Compile Include="Configuration\ContactConfig.cs" />
<Compile Include="Configuration\UploadConfig.cs" />
<Compile Include="Configuration\UserConfig.cs" />
<Compile Include="Controllers\DefaultController.cs" />
<Compile Include="Areas\Dev\Controllers\DevController.cs" />
<Compile Include="Filters\TrackLink.cs" />
@@ -315,24 +298,9 @@
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="Helpers\ActionResultHelper.cs" />
<Compile Include="Helpers\Constants.cs" />
<Compile Include="Helpers\Crypto.cs" />
<Compile Include="Areas\User\Models\Group.cs" />
<Compile Include="Areas\Blog\Models\BlogPost.cs" />
<Compile Include="Areas\User\Models\Role.cs" />
<Compile Include="Helpers\ExceptionExtensions.cs" />
<Compile Include="Helpers\HttpRequestExtensions.cs" />
<Compile Include="Helpers\MysqlDatabase.cs" />
<Compile Include="Helpers\MarkdownHelper.cs" />
<Compile Include="Helpers\RequestHelper.cs" />
<Compile Include="Helpers\RSSFeedResult.cs" />
<Compile Include="Helpers\Tracking.cs" />
<Compile Include="Helpers\UrlExtensions.cs" />
<Compile Include="Helpers\Utility.cs" />
<Compile Include="Helpers\WebClientExtension.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Migrations\Configuration.cs" />
<Compile Include="Models\TeknikEntities.cs" />
<Compile Include="Areas\User\Models\User.cs" />
@@ -572,11 +540,6 @@
<Content Include="Areas\User\Views\User\ResetPasswordVerification.cshtml" />
<Content Include="Areas\User\Views\User\ResetPassword.cshtml" />
<Content Include="Areas\User\Views\User\TwoFactorCheck.cshtml" />
<Content Include="Fonts\FontAwesome.otf" />
<Content Include="Fonts\fontawesome-webfont.woff2" />
<Content Include="Fonts\fontawesome-webfont.woff" />
<Content Include="Fonts\fontawesome-webfont.ttf" />
<Content Include="Fonts\fontawesome-webfont.eot" />
<Content Include="Fonts\glyphicons-halflings-regular.woff2" />
<Content Include="Fonts\glyphicons-halflings-regular.woff" />
<Content Include="Fonts\glyphicons-halflings-regular.ttf" />
@@ -598,6 +561,11 @@
<Content Include="App_Data\MachineKey.config" />
<Content Include="Areas\Admin\Views\Admin\UserInfo.cshtml" />
<Content Include="Areas\Shortener\Views\Shortener\Verify.cshtml" />
<Content Include="Fonts\FontAwesome.otf" />
<Content Include="Fonts\fontawesome-webfont.woff2" />
<Content Include="Fonts\fontawesome-webfont.woff" />
<Content Include="Fonts\fontawesome-webfont.ttf" />
<Content Include="Fonts\fontawesome-webfont.eot" />
<None Include="Properties\PublishProfiles\Teknik Dev.pubxml" />
<None Include="Properties\PublishProfiles\Teknik Production.pubxml" />
<None Include="Scripts\jquery-2.1.4.intellisense.js" />
@@ -720,6 +688,14 @@
<WCFMetadata Include="Service References\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Utilities\Configuration\Configuration.csproj">
<Project>{f0da1b67-af92-4b4a-8669-7e81645ff996}</Project>
<Name>Configuration</Name>
</ProjectReference>
<ProjectReference Include="..\Utilities\Piwik\Piwik.csproj">
<Project>{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}</Project>
<Name>Piwik</Name>
</ProjectReference>
<ProjectReference Include="..\Utilities\Utilities\Utilities.csproj">
<Project>{f45de6fc-3754-4954-a20a-4277362cc6c1}</Project>
<Name>Utilities</Name>
@@ -771,12 +747,12 @@
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<Import Project="..\packages\GitVersionTask.3.6.4\build\dotnet\GitVersionTask.targets" Condition="Exists('..\packages\GitVersionTask.3.6.4\build\dotnet\GitVersionTask.targets')" />
<Import Project="..\packages\GitVersionTask.3.6.5\build\dotnet\GitVersionTask.targets" Condition="Exists('..\packages\GitVersionTask.3.6.5\build\dotnet\GitVersionTask.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\GitVersionTask.3.6.4\build\dotnet\GitVersionTask.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GitVersionTask.3.6.4\build\dotnet\GitVersionTask.targets'))" />
<Error Condition="!Exists('..\packages\GitVersionTask.3.6.5\build\dotnet\GitVersionTask.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GitVersionTask.3.6.5\build\dotnet\GitVersionTask.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

+ 1
- 1
Teknik/ViewModels/ViewModelBase.cs View File

@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Web;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;

namespace Teknik.ViewModels
{

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

@@ -1,6 +1,6 @@
@model Teknik.ViewModels.ViewModelBase

@using Teknik.Helpers
@using Teknik.Utilities

<!DOCTYPE html>
<html lang="en">

+ 1
- 1
Teknik/Views/Shared/_Navbar.cshtml View File

@@ -2,7 +2,7 @@

@Html.Partial("../../Areas/User/Views/User/_LoginModalPartial", Model)

@using Teknik.Helpers
@using Teknik.Utilities

@{
string logoPath = Url.SubRouteUrl("www", "Default.Logo");

BIN
Teknik/fonts/FontAwesome.otf View File


BIN
Teknik/fonts/fontawesome-webfont.eot View File


+ 2668
- 682
Teknik/fonts/fontawesome-webfont.svg
File diff suppressed because it is too large
View File


+ 0
- 0
Teknik/fonts/fontawesome-webfont.ttf View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save