mirror of
https://gitlab.com/buildfeed/BuildFeed.git
synced 2024-03-22 21:10:34 +08:00
Begin port to .NET Core
This commit is contained in:
parent
b5377069c0
commit
6895178168
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Web.Mvc;
|
||||
using BuildFeed.Local;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
|
@ -42,7 +41,6 @@ public class BuildDetails
|
|||
public TypeOfSource SourceType { get; set; }
|
||||
|
||||
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_SourceDetails))]
|
||||
[AllowHtml]
|
||||
public string SourceDetails { get; set; }
|
||||
|
||||
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_LeakDate))]
|
||||
|
|
|
@ -1,118 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{7E2B4F61-1C11-4471-AF80-5480E94C0664}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>BuildFeed.Model</RootNamespace>
|
||||
<AssemblyName>BuildFeed.Model</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper">
|
||||
<Version>7.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="HtmlAgilityPack">
|
||||
<Version>1.8.9</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNet.Mvc">
|
||||
<Version>5.2.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNet.Razor">
|
||||
<Version>3.2.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNet.WebPages">
|
||||
<Version>3.2.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MongoDB.Driver">
|
||||
<Version>2.7.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="AutoMapper" Version="7.0.1" />
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.8.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Routing.Abstractions" Version="2.1.1" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="2.7.0" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<ProjectReference Include="..\BuildFeed.Local\BuildFeed.Local.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Api\ApiBuild.cs" />
|
||||
<Compile Include="Api\FamilyOverview.cs" />
|
||||
<Compile Include="Api\NewBuild.cs" />
|
||||
<Compile Include="Api\SearchResult.cs" />
|
||||
<Compile Include="BuildDetails.cs" />
|
||||
<Compile Include="BuildRepository-Group.cs" />
|
||||
<Compile Include="BuildRepository-Lab.cs" />
|
||||
<Compile Include="BuildRepository-Family.cs" />
|
||||
<Compile Include="BuildRepository-Source.cs" />
|
||||
<Compile Include="BuildRepository-Version.cs" />
|
||||
<Compile Include="BuildRepository-Year.cs" />
|
||||
<Compile Include="BuildRepository.cs" />
|
||||
<Compile Include="BuildGroup.cs" />
|
||||
<Compile Include="Build.cs" />
|
||||
<Compile Include="BuildVersion.cs" />
|
||||
<Compile Include="ItemHistory.cs" />
|
||||
<Compile Include="ItemHistoryType.cs" />
|
||||
<Compile Include="MetaItem.cs" />
|
||||
<Compile Include="ModelMappings.cs" />
|
||||
<Compile Include="MongoConfig.cs" />
|
||||
<Compile Include="ProjectFamily.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="TypeOfSource.cs" />
|
||||
<Compile Include="View\AddBulk.cs" />
|
||||
<Compile Include="View\ChangePassword.cs" />
|
||||
<Compile Include="View\FrontBuildGroup.cs" />
|
||||
<Compile Include="View\FrontPage.cs" />
|
||||
<Compile Include="View\LoginUser.cs" />
|
||||
<Compile Include="View\RegistrationUser.cs" />
|
||||
<Compile Include="View\SitemapData.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BuildFeed.Local\BuildFeed.Local.csproj">
|
||||
<Project>{9ebd4db1-1d37-456b-ad90-357aa89dd1b7}</Project>
|
||||
<Name>BuildFeed.Local</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 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.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
|
||||
</Project>
|
|
@ -31,22 +31,22 @@ public partial class BuildRepository
|
|||
|
||||
private readonly IMongoCollection<Build> _buildCollection;
|
||||
|
||||
public BuildRepository()
|
||||
public BuildRepository(MongoConfig config)
|
||||
{
|
||||
var settings = new MongoClientSettings
|
||||
{
|
||||
Server = new MongoServerAddress(MongoConfig.Host, MongoConfig.Port)
|
||||
Server = new MongoServerAddress(config.Host, config.Port)
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(MongoConfig.Username) && !string.IsNullOrEmpty(MongoConfig.Password))
|
||||
if (!string.IsNullOrEmpty(config.Username) && !string.IsNullOrEmpty(config.Password))
|
||||
{
|
||||
settings.Credential =
|
||||
MongoCredential.CreateCredential(MongoConfig.Database, MongoConfig.Username, MongoConfig.Password);
|
||||
MongoCredential.CreateCredential(config.Database, config.Username, config.Password);
|
||||
}
|
||||
|
||||
var dbClient = new MongoClient(settings);
|
||||
|
||||
IMongoDatabase buildDatabase = dbClient.GetDatabase(MongoConfig.Database);
|
||||
IMongoDatabase buildDatabase = dbClient.GetDatabase(config.Database);
|
||||
_buildCollection = buildDatabase.GetCollection<Build>(BUILD_COLLECTION_NAME);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Mvc;
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Driver;
|
||||
|
@ -24,7 +23,6 @@ public class MetaItemModel
|
|||
public string MetaDescription { get; set; }
|
||||
|
||||
[DisplayName("Page Content")]
|
||||
[AllowHtml]
|
||||
public string PageContent { get; set; }
|
||||
}
|
||||
|
||||
|
@ -35,24 +33,24 @@ public class MetaItem
|
|||
|
||||
private readonly IMongoCollection<MetaItemModel> _metaCollection;
|
||||
|
||||
public MetaItem()
|
||||
public MetaItem(MongoConfig config)
|
||||
{
|
||||
var settings = new MongoClientSettings
|
||||
{
|
||||
Server = new MongoServerAddress(MongoConfig.Host, MongoConfig.Port)
|
||||
Server = new MongoServerAddress(config.Host, config.Port)
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(MongoConfig.Username) && !string.IsNullOrEmpty(MongoConfig.Password))
|
||||
if (!string.IsNullOrEmpty(config.Username) && !string.IsNullOrEmpty(config.Password))
|
||||
{
|
||||
settings.Credential =
|
||||
MongoCredential.CreateCredential(MongoConfig.Database, MongoConfig.Username, MongoConfig.Password);
|
||||
MongoCredential.CreateCredential(config.Database, config.Username, config.Password);
|
||||
}
|
||||
|
||||
var dbClient = new MongoClient(settings);
|
||||
|
||||
_metaCollection = dbClient.GetDatabase(MongoConfig.Database)
|
||||
_metaCollection = dbClient.GetDatabase(config.Database)
|
||||
.GetCollection<MetaItemModel>(META_COLLECTION_NAME);
|
||||
_bModel = new BuildRepository();
|
||||
_bModel = new BuildRepository(config);
|
||||
}
|
||||
|
||||
[DataObjectMethod(DataObjectMethodType.Select, false)]
|
||||
|
|
|
@ -1,40 +1,37 @@
|
|||
using System.Configuration;
|
||||
|
||||
namespace BuildFeed.Model
|
||||
namespace BuildFeed.Model
|
||||
{
|
||||
public static class MongoConfig
|
||||
public class MongoConfig
|
||||
{
|
||||
public static string Host { get; }
|
||||
public static int Port { get; }
|
||||
public static string Database { get; }
|
||||
public static string Username { get; }
|
||||
public static string Password { get; }
|
||||
public string Host { get; }
|
||||
public int Port { get; }
|
||||
public string Database { get; }
|
||||
public string Username { get; }
|
||||
public string Password { get; }
|
||||
|
||||
static MongoConfig()
|
||||
public MongoConfig(string host, int? port, string database, string username, string password)
|
||||
{
|
||||
Host = !string.IsNullOrEmpty(ConfigurationManager.AppSettings["data:MongoHost"])
|
||||
? ConfigurationManager.AppSettings["data:MongoHost"]
|
||||
Host = !string.IsNullOrEmpty(host)
|
||||
? host
|
||||
: "localhost";
|
||||
|
||||
bool success = int.TryParse(ConfigurationManager.AppSettings["data:MongoPort"], out int port);
|
||||
if (!success)
|
||||
if (!port.HasValue)
|
||||
{
|
||||
port = 27017; // mongo default port
|
||||
}
|
||||
|
||||
Port = port;
|
||||
Port = port.Value;
|
||||
|
||||
Database = !string.IsNullOrEmpty(ConfigurationManager.AppSettings["data:MongoDB"])
|
||||
? ConfigurationManager.AppSettings["data:MongoDB"]
|
||||
Database = !string.IsNullOrEmpty(database)
|
||||
? database
|
||||
: "MongoAuth";
|
||||
|
||||
Username = ConfigurationManager.AppSettings["data:MongoUser"] ?? "";
|
||||
Password = ConfigurationManager.AppSettings["data:MongoPass"] ?? "";
|
||||
Username = username ?? "";
|
||||
Password = password ?? "";
|
||||
}
|
||||
|
||||
public static void SetupIndexes()
|
||||
public void SetupIndexes()
|
||||
{
|
||||
var b = new BuildRepository();
|
||||
var b = new BuildRepository(this);
|
||||
#pragma warning disable 4014
|
||||
b.SetupIndexes();
|
||||
#pragma warning restore 4014
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
[assembly: AssemblyTitle("BuildFeed.Model")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("BuildFeed.Model")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013 - 2018, The BuildFeed Team")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
|
||||
[assembly: Guid("7e2b4f61-1c11-4471-af80-5480e94c0664")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,6 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Routing;
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
|
||||
namespace BuildFeed.Model.View
|
||||
{
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1"/>
|
||||
</startup>
|
||||
</configuration>
|
|
@ -3,12 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27130.2010
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildFeed", "BuildFeed\BuildFeed.csproj", "{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{7E2B4F61-1C11-4471-AF80-5480E94C0664} = {7E2B4F61-1C11-4471-AF80-5480E94C0664}
|
||||
{7C67BFB9-1B3B-4676-A58D-10573DA82CFE} = {7C67BFB9-1B3B-4676-A58D-10573DA82CFE}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MongoAuth", "Authentication\MongoAuth\MongoAuth.csproj", "{7C67BFB9-1B3B-4676-A58D-10573DA82CFE}"
|
||||
EndProject
|
||||
Project("{262852C6-CD72-467D-83FE-5EEB1973A190}") = "BuildFeedApp-Westminster", "Mobile\BuildFeedApp-Westminster\BuildFeedApp-Westminster.jsproj", "{5CAADB66-1FC2-4492-B766-36354687120D}"
|
||||
|
@ -17,15 +11,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Authentication", "Authentic
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile", "Mobile", "{2B646675-44D1-4722-8A86-8C64876C8FB7}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildFeed.Model", "BuildFeed.Model\BuildFeed.Model.csproj", "{7E2B4F61-1C11-4471-AF80-5480E94C0664}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{948A2168-A092-4958-A465-427271563061}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
LICENSE.md = LICENSE.md
|
||||
README.md = README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildFeed.Local", "BuildFeed.Local\BuildFeed.Local.csproj", "{9EBD4DB1-1D37-456B-AD90-357AA89DD1B7}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildFeed.Local", "BuildFeed.Local\BuildFeed.Local.csproj", "{9EBD4DB1-1D37-456B-AD90-357AA89DD1B7}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildFeed.Model", "BuildFeed.Model\BuildFeed.Model.csproj", "{0D3A70CB-4657-485A-8662-14665C3F1B10}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildFeed", "BuildFeed\BuildFeed.csproj", "{73311A63-73DC-4AF4-89F0-92B2443C05D9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
@ -39,22 +35,6 @@ Global
|
|||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}.Release|x64.Build.0 = Release|Any CPU
|
||||
{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}.Release|x86.Build.0 = Release|Any CPU
|
||||
{7C67BFB9-1B3B-4676-A58D-10573DA82CFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7C67BFB9-1B3B-4676-A58D-10573DA82CFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7C67BFB9-1B3B-4676-A58D-10573DA82CFE}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
|
@ -95,22 +75,6 @@ Global
|
|||
{5CAADB66-1FC2-4492-B766-36354687120D}.Release|x86.ActiveCfg = Release|x86
|
||||
{5CAADB66-1FC2-4492-B766-36354687120D}.Release|x86.Build.0 = Release|x86
|
||||
{5CAADB66-1FC2-4492-B766-36354687120D}.Release|x86.Deploy.0 = Release|x86
|
||||
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Release|x64.Build.0 = Release|Any CPU
|
||||
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{7E2B4F61-1C11-4471-AF80-5480E94C0664}.Release|x86.Build.0 = Release|Any CPU
|
||||
{9EBD4DB1-1D37-456B-AD90-357AA89DD1B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9EBD4DB1-1D37-456B-AD90-357AA89DD1B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9EBD4DB1-1D37-456B-AD90-357AA89DD1B7}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
|
@ -127,6 +91,38 @@ Global
|
|||
{9EBD4DB1-1D37-456B-AD90-357AA89DD1B7}.Release|x64.Build.0 = Release|Any CPU
|
||||
{9EBD4DB1-1D37-456B-AD90-357AA89DD1B7}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{9EBD4DB1-1D37-456B-AD90-357AA89DD1B7}.Release|x86.Build.0 = Release|Any CPU
|
||||
{0D3A70CB-4657-485A-8662-14665C3F1B10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0D3A70CB-4657-485A-8662-14665C3F1B10}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0D3A70CB-4657-485A-8662-14665C3F1B10}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{0D3A70CB-4657-485A-8662-14665C3F1B10}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{0D3A70CB-4657-485A-8662-14665C3F1B10}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{0D3A70CB-4657-485A-8662-14665C3F1B10}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{0D3A70CB-4657-485A-8662-14665C3F1B10}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{0D3A70CB-4657-485A-8662-14665C3F1B10}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{0D3A70CB-4657-485A-8662-14665C3F1B10}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0D3A70CB-4657-485A-8662-14665C3F1B10}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0D3A70CB-4657-485A-8662-14665C3F1B10}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{0D3A70CB-4657-485A-8662-14665C3F1B10}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{0D3A70CB-4657-485A-8662-14665C3F1B10}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{0D3A70CB-4657-485A-8662-14665C3F1B10}.Release|x64.Build.0 = Release|Any CPU
|
||||
{0D3A70CB-4657-485A-8662-14665C3F1B10}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{0D3A70CB-4657-485A-8662-14665C3F1B10}.Release|x86.Build.0 = Release|Any CPU
|
||||
{73311A63-73DC-4AF4-89F0-92B2443C05D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{73311A63-73DC-4AF4-89F0-92B2443C05D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{73311A63-73DC-4AF4-89F0-92B2443C05D9}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{73311A63-73DC-4AF4-89F0-92B2443C05D9}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{73311A63-73DC-4AF4-89F0-92B2443C05D9}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{73311A63-73DC-4AF4-89F0-92B2443C05D9}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{73311A63-73DC-4AF4-89F0-92B2443C05D9}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{73311A63-73DC-4AF4-89F0-92B2443C05D9}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{73311A63-73DC-4AF4-89F0-92B2443C05D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{73311A63-73DC-4AF4-89F0-92B2443C05D9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{73311A63-73DC-4AF4-89F0-92B2443C05D9}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{73311A63-73DC-4AF4-89F0-92B2443C05D9}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{73311A63-73DC-4AF4-89F0-92B2443C05D9}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{73311A63-73DC-4AF4-89F0-92B2443C05D9}.Release|x64.Build.0 = Release|Any CPU
|
||||
{73311A63-73DC-4AF4-89F0-92B2443C05D9}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{73311A63-73DC-4AF4-89F0-92B2443C05D9}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
@using BuildFeed.Model.View
|
||||
@helper LatestBuild(string title, FrontPageBuild build)
|
||||
{
|
||||
<h4 class="latest-flex-title">@title</h4>
|
||||
<div class="latest-flex-detail">
|
||||
<p class="latest-flex-build">
|
||||
@if (build.Revision.HasValue)
|
||||
{
|
||||
@($"{build.Number}.{build.Revision}")
|
||||
}
|
||||
else
|
||||
{
|
||||
@build.Number
|
||||
}
|
||||
</p>
|
||||
<p class="latest-flex-lab">
|
||||
@build.Lab
|
||||
</p>
|
||||
@if (build.BuildTime.HasValue)
|
||||
{
|
||||
<p class="latest-flex-time">
|
||||
@build.BuildTime.Value.ToString("HH:mm, dddd dd MMMM yyyy")
|
||||
</p>
|
||||
}
|
||||
</div>
|
||||
}
|
|
@ -1,164 +0,0 @@
|
|||
@using System.Web.Mvc.Html
|
||||
@using System.Web.Routing
|
||||
@using BuildFeed.Code
|
||||
@helper PaginationBlock(int currentPage, int totalPages, string view, RouteValueDictionary rd)
|
||||
{
|
||||
string multiView = view + "Page";
|
||||
|
||||
if (totalPages > 1)
|
||||
{
|
||||
<ul class="pagination">
|
||||
@if (currentPage == 2)
|
||||
{
|
||||
var rvd = new RouteValueDictionary(rd);
|
||||
rvd.Remove("page");
|
||||
<li>
|
||||
<a href="@MvcIntrinsics.Url.Action(view, rvd)">
|
||||
<i class="fa fa-angle-double-left"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@MvcIntrinsics.Url.Action(view, rvd)">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
else if (currentPage > 2)
|
||||
{
|
||||
var firstRvd = new RouteValueDictionary(rd);
|
||||
firstRvd.Remove("page");
|
||||
<li>
|
||||
<a href="@MvcIntrinsics.Url.Action(view, firstRvd)">
|
||||
<i class="fa fa-angle-double-left"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
var rvd = new RouteValueDictionary(rd)
|
||||
{
|
||||
["page"] = currentPage - 1
|
||||
};
|
||||
<li>
|
||||
<a href="@MvcIntrinsics.Url.Action(multiView, rvd)">
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li class="disabled">
|
||||
<span>
|
||||
<i class="fa fa-angle-double-left"></i>
|
||||
</span>
|
||||
</li>
|
||||
<li class="disabled">
|
||||
<span>
|
||||
<i class="fa fa-angle-left"></i>
|
||||
</span>
|
||||
</li>
|
||||
}
|
||||
|
||||
|
||||
@{
|
||||
var rvdIndex = new RouteValueDictionary(rd);
|
||||
rvdIndex.Remove("page");
|
||||
IEnumerable<int> pages;
|
||||
}
|
||||
|
||||
@if (totalPages == 1)
|
||||
{
|
||||
var firstRvd = new RouteValueDictionary(rd);
|
||||
firstRvd.Remove("page");
|
||||
pages = Array.Empty<int>();
|
||||
|
||||
<li @( 1 == currentPage
|
||||
? "class=active"
|
||||
: "")>
|
||||
@MvcIntrinsics.Html.ActionLink(1.ToString(), view, firstRvd)
|
||||
</li>
|
||||
}
|
||||
else if (totalPages <= 7 && totalPages >= 2)
|
||||
{
|
||||
var firstRvd = new RouteValueDictionary(rd);
|
||||
firstRvd.Remove("page");
|
||||
pages = Enumerable.Range(2, totalPages - 1);
|
||||
|
||||
<li @( 1 == currentPage
|
||||
? "class=active"
|
||||
: "")>
|
||||
@MvcIntrinsics.Html.ActionLink(1.ToString(), view, firstRvd)
|
||||
</li>
|
||||
}
|
||||
else if (currentPage <= 4)
|
||||
{
|
||||
var firstRvd = new RouteValueDictionary(rd);
|
||||
firstRvd.Remove("page");
|
||||
pages = Enumerable.Range(2, 6);
|
||||
|
||||
<li @( 1 == currentPage
|
||||
? "class=active"
|
||||
: "")>
|
||||
@MvcIntrinsics.Html.ActionLink(1.ToString(), view, firstRvd)
|
||||
</li>
|
||||
}
|
||||
else if (currentPage >= totalPages - 2)
|
||||
{
|
||||
pages = Enumerable.Range(totalPages - 6, 7);
|
||||
}
|
||||
else
|
||||
{
|
||||
pages = Enumerable.Range(currentPage - 3, 7);
|
||||
}
|
||||
|
||||
@foreach (int i in pages)
|
||||
{
|
||||
var rvd = new RouteValueDictionary(rd)
|
||||
{
|
||||
["page"] = i
|
||||
};
|
||||
|
||||
<li @( i == currentPage
|
||||
? "class=active"
|
||||
: "")>
|
||||
@MvcIntrinsics.Html.ActionLink(i.ToString(), multiView, rvd)</li>
|
||||
}
|
||||
|
||||
|
||||
@if (currentPage < totalPages)
|
||||
{
|
||||
var rvd = new RouteValueDictionary(rd)
|
||||
{
|
||||
["page"] = currentPage + 1
|
||||
};
|
||||
|
||||
<li>
|
||||
<a href="@MvcIntrinsics.Url.Action(multiView, rvd)">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
var lastRvd = new RouteValueDictionary(rd)
|
||||
{
|
||||
["page"] = totalPages
|
||||
};
|
||||
<li>
|
||||
<a href="@MvcIntrinsics.Url.Action(multiView, lastRvd)">
|
||||
<i class="fa fa-angle-double-right"></i>
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li class="disabled">
|
||||
<span>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</span>
|
||||
</li>
|
||||
<li class="disabled">
|
||||
<span>
|
||||
<i class="fa fa-angle-double-right"></i>
|
||||
</span>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
using System.Web.Mvc;
|
||||
|
||||
namespace BuildFeed
|
||||
{
|
||||
public class FilterConfig
|
||||
{
|
||||
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
|
||||
{
|
||||
filters.Add(new HandleErrorAttribute());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
using System.Web.Http;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace BuildFeed
|
||||
{
|
||||
public class RouteConfig
|
||||
{
|
||||
public static void RegisterRoutes(RouteCollection routes)
|
||||
{
|
||||
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
|
||||
|
||||
routes.AppendTrailingSlash = true;
|
||||
routes.MapHttpRoute("API",
|
||||
"api/{action}/{id}",
|
||||
new
|
||||
{
|
||||
controller = "api",
|
||||
action = "GetBuilds",
|
||||
id = UrlParameter.Optional
|
||||
});
|
||||
|
||||
routes.MapMvcAttributeRoutes();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
using System.Threading.Tasks;
|
||||
using System.Web.Mvc;
|
||||
using BuildFeed.Controllers;
|
||||
using BuildFeed.Model;
|
||||
|
||||
namespace BuildFeed.Admin.Controllers
|
||||
{
|
||||
[Authorize(Roles = "Administrators")]
|
||||
[RouteArea("admin")]
|
||||
[RoutePrefix("")]
|
||||
public class RootController : BaseController
|
||||
{
|
||||
[Route("")]
|
||||
public ActionResult Index() => View();
|
||||
|
||||
[Route("regen-cache")]
|
||||
public async Task<ActionResult> RegenerateCache()
|
||||
{
|
||||
var bRepo = new BuildRepository();
|
||||
await bRepo.RegenerateCachedProperties();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,118 +0,0 @@
|
|||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Mvc;
|
||||
using BuildFeed.Admin.Models.ViewModel;
|
||||
using BuildFeed.Controllers;
|
||||
using BuildFeed.Model;
|
||||
|
||||
namespace BuildFeed.Admin.Controllers
|
||||
{
|
||||
[Authorize(Roles = "Administrators")]
|
||||
[RouteArea("admin")]
|
||||
[RoutePrefix("meta")]
|
||||
public class MetaController : BaseController
|
||||
{
|
||||
private readonly MetaItem _mModel;
|
||||
|
||||
public MetaController()
|
||||
{
|
||||
_mModel = new MetaItem();
|
||||
}
|
||||
|
||||
[Route("")]
|
||||
public async Task<ActionResult> Index() => View(new MetaListing
|
||||
{
|
||||
CurrentItems = from i in await _mModel.Select()
|
||||
group i by i.Id.Type
|
||||
into b
|
||||
orderby b.Key.ToString()
|
||||
select b,
|
||||
|
||||
NewItems = from i in (from l in await _mModel.SelectUnusedLabs()
|
||||
select new MetaItemModel
|
||||
{
|
||||
Id = new MetaItemKey
|
||||
{
|
||||
Type = MetaType.Lab,
|
||||
Value = l
|
||||
}
|
||||
}).Concat(from v in await _mModel.SelectUnusedVersions()
|
||||
select new MetaItemModel
|
||||
{
|
||||
Id = new MetaItemKey
|
||||
{
|
||||
Type = MetaType.Version,
|
||||
Value = v
|
||||
}
|
||||
})
|
||||
.Concat(from y in await _mModel.SelectUnusedYears()
|
||||
select new MetaItemModel
|
||||
{
|
||||
Id = new MetaItemKey
|
||||
{
|
||||
Type = MetaType.Year,
|
||||
Value = y
|
||||
}
|
||||
})
|
||||
.Concat(from y in await _mModel.SelectUnusedFamilies()
|
||||
select new MetaItemModel
|
||||
{
|
||||
Id = new MetaItemKey
|
||||
{
|
||||
Type = MetaType.Family,
|
||||
Value = y
|
||||
}
|
||||
})
|
||||
group i by i.Id.Type
|
||||
into b
|
||||
orderby b.Key.ToString()
|
||||
select b
|
||||
});
|
||||
|
||||
[Route("create/{type}/{value}")]
|
||||
public ActionResult Create(MetaType type, string value) => View(new MetaItemModel
|
||||
{
|
||||
Id = new MetaItemKey
|
||||
{
|
||||
Type = type,
|
||||
Value = value
|
||||
}
|
||||
});
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
[Route("create/{type}/{value}")]
|
||||
public async Task<ActionResult> Create(MetaItemModel meta)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
await _mModel.Insert(meta);
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(meta);
|
||||
}
|
||||
|
||||
[Route("edit/{type}/{value}")]
|
||||
public async Task<ActionResult> Edit(MetaType type, string value) => View(nameof(Create),
|
||||
await _mModel.SelectById(new MetaItemKey
|
||||
{
|
||||
Type = type,
|
||||
Value = value
|
||||
}));
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
[Route("edit/{type}/{value}")]
|
||||
public async Task<ActionResult> Edit(MetaItemModel meta)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
await _mModel.Update(meta);
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
||||
return View(nameof(Create), meta);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,83 +0,0 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Security;
|
||||
using BuildFeed.Controllers;
|
||||
using MongoAuth;
|
||||
|
||||
namespace BuildFeed.Admin.Controllers
|
||||
{
|
||||
[Authorize(Roles = "Administrators")]
|
||||
[RouteArea("admin")]
|
||||
[RoutePrefix("users")]
|
||||
public class UsersController : BaseController
|
||||
{
|
||||
[Route]
|
||||
public ActionResult Index() => View(Membership.GetAllUsers().Cast<MembershipUser>());
|
||||
|
||||
[Route("admins")]
|
||||
public ActionResult Admins()
|
||||
{
|
||||
var admins = Roles.GetUsersInRole("Administrators").Select(Membership.GetUser).ToList();
|
||||
|
||||
return View(admins.OrderByDescending(m => m.UserName));
|
||||
}
|
||||
|
||||
[Route("approve/{id:guid}")]
|
||||
public ActionResult Approve(Guid id)
|
||||
{
|
||||
var provider = Membership.Provider as MongoMembershipProvider;
|
||||
provider?.ChangeApproval(id, true);
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
[Route("unapprove/{id:guid}")]
|
||||
public ActionResult Unapprove(Guid id)
|
||||
{
|
||||
var provider = Membership.Provider as MongoMembershipProvider;
|
||||
provider?.ChangeApproval(id, false);
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
[Route("lock/{id:guid}")]
|
||||
public ActionResult Lock(Guid id)
|
||||
{
|
||||
var provider = Membership.Provider as MongoMembershipProvider;
|
||||
provider?.ChangeLockStatus(id, true);
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
[Route("unlock/{id:guid}")]
|
||||
public ActionResult Unlock(Guid id)
|
||||
{
|
||||
var provider = Membership.Provider as MongoMembershipProvider;
|
||||
provider?.ChangeLockStatus(id, false);
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
[Route("delete/{id:guid}")]
|
||||
public ActionResult Delete(Guid id)
|
||||
{
|
||||
var provider = Membership.Provider as MongoMembershipProvider;
|
||||
provider?.DeleteUser(id);
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
[Route("cleanup")]
|
||||
public ActionResult Cleanup()
|
||||
{
|
||||
MembershipUserCollection users = Membership.GetAllUsers();
|
||||
|
||||
foreach (MembershipUser user in users)
|
||||
{
|
||||
if (!user.IsApproved
|
||||
&& user.CreationDate.AddDays(30) < DateTime.Now)
|
||||
{
|
||||
Membership.DeleteUser(user.UserName);
|
||||
}
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BuildFeed.Model;
|
||||
|
||||
namespace BuildFeed.Admin.Models.ViewModel
|
||||
{
|
||||
public class MetaListing
|
||||
{
|
||||
public IEnumerable<IGrouping<MetaType, MetaItemModel>> CurrentItems { get; set; }
|
||||
public IEnumerable<IGrouping<MetaType, MetaItemModel>> NewItems { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
@{
|
||||
ViewBag.Title = $"Administration | {InvariantTerms.SiteName}";
|
||||
}
|
||||
|
||||
<h1>Administration</h1>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
@Html.ActionLink("Manage users", nameof(UsersController.Index), "Users")
|
||||
<ul>
|
||||
<li>@Html.ActionLink("View administrators", nameof(UsersController.Admins), "Users")</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
@Html.ActionLink("Manage metadata", nameof(MetaController.Index), "Meta")
|
||||
</li>
|
||||
<li>
|
||||
@Html.ActionLink("Regenerate cached properties", nameof(RootController.RegenerateCache), "Root")
|
||||
</li>
|
||||
</ul>
|
|
@ -1,3 +0,0 @@
|
|||
@{
|
||||
Layout = "~/Views/shared/_default.cshtml";
|
||||
}
|
|
@ -1,107 +0,0 @@
|
|||
@using BuildFeed.Model
|
||||
@model MetaItemModel
|
||||
@{
|
||||
ViewBag.Title = $"Add metadata for {Model.Id.Value} | {InvariantTerms.SiteName}";
|
||||
}
|
||||
|
||||
@section head
|
||||
{
|
||||
<link href="~/Scripts/trumbowyg/ui/trumbowyg.min.css" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
|
||||
<h1>@($"Add metadata for {Model.Id.Value}")</h1>
|
||||
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
@Html.HiddenFor(model => model.Id.Type)
|
||||
@Html.HiddenFor(model => model.Id.Value)
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.MetaDescription)
|
||||
<div class="wide-group">
|
||||
@Html.TextAreaFor(model => model.MetaDescription, new
|
||||
{
|
||||
rows = "4"
|
||||
})
|
||||
<div>
|
||||
<span id="meta-count">0</span> characters
|
||||
@Html.ValidationMessageFor(model => model.MetaDescription)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.PageContent)
|
||||
<div class="wide-group">
|
||||
@Html.TextAreaFor(model => model.PageContent)
|
||||
<div>
|
||||
@Html.ValidationMessageFor(model => model.PageContent)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<span class="label-placeholder"></span>
|
||||
<div>
|
||||
<input type="submit" value="Add metadata" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@section Scripts
|
||||
{
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
||||
<script src="~/Scripts/trumbowyg/trumbowyg.min.js" type="text/javascript"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.17.0/jquery.validate.min.js" integrity="sha256-F6h55Qw6sweK+t7SiOJX+2bpSAa3b/fnlrVCJvmEj1A=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validation-unobtrusive/3.2.6/jquery.validate.unobtrusive.min.js" integrity="sha256-g1QKGxqsp+x5JkuN/JjHl96je2wztgS5Wo4h4c7gm9M=" crossorigin="anonymous"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function updateMetaCount()
|
||||
{
|
||||
var count = document.getElementById("@Html.IdFor(model => model.MetaDescription)").value.length;
|
||||
$("#meta-count").text(count.toFixed(0));
|
||||
if (count === 0)
|
||||
{
|
||||
$("#meta-count").attr("class", "");
|
||||
}
|
||||
else if (count < 160)
|
||||
{
|
||||
$("#meta-count").attr("class", "text-success");
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#meta-count").attr("class", "text-danger");
|
||||
}
|
||||
}
|
||||
|
||||
$(function()
|
||||
{
|
||||
$.trumbowyg.svgPath = "/Scripts/trumbowyg/ui/icons.svg";
|
||||
|
||||
$("#@Html.IdFor(model => model.PageContent)")
|
||||
.trumbowyg({
|
||||
autogrow: true,
|
||||
btns: [
|
||||
['strong', 'em'],
|
||||
'|', 'link',
|
||||
'|', ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
|
||||
'|', ['unorderedList', 'orderedList'],
|
||||
'|', 'viewHTML',
|
||||
'|'
|
||||
]
|
||||
});
|
||||
|
||||
$("#@Html.IdFor(model => model.MetaDescription)")
|
||||
.keyup(function()
|
||||
{
|
||||
updateMetaCount();
|
||||
});
|
||||
|
||||
updateMetaCount();
|
||||
});
|
||||
</script>
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
@using BuildFeed.Admin.Models.ViewModel
|
||||
@using BuildFeed.Model
|
||||
@model MetaListing
|
||||
|
||||
@{
|
||||
ViewBag.Title = $"Manage metadata | {InvariantTerms.SiteName}";
|
||||
}
|
||||
|
||||
<h1>Manage metadata</h1>
|
||||
<ul>
|
||||
<li>@Html.ActionLink("Return to admin panel", nameof(RootController.Index), "Root")</li>
|
||||
</ul>
|
||||
<h3>Current items</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th style="width: 50px"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var group in Model.CurrentItems)
|
||||
{
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<h4>@group.Key</h4>
|
||||
</td>
|
||||
</tr>
|
||||
foreach (MetaItemModel item in group)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.Id.Value</td>
|
||||
<td>
|
||||
@Html.ActionLink("Edit", nameof(MetaController.Edit), new
|
||||
{
|
||||
type = item.Id.Type,
|
||||
value = item.Id.Value
|
||||
}, new
|
||||
{
|
||||
@class = "button",
|
||||
style = "width:50px"
|
||||
})</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>Add new items</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th style="width: 50px"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var group in Model.NewItems)
|
||||
{
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<h4>@group.Key</h4>
|
||||
</td>
|
||||
</tr>
|
||||
foreach (MetaItemModel item in group)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.Id.Value</td>
|
||||
<td>
|
||||
@Html.ActionLink("Create", nameof(MetaController.Create), new
|
||||
{
|
||||
type = item.Id.Type,
|
||||
value = item.Id.Value
|
||||
}, new
|
||||
{
|
||||
@class = "button",
|
||||
style = "width:50px"
|
||||
})</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
|
@ -1,47 +0,0 @@
|
|||
@using Humanizer
|
||||
@model IEnumerable<MembershipUser>
|
||||
|
||||
@{
|
||||
ViewBag.Title = "View administrators | BuildFeed";
|
||||
}
|
||||
|
||||
<h1>View administrators</h1>
|
||||
|
||||
<ul>
|
||||
<li>@Html.ActionLink("Manage users", "Index")</li>
|
||||
<li>@Html.ActionLink("Return to admin panel", "Index", "Root")</li>
|
||||
</ul>
|
||||
|
||||
<table class="table table-striped table-bordered table-admin">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Username
|
||||
</th>
|
||||
<th>
|
||||
Email Address
|
||||
</th>
|
||||
<th>
|
||||
Last Login Time
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (MembershipUser mu in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@mu.UserName
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:@mu.Email">@mu.Email</a>
|
||||
</td>
|
||||
<td>
|
||||
@(mu.LastLoginDate == default(DateTime)
|
||||
? "Never"
|
||||
: mu.LastLoginDate.Humanize())
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
|
@ -1,109 +0,0 @@
|
|||
@using Humanizer
|
||||
@model IEnumerable<MembershipUser>
|
||||
|
||||
@{
|
||||
ViewBag.Title = $"Manage users | {InvariantTerms.SiteName}";
|
||||
}
|
||||
|
||||
<h1>Manage users</h1>
|
||||
|
||||
<ul>
|
||||
<li>@Html.ActionLink("View administrators", "Admins")</li>
|
||||
<li>@Html.ActionLink("Clean-up old unapproved users", "Cleanup")</li>
|
||||
<li>@Html.ActionLink("Return to admin panel", "Index", "Root")</li>
|
||||
</ul>
|
||||
|
||||
<table id="user-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Username
|
||||
</th>
|
||||
<th>
|
||||
Email Address
|
||||
</th>
|
||||
<th>
|
||||
Registration Time
|
||||
</th>
|
||||
<th>
|
||||
Last Login Time
|
||||
</th>
|
||||
<th>
|
||||
Last Lockout Time
|
||||
</th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
<th style="width: 100px;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (MembershipUser mu in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@mu.UserName
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:@mu.Email" title="@mu.Email">@mu.Email</a>
|
||||
</td>
|
||||
<td>
|
||||
@mu.CreationDate.Humanize()
|
||||
</td>
|
||||
<td>
|
||||
@(mu.LastLoginDate == DateTime.MinValue
|
||||
? "Never"
|
||||
: mu.LastLoginDate.Humanize())
|
||||
</td>
|
||||
<td>
|
||||
@(mu.LastLockoutDate == DateTime.MinValue
|
||||
? "Never"
|
||||
: mu.LastLockoutDate.Humanize())
|
||||
</td>
|
||||
<td class="text-right">
|
||||
@(mu.IsApproved
|
||||
? Html.ActionLink("Unapprove", nameof(UsersController.Unapprove), new
|
||||
{
|
||||
id = mu.ProviderUserKey
|
||||
}, new
|
||||
{
|
||||
@class = "button delete-button"
|
||||
})
|
||||
: Html.ActionLink("Approve", nameof(UsersController.Approve), new
|
||||
{
|
||||
id = mu.ProviderUserKey
|
||||
}, new
|
||||
{
|
||||
@class = "button add-button"
|
||||
}))
|
||||
</td>
|
||||
<td class="text-right">
|
||||
@(!mu.IsLockedOut
|
||||
? Html.ActionLink("Lock", nameof(UsersController.Lock), new
|
||||
{
|
||||
id = mu.ProviderUserKey
|
||||
}, new
|
||||
{
|
||||
@class = "button delete-button"
|
||||
})
|
||||
: Html.ActionLink("Unlock", nameof(UsersController.Unlock), new
|
||||
{
|
||||
id = mu.ProviderUserKey
|
||||
}, new
|
||||
{
|
||||
@class = "button add-button"
|
||||
}))
|
||||
</td>
|
||||
<td>
|
||||
@Html.ActionLink("Delete", nameof(UsersController.Delete), new
|
||||
{
|
||||
id = mu.ProviderUserKey
|
||||
}, new
|
||||
{
|
||||
@class = "button delete-button",
|
||||
onclick = @"return !(confirm(""Are you sure you want to delete this user?"") === false);"
|
||||
})
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
|
@ -1,36 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<pages pageBaseType="System.Web.Mvc.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Mvc" />
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="BuildFeed" />
|
||||
<add namespace="BuildFeed.Local" />
|
||||
<add namespace="BuildFeed.Admin.Controllers" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<remove name="BlockViewHandler" />
|
||||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
|
@ -1,13 +0,0 @@
|
|||
using System.Web.Mvc;
|
||||
|
||||
namespace BuildFeed.Admin
|
||||
{
|
||||
public class AdminAreaRegistration : AreaRegistration
|
||||
{
|
||||
public override string AreaName => "admin";
|
||||
|
||||
public override void RegisterArea(AreaRegistrationContext context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,430 +1,133 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{CDDCF754-ECAA-4A66-ADAA-62957A57A51B}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>BuildFeed</RootNamespace>
|
||||
<AssemblyName>BuildFeed</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
|
||||
<EnableUpdateable>false</EnableUpdateable>
|
||||
<MvcBuildViews>true</MvcBuildViews>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<ApplicationInsightsResourceId>/subscriptions/4af45631-0e5c-4253-9e38-d0c47f9c5b32/resourcegroups/Default-ApplicationInsights-CentralUS/providers/microsoft.insights/components/BuildFeed</ApplicationInsightsResourceId>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<UseGlobalApplicationHostFile />
|
||||
<TargetFrameworkProfile />
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
|
||||
<Use64BitIISExpress />
|
||||
<MSBuildGitHashValidate>False</MSBuildGitHashValidate>
|
||||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>ExtendedCorrectnessRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TypeScriptTarget>ES6</TypeScriptTarget>
|
||||
<TypeScriptJSXEmit>None</TypeScriptJSXEmit>
|
||||
<TypeScriptCompileOnSaveEnabled>True</TypeScriptCompileOnSaveEnabled>
|
||||
<TypeScriptNoImplicitAny>False</TypeScriptNoImplicitAny>
|
||||
<TypeScriptModuleKind>ES6</TypeScriptModuleKind>
|
||||
<TypeScriptRemoveComments>False</TypeScriptRemoveComments>
|
||||
<TypeScriptOutFile />
|
||||
<TypeScriptOutDir />
|
||||
<TypeScriptGeneratesDeclarations>False</TypeScriptGeneratesDeclarations>
|
||||
<TypeScriptNoEmitOnError>True</TypeScriptNoEmitOnError>
|
||||
<TypeScriptSourceMap>True</TypeScriptSourceMap>
|
||||
<TypeScriptMapRoot />
|
||||
<TypeScriptSourceRoot />
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<UserSecretsId>aspnet-BuildFeed-794E2AE1-72C2-4F00-B783-1C78917251E7</UserSecretsId>
|
||||
<TypeScriptToolsVersion>3.0</TypeScriptToolsVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper" Version="7.0.1" />
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.8.9" />
|
||||
<PackageReference Include="Humanizer">
|
||||
<Version>2.5.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNet.Mvc">
|
||||
<Version>5.2.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNet.Razor">
|
||||
<Version>3.2.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNet.WebApi">
|
||||
<Version>5.2.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNet.WebPages">
|
||||
<Version>3.2.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform">
|
||||
<Version>2.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Net.Compilers">
|
||||
<Version>2.9.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Web.Infrastructure">
|
||||
<Version>1.0.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MSBuildGitHash">
|
||||
<Version>0.3.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="OneSignal.RestAPIv3.Client">
|
||||
<Version>1.0.3</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="WilderMinds.RssSyndication">
|
||||
<Version>1.3.0</Version>
|
||||
</PackageReference>
|
||||
<Content Remove="package.json" />
|
||||
<Content Remove="tsconfig.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="netstandard" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.IO.Compression.FileSystem" />
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
<Reference Include="System.Web.Routing" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
<Reference Include="System.Net.Http.WebRequest" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<PackageReference Include="Humanizer" Version="2.5.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.5" PrivateAssets="All" />
|
||||
<PackageReference Include="OneSignal.RestAPIv3.Client" Version="1.0.3" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="4.5.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="Areas\Admin\Controllers\RootController.cs" />
|
||||
<Compile Include="Areas\Admin\Controllers\MetaController.cs" />
|
||||
<Compile Include="Areas\Admin\Models\ViewModel\MetaListing.cs" />
|
||||
<Compile Include="Code\Base32Encoding.cs" />
|
||||
<Compile Include="Code\CustomContentTypeAttribute.cs" />
|
||||
<Compile Include="Code\DateTimeModelBinder.cs" />
|
||||
<Compile Include="Code\DisplayHelpers.cs" />
|
||||
<Compile Include="App_Start\FilterConfig.cs" />
|
||||
<Compile Include="App_Start\RouteConfig.cs" />
|
||||
<Compile Include="Areas\Admin\adminAreaRegistration.cs" />
|
||||
<Compile Include="Areas\Admin\Controllers\UsersController.cs" />
|
||||
<Compile Include="Code\EmailManager\EmailManager.cs" />
|
||||
<Compile Include="Code\EmailManager\RegistrationEmail.cs" />
|
||||
<Compile Include="Code\MvcIntrinsics.cs" />
|
||||
<Compile Include="Code\OneSignalHelper.cs" />
|
||||
<Compile Include="Code\Options\Locale.cs" />
|
||||
<Compile Include="Code\Options\Theme.cs" />
|
||||
<Compile Include="Code\OutputCachePushAttribute.cs" />
|
||||
<Compile Include="Controllers\AccountController.cs" />
|
||||
<Compile Include="Controllers\ApiController.cs" />
|
||||
<Compile Include="Controllers\BaseController.cs" />
|
||||
<Compile Include="Controllers\FrontController.cs" />
|
||||
<Compile Include="Controllers\RssController.cs" />
|
||||
<Compile Include="Controllers\SupportController.cs" />
|
||||
<Compile Include="Global.asax.cs">
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Folder Include="Areas\" />
|
||||
<Folder Include="wwwroot\res\css\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="BingSiteAuth.xml" />
|
||||
<Content Include="browserconfig.xml" />
|
||||
<Content Include="App_Code\BuildHelpers.cshtml" />
|
||||
<None Include="gulpfile.js" />
|
||||
<None Include="res\css\inc\_christmas.scss" />
|
||||
<None Include="package-lock.json">
|
||||
<DependentUpon>package.json</DependentUpon>
|
||||
</None>
|
||||
<Content Include="res\card\Feature2.png" />
|
||||
<Content Include="res\card\Redstone5.png" />
|
||||
<Content Include="res\css\winter.css">
|
||||
<DependentUpon>winter.scss</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="res\css\winter.css.map">
|
||||
<DependentUpon>winter.css</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="res\ico\notify.png" />
|
||||
<Content Include="OneSignalSDKUpdaterWorker.js" />
|
||||
<Content Include="OneSignalSDKWorker.js" />
|
||||
<Content Include="res\card\Longhorn.png" />
|
||||
<Content Include="res\card\Redstone4.png" />
|
||||
<Content Include="res\card\Redstone3.png" />
|
||||
<Content Include="res\card\Redstone2.png" />
|
||||
<Content Include="res\card\Redstone.png" />
|
||||
<Content Include="res\card\Threshold2.png" />
|
||||
<Content Include="res\card\Threshold.png" />
|
||||
<Content Include="res\card\Windows7.png" />
|
||||
<Content Include="res\card\Windows8.png" />
|
||||
<Content Include="res\card\WindowsBlue.png" />
|
||||
<Content Include="res\card\WindowsVista.png" />
|
||||
<Content Include="res\ico\wide.png" />
|
||||
<Content Include="res\ico\large.png" />
|
||||
<Content Include="res\ico\square.png" />
|
||||
<Content Include="res\ico\tiny.png" />
|
||||
<Content Include="favicon.ico" />
|
||||
<Content Include="Global.asax" />
|
||||
<Content Include="Areas\Admin\Views\web.config" />
|
||||
<Content Include="Areas\Admin\Views\Users\index.cshtml" />
|
||||
<Content Include="Areas\Admin\Views\_ViewStart.cshtml" />
|
||||
<Content Include="Areas\Admin\Views\Root\index.cshtml" />
|
||||
<Content Include="Areas\Admin\Views\Users\admins.cshtml" />
|
||||
<Content Include="Areas\Admin\Views\Meta\index.cshtml" />
|
||||
<Content Include="Areas\Admin\Views\Meta\create.cshtml" />
|
||||
<Content Include="res\card\WindowsXP.png" />
|
||||
<Content Include="res\css\dark.css">
|
||||
<DependentUpon>dark.scss</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="res\css\dark.css.map">
|
||||
<DependentUpon>dark.css</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="res\css\default.css">
|
||||
<DependentUpon>default.scss</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="res\css\default.css.map">
|
||||
<DependentUpon>default.css</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="res\css\light.css">
|
||||
<DependentUpon>light.scss</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="res\css\light.css.map">
|
||||
<DependentUpon>light.css</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="res\css\rtl.css">
|
||||
<DependentUpon>rtl.scss</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="res\css\rtl.css.map">
|
||||
<DependentUpon>rtl.css</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="res\ts\bfs.js">
|
||||
<DependentUpon>bfs.ts</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="res\ts\bfs.js.map">
|
||||
<DependentUpon>bfs.js</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="res\ts\christmas.js">
|
||||
<DependentUpon>christmas.ts</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="res\ts\christmas.js.map">
|
||||
<DependentUpon>christmas.js</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="robots.txt" />
|
||||
<Content Include="App_Code\PaginationHelpers.cshtml" />
|
||||
<Content Include="res\css\default.scss" />
|
||||
<Content Include="res\css\rtl.scss" />
|
||||
<Content Include="res\css\dark.scss" />
|
||||
<Content Include="manifest.json" />
|
||||
<None Include="package.json" />
|
||||
<Content Include="res\Web.config" />
|
||||
<Content Include="res\css\light.scss" />
|
||||
<Content Include="res\css\inc\_variables.scss" />
|
||||
<Content Include="res\css\inc\_nord.scss" />
|
||||
<Content Include="res\css\winter.scss" />
|
||||
<Content Include="Scripts\trumbowyg\langs\ar.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\bg.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\by.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\ca.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\cs.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\da.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\de.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\el.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\es.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\es_ar.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\fa.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\fi.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\fr.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\he.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\hr.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\hu.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\id.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\it.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\ja.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\ko.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\mn.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\my.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\nl.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\no_nb.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\ph.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\pl.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\pt.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\pt_br.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\ro.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\rs.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\rs_latin.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\ru.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\sk.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\sv.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\tr.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\ua.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\vi.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\zh_cn.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\langs\zh_tw.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\plugins\base64\trumbowyg.base64.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\plugins\cleanpaste\trumbowyg.cleanpaste.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\plugins\colors\trumbowyg.colors.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\plugins\colors\ui\trumbowyg.colors.min.css" />
|
||||
<Content Include="Scripts\trumbowyg\plugins\emoji\trumbowyg.emoji.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\plugins\emoji\ui\trumbowyg.emoji.min.css" />
|
||||
<Content Include="Scripts\trumbowyg\plugins\insertaudio\trumbowyg.insertaudio.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\plugins\noembed\trumbowyg.noembed.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\plugins\pasteimage\trumbowyg.pasteimage.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\plugins\preformatted\trumbowyg.preformatted.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\plugins\table\trumbowyg.table.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\plugins\template\trumbowyg.template.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\plugins\upload\trumbowyg.upload.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\trumbowyg.min.js" />
|
||||
<Content Include="Scripts\trumbowyg\ui\icons.svg" />
|
||||
<Content Include="Scripts\trumbowyg\ui\trumbowyg.min.css" />
|
||||
<Content Include="yandex_702baad42b020be7.html" />
|
||||
<None Include="Properties\PublishProfiles\Local Folder.pubxml" />
|
||||
<Content Include="googleacffc6da14c53e15.html" />
|
||||
<Content Include="Scripts\_references.js" />
|
||||
<Content Include="Web.config">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Web.Release.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Views\Web.config" />
|
||||
<Content Include="Views\_ViewStart.cshtml" />
|
||||
<Content Include="Views\shared\_default.cshtml" />
|
||||
<Content Include="Views\front\EditBuild.cshtml" />
|
||||
<Content Include="Views\shared\DisplayTemplates\Enumeration.cshtml" />
|
||||
<Content Include="Views\account\register.cshtml" />
|
||||
<Content Include="Views\account\login.cshtml" />
|
||||
<Content Include="Views\account\password.cshtml" />
|
||||
<Content Include="Views\account\registerthanks.cshtml" />
|
||||
<Content Include="Views\support\rss.cshtml" />
|
||||
<Content Include="Views\support\sitemap.cshtml" />
|
||||
<Content Include="smtp.config">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Views\front\Pages.cshtml" />
|
||||
<Content Include="Views\front\ViewGroup.cshtml" />
|
||||
<Content Include="Views\front\ViewBuild.cshtml" />
|
||||
<Content Include="Views\front\ViewLab.cshtml" />
|
||||
<Content Include="Views\front\ViewSource.cshtml" />
|
||||
<Content Include="Views\front\ViewYear.cshtml" />
|
||||
<Content Include="Views\front\ViewVersion.cshtml" />
|
||||
<Content Include="Views\support\credits.cshtml" />
|
||||
<Content Include="Views\shared\error.cshtml" />
|
||||
<Content Include="Views\front\Index.cshtml" />
|
||||
<Content Include="settings.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Views\front\AddBulk.cshtml" />
|
||||
<Content Include="Views\account\validate-success.cshtml" />
|
||||
<Content Include="Views\account\validate-failure.cshtml" />
|
||||
<None Include="tsconfig.json" />
|
||||
<Content Include="Views\front\ViewFamily.cshtml" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\ar.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\bg.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\by.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\ca.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\cs.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\da.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\de.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\el.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\es.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\es_ar.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\fa.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\fi.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\fr.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\he.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\hr.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\hu.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\id.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\it.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\ja.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\ko.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\lt.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\mn.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\my.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\nl.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\no_nb.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\ph.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\pl.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\pt.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\pt_br.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\ro.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\rs.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\rs_latin.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\ru.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\sk.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\sq.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\sv.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\th.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\tr.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\ua.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\vi.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\zh_cn.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\langs\zh_tw.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\allowtagsfrompaste\trumbowyg.allowtagsfrompaste.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\allowtagsfrompaste\trumbowyg.allowtagsfrompaste.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\base64\trumbowyg.base64.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\base64\trumbowyg.base64.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\cleanpaste\trumbowyg.cleanpaste.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\cleanpaste\trumbowyg.cleanpaste.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\colors\trumbowyg.colors.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\colors\trumbowyg.colors.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\colors\ui\sass\trumbowyg.colors.scss" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\emoji\trumbowyg.emoji.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\emoji\trumbowyg.emoji.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\emoji\ui\sass\trumbowyg.emoji.scss" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\fontfamily\trumbowyg.fontfamily.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\fontfamily\trumbowyg.fontfamily.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\fontsize\trumbowyg.fontsize.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\fontsize\trumbowyg.fontsize.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\highlight\trumbowyg.highlight.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\highlight\trumbowyg.highlight.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\highlight\ui\sass\trumbowyg.highlight.scss" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\history\trumbowyg.history.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\history\trumbowyg.history.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\insertaudio\trumbowyg.insertaudio.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\insertaudio\trumbowyg.insertaudio.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\lineheight\trumbowyg.lineheight.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\lineheight\trumbowyg.lineheight.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\mathml\trumbowyg.mathml.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\mathml\trumbowyg.mathml.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\mathml\ui\sass\trumbowyg.mathml.scss" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\mention\trumbowyg.mention.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\mention\trumbowyg.mention.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\mention\ui\sass\trumbowyg.mention.scss" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\noembed\trumbowyg.noembed.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\noembed\trumbowyg.noembed.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\pasteembed\trumbowyg.pasteembed.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\pasteembed\trumbowyg.pasteembed.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\pasteimage\trumbowyg.pasteimage.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\pasteimage\trumbowyg.pasteimage.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\preformatted\trumbowyg.preformatted.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\preformatted\trumbowyg.preformatted.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\resizimg\trumbowyg.resizimg.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\resizimg\trumbowyg.resizimg.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\ruby\trumbowyg.ruby.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\ruby\trumbowyg.ruby.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\table\trumbowyg.table.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\table\trumbowyg.table.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\table\ui\sass\trumbowyg.table.scss" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\template\trumbowyg.template.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\template\trumbowyg.template.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\upload\trumbowyg.upload.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\plugins\upload\trumbowyg.upload.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\trumbowyg.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\trumbowyg.min.js" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\ui\icons.svg" />
|
||||
<None Include="wwwroot\res\js\trumbowyg\ui\sass\trumbowyg.scss" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
|
||||
<ItemGroup>
|
||||
<TypeScriptCompile Include="res\ts\bfs.ts" />
|
||||
<TypeScriptCompile Include="res\ts\christmas.ts" />
|
||||
<ProjectReference Include="..\BuildFeed.Local\BuildFeed.Local.csproj" />
|
||||
<ProjectReference Include="..\BuildFeed.Model\BuildFeed.Model.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{4A0DDDB5-7A95-4FBF-97CC-616D07737A77}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Authentication\MongoAuth\MongoAuth.csproj">
|
||||
<Project>{7c67bfb9-1b3b-4676-a58d-10573da82cfe}</Project>
|
||||
<Name>MongoAuth</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\BuildFeed.Local\BuildFeed.Local.csproj">
|
||||
<Project>{9ebd4db1-1d37-456b-ad90-357aa89dd1b7}</Project>
|
||||
<Name>BuildFeed.Local</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\BuildFeed.Model\BuildFeed.Model.csproj">
|
||||
<Project>{7e2b4f61-1c11-4471-af80-5480e94c0664}</Project>
|
||||
<Name>BuildFeed.Model</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||
<TypeScriptTarget>ES2015</TypeScriptTarget>
|
||||
<TypeScriptJSXEmit>None</TypeScriptJSXEmit>
|
||||
<TypeScriptCompileOnSaveEnabled>False</TypeScriptCompileOnSaveEnabled>
|
||||
<TypeScriptNoImplicitAny>False</TypeScriptNoImplicitAny>
|
||||
<TypeScriptModuleKind>None</TypeScriptModuleKind>
|
||||
<TypeScriptRemoveComments>True</TypeScriptRemoveComments>
|
||||
<TypeScriptOutFile />
|
||||
<TypeScriptOutDir />
|
||||
<TypeScriptGeneratesDeclarations>False</TypeScriptGeneratesDeclarations>
|
||||
<TypeScriptNoEmitOnError>True</TypeScriptNoEmitOnError>
|
||||
<TypeScriptSourceMap>False</TypeScriptSourceMap>
|
||||
<TypeScriptMapRoot />
|
||||
<TypeScriptSourceRoot />
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets')" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||
<Target Name="AfterBuild">
|
||||
<Copy SourceFiles="$(TargetDir)\$(AssemblyName).dll.config" DestinationFiles="Web.config" />
|
||||
</Target>
|
||||
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
|
||||
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
|
||||
</Target>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>50468</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:50505/</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>attrib +H $(ProjectDir)node_modules /D
|
||||
attrib +H $(ProjectDir)obj /D</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
|
@ -1,3 +0,0 @@
|
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=areas/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=code_005Cemailmanager/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
|
@ -1,137 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace BuildFeed.Code
|
||||
{
|
||||
/* Based off http://stackoverflow.com/a/7135008 */
|
||||
public class Base32Encoding
|
||||
{
|
||||
public static byte[] ToBytes(string input)
|
||||
{
|
||||
if (string.IsNullOrEmpty(input))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(input));
|
||||
}
|
||||
|
||||
input = input.TrimEnd('='); //remove padding characters
|
||||
int byteCount = input.Length * 5 / 8; //this must be TRUNCATED
|
||||
var returnArray = new byte[byteCount];
|
||||
|
||||
byte curByte = 0,
|
||||
bitsRemaining = 8;
|
||||
|
||||
int arrayIndex = 0;
|
||||
|
||||
foreach (char c in input)
|
||||
{
|
||||
int cValue = CharToValue(c);
|
||||
|
||||
int mask;
|
||||
if (bitsRemaining > 5)
|
||||
{
|
||||
mask = cValue << (bitsRemaining - 5);
|
||||
curByte = (byte)(curByte | mask);
|
||||
bitsRemaining -= 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
mask = cValue >> (5 - bitsRemaining);
|
||||
curByte = (byte)(curByte | mask);
|
||||
returnArray[arrayIndex++] = curByte;
|
||||
curByte = (byte)(cValue << (3 + bitsRemaining));
|
||||
bitsRemaining += 3;
|
||||
}
|
||||
}
|
||||
|
||||
//if we didn't end with a full byte
|
||||
if (arrayIndex != byteCount)
|
||||
{
|
||||
returnArray[arrayIndex] = curByte;
|
||||
}
|
||||
|
||||
return returnArray;
|
||||
}
|
||||
|
||||
public static string ToString(byte[] input)
|
||||
{
|
||||
if (input == null || input.Length == 0)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(input));
|
||||
}
|
||||
|
||||
int charCount = (int)Math.Ceiling(input.Length / 5d) * 8;
|
||||
var returnArray = new char[charCount];
|
||||
|
||||
byte nextChar = 0,
|
||||
bitsRemaining = 5;
|
||||
int arrayIndex = 0;
|
||||
|
||||
foreach (byte b in input)
|
||||
{
|
||||
nextChar = (byte)(nextChar | (b >> (8 - bitsRemaining)));
|
||||
returnArray[arrayIndex++] = ValueToChar(nextChar);
|
||||
|
||||
if (bitsRemaining < 4)
|
||||
{
|
||||
nextChar = (byte)((b >> (3 - bitsRemaining)) & 31);
|
||||
returnArray[arrayIndex++] = ValueToChar(nextChar);
|
||||
bitsRemaining += 5;
|
||||
}
|
||||
|
||||
bitsRemaining -= 3;
|
||||
nextChar = (byte)((b << bitsRemaining) & 31);
|
||||
}
|
||||
|
||||
//if we didn't end with a full char
|
||||
if (arrayIndex != charCount)
|
||||
{
|
||||
returnArray[arrayIndex++] = ValueToChar(nextChar);
|
||||
while (arrayIndex != charCount)
|
||||
{
|
||||
returnArray[arrayIndex++] = '='; //padding
|
||||
}
|
||||
}
|
||||
|
||||
return new string(returnArray);
|
||||
}
|
||||
|
||||
private static int CharToValue(char c)
|
||||
{
|
||||
int value = c;
|
||||
|
||||
//65-90 == uppercase letters
|
||||
if (value < 91 && value > 64)
|
||||
{
|
||||
return value - 65;
|
||||
}
|
||||
|
||||
//50-55 == numbers 2-7
|
||||
if (value < 56 && value > 49)
|
||||
{
|
||||
return value - 24;
|
||||
}
|
||||
|
||||
//97-122 == lowercase letters
|
||||
if (value < 123 && value > 96)
|
||||
{
|
||||
return value - 97;
|
||||
}
|
||||
|
||||
throw new ArgumentException("Character is not a Base32 character.", nameof(c));
|
||||
}
|
||||
|
||||
private static char ValueToChar(byte b)
|
||||
{
|
||||
if (b < 26)
|
||||
{
|
||||
return (char)(b + 65);
|
||||
}
|
||||
|
||||
if (b < 32)
|
||||
{
|
||||
return (char)(b + 24);
|
||||
}
|
||||
|
||||
throw new ArgumentException("Byte is not a value Base32 value.", nameof(b));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
using System.Web.Mvc;
|
||||
|
||||
namespace BuildFeed.Code
|
||||
{
|
||||
// this class is a hacky workaround because Microsoft just don't feel like caching the correct content type
|
||||
public class CustomContentTypeAttribute : ActionFilterAttribute
|
||||
{
|
||||
public string ContentType { get; set; }
|
||||
|
||||
public override void OnResultExecuted(ResultExecutedContext filterContext)
|
||||
{
|
||||
filterContext.HttpContext.Response.ContentType = ContentType;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
using System;
|
||||
using System.Globalization;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace BuildFeed.Code
|
||||
{
|
||||
public class DateTimeModelBinder : DefaultModelBinder
|
||||
{
|
||||
public override object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
|
||||
{
|
||||
ValueProviderResult value = bindingContext.ValueProvider.GetValue(bindingContext.ModelName);
|
||||
|
||||
bool success = DateTime.TryParse(value.AttemptedValue,
|
||||
CultureInfo.CurrentUICulture.DateTimeFormat,
|
||||
DateTimeStyles.AllowWhiteSpaces,
|
||||
out DateTime retValue);
|
||||
|
||||
if (!success)
|
||||
{
|
||||
success = DateTime.TryParseExact(value.AttemptedValue,
|
||||
"yyMMdd-HHmm",
|
||||
CultureInfo.InvariantCulture,
|
||||
DateTimeStyles.AllowWhiteSpaces,
|
||||
out retValue);
|
||||
}
|
||||
|
||||
return success
|
||||
? retValue as DateTime?
|
||||
: null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,14 +3,14 @@
|
|||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
|
||||
namespace BuildFeed.Code
|
||||
{
|
||||
public static class MvcExtensions
|
||||
{
|
||||
public static IHtmlString CheckboxListForEnum<T>(this HtmlHelper html, string id, T currentItem)
|
||||
public static string CheckboxListForEnum<T>(this HtmlHelper html, string id, T currentItem)
|
||||
where T : struct
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
|
@ -29,9 +29,15 @@ public static IHtmlString CheckboxListForEnum<T>(this HtmlHelper html, string id
|
|||
var wrapper = new TagBuilder("div");
|
||||
wrapper.Attributes.Add("class", "checkbox");
|
||||
|
||||
var label = new TagBuilder("label");
|
||||
var label = new TagBuilder("label")
|
||||
{
|
||||
TagRenderMode = TagRenderMode.Normal
|
||||
};
|
||||
|
||||
var input = new TagBuilder("input");
|
||||
var input = new TagBuilder("input")
|
||||
{
|
||||
TagRenderMode = TagRenderMode.SelfClosing
|
||||
};
|
||||
if ((enumValue & currentValue) != 0)
|
||||
{
|
||||
input.MergeAttribute("checked", "checked");
|
||||
|
@ -41,15 +47,15 @@ public static IHtmlString CheckboxListForEnum<T>(this HtmlHelper html, string id
|
|||
input.MergeAttribute("value", enumValue.ToString());
|
||||
input.MergeAttribute("name", id);
|
||||
|
||||
label.InnerHtml = input.ToString(TagRenderMode.SelfClosing);
|
||||
label.InnerHtml += GetDisplayTextForEnum(enumItem);
|
||||
label.InnerHtml.AppendHtml(input.ToString());
|
||||
label.InnerHtml.Append(GetDisplayTextForEnum(enumItem));
|
||||
|
||||
wrapper.InnerHtml = label.ToString(TagRenderMode.Normal);
|
||||
wrapper.InnerHtml.AppendHtml(label.ToString());
|
||||
|
||||
sb.Append(wrapper.ToString(TagRenderMode.Normal));
|
||||
sb.Append(wrapper);
|
||||
}
|
||||
|
||||
return new HtmlString(sb.ToString());
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public static string GetDisplayTextForEnum(object o)
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
namespace BuildFeed.Code
|
||||
{
|
||||
public static partial class EmailManager
|
||||
{
|
||||
private const string EMAIL_FROM = "thomas@buildfeed.net";
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
using System.Net.Mail;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Security;
|
||||
using BuildFeed.Local;
|
||||
|
||||
namespace BuildFeed.Code
|
||||
{
|
||||
public static partial class EmailManager
|
||||
{
|
||||
public static async Task SendRegistrationEmail(MembershipUser mu, string validationLink)
|
||||
{
|
||||
using (var mm = new MailMessage(EMAIL_FROM, mu.Email))
|
||||
{
|
||||
mm.Subject = string.Format(VariantTerms.Email_Registration_Subject, InvariantTerms.SiteName);
|
||||
mm.Body = string.Format(VariantTerms.Email_Registration_Body, InvariantTerms.SiteName, validationLink);
|
||||
|
||||
using (var sc = new SmtpClient())
|
||||
{
|
||||
await sc.SendMailAsync(mm);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
using System.Web.Mvc;
|
||||
using System.Web.WebPages;
|
||||
|
||||
namespace BuildFeed.Code
|
||||
{
|
||||
public static class MvcIntrinsics
|
||||
{
|
||||
public static AjaxHelper Ajax => ((WebViewPage)WebPageContext.Current.Page).Ajax;
|
||||
public static HtmlHelper Html => ((WebViewPage)WebPageContext.Current.Page).Html;
|
||||
public static UrlHelper Url => ((WebViewPage)WebPageContext.Current.Page).Url;
|
||||
}
|
||||
}
|
|
@ -12,11 +12,11 @@ namespace BuildFeed.Code
|
|||
{
|
||||
public static class OneSignalHelper
|
||||
{
|
||||
public static void PushNewBuild(this OneSignalClient osc, Build build, string url)
|
||||
public static void PushNewBuild(this OneSignalClient osc, Guid appId, Build build, string url)
|
||||
{
|
||||
osc.Notifications.Create(new NotificationCreateOptions
|
||||
{
|
||||
AppId = Guid.Parse(ConfigurationManager.AppSettings["push:AppId"]),
|
||||
AppId = appId,
|
||||
IncludedSegments = new List<string>
|
||||
{
|
||||
#if DEBUG
|
||||
|
|
|
@ -1,89 +0,0 @@
|
|||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace BuildFeed.Code.Options
|
||||
{
|
||||
public class Locale
|
||||
{
|
||||
private const string LANG_COOKIE_NAME = "bf_lang";
|
||||
|
||||
public static readonly Locale[] AvailableLocales =
|
||||
{
|
||||
new Locale("ar"),
|
||||
//new Locale("bn"),
|
||||
new Locale("cs"),
|
||||
new Locale("de"),
|
||||
new Locale("el"),
|
||||
new Locale("en"),
|
||||
new Locale("es"),
|
||||
new Locale("fa"),
|
||||
new Locale("fi"),
|
||||
new Locale("fr"),
|
||||
new Locale("he"),
|
||||
new Locale("hr"),
|
||||
new Locale("hu"),
|
||||
new Locale("id"),
|
||||
new Locale("it"),
|
||||
new Locale("ja"),
|
||||
new Locale("ko"),
|
||||
new Locale("lt"),
|
||||
new Locale("nl"),
|
||||
new Locale("pl"),
|
||||
new Locale("pt"),
|
||||
new Locale("pt-br"),
|
||||
//new Locale("qps-ploc"),
|
||||
new Locale("ro"),
|
||||
new Locale("ru"),
|
||||
new Locale("sk"),
|
||||
new Locale("sl"),
|
||||
new Locale("sv"),
|
||||
new Locale("tr"),
|
||||
new Locale("uk"),
|
||||
new Locale("vi"),
|
||||
new Locale("zh-hans"),
|
||||
new Locale("zh-hant")
|
||||
};
|
||||
|
||||
public string DisplayName => Info.NativeName;
|
||||
|
||||
public CultureInfo Info { get; set; }
|
||||
public string LocaleId { get; set; }
|
||||
|
||||
public Locale(string localeId)
|
||||
{
|
||||
LocaleId = localeId;
|
||||
Info = CultureInfo.GetCultureInfo(localeId);
|
||||
}
|
||||
|
||||
public static CultureInfo DetectCulture(HttpContextBase context)
|
||||
{
|
||||
string langCookie = context.Request.Cookies[LANG_COOKIE_NAME]?.Value;
|
||||
|
||||
if (!string.IsNullOrEmpty(langCookie))
|
||||
{
|
||||
try
|
||||
{
|
||||
var ci = (CultureInfo)CultureInfo.GetCultureInfo(langCookie).Clone();
|
||||
|
||||
// Get Gregorian Calendar in locale if available
|
||||
Calendar gc = ci.OptionalCalendars.FirstOrDefault(c
|
||||
=> c is GregorianCalendar
|
||||
&& ((GregorianCalendar)c).CalendarType == GregorianCalendarTypes.Localized);
|
||||
if (gc != null)
|
||||
{
|
||||
ci.DateTimeFormat.Calendar = gc;
|
||||
}
|
||||
|
||||
return ci;
|
||||
}
|
||||
|
||||
catch (CultureNotFoundException)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
return CultureInfo.CurrentCulture;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using BuildFeed.Local;
|
||||
|
||||
namespace BuildFeed.Code.Options
|
||||
{
|
||||
public class Theme
|
||||
{
|
||||
private const string THEME_COOKIE_NAME = "bf_theme";
|
||||
|
||||
public static Theme[] AvailableThemes = (from st in Enum.GetValues(typeof(SiteTheme)).Cast<SiteTheme>()
|
||||
select new Theme(st)).ToArray();
|
||||
|
||||
public string CookieValue => Value.ToString();
|
||||
public string CssPath => $"~/res/css/{Value.ToString().ToLower()}.css";
|
||||
public string DisplayName => MvcExtensions.GetDisplayTextForEnum(Value);
|
||||
public SiteTheme Value { get; }
|
||||
|
||||
public Theme(SiteTheme st)
|
||||
{
|
||||
Value = st;
|
||||
}
|
||||
|
||||
public static SiteTheme DetectTheme(HttpContextBase context)
|
||||
{
|
||||
string themeCookie = context.Request.Cookies[THEME_COOKIE_NAME]?.Value;
|
||||
var theme = SiteTheme.Dark;
|
||||
if (!string.IsNullOrEmpty(themeCookie))
|
||||
{
|
||||
Enum.TryParse(themeCookie, out theme);
|
||||
}
|
||||
|
||||
return theme;
|
||||
}
|
||||
}
|
||||
|
||||
public enum SiteTheme
|
||||
{
|
||||
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Common_ThemeDark))]
|
||||
Dark = 0,
|
||||
|
||||
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Common_ThemeLight))]
|
||||
Light,
|
||||
|
||||
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Common_ThemeWinter))]
|
||||
Winter
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
using System.Globalization;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using BuildFeed.Code.Options;
|
||||
|
||||
namespace BuildFeed.Code
|
||||
{
|
||||
public class OutputCachePushAttribute : ActionFilterAttribute
|
||||
{
|
||||
public override void OnResultExecuted(ResultExecutedContext filterContext)
|
||||
{
|
||||
bool isRtl = CultureInfo.CurrentUICulture.TextInfo.IsRightToLeft;
|
||||
var theme = new Theme(Theme.DetectTheme(filterContext.HttpContext));
|
||||
|
||||
filterContext.HttpContext.Response.PushPromise("/res/css/default.css");
|
||||
filterContext.HttpContext.Response.PushPromise(VirtualPathUtility.ToAbsolute(theme.CssPath));
|
||||
if (isRtl)
|
||||
{
|
||||
filterContext.HttpContext.Response.PushPromise("/res/css/rtl.css");
|
||||
}
|
||||
|
||||
filterContext.HttpContext.Response.PushPromise("/res/ts/bfs.js");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,161 +0,0 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Security;
|
||||
using BuildFeed.Code;
|
||||
using BuildFeed.Local;
|
||||
using BuildFeed.Model.View;
|
||||
using MongoAuth;
|
||||
|
||||
namespace BuildFeed.Controllers
|
||||
{
|
||||
public class AccountController : BaseController
|
||||
{
|
||||
[Route("login/")]
|
||||
public ActionResult Login() => View();
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
[Route("login/")]
|
||||
public ActionResult Login(LoginUser ru)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
bool isAuthenticated = Membership.ValidateUser(ru.UserName, ru.Password);
|
||||
|
||||
if (isAuthenticated)
|
||||
{
|
||||
int expiryLength = ru.RememberMe
|
||||
? 129600
|
||||
: 60;
|
||||
|
||||
var ticket = new FormsAuthenticationTicket(ru.UserName, true, expiryLength);
|
||||
string encryptedTicket = FormsAuthentication.Encrypt(ticket);
|
||||
var cookieTicket = new HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket)
|
||||
{
|
||||
Expires = DateTime.Now.AddMinutes(expiryLength),
|
||||
Path = FormsAuthentication.FormsCookiePath
|
||||
};
|
||||
Response.Cookies.Add(cookieTicket);
|
||||
|
||||
string returnUrl = string.IsNullOrEmpty(Request.QueryString["ReturnUrl"])
|
||||
? "/"
|
||||
: Request.QueryString["ReturnUrl"];
|
||||
|
||||
return Redirect(returnUrl);
|
||||
}
|
||||
}
|
||||
|
||||
ViewData["ErrorMessage"] = "The username and password are not valid.";
|
||||
return View(ru);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[Route("password/")]
|
||||
public ActionResult Password() => View();
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
[Authorize]
|
||||
[Route("password/")]
|
||||
public ActionResult Password(ChangePassword cp)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
MembershipUser user = Membership.GetUser();
|
||||
|
||||
if (user != null)
|
||||
{
|
||||
bool success = user.ChangePassword(cp.OldPassword, cp.NewPassword);
|
||||
|
||||
if (success)
|
||||
{
|
||||
return Redirect("/");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ViewData["ErrorMessage"] = VariantTerms.Support_Error_ChangingPasswordFail;
|
||||
return View(cp);
|
||||
}
|
||||
|
||||
[Route("logout/")]
|
||||
public ActionResult Logout()
|
||||
{
|
||||
FormsAuthentication.SignOut();
|
||||
return Redirect("/");
|
||||
}
|
||||
|
||||
[Route("register/")]
|
||||
public ActionResult Register() => View();
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
[Route("register/")]
|
||||
public async Task<ActionResult> Register(RegistrationUser ru)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
MembershipUser mu = Membership.CreateUser(ru.UserName,
|
||||
ru.Password,
|
||||
ru.EmailAddress,
|
||||
"{IGNORE}",
|
||||
"{IGNORE}",
|
||||
false,
|
||||
out MembershipCreateStatus status);
|
||||
|
||||
switch (status)
|
||||
{
|
||||
case MembershipCreateStatus.Success:
|
||||
{
|
||||
Roles.AddUserToRole(mu.UserName, "Users");
|
||||
|
||||
var provider = (MongoMembershipProvider)Membership.Provider;
|
||||
var id = (Guid)mu.ProviderUserKey;
|
||||
string hash = (await provider.GenerateValidationHash(id)).ToLowerInvariant();
|
||||
|
||||
string fullUrl = Request.Url?.GetLeftPart(UriPartial.Authority)
|
||||
+ Url.Action("Validate",
|
||||
"Account",
|
||||
new
|
||||
{
|
||||
id,
|
||||
hash
|
||||
});
|
||||
await EmailManager.SendRegistrationEmail(mu, fullUrl);
|
||||
return RedirectToAction(nameof(RegisterThanks));
|
||||
}
|
||||
case MembershipCreateStatus.InvalidPassword:
|
||||
ViewData["ErrorMessage"] = VariantTerms.Support_Error_InvalidPassword;
|
||||
break;
|
||||
case MembershipCreateStatus.DuplicateEmail:
|
||||
ViewData["ErrorMessage"] = VariantTerms.Support_Error_DuplicateEmail;
|
||||
break;
|
||||
case MembershipCreateStatus.DuplicateUserName:
|
||||
ViewData["ErrorMessage"] = VariantTerms.Support_Error_DuplicateUserName;
|
||||
break;
|
||||
default:
|
||||
ViewData["ErrorMessage"] = VariantTerms.Support_Error_UnknownError;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return View(ru);
|
||||
}
|
||||
|
||||
[Route("register/thanks/")]
|
||||
public ActionResult RegisterThanks() => View();
|
||||
|
||||
[Route("validate/{id:guid}/{hash}/")]
|
||||
public async Task<ActionResult> Validate(Guid id, string hash)
|
||||
{
|
||||
var provider = (MongoMembershipProvider)Membership.Provider;
|
||||
bool success = await provider.ValidateUserFromHash(id, hash);
|
||||
|
||||
return View(success
|
||||
? "validate-success"
|
||||
: "validate-failure");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using BuildFeed.Code.Options;
|
||||
|
||||
namespace BuildFeed.Controllers
|
||||
{
|
||||
public class BaseController : Controller
|
||||
{
|
||||
public static string VersionString = Assembly.GetExecutingAssembly()
|
||||
.GetCustomAttributes(typeof(AssemblyMetadataAttribute))
|
||||
.OfType<AssemblyMetadataAttribute>()
|
||||
.FirstOrDefault(a => a.Key == "GitHash")
|
||||
?.Value
|
||||
?? "N/A";
|
||||
|
||||
protected override void Initialize(RequestContext requestContext)
|
||||
{
|
||||
CultureInfo ci = Locale.DetectCulture(requestContext.HttpContext);
|
||||
CultureInfo.CurrentCulture = ci;
|
||||
CultureInfo.CurrentUICulture = ci;
|
||||
|
||||
ViewBag.Theme = new Theme(Theme.DetectTheme(requestContext.HttpContext));
|
||||
ViewBag.Version = VersionString;
|
||||
|
||||
base.Initialize(requestContext);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,264 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Http;
|
||||
using System.Web.Security;
|
||||
using AutoMapper;
|
||||
using BuildFeed.Code;
|
||||
using BuildFeed.Local;
|
||||
using BuildFeed.Model;
|
||||
using BuildFeed.Model.Api;
|
||||
using BuildFeed.Model.View;
|
||||
using OneSignal.RestAPIv3.Client;
|
||||
|
||||
#pragma warning disable SG0016 // Controller method is vulnerable to CSRF - Not relevant for API
|
||||
|
||||
namespace BuildFeed.Controllers
|
||||
{
|
||||
public class ApiController : System.Web.Http.ApiController
|
||||
{
|
||||
private readonly BuildRepository _bModel;
|
||||
|
||||
public ApiController()
|
||||
{
|
||||
_bModel = new BuildRepository();
|
||||
}
|
||||
|
||||
public async Task<ApiBuild[]> GetBuilds(int limit = 20, int skip = 0)
|
||||
=> (from b in await _bModel.SelectBuildsByOrder(limit, skip)
|
||||
select Mapper.Map<ApiBuild>(b)).ToArray();
|
||||
|
||||
public async Task<FrontBuildGroup[]> GetBuildGroups(int limit = 20, int skip = 0)
|
||||
{
|
||||
var bgroups = await _bModel.SelectAllGroups(limit, skip);
|
||||
return bgroups.ToArray();
|
||||
}
|
||||
|
||||
public async Task<ApiBuild[]> GetBuildsForBuildGroup(uint major, uint minor, uint number, uint? revision = null)
|
||||
=> (from b in await _bModel.SelectGroup(new BuildGroup
|
||||
{
|
||||
Major = major,
|
||||
Minor = minor,
|
||||
Build = number,
|
||||
Revision = revision
|
||||
})
|
||||
select Mapper.Map<ApiBuild>(b)).ToArray();
|
||||
|
||||
public async Task<ApiBuild[]> GetBuildsByLab(string lab, int limit = 20, int skip = 0)
|
||||
=> (from b in await _bModel.SelectLab(lab, limit, skip)
|
||||
select Mapper.Map<ApiBuild>(b)).ToArray();
|
||||
|
||||
public async Task<List<FamilyOverview>> GetFamilyOverviews() => await _bModel.SelectFamilyOverviews();
|
||||
|
||||
public async Task<IEnumerable<string>> GetWin10Labs()
|
||||
{
|
||||
var labs = new List<string>();
|
||||
labs.AddRange(await _bModel.SelectLabsForVersion(6, 4));
|
||||
labs.AddRange(await _bModel.SelectLabsForVersion(10, 0));
|
||||
|
||||
return labs.GroupBy(l => l).Select(l => l.Key).Where(l => l.All(c => c != '(')).ToArray();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<bool> AddWin10Builds(NewBuildPost apiModel)
|
||||
{
|
||||
if (apiModel == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Membership.ValidateUser(apiModel.Username, apiModel.Password)
|
||||
&& (Roles.IsUserInRole(apiModel.Username, "Editors")
|
||||
|| Roles.IsUserInRole(apiModel.Username, "Administrators")))
|
||||
{
|
||||
var generateOldItem = new Func<NewBuild, BuildDetails>(nb =>
|
||||
{
|
||||
var bi = new BuildDetails
|
||||
{
|
||||
MajorVersion = nb.MajorVersion,
|
||||
MinorVersion = nb.MinorVersion,
|
||||
Number = nb.Number,
|
||||
Revision = nb.Revision,
|
||||
Lab = nb.Lab,
|
||||
BuildTime = nb.BuildTime.HasValue
|
||||
? DateTime.SpecifyKind(nb.BuildTime.Value, DateTimeKind.Utc)
|
||||
: null as DateTime?,
|
||||
SourceType = TypeOfSource.PrivateLeak
|
||||
};
|
||||
|
||||
return bi;
|
||||
});
|
||||
|
||||
var builds = apiModel.NewBuilds.Select(nb => new Build
|
||||
{
|
||||
MajorVersion = nb.MajorVersion,
|
||||
MinorVersion = nb.MinorVersion,
|
||||
Number = nb.Number,
|
||||
Revision = nb.Revision,
|
||||
Lab = nb.Lab,
|
||||
BuildTime = nb.BuildTime.HasValue
|
||||
? DateTime.SpecifyKind(nb.BuildTime.Value, DateTimeKind.Utc)
|
||||
: null as DateTime?,
|
||||
Added = DateTime.SpecifyKind(DateTime.UtcNow, DateTimeKind.Utc),
|
||||
Modified = DateTime.SpecifyKind(DateTime.UtcNow, DateTimeKind.Utc),
|
||||
SourceType = TypeOfSource.PrivateLeak,
|
||||
|
||||
History = new List<ItemHistory<BuildDetails>>
|
||||
{
|
||||
new ItemHistory<BuildDetails>
|
||||
{
|
||||
Type = ItemHistoryType.Added,
|
||||
Time = DateTime.SpecifyKind(DateTime.UtcNow, DateTimeKind.Utc),
|
||||
UserName = apiModel.Username,
|
||||
Item = generateOldItem(nb)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
foreach (Build build in builds)
|
||||
{
|
||||
await _bModel.Insert(build);
|
||||
|
||||
var osc = new OneSignalClient(ConfigurationManager.AppSettings["push:OneSignalApiKey"]);
|
||||
osc.PushNewBuild(build,
|
||||
$"https://buildfeed.net{Url.Route("Build", new { controller = "Front", action = nameof(FrontController.ViewBuild), id = build.Id, area = "", httproute = "" })}?utm_source=notification&utm_campaign=new_build");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<SearchResult>> GetSearchResult(string id, int maxResults = 16)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(id))
|
||||
{
|
||||
return Array.Empty<SearchResult>();
|
||||
}
|
||||
|
||||
var results = new List<SearchResult>();
|
||||
|
||||
results.AddRange(from s in (from c in await _bModel.SelectAllSources()
|
||||
select new
|
||||
{
|
||||
Text = MvcExtensions.GetDisplayTextForEnum(c),
|
||||
Value = c
|
||||
})
|
||||
where s.Text.ToLower().Contains(id.ToLower())
|
||||
orderby s.Text.ToLower().IndexOf(id.ToLower(), StringComparison.Ordinal)
|
||||
select new SearchResult
|
||||
{
|
||||
Url = Url.Route("Source Root",
|
||||
new
|
||||
{
|
||||
controller = "Front",
|
||||
action = "ViewSource",
|
||||
source = s.Value
|
||||
}),
|
||||
Label = s.Text.Replace(id, "<strong>" + id + "</strong>"),
|
||||
Title = s.Text,
|
||||
Group = VariantTerms.Search_Source
|
||||
});
|
||||
|
||||
if (results.Count >= maxResults)
|
||||
{
|
||||
return results.Take(maxResults);
|
||||
}
|
||||
|
||||
results.AddRange(from v in await _bModel.SelectAllVersions()
|
||||
where $"{v.Major}.{v.Minor}".StartsWith(id)
|
||||
orderby v.Major descending, v.Minor descending
|
||||
select new SearchResult
|
||||
{
|
||||
Url = Url.Route("Version Root",
|
||||
new
|
||||
{
|
||||
controller = "Front",
|
||||
action = "ViewVersion",
|
||||
major = v.Major,
|
||||
minor = v.Minor
|
||||
}),
|
||||
Label = $"{v.Major}.{v.Minor}".Replace(id, "<strong>" + id + "</strong>"),
|
||||
Title = "",
|
||||
Group = VariantTerms.Search_Version
|
||||
});
|
||||
|
||||
if (results.Count >= maxResults)
|
||||
{
|
||||
return results.Take(maxResults);
|
||||
}
|
||||
|
||||
results.AddRange(from y in await _bModel.SelectAllYears()
|
||||
where y.ToString().Contains(id)
|
||||
orderby y descending
|
||||
select new SearchResult
|
||||
{
|
||||
Url = Url.Route("Year Root",
|
||||
new
|
||||
{
|
||||
controller = "Front",
|
||||
action = "ViewYear",
|
||||
year = y
|
||||
}),
|
||||
Label = y.ToString().Replace(id, "<strong>" + id + "</strong>"),
|
||||
Title = "",
|
||||
Group = VariantTerms.Search_Year
|
||||
});
|
||||
|
||||
if (results.Count >= maxResults)
|
||||
{
|
||||
return results.Take(maxResults);
|
||||
}
|
||||
|
||||
results.AddRange(from l in await _bModel.SearchLabs(id)
|
||||
select new SearchResult
|
||||
{
|
||||
Url = Url.Route("Lab Root",
|
||||
new
|
||||
{
|
||||
controller = "Front",
|
||||
action = "ViewLab",
|
||||
lab = l.Replace('/', '-')
|
||||
}),
|
||||
Label = l.Replace(id, $"<strong>{id}</strong>"),
|
||||
Title = l,
|
||||
Group = VariantTerms.Search_Lab
|
||||
});
|
||||
|
||||
if (results.Count >= maxResults)
|
||||
{
|
||||
return results.Take(maxResults);
|
||||
}
|
||||
|
||||
results.AddRange(from b in await _bModel.SelectBuildsByStringSearch(id, maxResults)
|
||||
select new SearchResult
|
||||
{
|
||||
Url = Url.Route("Build",
|
||||
new
|
||||
{
|
||||
controller = "Front",
|
||||
action = "ViewBuild",
|
||||
id = b.Id
|
||||
}),
|
||||
Label = b.FullBuildString.Replace(id, $"<strong>{id}</strong>"),
|
||||
Title = b.FullBuildString,
|
||||
Group = VariantTerms.Search_Build
|
||||
});
|
||||
|
||||
if (results.Count == 0)
|
||||
{
|
||||
results.Add(new SearchResult
|
||||
{
|
||||
Url = "/",
|
||||
Label = VariantTerms.Search_Empty,
|
||||
Group = ""
|
||||
});
|
||||
}
|
||||
|
||||
return results.Take(16);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,27 +8,37 @@
|
|||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Policy;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Mvc;
|
||||
using BuildFeed.Code;
|
||||
using BuildFeed.Model;
|
||||
using BuildFeed.Model.View;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.IdentityModel.Protocols;
|
||||
using OneSignal.RestAPIv3.Client;
|
||||
|
||||
namespace BuildFeed.Controllers
|
||||
{
|
||||
public class FrontController : BaseController
|
||||
public class FrontController : Controller
|
||||
{
|
||||
public const int PAGE_SIZE = 72;
|
||||
|
||||
private readonly BuildRepository _bModel;
|
||||
private readonly MetaItem _mModel;
|
||||
private readonly IHostingEnvironment _env;
|
||||
private readonly IConfiguration _config;
|
||||
|
||||
public FrontController()
|
||||
public FrontController(IHostingEnvironment env, IConfiguration config, BuildRepository bModel, MetaItem mModel)
|
||||
{
|
||||
_bModel = new BuildRepository();
|
||||
_mModel = new MetaItem();
|
||||
_env = env;
|
||||
_bModel = bModel;
|
||||
_mModel = mModel;
|
||||
_config = config;
|
||||
}
|
||||
|
||||
[Route("", Order = 1)]
|
||||
|
@ -61,7 +71,7 @@ public async Task<ActionResult> IndexPage(int page)
|
|||
|
||||
if (ViewBag.PageNumber > ViewBag.PageCount)
|
||||
{
|
||||
return new HttpNotFoundResult();
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View("Pages", buildGroups);
|
||||
|
@ -105,7 +115,7 @@ public async Task<ActionResult> ViewBuild(Guid id)
|
|||
Build b = await _bModel.SelectById(id);
|
||||
if (b == null)
|
||||
{
|
||||
return new HttpNotFoundResult();
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(b);
|
||||
|
@ -117,7 +127,7 @@ public async Task<ActionResult> ViewBuild(long id)
|
|||
Build b = await _bModel.SelectByLegacyId(id);
|
||||
if (b == null)
|
||||
{
|
||||
return new HttpNotFoundResult();
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(ViewBuild),
|
||||
|
@ -137,10 +147,10 @@ public async Task<ActionResult> TwitterCard(Guid id)
|
|||
Build b = await _bModel.SelectById(id);
|
||||
if (b == null)
|
||||
{
|
||||
return new HttpNotFoundResult();
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
string path = Path.Combine(Server.MapPath("~/res/card/"), $"{b.Family}.png");
|
||||
string path = Path.Combine(_env.WebRootPath, "res/card", $"{b.Family}.png");
|
||||
bool backExists = System.IO.File.Exists(path);
|
||||
|
||||
using (Bitmap bm = backExists
|
||||
|
@ -252,7 +262,7 @@ public async Task<ActionResult> TwitterCard(Guid id)
|
|||
}
|
||||
|
||||
Response.ContentType = "image/png";
|
||||
bm.Save(Response.OutputStream, ImageFormat.Png);
|
||||
bm.Save(Response.Body, ImageFormat.Png);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -265,7 +275,7 @@ public async Task<ActionResult> TwitterCard(long id)
|
|||
Build b = await _bModel.SelectByLegacyId(id);
|
||||
if (b == null)
|
||||
{
|
||||
return new HttpNotFoundResult();
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(TwitterCard),
|
||||
|
@ -308,7 +318,7 @@ public async Task<ActionResult> ViewFamilyPage(ProjectFamily family, int page)
|
|||
|
||||
if (ViewBag.PageNumber > ViewBag.PageCount)
|
||||
{
|
||||
return new HttpNotFoundResult();
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View("viewFamily", builds);
|
||||
|
@ -347,7 +357,7 @@ public async Task<ActionResult> ViewLabPage(string lab, int page)
|
|||
|
||||
if (ViewBag.PageNumber > ViewBag.PageCount)
|
||||
{
|
||||
return new HttpNotFoundResult();
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View("viewLab", builds);
|
||||
|
@ -386,7 +396,7 @@ public async Task<ActionResult> ViewSourcePage(TypeOfSource source, int page)
|
|||
|
||||
if (ViewBag.PageNumber > ViewBag.PageCount)
|
||||
{
|
||||
return new HttpNotFoundResult();
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View("viewSource", builds);
|
||||
|
@ -424,7 +434,7 @@ public async Task<ActionResult> ViewYearPage(int year, int page)
|
|||
|
||||
if (ViewBag.PageNumber > ViewBag.PageCount)
|
||||
{
|
||||
return new HttpNotFoundResult();
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View("viewYear", builds);
|
||||
|
@ -464,7 +474,7 @@ public async Task<ActionResult> ViewVersionPage(uint major, uint minor, int page
|
|||
|
||||
if (ViewBag.PageNumber > ViewBag.PageCount)
|
||||
{
|
||||
return new HttpNotFoundResult();
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View("viewVersion", builds);
|
||||
|
@ -538,8 +548,11 @@ public async Task<ActionResult> AddBuild(Build build)
|
|||
return View("EditBuild", build);
|
||||
}
|
||||
|
||||
var osc = new OneSignalClient(ConfigurationManager.AppSettings["push:OneSignalApiKey"]);
|
||||
osc.PushNewBuild(build,
|
||||
|
||||
var osc = new OneSignalClient(_config.GetValue<string>("push:OneSignalApiKey"));
|
||||
osc.PushNewBuild(
|
||||
_config.GetValue<Guid>("push:AppId"),
|
||||
build,
|
||||
$"https://buildfeed.net{Url.Action(nameof(ViewBuild), new { id = build.Id })}?utm_source=notification&utm_campaign=new_build");
|
||||
|
||||
return RedirectToAction(nameof(ViewBuild),
|
||||
|
@ -562,12 +575,12 @@ public async Task<ActionResult> AddBuild(Build build)
|
|||
[HttpPost]
|
||||
public async Task<ActionResult> AddBulk(FormCollection values)
|
||||
{
|
||||
var osc = new OneSignalClient(ConfigurationManager.AppSettings["push:OneSignalApiKey"]);
|
||||
var osc = new OneSignalClient(_config.GetValue<string>("push:OneSignalApiKey"));
|
||||
var success = new List<Build>();
|
||||
var failed = new List<string>();
|
||||
bool notify = bool.Parse(values[nameof(BulkAddition.SendNotifications)].Split(',')[0]);
|
||||
bool notify = bool.Parse(values[nameof(BulkAddition.SendNotifications)][0]);
|
||||
|
||||
foreach (string line in values[nameof(BulkAddition.Builds)]
|
||||
foreach (string line in values[nameof(BulkAddition.Builds)][0]
|
||||
.Split(new[]
|
||||
{
|
||||
'\r',
|
||||
|
@ -636,7 +649,9 @@ public async Task<ActionResult> AddBulk(FormCollection values)
|
|||
|
||||
if (notify)
|
||||
{
|
||||
osc.PushNewBuild(b,
|
||||
osc.PushNewBuild(
|
||||
_config.GetValue<Guid>("push:AppId"),
|
||||
b,
|
||||
$"https://buildfeed.net{Url.Action(nameof(ViewBuild), new { id = b.Id })}?utm_source=notification&utm_campaign=new_build");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,169 +0,0 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Mvc;
|
||||
using BuildFeed.Model;
|
||||
using WilderMinds.RssSyndication;
|
||||
|
||||
namespace BuildFeed.Controllers
|
||||
{
|
||||
public class RssController : BaseController
|
||||
{
|
||||
private const int RSS_SIZE = 25;
|
||||
private readonly BuildRepository _bModel;
|
||||
|
||||
public RssController()
|
||||
{
|
||||
_bModel = new BuildRepository();
|
||||
}
|
||||
|
||||
[Route("rss/compiled")]
|
||||
public async Task<ActionResult> Index()
|
||||
{
|
||||
var builds = await _bModel.SelectBuildsByCompileDate(RSS_SIZE);
|
||||
|
||||
var feed = new Feed
|
||||
{
|
||||
Title = "BuildFeed RSS - Recently Compiled",
|
||||
Link = new Uri($"{Request.Url.Scheme}://{Request.Url.Authority}"),
|
||||
Items = (from build in builds
|
||||
select new Item
|
||||
{
|
||||
Title = build.AlternateBuildString,
|
||||
Link = new Uri(
|
||||
$"{Request.Url.Scheme}://{Request.Url.Authority}{Url.Action(nameof(FrontController.ViewBuild), new { controller = "Front", id = build.Id })}"),
|
||||
Permalink =
|
||||
$"{Request.Url.Scheme}://{Request.Url.Authority}{Url.Action(nameof(FrontController.ViewBuild), new { controller = "Front", id = build.Id })}",
|
||||
Categories = build.RssCategories,
|
||||
PublishDate = DateTime.SpecifyKind(build.BuildTime.GetValueOrDefault(), DateTimeKind.Utc)
|
||||
}).ToList()
|
||||
};
|
||||
|
||||
return new ContentResult
|
||||
{
|
||||
Content = feed.Serialize(),
|
||||
ContentType = "application/rss+xml",
|
||||
ContentEncoding = Encoding.UTF8
|
||||
};
|
||||
}
|
||||
|
||||
[Route("rss/added")]
|
||||
public async Task<ActionResult> Added()
|
||||
{
|
||||
var builds = await _bModel.SelectBuildsByAddedDate(RSS_SIZE);
|
||||
|
||||
var feed = new Feed
|
||||
{
|
||||
Title = "BuildFeed RSS - Recently Added",
|
||||
Link = new Uri($"{Request.Url.Scheme}://{Request.Url.Authority}"),
|
||||
Items = (from build in builds
|
||||
select new Item
|
||||
{
|
||||
Title = build.AlternateBuildString,
|
||||
Link = new Uri(
|
||||
$"{Request.Url.Scheme}://{Request.Url.Authority}{Url.Action(nameof(FrontController.ViewBuild), new { controller = "Front", id = build.Id })}"),
|
||||
Permalink =
|
||||
$"{Request.Url.Scheme}://{Request.Url.Authority}{Url.Action(nameof(FrontController.ViewBuild), new { controller = "Front", id = build.Id })}",
|
||||
Categories = build.RssCategories,
|
||||
PublishDate = DateTime.SpecifyKind(build.Added, DateTimeKind.Utc)
|
||||
}).ToList()
|
||||
};
|
||||
|
||||
return new ContentResult
|
||||
{
|
||||
Content = feed.Serialize(),
|
||||
ContentType = "application/rss+xml",
|
||||
ContentEncoding = Encoding.UTF8
|
||||
};
|
||||
}
|
||||
|
||||
[Route("rss/leaked")]
|
||||
public async Task<ActionResult> Leaked()
|
||||
{
|
||||
var builds = await _bModel.SelectBuildsByLeakedDate(RSS_SIZE);
|
||||
|
||||
var feed = new Feed
|
||||
{
|
||||
Title = "BuildFeed RSS - Recently Leaked",
|
||||
Link = new Uri($"{Request.Url.Scheme}://{Request.Url.Authority}"),
|
||||
Items = (from build in builds
|
||||
select new Item
|
||||
{
|
||||
Title = build.AlternateBuildString,
|
||||
Link = new Uri(
|
||||
$"{Request.Url.Scheme}://{Request.Url.Authority}{Url.Action(nameof(FrontController.ViewBuild), new { controller = "Front", id = build.Id })}"),
|
||||
Permalink =
|
||||
$"{Request.Url.Scheme}://{Request.Url.Authority}{Url.Action(nameof(FrontController.ViewBuild), new { controller = "Front", id = build.Id })}",
|
||||
Categories = build.RssCategories,
|
||||
PublishDate = DateTime.SpecifyKind(build.LeakDate.GetValueOrDefault(), DateTimeKind.Utc)
|
||||
}).ToList()
|
||||
};
|
||||
|
||||
return new ContentResult
|
||||
{
|
||||
Content = feed.Serialize(),
|
||||
ContentType = "application/rss+xml",
|
||||
ContentEncoding = Encoding.UTF8
|
||||
};
|
||||
}
|
||||
|
||||
[Route("rss/version")]
|
||||
public async Task<ActionResult> Version()
|
||||
{
|
||||
var builds = await _bModel.SelectBuildsByOrder(RSS_SIZE);
|
||||
|
||||
var feed = new Feed
|
||||
{
|
||||
Title = "BuildFeed RSS - Highest Version",
|
||||
Link = new Uri($"{Request.Url.Scheme}://{Request.Url.Authority}"),
|
||||
Items = (from build in builds
|
||||
select new Item
|
||||
{
|
||||
Title = build.AlternateBuildString,
|
||||
Link = new Uri(
|
||||
$"{Request.Url.Scheme}://{Request.Url.Authority}{Url.Action(nameof(FrontController.ViewBuild), new { controller = "Front", id = build.Id })}"),
|
||||
Permalink =
|
||||
$"{Request.Url.Scheme}://{Request.Url.Authority}{Url.Action(nameof(FrontController.ViewBuild), new { controller = "Front", id = build.Id })}",
|
||||
Categories = build.RssCategories
|
||||
}).ToList()
|
||||
};
|
||||
|
||||
return new ContentResult
|
||||
{
|
||||
Content = feed.Serialize(),
|
||||
ContentType = "application/rss+xml",
|
||||
ContentEncoding = Encoding.UTF8
|
||||
};
|
||||
}
|
||||
|
||||
[Route("rss/lab/{lab}")]
|
||||
public async Task<ActionResult> Lab(string lab)
|
||||
{
|
||||
var builds = await _bModel.SelectLab(lab, RSS_SIZE);
|
||||
|
||||
var feed = new Feed
|
||||
{
|
||||
Title = $"BuildFeed RSS - {lab} Lab",
|
||||
Link = new Uri($"{Request.Url.Scheme}://{Request.Url.Authority}"),
|
||||
Items = (from build in builds
|
||||
select new Item
|
||||
{
|
||||
Title = build.AlternateBuildString,
|
||||
Link = new Uri(
|
||||
$"{Request.Url.Scheme}://{Request.Url.Authority}{Url.Action(nameof(FrontController.ViewBuild), new { controller = "Front", id = build.Id })}"),
|
||||
Permalink =
|
||||
$"{Request.Url.Scheme}://{Request.Url.Authority}{Url.Action(nameof(FrontController.ViewBuild), new { controller = "Front", id = build.Id })}",
|
||||
Categories = build.RssCategories
|
||||
}).ToList()
|
||||
};
|
||||
|
||||
return new ContentResult
|
||||
{
|
||||
Content = feed.Serialize(),
|
||||
ContentType = "application/rss+xml",
|
||||
ContentEncoding = Encoding.UTF8
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,224 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using System.Xml.Linq;
|
||||
using BuildFeed.Code;
|
||||
using BuildFeed.Local;
|
||||
using BuildFeed.Model;
|
||||
using BuildFeed.Model.View;
|
||||
|
||||
namespace BuildFeed.Controllers
|
||||
{
|
||||
public class SupportController : BaseController
|
||||
{
|
||||
private readonly BuildRepository _bModel;
|
||||
|
||||
public SupportController()
|
||||
{
|
||||
_bModel = new BuildRepository();
|
||||
}
|
||||
|
||||
[Route("rss")]
|
||||
public async Task<ActionResult> Rss()
|
||||
{
|
||||
ViewBag.Labs = await _bModel.SelectAllLabs();
|
||||
return View();
|
||||
}
|
||||
|
||||
[Route("sitemap/")]
|
||||
#if !DEBUG
|
||||
[OutputCache(Duration = 3600, VaryByParam = "none", VaryByCustom = "userName;lang;theme")]
|
||||
#endif
|
||||
public async Task<ActionResult> Sitemap()
|
||||
{
|
||||
var builds = await _bModel.SelectBuildsByOrder();
|
||||
var actions = new Dictionary<string, SitemapPagedAction[]>
|
||||
{
|
||||
{
|
||||
"Pages", new[]
|
||||
{
|
||||
new SitemapPagedAction
|
||||
{
|
||||
UrlParams = new RouteValueDictionary(new
|
||||
{
|
||||
controller = "Front",
|
||||
action = "Index",
|
||||
page = 1
|
||||
}),
|
||||
Pages = (builds.Count + (FrontController.PAGE_SIZE - 1)) / FrontController.PAGE_SIZE
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Versions", (from b in builds
|
||||
group b by new BuildVersion
|
||||
{
|
||||
Major = b.MajorVersion,
|
||||
Minor = b.MinorVersion
|
||||
}
|
||||
into bv
|
||||
orderby bv.Key.Major descending, bv.Key.Minor descending
|
||||
select new SitemapPagedAction
|
||||
{
|
||||
Name = $"{InvariantTerms.ProductName} {bv.Key.Major}.{bv.Key.Minor}",
|
||||
UrlParams = new RouteValueDictionary(new
|
||||
{
|
||||
controller = "Front",
|
||||
action = "ViewVersion",
|
||||
major = bv.Key.Major,
|
||||
minor = bv.Key.Minor,
|
||||
page = 1
|
||||
}),
|
||||
Pages = (bv.Count() + (FrontController.PAGE_SIZE - 1)) / FrontController.PAGE_SIZE
|
||||
}).ToArray()
|
||||
},
|
||||
{
|
||||
"Labs", (from b in builds
|
||||
where !string.IsNullOrEmpty(b.Lab)
|
||||
group b by b.Lab
|
||||
into bv
|
||||
orderby bv.Key
|
||||
select new SitemapPagedAction
|
||||
{
|
||||
Name = bv.Key,
|
||||
UrlParams = new RouteValueDictionary(new
|
||||
{
|
||||
controller = "Front",
|
||||
action = "ViewLab",
|
||||
lab = bv.Key,
|
||||
page = 1
|
||||
}),
|
||||
Pages = (bv.Count() + (FrontController.PAGE_SIZE - 1)) / FrontController.PAGE_SIZE
|
||||
}).ToArray()
|
||||
},
|
||||
{
|
||||
"Years", (from b in builds
|
||||
where b.BuildTime.HasValue
|
||||
group b by b.BuildTime.Value.Year
|
||||
into bv
|
||||
orderby bv.Key descending
|
||||
select new SitemapPagedAction
|
||||
{
|
||||
Name = bv.Key.ToString(),
|
||||
UrlParams = new RouteValueDictionary(new
|
||||
{
|
||||
controller = "Front",
|
||||
action = "ViewYear",
|
||||
year = bv.Key,
|
||||
page = 1
|
||||
}),
|
||||
Pages = (bv.Count() + (FrontController.PAGE_SIZE - 1)) / FrontController.PAGE_SIZE
|
||||
}).ToArray()
|
||||
},
|
||||
{
|
||||
"Sources", (from b in builds
|
||||
group b by b.SourceType
|
||||
into bv
|
||||
orderby bv.Key
|
||||
select new SitemapPagedAction
|
||||
{
|
||||
Name = MvcExtensions.GetDisplayTextForEnum(bv.Key),
|
||||
UrlParams = new RouteValueDictionary(new
|
||||
{
|
||||
controller = "Front",
|
||||
action = "ViewSource",
|
||||
source = bv.Key,
|
||||
page = 1
|
||||
}),
|
||||
Pages = (bv.Count() + (FrontController.PAGE_SIZE - 1)) / FrontController.PAGE_SIZE
|
||||
}).ToArray()
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var model = new SitemapData
|
||||
{
|
||||
Builds = (from b in builds
|
||||
group b by new
|
||||
{
|
||||
Major = b.MajorVersion,
|
||||
Minor = b.MinorVersion,
|
||||
Build = b.Number,
|
||||
b.Revision
|
||||
}
|
||||
into bg
|
||||
orderby bg.Key.Major descending, bg.Key.Minor descending, bg.Key.Build descending, bg.Key.Revision
|
||||
descending
|
||||
select new SitemapDataBuildGroup
|
||||
{
|
||||
Id = new BuildGroup
|
||||
{
|
||||
Major = bg.Key.Major,
|
||||
Minor = bg.Key.Minor,
|
||||
Build = bg.Key.Build,
|
||||
Revision = bg.Key.Revision
|
||||
},
|
||||
Builds = (from bgb in bg
|
||||
select new SitemapDataBuild
|
||||
{
|
||||
Id = bgb.Id,
|
||||
Name = bgb.FullBuildString
|
||||
}).ToArray()
|
||||
}).ToArray(),
|
||||
Actions = actions,
|
||||
Labs = (from b in builds
|
||||
group b by b.Lab
|
||||
into lab
|
||||
select lab.Key).ToArray()
|
||||
};
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[Route("xml-sitemap/")]
|
||||
#if !DEBUG
|
||||
[OutputCache(Duration = 3600, VaryByParam = "none", VaryByCustom = "userName;lang;theme")]
|
||||
#endif
|
||||
public async Task<ActionResult> XmlSitemap()
|
||||
{
|
||||
XNamespace xn = XNamespace.Get("http://www.sitemaps.org/schemas/sitemap/0.9");
|
||||
var xlist = new List<XElement>();
|
||||
|
||||
// home page
|
||||
var home = new XElement(xn + "url");
|
||||
home.Add(new XElement(xn + "loc", Request.Url?.GetLeftPart(UriPartial.Authority) + "/"));
|
||||
home.Add(new XElement(xn + "changefreq", "daily"));
|
||||
xlist.Add(home);
|
||||
|
||||
foreach (Build b in await _bModel.Select())
|
||||
{
|
||||
var url = new XElement(xn + "url");
|
||||
url.Add(new XElement(xn + "loc",
|
||||
Request.Url?.GetLeftPart(UriPartial.Authority)
|
||||
+ Url.Action("ViewBuild",
|
||||
"Front",
|
||||
new
|
||||
{
|
||||
id = b.Id
|
||||
})));
|
||||
if (b.Modified != DateTime.MinValue)
|
||||
{
|
||||
url.Add(new XElement(xn + "lastmod", b.Modified.ToString("yyyy-MM-dd")));
|
||||
}
|
||||
|
||||
xlist.Add(url);
|
||||
}
|
||||
|
||||
var decl = new XDeclaration("1.0", "utf-8", "");
|
||||
var root = new XElement(xn + "urlset", xlist);
|
||||
|
||||
var xdoc = new XDocument(decl, root);
|
||||
|
||||
Response.ContentType = "application/xml";
|
||||
xdoc.Save(Response.OutputStream);
|
||||
|
||||
return new EmptyResult();
|
||||
}
|
||||
|
||||
[Route("credits/")]
|
||||
public ActionResult Credits() => View();
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
<%@ Application Codebehind="Global.asax.cs" Inherits="BuildFeed.MvcApplication" Language="C#" %>
|
|
@ -1,68 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using BuildFeed.Code;
|
||||
using BuildFeed.Code.Options;
|
||||
using BuildFeed.Model;
|
||||
|
||||
namespace BuildFeed
|
||||
{
|
||||
public class MvcApplication : HttpApplication
|
||||
{
|
||||
protected void Application_Start()
|
||||
{
|
||||
// Disable ASP.NET MVC version header
|
||||
MvcHandler.DisableMvcResponseHeader = true;
|
||||
|
||||
// Don't bother looking for the legacy aspx view engine.
|
||||
ViewEngines.Engines.Clear();
|
||||
ViewEngines.Engines.Add(new RazorViewEngine());
|
||||
|
||||
RouteConfig.RegisterRoutes(RouteTable.Routes);
|
||||
AreaRegistration.RegisterAllAreas();
|
||||
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
|
||||
|
||||
var db = new DateTimeModelBinder();
|
||||
|
||||
ModelBinders.Binders.Add(typeof(DateTime), db);
|
||||
ModelBinders.Binders.Add(typeof(DateTime?), db);
|
||||
|
||||
ModelMappings.Initialise();
|
||||
|
||||
Roles.CreateRole("Administrators");
|
||||
Roles.CreateRole("Editors");
|
||||
Roles.CreateRole("Users");
|
||||
|
||||
MongoConfig.SetupIndexes();
|
||||
}
|
||||
|
||||
public override string GetVaryByCustomString(HttpContext context, string custom)
|
||||
{
|
||||
var parts = custom.Split(';');
|
||||
var varyParts = new List<string>();
|
||||
var contextWrapper = new HttpContextWrapper(context);
|
||||
|
||||
foreach (string part in parts)
|
||||
{
|
||||
switch (part)
|
||||
{
|
||||
case "userName":
|
||||
varyParts.Add($"user:{context.User.Identity.Name}");
|
||||
break;
|
||||
case "lang":
|
||||
varyParts.Add($"lang:{Locale.DetectCulture(contextWrapper).IetfLanguageTag}");
|
||||
break;
|
||||
case "theme":
|
||||
varyParts.Add($"theme:{Theme.DetectTheme(contextWrapper)}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return string.Join(";", varyParts.OrderBy(s => s));
|
||||
}
|
||||
}
|
||||
}
|
11
BuildFeed/Models/ErrorViewModel.cs
Normal file
11
BuildFeed/Models/ErrorViewModel.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
using System;
|
||||
|
||||
namespace BuildFeed.Models
|
||||
{
|
||||
public class ErrorViewModel
|
||||
{
|
||||
public string RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
}
|
||||
}
|
17
BuildFeed/Program.cs
Normal file
17
BuildFeed/Program.cs
Normal file
|
@ -0,0 +1,17 @@
|
|||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
|
||||
namespace BuildFeed
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
CreateWebHostBuilder(args).Build().Run();
|
||||
}
|
||||
|
||||
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
.UseStartup<Startup>();
|
||||
}
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
[assembly: AssemblyTitle("BuildFeed")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("BuildFeed")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013 - 2018, The BuildFeed Team")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
|
||||
[assembly: Guid("6c5846cb-43ac-4818-a9b5-a6cd1d6983a3")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
|
||||
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<WebPublishMethod>FileSystem</WebPublishMethod>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
||||
<ExcludeApp_Data>False</ExcludeApp_Data>
|
||||
<publishUrl>$(HOMEDRIVE)$(HOMEPATH)\Documents\Publish\buildfeed.net</publishUrl>
|
||||
<DeleteExistingFiles>True</DeleteExistingFiles>
|
||||
<PrecompileBeforePublish>True</PrecompileBeforePublish>
|
||||
<EnableUpdateable>False</EnableUpdateable>
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
<WDPMergeOption>MergeAllOutputsToASingleAssembly</WDPMergeOption>
|
||||
<UseMerge>True</UseMerge>
|
||||
<SingleAssemblyName>BuildFeed.Views</SingleAssemblyName>
|
||||
<DeleteAppCodeCompiledFiles>True</DeleteAppCodeCompiledFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
27
BuildFeed/Properties/launchSettings.json
Normal file
27
BuildFeed/Properties/launchSettings.json
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:50201",
|
||||
"sslPort": 44395
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"BuildFeed": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "https://localhost:5001;http://localhost:5000",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
9
BuildFeed/Scripts/trumbowyg/langs/da.min.js
vendored
9
BuildFeed/Scripts/trumbowyg/langs/da.min.js
vendored
|
@ -1,9 +0,0 @@
|
|||
/* ===========================================================
|
||||
* da.js
|
||||
* Danish translation for Trumbowyg
|
||||
* http://alex-d.github.com/Trumbowyg
|
||||
* ===========================================================
|
||||
* Author : Christian Pedersen
|
||||
* Github : https://github.com/chripede
|
||||
*/
|
||||
jQuery.trumbowyg.langs.da={viewHTML:"Vis HTML",formatting:"Formatter",p:"Afsnit",blockquote:"Citat",code:"Kode",header:"Overskrift",bold:"Fed",italic:"Kursiv",strikethrough:"Gennemstreg",underline:"Understreg",strong:"Vigtig",em:"Fremhæv",del:"Slettet",unorderedList:"Uordnet liste",orderedList:"Ordnet liste",insertImage:"Indsæt billede",insertVideo:"Indsæt video",link:"Link",createLink:"Indsæt link",unlink:"Fjern link",justifyLeft:"Venstrestil",justifyCenter:"Centrer",justifyRight:"Højrestil",justifyFull:"Lige margener",horizontalRule:"Horisontal linie",fullscreen:"Fuld skærm",close:"Luk",submit:"Bekræft",reset:"Annuller",required:"Påkrævet",description:"Beskrivelse",title:"Titel",text:"Tekst"};
|
10
BuildFeed/Scripts/trumbowyg/langs/fa.min.js
vendored
10
BuildFeed/Scripts/trumbowyg/langs/fa.min.js
vendored
|
@ -1,10 +0,0 @@
|
|||
/* ===========================================================
|
||||
* fa.js
|
||||
* Persian translation for Trumbowyg
|
||||
* http://alex-d.github.com/Trumbowyg
|
||||
* ===========================================================
|
||||
* Author : Kiarash Soleimanzadeh
|
||||
* Github : https://github.com/kiyarash
|
||||
* Email : kiarash.s@hotmail.com
|
||||
*/
|
||||
jQuery.trumbowyg.langs.fa={viewHTML:"نمایش کد اچ تی ام ال",formatting:"قالب بندی",p:"پاراگراف",blockquote:"نقل قول",code:"کد",header:"سر تیتر",bold:"ضخیم",italic:"مورب",strikethrough:"میان خط دار",underline:"زیر خط دار",strong:"برجسته",em:"مورب",del:"حذف شده",unorderedList:"لیست نامرتب",orderedList:"لیست مرتب",insertImage:"درج تصویر",insertVideo:"درج ویدئو",link:"لینک",createLink:"درج لینک",unlink:"حذف لینک",justifyLeft:"تراز به چپ",justifyCenter:"تراز به وسط",justifyRight:"تراز به راست",justifyFull:"تراز به چپ و راست",horizontalRule:"درج خط افقی",fullscreen:"تمام صفحه",close:"بستن",submit:"تائید",reset:"انصراف",required:"اجباری",description:"توضیحات",title:"عنوان",text:"متن"};
|
10
BuildFeed/Scripts/trumbowyg/langs/fr.min.js
vendored
10
BuildFeed/Scripts/trumbowyg/langs/fr.min.js
vendored
|
@ -1,10 +0,0 @@
|
|||
/* ===========================================================
|
||||
* fr.js
|
||||
* French translation for Trumbowyg
|
||||
* http://alex-d.github.com/Trumbowyg
|
||||
* ===========================================================
|
||||
* Author : Alexandre Demode (Alex-D)
|
||||
* Twitter : @AlexandreDemode
|
||||
* Website : alex-d.fr
|
||||
*/
|
||||
jQuery.trumbowyg.langs.fr={viewHTML:"Voir le HTML",undo:"Annuler",redo:"Refaire",formatting:"Format",p:"Paragraphe",blockquote:"Citation",code:"Code",header:"Titre",bold:"Gras",italic:"Italique",strikethrough:"Rayé",underline:"Souligné",strong:"Fort",em:"Emphase",del:"Supprimé",superscript:"Exposant",subscript:"Indice",unorderedList:"Liste à puces",orderedList:"Liste ordonnée",insertImage:"Insérer une image",insertVideo:"Insérer une video",link:"Lien",createLink:"Insérer un lien",unlink:"Supprimer le lien",justifyLeft:"Aligner à gauche",justifyCenter:"Centrer",justifyRight:"Aligner à droite",justifyFull:"Justifier",horizontalRule:"Insérer un séparateur horizontal",removeformat:"Supprimer formatage",fullscreen:"Plein écran",close:"Fermer",submit:"Valider",reset:"Annuler",required:"Obligatoire",description:"Description",title:"Titre",text:"Texte",target:"Cible"};
|
11
BuildFeed/Scripts/trumbowyg/langs/zh_tw.min.js
vendored
11
BuildFeed/Scripts/trumbowyg/langs/zh_tw.min.js
vendored
|
@ -1,11 +0,0 @@
|
|||
/* ===========================================================
|
||||
* zh_tw.js
|
||||
* Traditional Chinese translation for Trumbowyg
|
||||
* http://alex-d.github.com/Trumbowyg
|
||||
* ===========================================================
|
||||
* Author : Peter Dave Hello (PeterDaveHello)
|
||||
* Twitter : @PeterDaveHello
|
||||
* Github : https://github.com/PeterDaveHello
|
||||
*/
|
||||
// jshint camelcase:false
|
||||
jQuery.trumbowyg.langs.zh_tw={viewHTML:"原始碼",formatting:"格式",p:"段落",blockquote:"引用",code:"代碼",header:"標題",bold:"加粗",italic:"斜體",strikethrough:"刪除線",underline:"底線",strong:"加粗",em:"斜體",del:"刪除線",unorderedList:"無序列表",orderedList:"有序列表",insertImage:"插入圖片",insertVideo:"插入影片",link:"超連結",createLink:"插入連結",unlink:"取消連結",justifyLeft:"靠左對齊",justifyCenter:"置中對齊",justifyRight:"靠右對齊",justifyFull:"左右對齊",horizontalRule:"插入分隔線",fullscreen:"全螢幕",close:"關閉",submit:"確定",reset:"取消",required:"必需的",description:"描述",title:"標題",text:"文字"};
|
|
@ -1 +0,0 @@
|
|||
!function(e){"use strict";var a=function(){return"undefined"!=typeof FileReader},r=function(e){return/^data:image\/[a-z]?/i.test(e)};e.extend(!0,e.trumbowyg,{langs:{en:{base64:"Image as base64",file:"File",errFileReaderNotSupported:"FileReader is not supported by your browser.",errInvalidImage:"Invalid image file."},fr:{base64:"Image en base64",file:"Fichier"},cs:{base64:"Vložit obrázek",file:"Soubor"},zh_cn:{base64:"图片(Base64编码)",file:"文件"},nl:{errFileReaderNotSupported:"Uw browser ondersteunt deze functionaliteit niet.",errInvalidImage:"De gekozen afbeelding is ongeldig."},ru:{base64:"Изображение как код в base64",file:"Файл",errFileReaderNotSupported:"FileReader не поддерживается вашим браузером.",errInvalidImage:"Недопустимый файл изображения."},ja:{base64:"画像 (Base64形式)",file:"ファイル",errFileReaderNotSupported:"あなたのブラウザーはFileReaderをサポートしていません",errInvalidImage:"画像形式が正しくありません"}},plugins:{base64:{shouldInit:a,init:function(i){var t={isSupported:a,fn:function(){i.saveRange();var a,t=i.openModalInsert(i.lang.base64,{file:{type:"file",required:!0,attributes:{accept:"image/*"}},alt:{label:"description",value:i.getRangeText()}},function(n){var l=new FileReader;l.onloadend=function(a){r(a.target.result)?(i.execCmd("insertImage",l.result),e(['img[src="',l.result,'"]:not([alt])'].join(""),i.$box).attr("alt",n.alt),i.closeModal()):i.addErrorOnModalField(e("input[type=file]",t),i.lang.errInvalidImage)},l.readAsDataURL(a)});e("input[type=file]").on("change",function(e){a=e.target.files[0]})}};i.addBtnDef("base64",t)}}}})}(jQuery);
|
|
@ -1 +0,0 @@
|
|||
!function(r){"use strict";function e(r){for(var e="",t=r.length-1;t>=0;t-=1)e+=r.charAt(t);return e}function t(r){var e=r;return e=e.replace(/<[^> ]*/g,function(r){return r.toLowerCase()}),e=e.replace(/<[^>]*>/g,function(r){return r=r.replace(/ [^=]+=/g,function(r){return r.toLowerCase()})}),e=e.replace(/<[^>]*>/g,function(r){return r=r.replace(/( [^=]+=)([^"][^ >]*)/g,'$1"$2"')})}function n(r,n){var a,c,i,l="",s="";for(a=0;n.charAt(a)===r.charAt(a);a+=1)l+=n.charAt(a);for(var u=a;u>=0;u-=1){if("<"===r.charAt(u)){a=u,l=r.substring(0,a);break}if(">"===r.charAt(u))break}for(n=e(n),r=e(r),c=0;n.charAt(c)===r.charAt(c);c+=1)s+=n.charAt(c);for(var g=c;g>=0;g-=1){if(">"===r.charAt(g)){c=g,s=r.substring(0,c);break}if("<"===r.charAt(g))break}if(s=e(s),a===n.length-c)return!1;for(n=e(n),i=n.substring(a,n.length-c),i=t(i),i=i.replace(/<b(\s+|>)/g,"<strong$1"),i=i.replace(/<\/b(\s+|>)/g,"</strong$1"),i=i.replace(/<i(\s+|>)/g,"<em$1"),i=i.replace(/<\/i(\s+|>)/g,"</em$1"),i=i.replace(/<!(?:--[\s\S]*?--\s*)?>\s*/g,""),i=i.replace(/ /gi," "),i=i.replace(/ <\//gi,"</");-1!==i.indexOf(" ");){var o=i.split(" ");i=o.join(" ")}return i=i.replace(/^\s*|\s*$/g,""),i=i.replace(/<[^>]*>/g,function(r){return r=r.replace(/ ([^=]+)="[^"]*"/g,function(r,e){return-1!==["alt","href","src","title"].indexOf(e)?r:""})}),i=i.replace(/<\?xml[^>]*>/g,""),i=i.replace(/<[^ >]+:[^>]*>/g,""),i=i.replace(/<\/[^ >]+:[^>]*>/g,""),i=i.replace(/<(div|span|style|meta|link){1}.*?>/gi,""),n=l+i+s}r.extend(!0,r.trumbowyg,{plugins:{cleanPaste:{init:function(r){r.pasteHandlers.push(function(){try{var e=r.$ed.html();setTimeout(function(){var t=r.$ed.html();t=n(e,t),r.$ed.html(t)},0)}catch(t){}})}}}})}(jQuery);
|
|
@ -1 +0,0 @@
|
|||
!function(o){"use strict";function r(o){return("0"+parseInt(o).toString(16)).slice(-2)}function e(o){return-1===o.search("rgb")?o.replace("#",""):"rgba(0, 0, 0, 0)"===o?"transparent":(o=o.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/),r(o[1])+r(o[2])+r(o[3]))}function f(o,r){var f=[];if(!o.style)return f;if(""!==o.style.backgroundColor){var c=e(o.style.backgroundColor);r.o.plugins.colors.colorList.indexOf(c)>=0?f.push("backColor"+c):f.push("backColorFree")}var a;return""!==o.style.color?a=e(o.style.color):o.hasAttribute("color")&&(a=e(o.getAttribute("color"))),a&&(r.o.plugins.colors.colorList.indexOf(a)>=0?f.push("foreColor"+a):f.push("foreColorFree")),f}function c(r,e){var f=[];o.each(e.o.plugins.colors.colorList,function(o,c){var a=r+c,d={fn:r,forceCss:!0,param:"#"+c,style:"background-color: #"+c+";"};e.addBtnDef(a,d),f.push(a)});var c=r+"Remove",a={fn:"removeFormat",param:r,style:"background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAG0lEQVQIW2NkQAAfEJMRmwBYhoGBYQtMBYoAADziAp0jtJTgAAAAAElFTkSuQmCC);"};e.addBtnDef(c,a),f.push(c);var d=r+"Free",l={fn:function(){e.openModalInsert(e.lang[r],{color:{label:r,value:"#FFFFFF"}},function(o){return e.execCmd(r,o.color),!0})},text:"#",style:"text-indent: 0;line-height: 20px;padding: 0 5px;"};return e.addBtnDef(d,l),f.push(d),f}o.extend(!0,o.trumbowyg,{langs:{cs:{foreColor:"Barva textu",backColor:"Barva pozadí"},en:{foreColor:"Text color",backColor:"Background color"},fr:{foreColor:"Couleur du texte",backColor:"Couleur de fond"},sk:{foreColor:"Farba textu",backColor:"Farba pozadia"},zh_cn:{foreColor:"文字颜色",backColor:"背景颜色"},ru:{foreColor:"Цвет текста",backColor:"Цвет выделения текста"},ja:{foreColor:"文字色",backColor:"背景色"}}});var a={colorList:["ffffff","000000","eeece1","1f497d","4f81bd","c0504d","9bbb59","8064a2","4bacc6","f79646","ffff00","f2f2f2","7f7f7f","ddd9c3","c6d9f0","dbe5f1","f2dcdb","ebf1dd","e5e0ec","dbeef3","fdeada","fff2ca","d8d8d8","595959","c4bd97","8db3e2","b8cce4","e5b9b7","d7e3bc","ccc1d9","b7dde8","fbd5b5","ffe694","bfbfbf","3f3f3f","938953","548dd4","95b3d7","d99694","c3d69b","b2a2c7","b7dde8","fac08f","f2c314","a5a5a5","262626","494429","17365d","366092","953734","76923c","5f497a","92cddc","e36c09","c09100","7f7f7f","0c0c0c","1d1b10","0f243e","244061","632423","4f6128","3f3151","31859b","974806","7f6000"]};o.extend(!0,o.trumbowyg,{plugins:{color:{init:function(o){o.o.plugins.colors=o.o.plugins.colors||a;var r={dropdown:c("foreColor",o)},e={dropdown:c("backColor",o)};o.addBtnDef("foreColor",r),o.addBtnDef("backColor",e)},tagHandler:f}}})}(jQuery);
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
!function(e){"use strict";var r={src:{label:"URL",required:!0},autoplay:{label:"AutoPlay",required:!1,type:"checkbox"},muted:{label:"Muted",required:!1,type:"checkbox"},preload:{label:"preload options",required:!1}};e.extend(!0,e.trumbowyg,{langs:{en:{insertAudio:"Insert Audio"},ru:{insertAudio:"Вставить аудио"},ja:{insertAudio:"音声の挿入"}},plugins:{insertAudio:{init:function(t){var n={fn:function(){var n=function(r){var n="<audio controls";r.src&&(n+=" src='"+r.src+"'"),r.autoplay&&(n+=" autoplay"),r.muted&&(n+=" muted"),r.preload&&(n+=" preload='"+r+"'"),n+="></audio>";var o=e(n)[0];return t.range.deleteContents(),t.range.insertNode(o),!0};t.openModalInsert(t.lang.insertAudio,r,n)}};t.addBtnDef("insertAudio",n)}}}})}(jQuery);
|
|
@ -1 +0,0 @@
|
|||
!function(e){"use strict";var r={proxy:"https://noembed.com/embed?nowrap=on",urlFiled:"url",data:[],success:void 0,error:void 0};e.extend(!0,e.trumbowyg,{langs:{en:{noembed:"Noembed",noembedError:"Error"},sk:{noembedError:"Chyba"},fr:{noembedError:"Erreur"},cs:{noembedError:"Chyba"},ru:{noembedError:"Ошибка"},ja:{noembedError:"エラー"}},plugins:{noembed:{init:function(o){o.o.plugins.noembed=e.extend(!0,{},r,o.o.plugins.noembed||{});var n={fn:function(){var r=o.openModalInsert(o.lang.noembed,{url:{label:"URL",required:!0}},function(n){e.ajax({url:o.o.plugins.noembed.proxy,type:"GET",data:n,cache:!1,dataType:"json",success:o.o.plugins.noembed.success||function(n){n.html?(o.execCmd("insertHTML",n.html),setTimeout(function(){o.closeModal()},250)):o.addErrorOnModalField(e("input[type=text]",r),n.error)},error:o.o.plugins.noembed.error||function(){o.addErrorOnModalField(e("input[type=text]",r),o.lang.noembedError)}})})}};o.addBtnDef("noembed",n)}}}})}(jQuery);
|
|
@ -1 +0,0 @@
|
|||
!function(e){"use strict";var t={rows:0,columns:0,styler:""};e.extend(!0,e.trumbowyg,{langs:{en:{table:"Insert table",tableAddRow:"Add rows",tableAddColumn:"Add columns",rows:"Rows",columns:"Columns",styler:"Table class",error:"Error"},sk:{table:"Vytvoriť tabuľky",tableAddRow:"Pridať riadok",tableAddColumn:"Pridať stĺpec",rows:"Riadky",columns:"Stĺpce",styler:"Tabuľku triedy",error:"Chyba"},fr:{table:"Insérer un tableau",tableAddRow:"Ajouter des lignes",tableAddColumn:"Ajouter des colonnes",rows:"Lignes",columns:"Colonnes",styler:"Classes CSS sur la table",error:"Erreur"},cs:{table:"Vytvořit příkaz Table",tableAddRow:"Přidat řádek",tableAddColumn:"Přidat sloupec",rows:"Řádky",columns:"Sloupce",styler:"Tabulku třída",error:"Chyba"},ru:{table:"Вставить таблицу",tableAddRow:"Добавить строки",tableAddColumn:"Добавить столбцы",rows:"Строки",columns:"Столбцы",styler:"Имя CSS класса для таблицы",error:"Ошибка"},ja:{table:"表の挿入",tableAddRow:"行の追加",tableAddColumn:"列の追加",rows:"行",columns:"列",styler:"表のクラス",error:"エラー"}},plugins:{table:{init:function(r){r.o.plugins.table=e.extend(!0,{},t,r.o.plugins.table||{});var l={fn:function(){r.saveRange(),r.openModalInsert(r.lang.table,{rows:{type:"number",required:!0},columns:{type:"number",required:!0},styler:{label:r.lang.styler,type:"text"}},function(t){var l=e("<table></table>");0!==t.styler.length&&l.addClass(t.styler);for(var n=0;n<t.rows;n+=1)for(var a=e("<tr></tr>").appendTo(l),o=0;o<t.columns;o+=1)e("<td></td>").appendTo(a);return r.range.deleteContents(),r.range.insertNode(l[0]),!0})}},n={fn:function(){r.saveRange();var t=e("<tr></tr>");return r.range.deleteContents(),r.range.insertNode(t[0]),!0}},a={fn:function(){r.saveRange();var t=e("<td></td>");return r.range.deleteContents(),r.range.insertNode(t[0]),!0}};r.addBtnDef("table",l),r.addBtnDef("tableAddRow",n),r.addBtnDef("tableAddColumn",a)}}}})}(jQuery);
|
|
@ -1 +0,0 @@
|
|||
!function(t){"use strict";function e(e){var n=e.o.plugins.templates,a=[];return t.each(n,function(t,n){e.addBtnDef("template_"+t,{fn:function(){e.html(n.html)},hasIcon:!1,title:n.name}),a.push("template_"+t)}),a}t.extend(!0,t.trumbowyg,{langs:{en:{template:"Template"},nl:{template:"Sjabloon"},ru:{template:"Шаблон"},ja:{template:"テンプレート"}}}),t.extend(!0,t.trumbowyg,{plugins:{template:{shouldInit:function(t){return t.o.plugins.hasOwnProperty("templates")},init:function(t){t.addBtnDef("template",{dropdown:e(t),hasIcon:!1,text:t.lang.template})}}}})}(jQuery);
|
|
@ -1 +0,0 @@
|
|||
!function(r){"use strict";function e(r,a){var o=a.shift(),l=a;if(null!==r){if(0===l.length)return r[o];if("object"==typeof r)return e(r[o],l)}return r}function a(){if(!r.trumbowyg.addedXhrProgressEvent){var e=r.ajaxSettings.xhr;r.ajaxSetup({xhr:function(){var r=e(),a=this;return r&&"object"==typeof r.upload&&void 0!==a.progressUpload&&r.upload.addEventListener("progress",function(r){a.progressUpload(r)},!1),r}}),r.trumbowyg.addedXhrProgressEvent=!0}}var o={serverPath:"",fileFieldName:"fileToUpload",data:[],headers:{},xhrFields:{},urlPropertyName:"file",statusPropertyName:"success",success:void 0,error:void 0};a(),r.extend(!0,r.trumbowyg,{langs:{en:{upload:"Upload",file:"File",uploadError:"Error"},sk:{upload:"Nahrať",file:"Súbor",uploadError:"Chyba"},fr:{upload:"Envoi",file:"Fichier",uploadError:"Erreur"},cs:{upload:"Nahrát obrázek",file:"Soubor",uploadError:"Chyba"},zh_cn:{upload:"上传",file:"文件",uploadError:"错误"},zh_tw:{upload:"上傳",file:"文件",uploadError:"錯誤"},ru:{upload:"Загрузка",file:"Файл",uploadError:"Ошибка"},ja:{upload:"アップロード",file:"ファイル",uploadError:"エラー"},pt_br:{upload:"Enviar do local",file:"Arquivo",uploadError:"Erro"}},plugins:{upload:{init:function(a){a.o.plugins.upload=r.extend(!0,{},o,a.o.plugins.upload||{});var l={fn:function(){a.saveRange();var o,l=a.o.prefix,t=a.openModalInsert(a.lang.upload,{file:{type:"file",required:!0,attributes:{accept:"image/*"}},alt:{label:"description",value:a.getRangeText()}},function(u){var p=new FormData;p.append(a.o.plugins.upload.fileFieldName,o),a.o.plugins.upload.data.map(function(r){p.append(r.name,r.value)}),r.map(u,function(r,e){"file"!==e&&p.append(e,r)}),0===r("."+l+"progress",t).length&&r("."+l+"modal-title",t).after(r("<div/>",{"class":l+"progress"}).append(r("<div/>",{"class":l+"progress-bar"}))),r.ajax({url:a.o.plugins.upload.serverPath,headers:a.o.plugins.upload.headers,xhrFields:a.o.plugins.upload.xhrFields,type:"POST",data:p,cache:!1,dataType:"json",processData:!1,contentType:!1,progressUpload:function(e){r("."+l+"progress-bar").css("width",Math.round(100*e.loaded/e.total)+"%")},success:function(o){if(a.o.plugins.upload.success)a.o.plugins.upload.success(o,a,t,u);else if(e(o,a.o.plugins.upload.statusPropertyName.split("."))){var l=e(o,a.o.plugins.upload.urlPropertyName.split("."));a.execCmd("insertImage",l),r('img[src="'+l+'"]:not([alt])',a.$box).attr("alt",u.alt),setTimeout(function(){a.closeModal()},250),a.$c.trigger("tbwuploadsuccess",[a,o,l])}else a.addErrorOnModalField(r("input[type=file]",t),a.lang[o.message]),a.$c.trigger("tbwuploaderror",[a,o])},error:a.o.plugins.upload.error||function(){a.addErrorOnModalField(r("input[type=file]",t),a.lang.uploadError),a.$c.trigger("tbwuploaderror",[a])}})});r("input[type=file]").on("change",function(r){try{o=r.target.files[0]}catch(e){o=r.target.value}})}};a.addBtnDef("upload",l)}}}})}(jQuery);
|
2
BuildFeed/Scripts/trumbowyg/trumbowyg.min.js
vendored
2
BuildFeed/Scripts/trumbowyg/trumbowyg.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 18 KiB |
File diff suppressed because one or more lines are too long
66
BuildFeed/Startup.cs
Normal file
66
BuildFeed/Startup.cs
Normal file
|
@ -0,0 +1,66 @@
|
|||
using BuildFeed.Model;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace BuildFeed
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public IConfiguration Configuration { get; }
|
||||
|
||||
public Startup(IConfiguration configuration)
|
||||
{
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||
|
||||
services.AddTransient(provider => Configuration);
|
||||
|
||||
var config = new MongoConfig(
|
||||
Configuration.GetValue<string>("data:MongoHost"),
|
||||
Configuration.GetValue<int?>("data:MongoPort"),
|
||||
Configuration.GetValue<string>("data:MongoDB"),
|
||||
Configuration.GetValue<string>("data:MongoUser"),
|
||||
Configuration.GetValue<string>("data:MongoPass")
|
||||
);
|
||||
|
||||
services.AddTransient(provider => new BuildRepository(config));
|
||||
services.AddTransient(provider => new MetaItem(config));
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
||||
{
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
app.UseDatabaseErrorPage();
|
||||
}
|
||||
else
|
||||
{
|
||||
app.UseExceptionHandler("/Home/Error");
|
||||
app.UseHsts();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.UseAuthentication();
|
||||
|
||||
app.UseMvc(routes =>
|
||||
{
|
||||
routes.MapRoute(
|
||||
"default",
|
||||
"{controller=Home}/{action=Index}/{id?}");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.6.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<pages pageBaseType="System.Web.Mvc.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Mvc" />
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="BuildFeed" />
|
||||
<add namespace="BuildFeed.Local" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<remove name="BlockViewHandler" />
|
||||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</configuration>
|
7
BuildFeed/Views/_ViewImports.cshtml
Normal file
7
BuildFeed/Views/_ViewImports.cshtml
Normal file
|
@ -0,0 +1,7 @@
|
|||
@using BuildFeed
|
||||
@using BuildFeed.Code
|
||||
@using BuildFeed.Controllers
|
||||
@using BuildFeed.Model
|
||||
@using BuildFeed.Model.View
|
||||
@using BuildFeed.Local
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@ -1,3 +1,3 @@
|
|||
@{
|
||||
Layout = "~/Views/shared/_default.cshtml";
|
||||
Layout = "_default";
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
@using BuildFeed.Controllers
|
||||
@using BuildFeed.Model.View
|
||||
@model LoginUser
|
||||
|
||||
@{
|
||||
ViewBag.Title = $"{VariantTerms.Support_Login} | {InvariantTerms.SiteName}";
|
||||
Html.EnableClientValidation();
|
||||
Html.EnableUnobtrusiveJavaScript();
|
||||
}
|
||||
|
||||
<h1>@VariantTerms.Support_Login</h1>
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
if (ViewData["ErrorMessage"] != null)
|
||||
{
|
||||
<p class="text-danger">
|
||||
@ViewData["ErrorMessage"]
|
||||
</p>
|
||||
}
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.UserName)
|
||||
<div>
|
||||
@Html.TextBoxFor(model => model.UserName)
|
||||
@Html.ValidationMessageFor(model => model.UserName)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.Password)
|
||||
<div>
|
||||
@Html.PasswordFor(model => model.Password)
|
||||
@Html.ValidationMessageFor(model => model.Password)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<span class="label-placeholder"></span>
|
||||
<div>
|
||||
<label for="@Html.IdFor(model => model.RememberMe)">
|
||||
@Html.CheckBoxFor(model => model.RememberMe) @Html.DisplayNameFor(model => model.RememberMe)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<span class="label-placeholder"></span>
|
||||
<div>
|
||||
<input type="submit" value="@VariantTerms.Support_Login" />  
|
||||
@Html.ActionLink(VariantTerms.Support_Register, nameof(AccountController.Register), new
|
||||
{
|
||||
controller = "Account"
|
||||
}, new
|
||||
{
|
||||
@class = "button"
|
||||
})
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@section Scripts
|
||||
{
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.17.0/jquery.validate.min.js" integrity="sha256-F6h55Qw6sweK+t7SiOJX+2bpSAa3b/fnlrVCJvmEj1A=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validation-unobtrusive/3.2.6/jquery.validate.unobtrusive.min.js" integrity="sha256-g1QKGxqsp+x5JkuN/JjHl96je2wztgS5Wo4h4c7gm9M=" crossorigin="anonymous"></script>
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
@using BuildFeed.Model.View
|
||||
@model ChangePassword
|
||||
|
||||
@{
|
||||
ViewBag.Title = $"{VariantTerms.Support_ChangePassword} | {InvariantTerms.SiteName}";
|
||||
Html.EnableClientValidation();
|
||||
Html.EnableUnobtrusiveJavaScript();
|
||||
}
|
||||
|
||||
<h1>@VariantTerms.Support_ChangePassword</h1>
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
if (ViewData["ErrorMessage"] != null)
|
||||
{
|
||||
<p class="text-danger">
|
||||
@ViewData["ErrorMessage"]
|
||||
</p>
|
||||
}
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.OldPassword)
|
||||
<div>
|
||||
@Html.PasswordFor(model => model.OldPassword)
|
||||
@Html.ValidationMessageFor(model => model.OldPassword)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.NewPassword)
|
||||
<div>
|
||||
@Html.PasswordFor(model => model.NewPassword)
|
||||
@Html.ValidationMessageFor(model => model.NewPassword)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.ConfirmNewPassword)
|
||||
<div>
|
||||
@Html.PasswordFor(model => model.ConfirmNewPassword)
|
||||
@Html.ValidationMessageFor(model => model.ConfirmNewPassword)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<span class="label-placeholder"></span>
|
||||
<div>
|
||||
<input type="submit" value="@VariantTerms.Support_ChangePassword" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@section Scripts
|
||||
{
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.17.0/jquery.validate.min.js" integrity="sha256-F6h55Qw6sweK+t7SiOJX+2bpSAa3b/fnlrVCJvmEj1A=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validation-unobtrusive/3.2.6/jquery.validate.unobtrusive.min.js" integrity="sha256-g1QKGxqsp+x5JkuN/JjHl96je2wztgS5Wo4h4c7gm9M=" crossorigin="anonymous"></script>
|
||||
}
|
|
@ -1,68 +0,0 @@
|
|||
@using BuildFeed.Model.View
|
||||
@model RegistrationUser
|
||||
|
||||
@{
|
||||
ViewBag.Title = $"{VariantTerms.Support_Register} | {InvariantTerms.SiteName}";
|
||||
Html.EnableClientValidation();
|
||||
Html.EnableUnobtrusiveJavaScript();
|
||||
}
|
||||
|
||||
<h1>@VariantTerms.Support_Register</h1>
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
if (ViewData["ErrorMessage"] != null)
|
||||
{
|
||||
<p class="text-danger">
|
||||
@ViewData["ErrorMessage"]
|
||||
</p>
|
||||
}
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.UserName)
|
||||
<div>
|
||||
@Html.TextBoxFor(model => model.UserName)
|
||||
@Html.ValidationMessageFor(model => model.UserName)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.Password)
|
||||
<div>
|
||||
@Html.PasswordFor(model => model.Password)
|
||||
@Html.ValidationMessageFor(model => model.Password)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.ConfirmPassword)
|
||||
<div>
|
||||
@Html.PasswordFor(model => model.ConfirmPassword)
|
||||
@Html.ValidationMessageFor(model => model.ConfirmPassword)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.EmailAddress)
|
||||
<div class="col-md-10">
|
||||
@Html.TextBoxFor(model => model.EmailAddress)
|
||||
@Html.ValidationMessageFor(model => model.EmailAddress)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<span class="label-placeholder"></span>
|
||||
<div>
|
||||
<input type="submit" value="@VariantTerms.Support_Register" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@section Scripts
|
||||
{
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.17.0/jquery.validate.min.js" integrity="sha256-F6h55Qw6sweK+t7SiOJX+2bpSAa3b/fnlrVCJvmEj1A=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validation-unobtrusive/3.2.6/jquery.validate.unobtrusive.min.js" integrity="sha256-g1QKGxqsp+x5JkuN/JjHl96je2wztgS5Wo4h4c7gm9M=" crossorigin="anonymous"></script>
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
@{
|
||||
ViewBag.Title = $"{VariantTerms.Support_EmailValidationTitle} | {InvariantTerms.SiteName}";
|
||||
}
|
||||
|
||||
<h1>@VariantTerms.Support_EmailValidationTitle</h1>
|
||||
<p>@VariantTerms.Support_EmailValidationContent</p>
|
|
@ -1,6 +0,0 @@
|
|||
@{
|
||||
ViewBag.Title = $"{VariantTerms.Support_ValidationFailureTitle} | {InvariantTerms.SiteName}";
|
||||
}
|
||||
|
||||
<h1>@VariantTerms.Support_ValidationFailureTitle</h1>
|
||||
<p>@VariantTerms.Support_ValidationFailureContent</p>
|
|
@ -1,6 +0,0 @@
|
|||
@{
|
||||
ViewBag.Title = $"{VariantTerms.Support_ValidationSuccessTitle} | {InvariantTerms.SiteName}";
|
||||
}
|
||||
|
||||
<h1>@VariantTerms.Support_ValidationSuccessTitle</h1>
|
||||
<p>@VariantTerms.Support_ValidationSuccessContent</p>
|
|
@ -1,7 +1,4 @@
|
|||
@using BuildFeed.Controllers
|
||||
@using BuildFeed.Model
|
||||
@using BuildFeed.Model.View
|
||||
@model BulkAddition
|
||||
@model BulkAddition
|
||||
|
||||
@{
|
||||
ViewBag.Title = $"{VariantTerms.Common_AddBulk} | {InvariantTerms.SiteName}";
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
@using BuildFeed.Code
|
||||
@using BuildFeed.Controllers
|
||||
@using BuildFeed.Model.View
|
||||
@using Humanizer
|
||||
@using Humanizer
|
||||
@model IEnumerable<FrontBuildGroup>
|
||||
@{
|
||||
ViewBag.Title = $"{string.Format(VariantTerms.Front_HomepageH1, InvariantTerms.ProductName)} {string.Format(VariantTerms.Common_TitlePage, (int)ViewBag.PageNumber)} | {InvariantTerms.SiteName}";
|
||||
|
@ -58,4 +55,4 @@
|
|||
<div class="build-group-empty"></div>
|
||||
<div class="build-group-empty"></div>
|
||||
</div>
|
||||
@PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, nameof(FrontController.Index), ViewContext.RouteData.Values)
|
||||
@*PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, nameof(FrontController.Index), ViewContext.RouteData.Values)*@
|
|
@ -1,7 +1,4 @@
|
|||
@using BuildFeed.Code
|
||||
@using BuildFeed.Controllers
|
||||
@using BuildFeed.Model
|
||||
@using Humanizer
|
||||
@using Humanizer
|
||||
@model IEnumerable<Build>
|
||||
@{
|
||||
ViewBag.Title = string.Format("{0} {1} | {2}", ViewBag.ItemId, ViewBag.PageNumber == 1
|
||||
|
@ -95,7 +92,7 @@
|
|||
<i class="fa fa-lock fa-fw"></i> @VariantTerms.Front_Private</span>
|
||||
</p>
|
||||
}
|
||||
@if (Roles.IsUserInRole("Editors") || Roles.IsUserInRole("Administrators"))
|
||||
@*if (Roles.IsUserInRole("Editors") || Roles.IsUserInRole("Administrators"))
|
||||
{
|
||||
<p>
|
||||
<a href="@Url.Action(nameof(FrontController.EditBuild), new
|
||||
|
@ -115,7 +112,7 @@
|
|||
</a>
|
||||
}
|
||||
</p>
|
||||
}
|
||||
}*@
|
||||
</div>
|
||||
}
|
||||
<div class="build-group-empty"></div>
|
||||
|
@ -124,4 +121,4 @@
|
|||
<div class="build-group-empty"></div>
|
||||
<div class="build-group-empty"></div>
|
||||
</div>
|
||||
@PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, "ViewFamily", ViewContext.RouteData.Values)
|
||||
@*PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, "ViewFamily", ViewContext.RouteData.Values)*@
|
|
@ -1,12 +1,8 @@
|
|||
@using BuildFeed.Controllers
|
||||
@using BuildFeed.Model
|
||||
@model Build
|
||||
@model Build
|
||||
@{
|
||||
ViewBag.Title = (string)ViewContext.RouteData.Values["action"] == nameof(FrontController.AddBuild)
|
||||
? $"{VariantTerms.Common_AddBuild} | {InvariantTerms.SiteName}"
|
||||
: $"{VariantTerms.Front_EditBuild} {Model.FullBuildString} | {InvariantTerms.SiteName}";
|
||||
Html.EnableClientValidation();
|
||||
Html.EnableUnobtrusiveJavaScript();
|
||||
}
|
||||
|
||||
@section head
|
||||
|
@ -86,7 +82,7 @@ else
|
|||
<div class="form-group">
|
||||
@Html.LabelFor(model => model.SourceType)
|
||||
<div>
|
||||
@Html.DropDownListFor(model => model.SourceType, EnumHelper.GetSelectList(typeof(TypeOfSource)))
|
||||
@Html.DropDownListFor(model => model.SourceType, Html.GetEnumSelectList<TypeOfSource>())
|
||||
@Html.ValidationMessageFor(model => model.SourceType)
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,16 +1,25 @@
|
|||
@using BuildFeed.Code
|
||||
@using BuildFeed.Controllers
|
||||
@using BuildFeed.Model
|
||||
@using BuildFeed.Model.View
|
||||
@using Microsoft.AspNetCore.Html
|
||||
@model Dictionary<ProjectFamily, FrontPage>
|
||||
@{
|
||||
ViewBag.Title = string.Format(VariantTerms.Front_HomeH1, InvariantTerms.SiteName);
|
||||
|
||||
HtmlString LatestBuild(string title, FrontPageBuild build)
|
||||
{
|
||||
string buildText = build.Revision.HasValue
|
||||
? $"{build.Number}.{build.Revision}"
|
||||
: build.Number.ToString();
|
||||
string dateText = build.BuildTime.HasValue
|
||||
? $@"<p class=""latest-flex-time"">{build.BuildTime.Value:HH:mm, dddd dd MMMM yyyy}</p>"
|
||||
: "";
|
||||
return new HtmlString($@"<h4 class=""latest-flex-title"">{title}</h4><div class=""latest-flex-detail""><p class=""latest-flex-build"">{buildText}</p><p class=""latest-flex-lab"">{build.Lab}</p>{dateText}</div>");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@section Head
|
||||
{
|
||||
{
|
||||
<meta name="description" content="Learn what Dona Sarkar won't tell you. Keep up to date with the latest Microsoft Windows developments with BuildFeed, the comprehensive build tracker." />
|
||||
<link rel="alternate" type="application/rss+xml" title="Latest additions - RSS" href="@Url.Action(nameof(RssController.Added), "Rss")" />
|
||||
@*<link rel="alternate" type="application/rss+xml" title="Latest additions - RSS" href="@Url.Action(nameof(RssController.Added), "Rss")" />*@
|
||||
}
|
||||
|
||||
<h1>@string.Format(VariantTerms.Front_HomeH1, InvariantTerms.SiteName)</h1>
|
||||
|
@ -37,7 +46,7 @@
|
|||
{
|
||||
family.CurrentCanary.Id
|
||||
})" class="latest-flex-item latest-flex-red">
|
||||
@BuildHelpers.LatestBuild(VariantTerms.Front_CurrentCanary, family.CurrentCanary)
|
||||
@LatestBuild(VariantTerms.Front_CurrentCanary, family.CurrentCanary)
|
||||
</a>
|
||||
}
|
||||
@if (family.CurrentInsider != null && family.CurrentInsider.Id != family.CurrentRelease?.Id)
|
||||
|
@ -46,7 +55,7 @@
|
|||
{
|
||||
family.CurrentInsider.Id
|
||||
})" class="latest-flex-item latest-flex-yellow">
|
||||
@BuildHelpers.LatestBuild(VariantTerms.Front_CurrentInsider, family.CurrentInsider)
|
||||
@LatestBuild(VariantTerms.Front_CurrentInsider, family.CurrentInsider)
|
||||
</a>
|
||||
}
|
||||
@if (family.CurrentRelease != null)
|
||||
|
@ -55,7 +64,7 @@
|
|||
{
|
||||
family.CurrentRelease.Id
|
||||
})" class="latest-flex-item latest-flex-blue">
|
||||
@BuildHelpers.LatestBuild(VariantTerms.Front_CurrentRelease, family.CurrentRelease)
|
||||
@LatestBuild(VariantTerms.Front_CurrentRelease, family.CurrentRelease)
|
||||
</a>
|
||||
}
|
||||
@if (family.CurrentAnalog != null)
|
||||
|
@ -64,7 +73,7 @@
|
|||
{
|
||||
family.CurrentAnalog.Id
|
||||
})" class="latest-flex-item latest-flex-purple">
|
||||
@BuildHelpers.LatestBuild(VariantTerms.Front_CurrentAnalog, family.CurrentAnalog)
|
||||
@LatestBuild(VariantTerms.Front_CurrentAnalog, family.CurrentAnalog)
|
||||
</a>
|
||||
}
|
||||
@if (family.CurrentXbox != null)
|
||||
|
@ -73,7 +82,7 @@
|
|||
{
|
||||
family.CurrentXbox.Id
|
||||
})" class="latest-flex-item latest-flex-green">
|
||||
@BuildHelpers.LatestBuild(VariantTerms.Front_CurrentXbox, family.CurrentXbox)
|
||||
@LatestBuild(VariantTerms.Front_CurrentXbox, family.CurrentXbox)
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
|
@ -174,7 +183,7 @@
|
|||
<p>@VariantTerms.About_A3</p>
|
||||
|
||||
@section Scripts
|
||||
{
|
||||
{
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@("@")context": "http://schema.org",
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
@using System.Globalization
|
||||
@using BuildFeed.Code
|
||||
@using BuildFeed.Controllers
|
||||
@using BuildFeed.Model
|
||||
@model Build
|
||||
|
||||
@{
|
||||
|
@ -11,14 +8,14 @@
|
|||
@section head
|
||||
{
|
||||
<meta property="og:title" content="@Model.FullBuildString" />
|
||||
<meta property="og:image" content="@Request.Url.GetLeftPart(UriPartial.Authority)@Url.Action("twitterCard", new
|
||||
<meta property="og:image" content="@Url.Action("twitterCard", new
|
||||
{
|
||||
id = Model.Id
|
||||
})">
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="@Model.FullBuildString | @InvariantTerms.SiteName">
|
||||
<meta name="twitter:image" content="@Request.Url.GetLeftPart(UriPartial.Authority)@Url.Action("twitterCard", new
|
||||
<meta name="twitter:image" content="@Url.Action("twitterCard", new
|
||||
{
|
||||
id = Model.Id
|
||||
})">
|
||||
|
@ -178,7 +175,7 @@
|
|||
<div class="addthis_sharing_toolbox"></div>
|
||||
<br />
|
||||
|
||||
@if (Roles.IsUserInRole("Editors") || Roles.IsUserInRole("Administrators"))
|
||||
@*if (Roles.IsUserInRole("Editors") || Roles.IsUserInRole("Administrators"))
|
||||
{
|
||||
<h3>@VariantTerms.Front_EditorActions</h3>
|
||||
<p class="build-details-flex-value">
|
||||
|
@ -201,7 +198,7 @@
|
|||
})
|
||||
}
|
||||
</p>
|
||||
}
|
||||
}*@
|
||||
<section class="build-details-comments">
|
||||
<h3>@VariantTerms.Front_Comments</h3>
|
||||
<div id="disqus_thread"></div>
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
@using BuildFeed.Code
|
||||
@using BuildFeed.Controllers
|
||||
@using BuildFeed.Model
|
||||
@using Humanizer
|
||||
@using Humanizer
|
||||
@model Tuple<BuildGroup, List<Build>>
|
||||
@{
|
||||
ViewBag.Title = $"{Model.Item1} | {InvariantTerms.SiteName}";
|
||||
|
@ -49,7 +46,7 @@
|
|||
<i class="fa fa-lock fa-fw"></i> @VariantTerms.Front_Private</span>
|
||||
</p>
|
||||
}
|
||||
@if (Roles.IsUserInRole("Editors") || Roles.IsUserInRole("Administrators"))
|
||||
@*if (Roles.IsUserInRole("Editors") || Roles.IsUserInRole("Administrators"))
|
||||
{
|
||||
<p>
|
||||
<a href="@Url.Action(nameof(FrontController.EditBuild), new
|
||||
|
@ -69,7 +66,7 @@
|
|||
</a>
|
||||
}
|
||||
</p>
|
||||
}
|
||||
}*@
|
||||
</div>
|
||||
}
|
||||
<div class="build-group-empty"></div>
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
@using BuildFeed.Code
|
||||
@using BuildFeed.Controllers
|
||||
@using BuildFeed.Model
|
||||
@using Humanizer
|
||||
@using Humanizer
|
||||
@model IEnumerable<Build>
|
||||
@{
|
||||
ViewBag.Title = string.Format("{0} {1} | {2}", string.Format(VariantTerms.Front_BuildsFrom, ViewBag.ItemId), ViewBag.PageNumber == 1
|
||||
|
@ -100,7 +97,7 @@
|
|||
</span>
|
||||
</p>
|
||||
}
|
||||
@if (Roles.IsUserInRole("Editors") || Roles.IsUserInRole("Administrators"))
|
||||
@*if (Roles.IsUserInRole("Editors") || Roles.IsUserInRole("Administrators"))
|
||||
{
|
||||
<p>
|
||||
<a href="@Url.Action(nameof(FrontController.EditBuild), new
|
||||
|
@ -120,7 +117,7 @@
|
|||
</a>
|
||||
}
|
||||
</p>
|
||||
}
|
||||
}*@
|
||||
</div>
|
||||
}
|
||||
<div class="build-group-empty"></div>
|
||||
|
@ -129,4 +126,4 @@
|
|||
<div class="build-group-empty"></div>
|
||||
<div class="build-group-empty"></div>
|
||||
</div>
|
||||
@PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, "viewLab", ViewContext.RouteData.Values)
|
||||
@*PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, "viewLab", ViewContext.RouteData.Values)*@
|
|
@ -1,7 +1,4 @@
|
|||
@using BuildFeed.Code
|
||||
@using BuildFeed.Controllers
|
||||
@using BuildFeed.Model
|
||||
@using Humanizer
|
||||
@using Humanizer
|
||||
@model IEnumerable<Build>
|
||||
@{
|
||||
ViewBag.Title = string.Format("{0} {1} | {2}", ViewBag.ItemId, ViewBag.PageNumber == 1
|
||||
|
@ -100,7 +97,7 @@
|
|||
</span>
|
||||
</p>
|
||||
}
|
||||
@if (Roles.IsUserInRole("Editors") || Roles.IsUserInRole("Administrators"))
|
||||
@*if (Roles.IsUserInRole("Editors") || Roles.IsUserInRole("Administrators"))
|
||||
{
|
||||
<p>
|
||||
<a href="@Url.Action(nameof(FrontController.EditBuild), new
|
||||
|
@ -120,7 +117,7 @@
|
|||
</a>
|
||||
}
|
||||
</p>
|
||||
}
|
||||
}*@
|
||||
</div>
|
||||
}
|
||||
<div class="build-group-empty"></div>
|
||||
|
@ -129,4 +126,4 @@
|
|||
<div class="build-group-empty"></div>
|
||||
<div class="build-group-empty"></div>
|
||||
</div>
|
||||
@PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, "viewSource", ViewContext.RouteData.Values)
|
||||
@*PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, "viewSource", ViewContext.RouteData.Values)*@
|
|
@ -1,7 +1,4 @@
|
|||
@using BuildFeed.Code
|
||||
@using BuildFeed.Controllers
|
||||
@using BuildFeed.Model
|
||||
@using Humanizer
|
||||
@using Humanizer
|
||||
@model IEnumerable<Build>
|
||||
@{
|
||||
ViewBag.Title = $"{InvariantTerms.ProductName} {ViewBag.ItemId} {(ViewBag.PageNumber == 1 ? "" : string.Format(VariantTerms.Common_TitlePage, ViewBag.PageNumber))} | {InvariantTerms.SiteName}";
|
||||
|
@ -99,7 +96,7 @@
|
|||
</span>
|
||||
</p>
|
||||
}
|
||||
@if (Roles.IsUserInRole("Editors") || Roles.IsUserInRole("Administrators"))
|
||||
@*if (Roles.IsUserInRole("Editors") || Roles.IsUserInRole("Administrators"))
|
||||
{
|
||||
<p>
|
||||
<a href="@Url.Action(nameof(FrontController.EditBuild), new
|
||||
|
@ -119,7 +116,7 @@
|
|||
</a>
|
||||
}
|
||||
</p>
|
||||
}
|
||||
}*@
|
||||
</div>
|
||||
}
|
||||
<div class="build-group-empty"></div>
|
||||
|
@ -128,4 +125,4 @@
|
|||
<div class="build-group-empty"></div>
|
||||
<div class="build-group-empty"></div>
|
||||
</div>
|
||||
@PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, "viewVersion", ViewContext.RouteData.Values)
|
||||
@*PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, "viewVersion", ViewContext.RouteData.Values)*@
|
|
@ -1,7 +1,4 @@
|
|||
@using BuildFeed.Code
|
||||
@using BuildFeed.Controllers
|
||||
@using BuildFeed.Model
|
||||
@using Humanizer
|
||||
@using Humanizer
|
||||
@model IEnumerable<Build>
|
||||
@{
|
||||
ViewBag.Title = string.Format("{0} {1} | {2}", string.Format(VariantTerms.Front_BuildsFrom, ViewBag.ItemId), ViewBag.PageNumber == 1
|
||||
|
@ -106,7 +103,7 @@
|
|||
</span>
|
||||
</p>
|
||||
}
|
||||
@if (Roles.IsUserInRole("Editors") || Roles.IsUserInRole("Administrators"))
|
||||
@*if (Roles.IsUserInRole("Editors") || Roles.IsUserInRole("Administrators"))
|
||||
{
|
||||
<p>
|
||||
<a href="@Url.Action(nameof(FrontController.EditBuild), new
|
||||
|
@ -126,7 +123,7 @@
|
|||
</a>
|
||||
}
|
||||
</p>
|
||||
}
|
||||
}*@
|
||||
</div>
|
||||
}
|
||||
<div class="build-group-empty"></div>
|
||||
|
@ -135,4 +132,4 @@
|
|||
<div class="build-group-empty"></div>
|
||||
<div class="build-group-empty"></div>
|
||||
</div>
|
||||
@PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, "viewYear", ViewContext.RouteData.Values)
|
||||
@*PaginationHelpers.PaginationBlock((int)ViewBag.PageNumber, (int)ViewBag.PageCount, "viewYear", ViewContext.RouteData.Values)*@
|
|
@ -1,4 +0,0 @@
|
|||
@using BuildFeed.Code
|
||||
@model Enum
|
||||
|
||||
@MvcExtensions.GetDisplayTextForEnum(ViewData.Model)
|
|
@ -1,17 +1,6 @@
|
|||
@using System.Globalization
|
||||
@using BuildFeed.Code.Options
|
||||
@using BuildFeed.Controllers
|
||||
@{
|
||||
bool isRtl = CultureInfo.CurrentUICulture.TextInfo.IsRightToLeft;
|
||||
|
||||
Response.PushPromise("/res/css/default.css?20170517");
|
||||
Response.PushPromise(VirtualPathUtility.ToAbsolute(((Theme)ViewBag.Theme).CssPath) + "?20170517");
|
||||
if (isRtl)
|
||||
{
|
||||
Response.PushPromise("/res/css/rtl.css");
|
||||
}
|
||||
|
||||
Response.PushPromise("/res/ts/bfs.js");
|
||||
}<!DOCTYPE html>
|
||||
<html dir="@(isRtl
|
||||
? "rtl"
|
||||
|
@ -22,11 +11,11 @@
|
|||
<meta name="format-detection" content="telephone=no" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<title>@ViewBag.Title</title>
|
||||
<link href="/res/css/default.css?180211" rel="stylesheet" type="text/css" />
|
||||
<link href="@(VirtualPathUtility.ToAbsolute(((Theme)ViewBag.Theme).CssPath))" rel="stylesheet" type="text/css" />
|
||||
<link href="~/res/css/default.css" rel="stylesheet" type="text/css" />
|
||||
<link href="~/res/css/dark.css" rel="stylesheet" type="text/css" />
|
||||
@if (isRtl)
|
||||
{
|
||||
<link href="/res/css/rtl.css" rel="stylesheet" type="text/css" />
|
||||
<link href="~/res/css/rtl.css" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
@switch (CultureInfo.CurrentUICulture.TwoLetterISOLanguageName)
|
||||
{
|
||||
|
@ -75,7 +64,7 @@
|
|||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
<script>
|
||||
(function (i, s, o, g, r, a, m) {
|
||||
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
|
||||
(i[r].q = i[r].q || []).push(arguments);
|
||||
|
@ -87,8 +76,8 @@
|
|||
ga('require', 'displayfeatures');
|
||||
ga('require', 'linkid', 'linkid.js');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
<header id="page-header">
|
||||
</script>
|
||||
<header id="page-header">
|
||||
<div class="container">
|
||||
<h1>
|
||||
@Html.ActionLink(InvariantTerms.SiteName, nameof(FrontController.Index), new
|
||||
|
@ -98,8 +87,8 @@
|
|||
})
|
||||
</h1>
|
||||
</div>
|
||||
</header>
|
||||
<nav id="page-navigation" role="navigation">
|
||||
</header>
|
||||
<nav id="page-navigation" role="navigation">
|
||||
<div class="container">
|
||||
<button id="page-navigation-toggle">
|
||||
<i class="fa fa-bars"></i> @VariantTerms.Common_ToggleNavigation
|
||||
|
@ -110,7 +99,7 @@
|
|||
<i class="fa fa-fw fa-search"></i> @VariantTerms.Search_Title
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
@*<li>
|
||||
<a href="@Url.Action(nameof(SupportController.Rss), new
|
||||
{
|
||||
controller = "Support",
|
||||
|
@ -118,7 +107,7 @@
|
|||
})" title="@VariantTerms.Common_RssFeeds">
|
||||
<i class="fa fa-fw fa-rss"></i> @VariantTerms.Common_RssFeeds
|
||||
</a>
|
||||
</li>
|
||||
</li>*@
|
||||
<li>
|
||||
<a href="https://blog.buildfeed.net/" title="@VariantTerms.Common_Blog" target="_blank" rel="noopener">
|
||||
<i class="fa fa-fw fa-book"></i> @VariantTerms.Common_Blog
|
||||
|
@ -133,7 +122,7 @@
|
|||
<a href="#">
|
||||
<i class="fa fa-fw fa-user"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
@*<ul class="dropdown-menu">
|
||||
<li id="user-action-menu" class="dropdown-menu-block">
|
||||
<ul>
|
||||
@if (!User.Identity.IsAuthenticated)
|
||||
|
@ -207,7 +196,7 @@
|
|||
}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>*@
|
||||
</li>
|
||||
<li class="dropdown-parent">
|
||||
<a href="#">
|
||||
|
@ -216,18 +205,18 @@
|
|||
<ul class="dropdown-menu">
|
||||
<li id="settings-theme-menu" class="dropdown-menu-block">
|
||||
<h4>@VariantTerms.Common_NavigationTheme</h4>
|
||||
<ul>
|
||||
@*<ul>
|
||||
@foreach (Theme item in Theme.AvailableThemes)
|
||||
{
|
||||
<li>
|
||||
<a href="#" data-theme="@item.CookieValue">@item.DisplayName</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</ul>*@
|
||||
</li>
|
||||
<li id="settings-lang-menu" class="dropdown-menu-block">
|
||||
<h4>@VariantTerms.Common_NavigationLanguage</h4>
|
||||
<ul>
|
||||
@*<ul>
|
||||
@foreach (Locale locale in Locale.AvailableLocales)
|
||||
{
|
||||
<li>
|
||||
|
@ -244,23 +233,23 @@
|
|||
<li></li>
|
||||
<li></li>
|
||||
<li></li>
|
||||
</ul>
|
||||
</ul>*@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<article id="page-content">
|
||||
</nav>
|
||||
<article id="page-content">
|
||||
<div class="container">
|
||||
@RenderBody()
|
||||
</div>
|
||||
</article>
|
||||
<footer id="page-footer">
|
||||
</article>
|
||||
<footer id="page-footer">
|
||||
<div class="container">
|
||||
<div class="footer-flex">
|
||||
<div class="footer-flex-item">
|
||||
<p>
|
||||
@*<p>
|
||||
<a href="@Url.Action(nameof(SupportController.Sitemap), new
|
||||
{
|
||||
controller = "Support",
|
||||
|
@ -277,7 +266,7 @@
|
|||
})">
|
||||
@VariantTerms.Common_Credits
|
||||
</a>
|
||||
</p>
|
||||
</p>*@
|
||||
<p>
|
||||
<i class="fa fa-language"></i> 
|
||||
@CultureInfo.CurrentUICulture.NativeName
|
||||
|
@ -296,9 +285,9 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</footer>
|
||||
|
||||
<div id="modal-search-overlay">
|
||||
<div id="modal-search-overlay">
|
||||
<div id="modal-search">
|
||||
<h3>@VariantTerms.Search_BuildFeed</h3>
|
||||
<div id="modal-search-box">
|
||||
|
@ -309,22 +298,22 @@
|
|||
</div>
|
||||
<div id="modal-search-result"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="menu-open-overlay"></div>
|
||||
</div>
|
||||
<div id="menu-open-overlay"></div>
|
||||
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jsrender/1.0.0-rc.70/jsrender.min.js" integrity="sha256-3UBtL0tzgKVuJU8ZZiWLXEWGEjXEr6Z023rpauMnBUE=" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript" src="~/res/ts/bfs.js" async="async"></script>
|
||||
@if (((Theme)ViewBag.Theme).Value == SiteTheme.Winter)
|
||||
{
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jsrender/1.0.0-rc.70/jsrender.min.js" integrity="sha256-3UBtL0tzgKVuJU8ZZiWLXEWGEjXEr6Z023rpauMnBUE=" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript" src="~/res/ts/bfs.js" async="async"></script>
|
||||
@*@if (((Theme)ViewBag.Theme).Value == SiteTheme.Winter)
|
||||
{
|
||||
<script type="text/javascript" src="~/res/ts/christmas.js" async="async"></script>
|
||||
}
|
||||
@RenderSection("scripts", false)
|
||||
<script id="result-template" type="text/x-jsrender">
|
||||
}*@
|
||||
@RenderSection("scripts", false)
|
||||
<script id="result-template" type="text/x-jsrender">
|
||||
<a href="{{:Url}}" class="search-result-item" title="{{:Title}}">
|
||||
<h4 class="search-result-heading no-wrapping">{{:Label}}</h4>
|
||||
<p class="search-result-text">{{:Group}}</p>
|
||||
</a>
|
||||
</script>
|
||||
<script type="text/javascript" src="https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5431719a661cbfd0" async="async"></script>
|
||||
</script>
|
||||
<script type="text/javascript" src="https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5431719a661cbfd0" async="async"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,119 +0,0 @@
|
|||
@using System.Globalization
|
||||
@using BuildFeed.Code.Options
|
||||
@using BuildFeed.Controllers
|
||||
@model HandleErrorInfo
|
||||
@{
|
||||
bool isRtl = CultureInfo.CurrentUICulture.TextInfo.IsRightToLeft;
|
||||
Layout = null;
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html dir="@(isRtl
|
||||
? "rtl"
|
||||
: "ltr")" lang="@CultureInfo.CurrentUICulture.TwoLetterISOLanguageName">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="format-detection" content="telephone=no" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<title>@VariantTerms.Common_Error | @InvariantTerms.SiteName</title>
|
||||
<link href="/res/css/default.css" rel="stylesheet" type="text/css" />
|
||||
<link href="@(VirtualPathUtility.ToAbsolute(Theme.AvailableThemes[0].CssPath))" rel="stylesheet" type="text/css" />
|
||||
@if (isRtl)
|
||||
{
|
||||
<link href="/res/css/rtl.css" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
<link href="https://fonts.googleapis.com/css?family=Fira+Sans:300,400,700&subset=cyrillic,greek,vietnamese" rel="stylesheet" type="text/css" />
|
||||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous" />
|
||||
<link rel="manifest" href="~/manifest.json">
|
||||
<link rel="shortcut icon" href="~/favicon.ico" />
|
||||
<link rel="icon" href="~/favicon.ico" />
|
||||
<meta name="theme-color" content="#373736">
|
||||
<meta name="application-name" content="@InvariantTerms.SiteName" />
|
||||
<meta name="twitter:site" content="@("@")buildfeed">
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
(function (i, s, o, g, r, a, m) {
|
||||
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
|
||||
(i[r].q = i[r].q || []).push(arguments)
|
||||
}, i[r].l = 1 * new Date(); a = s.createElement(o),
|
||||
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
|
||||
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
||||
|
||||
ga('create', 'UA-55417692-1', 'auto');
|
||||
ga('require', 'displayfeatures');
|
||||
ga('require', 'linkid', 'linkid.js');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
<header id="page-header">
|
||||
<div class="container">
|
||||
<h1>
|
||||
@Html.ActionLink(InvariantTerms.SiteName, nameof(FrontController.Index), new
|
||||
{
|
||||
controller = "Front",
|
||||
area = ""
|
||||
})
|
||||
</h1>
|
||||
</div>
|
||||
</header>
|
||||
<nav id="page-navigation" role="navigation">
|
||||
<div class="container">
|
||||
<button id="page-navigation-toggle">
|
||||
<i class="fa fa-bars"></i> @VariantTerms.Common_ToggleNavigation
|
||||
</button>
|
||||
<ul id="page-navigation-links">
|
||||
<li>
|
||||
<a href="https://blog.buildfeed.net/" title="@VariantTerms.Common_Blog" target="_blank" rel="noopener">
|
||||
<i class="fa fa-fw fa-book"></i> @VariantTerms.Common_Blog
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://twitter.com/buildfeed" title="@VariantTerms.Common_Twitter" target="_blank" rel="noopener">
|
||||
<i class="fa fa-fw fa-twitter"></i> @VariantTerms.Common_Twitter
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<article id="page-content">
|
||||
<div class="container">
|
||||
<h1>@VariantTerms.Common_Error</h1>
|
||||
<p>
|
||||
@Html.Raw(string.Format(VariantTerms.Common_ErrorContent, "<a href=\"https://gitlab.com/buildfeed/BuildFeed/issues\">GitLab</a>"))
|
||||
</p>
|
||||
<p>
|
||||
Controller: <code>@Model.ControllerName</code>
|
||||
</p>
|
||||
<p>
|
||||
Action: <code>@Model.ActionName</code>
|
||||
</p>
|
||||
<p>
|
||||
Error: <code>@Model.Exception.Message</code>
|
||||
</p>
|
||||
</div>
|
||||
</article>
|
||||
<footer id="page-footer">
|
||||
<div class="container">
|
||||
<div class="footer-flex">
|
||||
<div class="footer-flex-item">
|
||||
<p>
|
||||
<i class="fa fa-language"></i> 
|
||||
@CultureInfo.CurrentUICulture.NativeName
|
||||
</p>
|
||||
</div>
|
||||
<div class="footer-flex-item">
|
||||
<p>
|
||||
© 2013 - @DateTime.Now.Year.ToString(), <span dir="ltr">@InvariantTerms.SiteName</span>
|
||||
</p>
|
||||
<p>
|
||||
@Html.Raw(string.Format(VariantTerms.Common_DevelopedBy, $"<a href=\"https://twitter.com/buildfeed\" target=\"_blank\" dir=\"ltr\" rel=\"noopener\">{InvariantTerms.DeveloperName}</a>"))
|
||||
</p>
|
||||
<p>
|
||||
@Html.Raw(string.Format(VariantTerms.Common_ContributeOn, "<a href=\"https://gitlab.com/buildfeed/BuildFeed\" target=\"_blank\" dir=\"ltr\" rel=\"noopener\"><i class=\"fa fa-gitlab\"></i> GitLab</a>"))
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
|
@ -1,299 +0,0 @@
|
|||
@using System.Globalization
|
||||
@{
|
||||
ViewBag.Title = $"{VariantTerms.Common_Credits} | {InvariantTerms.SiteName}";
|
||||
}
|
||||
|
||||
<h1>@VariantTerms.Common_Credits</h1>
|
||||
|
||||
<dl class="credits-list">
|
||||
<dt>BuildFeed Team</dt>
|
||||
<dd>
|
||||
Thomas Hounsell 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/tomhounsell">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dd>
|
||||
Nick (ultrawindows) 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/nickurtnl">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dd>
|
||||
Ahmed (airportsfan)
|
||||
</dd>
|
||||
<dd>
|
||||
Lukas (tfwboredom) 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/tfwboredom">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dd>
|
||||
Soorya (fakirmeditation) 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/fakirmeditation">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dd>
|
||||
Chris (Chris123NT) 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/Chris123NT">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="credits-wrapper">
|
||||
<dl class="credits-list">
|
||||
<dt>Arabic (@CultureInfo.GetCultureInfo("ar").NativeName) Translation</dt>
|
||||
<dd>
|
||||
Ahmed (airportsfan)
|
||||
</dd>
|
||||
<dt>Bengali (@CultureInfo.GetCultureInfo("bn").NativeName) Translation</dt>
|
||||
<dd>
|
||||
Mehedi Hassan 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/mehedih_">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Czech (@CultureInfo.GetCultureInfo("cs").NativeName) Translation</dt>
|
||||
<dd>
|
||||
David (rezedus) 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/rezedus">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>German (@CultureInfo.GetCultureInfo("de").NativeName) Translation</dt>
|
||||
<dd>
|
||||
The Dhel 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/The_Dhel">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dd>
|
||||
Christopher 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/evil_pro_">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Greek (@CultureInfo.GetCultureInfo("el").NativeName) Translation</dt>
|
||||
<dd>Hacker?pcs</dd>
|
||||
<dd>
|
||||
Sotiris Michail 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/SnakeOnStick">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Spanish (@CultureInfo.GetCultureInfo("es").NativeName) Translation</dt>
|
||||
<dd>Nightsteed</dd>
|
||||
<dd>
|
||||
Ben Ward 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/_BenW_">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dd>
|
||||
Meober Whagby 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/ultimofriki">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Farsi (@CultureInfo.GetCultureInfo("fa").NativeName) Translation</dt>
|
||||
<dd>
|
||||
Niloo 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/Niloo0937">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Finnish (@CultureInfo.GetCultureInfo("fi").NativeName) Translation</dt>
|
||||
<dd>
|
||||
Daniel Gurney (wheatley) 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/Daniel_Gurney0">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>French (@CultureInfo.GetCultureInfo("fr").NativeName) Translation</dt>
|
||||
<dd>
|
||||
CgSYannick 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/YannickTHFR">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dd>
|
||||
Gustave M. 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/gus33000">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dd>
|
||||
Christophe Lavalle 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/ChristopheLav">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Croatian (@CultureInfo.GetCultureInfo("hr").NativeName) Translation</dt>
|
||||
<dd>
|
||||
Mario Bešen 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/mariobesen">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Hebrew (@CultureInfo.GetCultureInfo("he").NativeName) Translation</dt>
|
||||
<dd>
|
||||
David Fainshtein 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/david_f">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Indonesian (@CultureInfo.GetCultureInfo("id").NativeName) Translation</dt>
|
||||
<dd>Andreas</dd>
|
||||
<dt>Italian (@CultureInfo.GetCultureInfo("it").NativeName) Translation</dt>
|
||||
<dd>
|
||||
Meober Whagby 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/ultimofriki">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dd>
|
||||
Simone Nataz 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/djnataz">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Japanese (@CultureInfo.GetCultureInfo("ja").NativeName) Translation</dt>
|
||||
<dd>
|
||||
parly 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://github.com/parly">
|
||||
<i class="fa fa-github"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Korean (@CultureInfo.GetCultureInfo("ko").NativeName) Translation</dt>
|
||||
<dd>qta3426</dd>
|
||||
<dd>
|
||||
SD SkyKlouD 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/_SDSkyKlouD">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="credits-list">
|
||||
<dt>Lithuanian (@CultureInfo.GetCultureInfo("lt").NativeName) Translation</dt>
|
||||
<dd>
|
||||
Super User 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/Superb_User">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Dutch (@CultureInfo.GetCultureInfo("nl").NativeName) Translation</dt>
|
||||
<dd>
|
||||
Nick (ultrawindows) 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/nickurtnl">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Polish (@CultureInfo.GetCultureInfo("pl").NativeName) Translation</dt>
|
||||
<dd>
|
||||
piotrulos 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/piotrulos">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dd>
|
||||
dzaggiel 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/dzaggiel">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Portuguese (@CultureInfo.GetCultureInfo("pt").NativeName) Translation</dt>
|
||||
<dd>OBattler</dd>
|
||||
<dt>Portugese - Brazilian (@CultureInfo.GetCultureInfo("pt-br").NativeName) Translation</dt>
|
||||
<dd>RichardG</dd>
|
||||
@*<dt>Pseudo-localisation (@System.Globalization.CultureInfo.GetCultureInfo("qps-ploc").NativeName) Translation</dt>
|
||||
<dd>Thomas Hounsell, with <a target="_blank" rel="nofollow noopener" href="http://www.pseudolocalize.com/"><i class="fa fa-globe"></i> Pseudolocalize!</a></dd>*@
|
||||
<dt>Romanian (@CultureInfo.GetCultureInfo("ro").NativeName) Translation</dt>
|
||||
<dd>
|
||||
ovctvct 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://www.youtube.com/channel/UC9AC01rKiwDhVPvAsT93rjw">
|
||||
<i class="fa fa-youtube"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Russian (@CultureInfo.GetCultureInfo("ru").NativeName) Translation</dt>
|
||||
<dd>
|
||||
Roman (rlinev) 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/rlinev">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dd>
|
||||
Fuhrer_Adolf 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/Fuhrer_Adolf">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Slovak (@CultureInfo.GetCultureInfo("sk").NativeName) Translation</dt>
|
||||
<dd>
|
||||
Lukas 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/tfwboredom">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Slovenian (@CultureInfo.GetCultureInfo("sl").NativeName) Translation</dt>
|
||||
<dd>Overdoze</dd>
|
||||
<dt>Swedish (@CultureInfo.GetCultureInfo("sv").NativeName) Translation</dt>
|
||||
<dd>
|
||||
mrpijey 
|
||||
<a target="_blank" rel="nofollow noopener" href="http://www.mrpijey.net/">
|
||||
<i class="fa fa-globe"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Turkish (@CultureInfo.GetCultureInfo("tr").NativeName) Translation</dt>
|
||||
<dd>
|
||||
Furkan AKÇATEPE 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/FurkanAKATEPE">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dd>Can Taşan</dd>
|
||||
<dd>
|
||||
Duhan Ömür 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/BilgisyrKurdu16">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Ukrainian (@CultureInfo.GetCultureInfo("uk").NativeName) Translation</dt>
|
||||
<dd>
|
||||
Fuhrer_Adolf 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/Fuhrer_Adolf">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Vietnamese (@CultureInfo.GetCultureInfo("vi").NativeName) Translation</dt>
|
||||
<dd>
|
||||
Trần Kim Long Hải 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/trankimlonghai">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Chinese - Simplified (@CultureInfo.GetCultureInfo("zh-hans").NativeName) Translation</dt>
|
||||
<dd>
|
||||
Zheng He 
|
||||
<a target="_blank" rel="nofollow noopener" href="http://www.betaworld.cn/">
|
||||
<i class="fa fa-globe"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dt>Chinese - Traditional (@CultureInfo.GetCultureInfo("zh-hant").NativeName) Translation</dt>
|
||||
<dd>
|
||||
Andrew Huang 
|
||||
<a target="_blank" rel="nofollow noopener" href="https://twitter.com/AndrewDev8383">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a> 
|
||||
<a target="_blank" rel="nofollow noopener" href="http://isite.tw/">
|
||||
<i class="fa fa-globe"></i>
|
||||
</a>
|
||||
</dd>
|
||||
<dd>
|
||||
GT Wang 
|
||||
<a target="_blank" rel="nofollow noopener" href="http://mkvq.blogspot.com/">
|
||||
<i class="fa fa-globe"></i>
|
||||
</a>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
|
@ -1,52 +0,0 @@
|
|||
@{
|
||||
ViewBag.Title = $"{VariantTerms.Common_RssFeeds} | {InvariantTerms.SiteName}";
|
||||
}
|
||||
|
||||
<h1>@VariantTerms.Common_RssFeeds</h1>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href="@Url.Action("Index", new
|
||||
{
|
||||
controller = "Rss"
|
||||
})" title="@VariantTerms.Support_RecentlyCompiled">
|
||||
<i class="fa fa-sm fa-rss"></i> @VariantTerms.Support_RecentlyCompiled</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@Url.Action("Leaked", new
|
||||
{
|
||||
controller = "Rss"
|
||||
})" title="@VariantTerms.Support_RecentlyLeaked">
|
||||
<i class="fa fa-sm fa-rss"></i> @VariantTerms.Support_RecentlyLeaked</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@Url.Action("Added", new
|
||||
{
|
||||
controller = "Rss"
|
||||
})" title="@VariantTerms.Support_RecentlyAdded">
|
||||
<i class="fa fa-sm fa-rss"></i> @VariantTerms.Support_RecentlyAdded</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@Url.Action("Version", new
|
||||
{
|
||||
controller = "Rss"
|
||||
})" title="@VariantTerms.Support_HighestVersion">
|
||||
<i class="fa fa-sm fa-rss"></i> @VariantTerms.Support_HighestVersion</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#rss-labs" data-toggle="collapse">@VariantTerms.Search_Lab</a>
|
||||
<ul id="rss-labs" class="collapse">
|
||||
@foreach (string lab in ViewBag.Labs)
|
||||
{
|
||||
<li>
|
||||
<a href="@Url.Action("Lab", new
|
||||
{
|
||||
controller = "Rss",
|
||||
lab
|
||||
})" title="@lab">
|
||||
<i class="fa fa-sm fa-rss"></i> @lab</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
|
@ -1,130 +0,0 @@
|
|||
@using BuildFeed.Controllers
|
||||
@using BuildFeed.Model.View
|
||||
@model SitemapData
|
||||
@{
|
||||
ViewBag.Title = $"{VariantTerms.Common_Sitemap} | {InvariantTerms.SiteName}";
|
||||
}
|
||||
|
||||
<h1>@VariantTerms.Common_Sitemap</h1>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
@Html.ActionLink("BuildFeed", nameof(FrontController.Index), "Front")
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#sitemap-builds">Builds</a>
|
||||
<ul id="sitemap-builds">
|
||||
@foreach (SitemapDataBuildGroup buildGroup in Model.Builds)
|
||||
{
|
||||
<li>
|
||||
@Html.ActionLink(buildGroup.Id.ToString(), "ViewGroup", new
|
||||
{
|
||||
controller = "Front",
|
||||
major = buildGroup.Id.Major,
|
||||
minor = buildGroup.Id.Minor,
|
||||
number = buildGroup.Id.Build,
|
||||
revision = buildGroup.Id.Revision
|
||||
})
|
||||
<ul>
|
||||
@foreach (SitemapDataBuild build in buildGroup.Builds)
|
||||
{
|
||||
<li>
|
||||
@Html.ActionLink(build.Name, "ViewBuild", new
|
||||
{
|
||||
controller = "Front",
|
||||
id = build.Id
|
||||
})</li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
@foreach (var item in Model.Actions)
|
||||
{
|
||||
<li>
|
||||
<a href="#sitemap-@item.Key.ToLower()">@item.Key</a>
|
||||
<ul id="sitemap-@item.Key.ToLower()">
|
||||
@foreach (SitemapPagedAction action in item.Value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(action.Name))
|
||||
{
|
||||
<li>@Html.ActionLink("Page 1", action.Action, action.UrlParams)</li>
|
||||
for (int i = 2; i <= action.Pages; i++)
|
||||
{
|
||||
RouteValueDictionary urlParams = action.UrlParams;
|
||||
urlParams["page"] = i;
|
||||
<li>@Html.ActionLink($"Page {i}", action.Action + "Page", urlParams)</li>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<li>
|
||||
<a href="#sitemap-@action.UniqueId">@action.Name</a>
|
||||
<ul id="sitemap-@action.UniqueId">
|
||||
<li>@Html.ActionLink("Page 1", action.Action, action.UrlParams)</li>
|
||||
@for (int i = 2; i <= action.Pages; i++)
|
||||
{
|
||||
RouteValueDictionary urlParams = action.UrlParams;
|
||||
urlParams["page"] = i;
|
||||
<li>@Html.ActionLink($"Page {i}", action.Action + "Page", urlParams)</li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
<li>
|
||||
<a href="#sitemap-rss">@VariantTerms.Common_RssFeeds</a>
|
||||
<ul id="sitemap-rss">
|
||||
<li>
|
||||
<a href="@Url.Action("Index", new
|
||||
{
|
||||
controller = "Rss"
|
||||
})" title="@VariantTerms.Support_RecentlyCompiled">
|
||||
<i class="fa fa-sm fa-rss"></i> @VariantTerms.Support_RecentlyCompiled</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@Url.Action("Leaked", new
|
||||
{
|
||||
controller = "Rss"
|
||||
})" title="@VariantTerms.Support_RecentlyLeaked">
|
||||
<i class="fa fa-sm fa-rss"></i> @VariantTerms.Support_RecentlyLeaked</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@Url.Action("Added", new
|
||||
{
|
||||
controller = "Rss"
|
||||
})" title="@VariantTerms.Support_RecentlyAdded">
|
||||
<i class="fa fa-sm fa-rss"></i> @VariantTerms.Support_RecentlyAdded</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@Url.Action("Version", new
|
||||
{
|
||||
controller = "Rss"
|
||||
})" title="@VariantTerms.Support_HighestVersion">
|
||||
<i class="fa fa-sm fa-rss"></i> @VariantTerms.Support_HighestVersion</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#rss-labs">@VariantTerms.Model_LabString</a>
|
||||
<ul id="rss-labs">
|
||||
@foreach (string lab in Model.Labs)
|
||||
{
|
||||
<li>
|
||||
<a href="@Url.Action("Lab", new
|
||||
{
|
||||
controller = "Rss",
|
||||
lab
|
||||
})" title="@lab">
|
||||
<i class="fa fa-sm fa-rss"></i> @lab</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
<system.web>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
</system.webServer>
|
||||
</configuration>
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
|
||||
<system.web>
|
||||
<customErrors mode="On" xdt:Transform="Insert" />
|
||||
<compilation xdt:Transform="RemoveAttributes(debug)" />
|
||||
<trace enabled="false" requestLimit="40" pageOutput="false" xdt:Transform="Replace" />
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<rewrite>
|
||||
<rules>
|
||||
<rule name="CanonicalHost" stopProcessing="true" xdt:Transform="Insert">
|
||||
<match url="(.*)" />
|
||||
<conditions logicalGrouping="MatchAny">
|
||||
<add input="{HTTP_HOST}" pattern="^buildfeed\.net$" negate="true" />
|
||||
<add input="{HTTPS}" pattern="off" />
|
||||
</conditions>
|
||||
<action type="Redirect" url="https://buildfeed.net/{R:1}" />
|
||||
</rule>
|
||||
</rules>
|
||||
</rewrite>
|
||||
<httpProtocol>
|
||||
<customHeaders>
|
||||
<add name="Strict-Transport-Security" value="max-age=31536000" xdt:Transform="Insert" />
|
||||
</customHeaders>
|
||||
</httpProtocol>
|
||||
</system.webServer>
|
||||
</configuration>
|
|
@ -1,195 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<appSettings file="settings.config">
|
||||
<add key="webpages:Version" value="3.0.0.0" />
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
<add key="PreserveLoginUrl" value="true" />
|
||||
<add key="ClientValidationEnabled" value="true" />
|
||||
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
||||
<add key="data:MongoDB" value="BuildFeed" />
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<compilation debug="true" targetFramework="4.7.1">
|
||||
<assemblies>
|
||||
<add assembly="System.Globalization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add assembly="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
|
||||
</assemblies>
|
||||
</compilation>
|
||||
<httpRuntime targetFramework="4.7.1" enableVersionHeader="false" />
|
||||
<globalization culture="auto:en" uiCulture="auto:en" />
|
||||
<trace enabled="true" requestLimit="40" pageOutput="false" />
|
||||
<sessionState cookieless="UseCookies" />
|
||||
<anonymousIdentification cookieless="UseCookies" enabled="false" />
|
||||
<authentication mode="Forms">
|
||||
<forms loginUrl="/login/" cookieless="UseCookies" name="BuildFeedAuth" />
|
||||
</authentication>
|
||||
<membership defaultProvider="BuildFeedMemberProvider">
|
||||
<providers>
|
||||
<clear />
|
||||
<add name="BuildFeedMemberProvider" type="MongoAuth.MongoMembershipProvider,MongoAuth" />
|
||||
</providers>
|
||||
</membership>
|
||||
<roleManager defaultProvider="BuildFeedRoleProvider" enabled="true">
|
||||
<providers>
|
||||
<clear />
|
||||
<add name="BuildFeedRoleProvider" type="MongoAuth.MongoRoleProvider,MongoAuth" />
|
||||
</providers>
|
||||
</roleManager>
|
||||
<httpModules />
|
||||
<httpHandlers />
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<urlCompression doDynamicCompression="true" />
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
<modules />
|
||||
<rewrite>
|
||||
<rules>
|
||||
<rule name="(2015-05) Support Pages">
|
||||
<match url=".*" />
|
||||
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
|
||||
<add input="{Support Pages:{REQUEST_URI}}" pattern="(.+)" />
|
||||
</conditions>
|
||||
<action type="Redirect" url="{C:1}" appendQueryString="true" />
|
||||
</rule>
|
||||
<rule name="(2015-05) Pagination">
|
||||
<match url="(.*)page/(\d+)/(.*)" />
|
||||
<action type="Redirect" redirectType="Permanent" url="/{R:1}{R:3}" />
|
||||
</rule>
|
||||
<rule name="(2015-12) Build Info Pages">
|
||||
<match url="^actions/info/([0-9a-f-]+)/(\?.+)?$" />
|
||||
<action type="Redirect" redirectType="Permanent" url="/build/{R:1}/{R:2}" />
|
||||
</rule>
|
||||
<rule name="(2016-07) RSS Flights">
|
||||
<match url="^rss/flight/([a-z-]+)/(\?.+)?$" />
|
||||
<action type="Redirect" redirectType="Permanent" url="/rss/" />
|
||||
</rule>
|
||||
</rules>
|
||||
<rewriteMaps>
|
||||
<rewriteMap name="Support Pages">
|
||||
<add key="/content/tile/large.png" value="/res/ico/large.png" />
|
||||
<add key="/content/tile/notify.png" value="/res/ico/notify.png" />
|
||||
<add key="/content/tile/square.png" value="/res/ico/square.png" />
|
||||
<add key="/content/tile/tiny.png" value="/res/ico/tiny.png" />
|
||||
<add key="/content/tile/wide.png" value="/res/ico/wide.png" />
|
||||
<add key="/statistics/" value="/" />
|
||||
<add key="/support/question/" value="/" />
|
||||
<add key="/support/stats/" value="/" />
|
||||
<add key="/support/rss/" value="/rss/" />
|
||||
<add key="/actions/create/" value="/add/" />
|
||||
<add key="/support/login/" value="/login/" />
|
||||
<add key="/support/logout/" value="/logout/" />
|
||||
<add key="/support/password/" value="/password/" />
|
||||
<add key="/support/register/" value="/register/" />
|
||||
<add key="/support/sitemap/" value="/sitemap/" />
|
||||
<add key="/support/xmlsitemap/" value="/xml-sitemap/" />
|
||||
</rewriteMap>
|
||||
</rewriteMaps>
|
||||
</rewrite>
|
||||
<httpProtocol>
|
||||
<customHeaders>
|
||||
<clear />
|
||||
<add name="X-Content-Type-Options" value="nosniff" />
|
||||
<add name="X-Frame-Options" value="DENY" />
|
||||
<add name="X-XSS-Protection" value="1; mode=block" />
|
||||
<add name="Referrer-Policy" value="origin-when-cross-origin" />
|
||||
</customHeaders>
|
||||
</httpProtocol>
|
||||
<handlers>
|
||||
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
|
||||
<remove name="OPTIONSVerbHandler" />
|
||||
<remove name="TRACEVerbHandler" />
|
||||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
<system.net>
|
||||
<mailSettings>
|
||||
<smtp configSource="smtp.config" />
|
||||
</mailSettings>
|
||||
</system.net>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Data.Common" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.Serialization.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Diagnostics.Tracing" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Security.Cryptography.Algorithms" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Net.Sockets" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Globalization.Extensions" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Security.SecureString" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Overlapped" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
9
BuildFeed/appsettings.Development.json
Normal file
9
BuildFeed/appsettings.Development.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
}
|
||||
}
|
||||
}
|
17
BuildFeed/appsettings.json
Normal file
17
BuildFeed/appsettings.json
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
|
||||
"push": {
|
||||
"OneSignalApiKey": "Y2I2ZDVjZWItMGNmNS00YzI1LTlkZmMtMWUyZDgzNjMyYzFh",
|
||||
"AppId": "94384f83-dced-4d66-a88c-c2b6e3cdfbaa"
|
||||
},
|
||||
|
||||
"data": {
|
||||
"MongoDB": "BuildFeed"
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user