Merge rest pf files
This commit is contained in:
parent
86b22c6d86
commit
875e846470
@ -1,10 +1,8 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Squirrowse.Client.Service;
|
||||
|
||||
namespace Squirrowse.Client
|
||||
namespace squirrowse.client
|
||||
{
|
||||
public class Program
|
||||
class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
@ -17,11 +15,13 @@ namespace Squirrowse.Client
|
||||
.ConfigureServices((hostContext, services) =>
|
||||
{
|
||||
services.AddHostedService<Worker>();
|
||||
services.AddSingleton<IConnectionManager>(x=> new ConnectionManager("http://localhost", 44366)); //keep as transient for now
|
||||
services.AddSingleton< ICameraService, CameraService >(x=>new CameraService(new Camera()));
|
||||
services.AddTransient<IStreamService, StreamService>();
|
||||
services.AddSingleton<IConnectionManager>(x =>
|
||||
new ConnectionManager("http://squirrowse.azurewebsites.net", 80)); //keep as transient for now
|
||||
|
||||
// new ConnectionManager("http://192.168.0.13", 5000)); //keep as transient for now
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,24 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Worker">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<UserSecretsId>dotnet-Squirrowse.Client-D6805387-040A-46DF-9DAE-926B46C981A6</UserSecretsId>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="3.0.0" />
|
||||
<PackageReference Include="OpenCvSharp4.Windows" Version="4.1.1.20191021" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="3.1.5" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Common" Version="3.1.5" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="3.1.5" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.2" />
|
||||
<PackageReference Include="OpenCvSharp4" Version="4.2.0.20200208" />
|
||||
<PackageReference Include="OpenCvSharp4.runtime.win" Version="4.2.0.20200208" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Squirrowse.Core\Squirrowse.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="appsettings.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -1,42 +1,36 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.SignalR.Client;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Squirrowse.Client.Service;
|
||||
using Squirrowse.Core.Models;
|
||||
using Squirrowse.Core.Services;
|
||||
|
||||
namespace Squirrowse.Client
|
||||
namespace squirrowse.client
|
||||
{
|
||||
public class Worker : IHostedService
|
||||
{
|
||||
private readonly IConnectionManager _connectionManager;
|
||||
private readonly ILogger<Worker> logger;
|
||||
private readonly IActionDispatcher _actionDispatcher;
|
||||
public Worker(ILogger<Worker> logger, IConnectionManager connectionManager,IActionDispatcher act)
|
||||
private readonly IConnectionManager _connectionManager;
|
||||
private Connection con =new Connection();
|
||||
public Worker(ILogger<Worker> logger, IConnectionManager connectionManager)
|
||||
{
|
||||
this.logger = logger;
|
||||
_connectionManager = connectionManager;
|
||||
_actionDispatcher = act;
|
||||
|
||||
}
|
||||
|
||||
public async Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _connectionManager.InitConnection(ConnectionType.Client);
|
||||
await _connectionManager.InitConnection();
|
||||
|
||||
}
|
||||
catch
|
||||
//var d = _connectionManager.GetConnection();
|
||||
if (_connectionManager.IsConnected())
|
||||
{
|
||||
await Task.Delay(1111);
|
||||
var d =await _connectionManager.GetConnection();
|
||||
await d.SendAsync("UploadStream", con.clientStreamData());
|
||||
}
|
||||
}
|
||||
// await Task.Delay(10000);//for debug
|
||||
|
||||
}
|
||||
|
||||
public async Task StopAsync(CancellationToken cancellationToken)
|
||||
|
@ -1,13 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.0.0" />
|
||||
<PackageReference Include="OpenCvSharp4.Windows" Version="4.1.1.20191021" />
|
||||
<PackageReference Include="LiteDB" Version="5.0.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="3.1.5" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Common" Version="3.1.5" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="3.1.5" />
|
||||
<PackageReference Include="Microsoft.Azure.CognitiveServices.Vision.ComputerVision" Version="6.0.0-dev.20190919.3" />
|
||||
<PackageReference Include="OpenCvSharp4" Version="4.2.0.20200208" />
|
||||
<PackageReference Include="OpenCvSharp4.runtime.ubuntu.18.04-x64" Version="4.2.0.20200208" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -1,4 +1,4 @@
|
||||
<Router AppAssembly="@typeof(Program).Assembly">
|
||||
<Router AppAssembly="@typeof(Program).Assembly">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/>
|
||||
</Found>
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
<h1>Hello, world!</h1>
|
||||
|
||||
Welcome to your new app.
|
||||
Welcome to aws.
|
@ -1,22 +1,179 @@
|
||||
@page "/"
|
||||
@namespace Squirrowse.Web.Pages
|
||||
@namespace squirrowse.web.Pages
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script src="jquery/jquery.js"></script>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>Squirrowse.Web</title>
|
||||
<title>squirrowse.web</title>
|
||||
<base href="~/"/>
|
||||
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css"/>
|
||||
<link rel="stylesheet" href="lib/lightgallery/css/lightgallery.css"/>
|
||||
<link href="css/site.css" rel="stylesheet"/>
|
||||
<style type="text/css">
|
||||
|
||||
|
||||
.demo-gallery > ul { margin-bottom: 0; }
|
||||
|
||||
.demo-gallery > ul > li {
|
||||
float: left;
|
||||
margin-bottom: 15px;
|
||||
margin-right: 20px;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.demo-gallery > ul > li a {
|
||||
border: 3px solid #FFF;
|
||||
border-radius: 3px;
|
||||
display: block;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.mostly-customized-scrollbar::-webkit-scrollbar {
|
||||
background-color: #aaa; /* or add it to the track */
|
||||
height: 8px;
|
||||
overflow: auto;
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.demo-gallery > ul > li a > img {
|
||||
-moz-transition: -moz-transform 0.15s ease 0s;
|
||||
-o-transition: -o-transform 0.15s ease 0s;
|
||||
-webkit-transform: scale3d(1, 1, 1);
|
||||
-webkit-transition: -webkit-transform 0.15s ease 0s;
|
||||
height: 100%;
|
||||
transform: scale3d(1, 1, 1);
|
||||
transition: transform 0.15s ease 0s;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.demo-gallery > ul > li a:hover > img {
|
||||
-webkit-transform: scale3d(1.1, 1.1, 1.1);
|
||||
transform: scale3d(1.1, 1.1, 1.1);
|
||||
}
|
||||
|
||||
.demo-gallery > ul > li a:hover .demo-gallery-poster > img { opacity: 1; }
|
||||
|
||||
.demo-gallery > ul > li a .demo-gallery-poster {
|
||||
-o-transition: background-color 0.15s ease 0s;
|
||||
-webkit-transition: background-color 0.15s ease 0s;
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
transition: background-color 0.15s ease 0s;
|
||||
}
|
||||
|
||||
.demo-gallery > ul > li a .demo-gallery-poster > img {
|
||||
-o-transition: opacity 0.3s ease 0s;
|
||||
-webkit-transition: opacity 0.3s ease 0s;
|
||||
left: 50%;
|
||||
margin-left: -10px;
|
||||
margin-top: -10px;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transition: opacity 0.3s ease 0s;
|
||||
}
|
||||
|
||||
.demo-gallery > ul > li a:hover .demo-gallery-poster { background-color: rgba(0, 0, 0, 0.5); }
|
||||
|
||||
.demo-gallery .justified-gallery > a > img {
|
||||
-moz-transition: -moz-transform 0.15s ease 0s;
|
||||
-o-transition: -o-transform 0.15s ease 0s;
|
||||
-webkit-transform: scale3d(1, 1, 1);
|
||||
-webkit-transition: -webkit-transform 0.15s ease 0s;
|
||||
height: 100%;
|
||||
transform: scale3d(1, 1, 1);
|
||||
transition: transform 0.15s ease 0s;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.demo-gallery .justified-gallery > a:hover > img {
|
||||
-webkit-transform: scale3d(1.1, 1.1, 1.1);
|
||||
transform: scale3d(1.1, 1.1, 1.1);
|
||||
}
|
||||
|
||||
.demo-gallery .justified-gallery > a:hover .demo-gallery-poster > img { opacity: 1; }
|
||||
|
||||
.demo-gallery .justified-gallery > a .demo-gallery-poster {
|
||||
-o-transition: background-color 0.15s ease 0s;
|
||||
-webkit-transition: background-color 0.15s ease 0s;
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
transition: background-color 0.15s ease 0s;
|
||||
}
|
||||
|
||||
.demo-gallery .justified-gallery > a .demo-gallery-poster > img {
|
||||
-o-transition: opacity 0.3s ease 0s;
|
||||
-webkit-transition: opacity 0.3s ease 0s;
|
||||
left: 50%;
|
||||
margin-left: -10px;
|
||||
margin-top: -10px;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transition: opacity 0.3s ease 0s;
|
||||
}
|
||||
|
||||
.demo-gallery .justified-gallery > a:hover .demo-gallery-poster { background-color: rgba(0, 0, 0, 0.5); }
|
||||
|
||||
.demo-gallery .video .demo-gallery-poster img {
|
||||
height: 48px;
|
||||
margin-left: -24px;
|
||||
margin-top: -24px;
|
||||
opacity: 0.8;
|
||||
width: 48px;
|
||||
}
|
||||
|
||||
.demo-gallery.dark > ul > li a { border: 3px solid #04070a; }
|
||||
|
||||
.home .demo-gallery { padding-bottom: 80px; }
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<app>
|
||||
@(await Html.RenderComponentAsync<App>(RenderMode.ServerPrerendered))
|
||||
<component type="typeof(App)" render-mode="ServerPrerendered"/>
|
||||
</app>
|
||||
|
||||
<div id="blazor-error-ui">
|
||||
<environment include="Staging,Production">
|
||||
An error has occurred. This application may no longer respond until reloaded.
|
||||
</environment>
|
||||
<environment include="Development">
|
||||
An unhandled exception has occurred. See browser dev tools for details.
|
||||
</environment>
|
||||
<a href="" class="reload">Reload</a>
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
|
||||
<script src="lib/lightgallery/js/lightgallery-all.js"></script>
|
||||
<script src="_framework/blazor.server.js"></script>
|
||||
<script>
|
||||
function galeryJs() {
|
||||
|
||||
$('.lgalery').lightGallery();
|
||||
};
|
||||
|
||||
function colapseD() {
|
||||
$('.collapse').collapse();
|
||||
};
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,7 +1,7 @@
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace Squirrowse.Web
|
||||
namespace squirrowse.web
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
@ -13,7 +13,7 @@ namespace Squirrowse.Web
|
||||
public static IHostBuilder CreateHostBuilder(string[] args)
|
||||
{
|
||||
return Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>(); });
|
||||
.ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>().UseUrls("http://0.0.0.0:5000"); });
|
||||
}
|
||||
}
|
||||
}
|
@ -3,8 +3,8 @@
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:56422",
|
||||
"sslPort": 44381
|
||||
"applicationUrl": "http://192.168.0.13:8000",
|
||||
"sslPort": 443
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
@ -15,13 +15,21 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"Squirrowse.Web": {
|
||||
"squirrowse.web": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "https://localhost:5003;http://localhost:5002",
|
||||
"useSSL": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"applicationUrl": "http://192.168.0.13:8000"
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
|
||||
"publishAllPorts": true,
|
||||
"useSSL": true
|
||||
}
|
||||
}
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
|
||||
<div class="main">
|
||||
<div class="top-row px-4">
|
||||
<a href="https://docs.microsoft.com/en-us/aspnet/" target="_blank">About</a>
|
||||
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
|
||||
</div>
|
||||
|
||||
<div class="content px-4">
|
||||
|
@ -1,11 +1,11 @@
|
||||
<div class="top-row pl-4 navbar navbar-dark">
|
||||
<a class="navbar-brand" href="">Squirrowse.Web</a>
|
||||
<a class="navbar-brand" href="">squirrowse.web</a>
|
||||
<button class="navbar-toggler" @onclick="ToggleNavMenu">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
|
||||
<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
|
||||
@ -13,21 +13,26 @@
|
||||
</NavLink>
|
||||
</li>
|
||||
<li class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="Hub">
|
||||
<span class="oi oi-list-rich" aria-hidden="true"></span> Stream
|
||||
<NavLink class="nav-link" href="client">
|
||||
<span class="oi oi-list-rich" aria-hidden="true"></span> Client
|
||||
</NavLink>
|
||||
</li>
|
||||
<li class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="galery">
|
||||
<span class="oi oi-list-rich" aria-hidden="true"></span> Galery
|
||||
</NavLink>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
bool collapseNavMenu = true;
|
||||
@code {
|
||||
private bool collapseNavMenu = true;
|
||||
|
||||
string NavMenuCssClass => collapseNavMenu ? "collapse" : null;
|
||||
private string NavMenuCssClass => collapseNavMenu ? "collapse" : null;
|
||||
|
||||
void ToggleNavMenu()
|
||||
private void ToggleNavMenu()
|
||||
{
|
||||
collapseNavMenu = !collapseNavMenu;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,22 +1,44 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<StartupObject>Squirrowse.Web.Program</StartupObject>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<UserSecretsId>e06d99cb-4df6-41f0-8639-cd34df940830</UserSecretsId>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Squirrowse.Core\Squirrowse.Core.csproj" />
|
||||
<PackageReference Include="CNTK.Deps.OpenCV.Zip" Version="2.8.0-rc0.dev20200201" />
|
||||
<PackageReference Include="DevExpress.Blazor" Version="19.2.4-preview" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="3.1.5" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Common" Version="3.1.5" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="3.1.5" />
|
||||
<PackageReference Include="Microsoft.Azure.CognitiveServices.Vision.ComputerVision" Version="6.0.0-dev.20190919.3" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.9.10" />
|
||||
<PackageReference Include="OpenCvSharp4" Version="4.2.0.20200208" />
|
||||
<PackageReference Include="OpenCvSharp4.runtime.ubuntu.18.04-x64" Version="4.2.0.20200208" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="appsettings.json">
|
||||
<ProjectReference Include="..\squirrowse.core\squirrowse.core.csproj" />
|
||||
<ProjectReference Include="..\squirrowse.db\squirrowse.db.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="StaticFiles\haarcascade_frontalface_alt.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</None>
|
||||
<None Update="StaticFiles\haarcascade_lowerbody.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="StaticFiles\haarcascade_upperbody.xml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Data\" />
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties appsettings_1development_1json__JsonSchema="http://json.schemastore.org/asmdef" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
|
||||
</Project>
|
@ -1,11 +1,15 @@
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Squirrowse.Core;
|
||||
using squirrowse.db;
|
||||
using squirrowse.web.Cognitive;
|
||||
using squirrowse.web.Data;
|
||||
|
||||
namespace Squirrowse.Web
|
||||
namespace squirrowse.web
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
@ -21,10 +25,20 @@ namespace Squirrowse.Web
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddRazorPages();
|
||||
services.AddServerSideBlazor().AddHubOptions(x =>
|
||||
{
|
||||
x.EnableDetailedErrors = true;
|
||||
x.MaximumReceiveMessageSize = short.MaxValue;
|
||||
});
|
||||
|
||||
services.AddServerSideBlazor().AddHubOptions(x => x.MaximumReceiveMessageSize = 102400000);
|
||||
services.AddCoreModule();
|
||||
services.AddSignalR().AddMessagePackProtocol();
|
||||
services.AddSingleton<SaveVideo>();
|
||||
services.AddSingleton<Detection>();
|
||||
services.AddSingleton<IAzureCV, AzureCV>();
|
||||
services.AddSingleton<DbContext>();
|
||||
services.AddSingleton<GaleryService>();
|
||||
services.AddSingleton<Bloob>();
|
||||
services.AddSingleton<VideoQ>();
|
||||
services.AddSignalR(x => x.MaximumReceiveMessageSize = ((int)(int.MaxValue / 2))).AddMessagePackProtocol();
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
@ -41,15 +55,16 @@ namespace Squirrowse.Web
|
||||
app.UseHsts();
|
||||
}
|
||||
|
||||
app.UsePathBase(new PathString("/extra"));
|
||||
app.UseHttpsRedirection();
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapBlazorHub();
|
||||
endpoints.MapFallbackToPage("/_Host");
|
||||
endpoints.MapHub<ClientHub>("hub");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -5,5 +5,5 @@
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using Microsoft.JSInterop
|
||||
@using Squirrowse.Web
|
||||
@using Squirrowse.Web.Shared
|
||||
@using squirrowse.web
|
||||
@using squirrowse.web.Shared
|
@ -1,9 +1,10 @@
|
||||
{
|
||||
"DetailedErrors": true,
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
@ -30,7 +30,15 @@ app {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.main .top-row > a { margin-left: 1.5rem; }
|
||||
.main .top-row > a, .main .top-row .btn-link {
|
||||
margin-left: 1.5rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.main .top-row a:first-child {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.sidebar { background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); }
|
||||
|
||||
@ -45,16 +53,16 @@ app {
|
||||
width: 2rem;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
.sidebar .nav-item {
|
||||
font-size: 0.9rem;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.nav-item:first-of-type { padding-top: 1rem; }
|
||||
.sidebar .nav-item:first-of-type { padding-top: 1rem; }
|
||||
|
||||
.nav-item:last-of-type { padding-bottom: 1rem; }
|
||||
.sidebar .nav-item:last-of-type { padding-bottom: 1rem; }
|
||||
|
||||
.nav-item a {
|
||||
.sidebar .nav-item a {
|
||||
align-items: center;
|
||||
border-radius: 4px;
|
||||
color: #d7d7d7;
|
||||
@ -63,12 +71,12 @@ app {
|
||||
line-height: 3rem;
|
||||
}
|
||||
|
||||
.nav-item a.active {
|
||||
.sidebar .nav-item a.active {
|
||||
background-color: rgba(255, 255, 255, 0.25);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-item a:hover {
|
||||
.sidebar .nav-item a:hover {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
color: white;
|
||||
}
|
||||
@ -83,8 +91,31 @@ app {
|
||||
|
||||
.validation-message { color: red; }
|
||||
|
||||
#blazor-error-ui {
|
||||
background: lightyellow;
|
||||
bottom: 0;
|
||||
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
|
||||
display: none;
|
||||
left: 0;
|
||||
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
#blazor-error-ui .dismiss {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
top: 0.5rem;
|
||||
}
|
||||
|
||||
@media (max-width: 767.98px) {
|
||||
.main .top-row { display: none; }
|
||||
.main .top-row:not(.auth) { display: none; }
|
||||
|
||||
.main .top-row.auth { justify-content: space-between; }
|
||||
|
||||
.main .top-row a, .main .top-row .btn-link { margin-left: 0; }
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
|
@ -1,22 +1,15 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29411.108
|
||||
VisualStudioVersion = 16.0.29806.167
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrowse.Service", "Squirrowse.Service\Squirrowse.Service.csproj", "{8C085621-BAAA-4E96-B027-561BC18751EE}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "squirrowse.web", "squirrowse.web\squirrowse.web.csproj", "{8A3C08CE-2DB6-4339-9A72-6EB58AD2300F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrowse.Client", "Squirrowse.Client\Squirrowse.Client.csproj", "{558A5917-6AD3-4C40-ACA1-EE3B8B8927C8}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "squirrowse.db", "squirrowse.db\squirrowse.db.csproj", "{322D1CFC-AEC6-4C8A-9561-8CB25F3C8A4F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrowse.Core", "Squirrowse.Core\Squirrowse.Core.csproj", "{D0989FCC-484E-4ADB-BA5E-1020894F9C09}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "squirrowse.core", "squirrowse.core\squirrowse.core.csproj", "{0C908BE8-729C-4DCA-92DE-07FB7346EBB7}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{BB569A06-F4D1-4927-87AB-86C4BD2AFBC5}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Squirrowse.Core.Tests", "Squirrowse.Core.Tests\Squirrowse.Core.Tests.csproj", "{CFA96677-EAA7-4871-AAD8-E6336973366F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Squirrowse.Web", "Squirrowse.Web\Squirrowse.Web.csproj", "{5FEF6EDF-3327-48B1-9298-26A24D023924}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{D0989FCC-484E-4ADB-BA5E-1020894F9C09} = {D0989FCC-484E-4ADB-BA5E-1020894F9C09}
|
||||
EndProjectSection
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "squirrowse.client", "squirrowse.client\squirrowse.client.csproj", "{89E3C9E7-94E5-4976-97C0-0703F6C9DF49}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -24,34 +17,27 @@ Global
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8C085621-BAAA-4E96-B027-561BC18751EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8C085621-BAAA-4E96-B027-561BC18751EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8C085621-BAAA-4E96-B027-561BC18751EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8C085621-BAAA-4E96-B027-561BC18751EE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{558A5917-6AD3-4C40-ACA1-EE3B8B8927C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{558A5917-6AD3-4C40-ACA1-EE3B8B8927C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{558A5917-6AD3-4C40-ACA1-EE3B8B8927C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{558A5917-6AD3-4C40-ACA1-EE3B8B8927C8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D0989FCC-484E-4ADB-BA5E-1020894F9C09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D0989FCC-484E-4ADB-BA5E-1020894F9C09}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D0989FCC-484E-4ADB-BA5E-1020894F9C09}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D0989FCC-484E-4ADB-BA5E-1020894F9C09}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CFA96677-EAA7-4871-AAD8-E6336973366F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CFA96677-EAA7-4871-AAD8-E6336973366F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CFA96677-EAA7-4871-AAD8-E6336973366F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CFA96677-EAA7-4871-AAD8-E6336973366F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5FEF6EDF-3327-48B1-9298-26A24D023924}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5FEF6EDF-3327-48B1-9298-26A24D023924}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5FEF6EDF-3327-48B1-9298-26A24D023924}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5FEF6EDF-3327-48B1-9298-26A24D023924}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8A3C08CE-2DB6-4339-9A72-6EB58AD2300F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8A3C08CE-2DB6-4339-9A72-6EB58AD2300F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8A3C08CE-2DB6-4339-9A72-6EB58AD2300F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8A3C08CE-2DB6-4339-9A72-6EB58AD2300F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{322D1CFC-AEC6-4C8A-9561-8CB25F3C8A4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{322D1CFC-AEC6-4C8A-9561-8CB25F3C8A4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{322D1CFC-AEC6-4C8A-9561-8CB25F3C8A4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{322D1CFC-AEC6-4C8A-9561-8CB25F3C8A4F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0C908BE8-729C-4DCA-92DE-07FB7346EBB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0C908BE8-729C-4DCA-92DE-07FB7346EBB7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0C908BE8-729C-4DCA-92DE-07FB7346EBB7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0C908BE8-729C-4DCA-92DE-07FB7346EBB7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{89E3C9E7-94E5-4976-97C0-0703F6C9DF49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{89E3C9E7-94E5-4976-97C0-0703F6C9DF49}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{89E3C9E7-94E5-4976-97C0-0703F6C9DF49}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{89E3C9E7-94E5-4976-97C0-0703F6C9DF49}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{CFA96677-EAA7-4871-AAD8-E6336973366F} = {BB569A06-F4D1-4927-87AB-86C4BD2AFBC5}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {1CC5C3B8-3825-4EB5-ACFF-73B4CAC8945D}
|
||||
SolutionGuid = {8CE6F2C5-E801-4DB6-8A77-7CA7DB88E070}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
Loading…
Reference in New Issue
Block a user