chat cx have a user name
This commit is contained in:
@ -42,6 +42,7 @@ namespace Yavsc
|
||||
new Scope { Id = "frontoffice" , Description ="Your front office interface" }
|
||||
};
|
||||
|
||||
public const string SshHeaderKey = "SSH";
|
||||
|
||||
private static readonly string[] GoogleScopes = { "openid", "profile", "email" };
|
||||
public static readonly string[] GoogleCalendarScopes =
|
||||
|
@ -34,7 +34,9 @@ namespace Yavsc.Controllers
|
||||
|
||||
public async Task<IActionResult> Index(string id)
|
||||
{
|
||||
|
||||
ViewBag.IsFromSecureProx = (Request.Headers.ContainsKey(Constants.SshHeaderKey))? Request.Headers[Constants.SshHeaderKey]=="on" : false ;
|
||||
ViewBag.SecureHomeUrl = "https://"+Request.Headers["X-Forwarded-Host"];
|
||||
ViewBag.SshHeaderKey = Request.Headers[Constants.SshHeaderKey];
|
||||
var uid = User.GetUserId();
|
||||
long [] clicked=null;
|
||||
if (uid==null) {
|
||||
|
@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Metadata;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
|
@ -1,8 +1,6 @@
|
||||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Metadata;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
|
@ -293,7 +293,9 @@
|
||||
<data name="Not Approuved"><value>Non approuvé</value></data>
|
||||
<data name="NonValidee"><value>Non validée</value></data>
|
||||
<data name="NonValide"><value>Non validé</value></data>
|
||||
<data name="off"><value>inactif</value></data>
|
||||
<data name="Offline"><value>Hors ligne</value></data>
|
||||
<data name="on"><value>actif</value></data>
|
||||
<data name="Online"><value>En ligne</value></data>
|
||||
<data name="OnlyAuthorizedMayContact"><value>Seuls les utilisateurs authorisés peuvent contacter un préstataire par courrier.</value></data>
|
||||
<data name="Password"><value>Mot de passe</value></data>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<h2>Chat </h2>
|
||||
<label><input type="checkbox" id="mute" />Muet</label>
|
||||
|
||||
<div class="container">
|
||||
<div class="container" id="chatview" class="disabled" >
|
||||
<input type="hidden" id="displayname" />
|
||||
<div class="panel">
|
||||
<em>Salons</em>
|
||||
@ -15,7 +15,7 @@
|
||||
</div>
|
||||
<ul id="discussion">
|
||||
</ul>
|
||||
<div id="targets" class="disabled" >
|
||||
<div id="targets" >
|
||||
<div id="sendmessagebox">
|
||||
<div class="col-md-10">
|
||||
<div class="row">
|
||||
|
@ -63,4 +63,25 @@
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
@if (!ViewBag.IsFromSecureProx) {
|
||||
<div class="alert alert-warning alert-dismissable">
|
||||
<markdown>
|
||||
# Alerte, alerte!
|
||||
|
||||
Votre connexion n'est pas sécurisée.
|
||||
|
||||
Un accés sécurisé est disponible, mais le certificat qui le chiffre n'est pas certifié par Google, ni aucune
|
||||
autre autorité de certification reconnue. C'est un certificat auto signé.
|
||||
|
||||
Pour l'utiliser, vous devrez ajouter une exception pour ce certificat (p-e après
|
||||
avoir cliqué sur le lien "avancé" de l'alerte'), et continuer votre navigation
|
||||
malgré ce défaut de validation de la sécurité associée.
|
||||
|
||||
Prennez soin d'ajouter cette exception de manière définitive, je ne compte pas me séparer de ce certificat de si tôt.
|
||||
|
||||
---
|
||||
*Voilà*, c'est comme ça.'
|
||||
</markdown>
|
||||
<a href="@ViewBag.SecureHomeUrl" aria-label="close" class="close" >Lien vers le site sécurisé</a>
|
||||
</div>
|
||||
}
|
||||
|
@ -51,8 +51,7 @@
|
||||
@if (ViewData ["Notify"] != null) {
|
||||
foreach (Notification n in ViewData ["Notify"] as IEnumerable<Notification>) {
|
||||
<div class="alert alert-info alert-dismissable">
|
||||
<h1>@n.title</h1><em></em>
|
||||
@n.body
|
||||
<h1>@n.title</h1>@n.body
|
||||
<a class="close" data-dismiss="alert" aria-label="close" onclick="notifClick(@n.Id)">@((n.click_action==null)?SR["Fermer"]:SR[n.click_action])</a>
|
||||
</div>
|
||||
}
|
||||
|
23
Yavsc/Yavsc.csproj
Normal file
23
Yavsc/Yavsc.csproj
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161123-03" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
|
||||
<Content Include="Models\Workflow\CommandForm.cs" />
|
||||
<Content Include="Models\Workflow\RdvQuery.cs" />
|
||||
<Content Include="Views\Account\Authorize.cshtml" />
|
||||
<Content Include="Views\Account\Lockout.cshtml" />
|
||||
<Content Include="Views\Account\ResetPassword.cshtml" />
|
||||
<Content Include="project.lock.json" />
|
||||
<Content Include="project.json" />
|
||||
<Content Include="Controllers\HomeController.cs" />
|
||||
<Content Include="Startup\Startup.cs" />
|
||||
<Content Include="Controllers\SIRENExceptionsController.cs" />
|
||||
<Content Include="Startup\Startup.OAuth.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -12,6 +12,10 @@
|
||||
"compilationOptions": {
|
||||
"emitEntryPoint": true
|
||||
},
|
||||
"buildOptions": {
|
||||
"debugType": "portable",
|
||||
"emitEntryPoint": true
|
||||
},
|
||||
"compile": [
|
||||
"*.cs"
|
||||
],
|
||||
@ -28,7 +32,7 @@
|
||||
"TRACE"
|
||||
],
|
||||
"optimize": false,
|
||||
"debugType": "full"
|
||||
"debugType": "portable"
|
||||
}
|
||||
},
|
||||
"Release": {
|
||||
@ -50,8 +54,8 @@
|
||||
"EntityFramework.Core": "7.0.0-rc1-*",
|
||||
"EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-*",
|
||||
"EntityFramework.Relational": "7.0.0-rc1-*",
|
||||
"EntityFramework7.Npgsql": "3.1.0-*",
|
||||
"EntityFramework7.Npgsql.Design": "3.1.0-*",
|
||||
"EntityFramework7.Npgsql": "3.1.0-rc1-*",
|
||||
"EntityFramework7.Npgsql.Design": "3.1.0-rc1-*",
|
||||
"Google.Apis.Core": "1.11.1",
|
||||
"Google.Apis": "1.11.1",
|
||||
"MailKit": "1.3.0-beta7",
|
||||
@ -73,11 +77,11 @@
|
||||
"Microsoft.AspNet.SignalR.JS": "2.2.1",
|
||||
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-*",
|
||||
"Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-*",
|
||||
"Microsoft.AspNet.WebSockets.Server": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.WebSockets.Server": "1.0.0-*",
|
||||
"Microsoft.Extensions.Configuration.Abstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-*",
|
||||
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-*",
|
||||
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-*",
|
||||
"Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
|
||||
@ -89,12 +93,11 @@
|
||||
"Microsoft.Extensions.CodeGeneration": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.CodeGenerators.Mvc": "1.0.0-rc1-final",
|
||||
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
|
||||
"Microsoft.Framework.Configuration.Abstractions": "1.0.0-beta8",
|
||||
"Microsoft.Framework.Configuration.Binder": "1.0.0-beta8",
|
||||
"Microsoft.Framework.Configuration.Json": "1.0.0-beta8",
|
||||
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-*",
|
||||
"Microsoft.Framework.Configuration.Abstractions": "1.0.0-*",
|
||||
"Microsoft.Framework.Configuration.Binder": "1.0.0-*",
|
||||
"Microsoft.Framework.Configuration.Json": "1.0.0-*",
|
||||
"Microsoft.AspNet.Session": "1.0.0-rc1-final",
|
||||
"Microsoft.NETCore.Platforms": "1.0.1-beta-23516",
|
||||
"Microsoft.AspNet.Web.Optimization": "1.1.3",
|
||||
"Microsoft.Extensions.WebEncoders.Core": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Options": "0.0.1-alpha",
|
||||
@ -110,7 +113,8 @@
|
||||
"YavscLib": "1.0.0-*",
|
||||
"Extensions.AspNet.Authentication.Instagram": "1.0.0-t150809211713",
|
||||
"PayPalMerchantSDK": "2.16.204",
|
||||
"Microsoft.AspNet.Http.Extensions": "1.0.0-rc1-final"
|
||||
"Microsoft.AspNet.Http.Extensions": "1.0.0-rc1-final",
|
||||
"Microsoft.DiaSymReader.Native": "1.5.0"
|
||||
},
|
||||
"commands": {
|
||||
"web": "Microsoft.AspNet.Server.Kestrel --server.urls http://*:5000",
|
||||
@ -151,9 +155,5 @@
|
||||
"prepublish": "gulp min",
|
||||
"postpublish": "echo \" . ./contrib/postPublish.sh # to push in prod.\""
|
||||
},
|
||||
"embed": "Views/**/*.cshtml",
|
||||
"buildOptions": {
|
||||
"warningsAsErrors": false,
|
||||
"emitEntryPoint": true
|
||||
}
|
||||
"embed": "Views/**/*.cshtml"
|
||||
}
|
@ -217,12 +217,12 @@
|
||||
"Zlib.Portable.Signed": "1.11.0"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net45/Google.Apis.dll": {},
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {}
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {},
|
||||
"lib/net45/Google.Apis.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net45/Google.Apis.dll": {},
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {}
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {},
|
||||
"lib/net45/Google.Apis.dll": {}
|
||||
}
|
||||
},
|
||||
"Google.Apis.Core/1.11.1": {
|
||||
@ -1525,6 +1525,9 @@
|
||||
"lib/net45/Microsoft.CodeAnalysis.CSharp.dll": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.DiaSymReader.Native/1.5.0": {
|
||||
"type": "package"
|
||||
},
|
||||
"Microsoft.Dnx.Compilation.Abstractions/1.0.0-rc1-final": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
@ -2449,15 +2452,6 @@
|
||||
"lib/net451/Microsoft.Net.WebSockets.dll": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/1.0.1-beta-23516": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Targets": "1.0.1-beta-23516"
|
||||
}
|
||||
},
|
||||
"Microsoft.NETCore.Targets/1.0.1-beta-23516": {
|
||||
"type": "package"
|
||||
},
|
||||
"Microsoft.Owin/2.1.0": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
@ -3075,12 +3069,12 @@
|
||||
"Zlib.Portable.Signed": "1.11.0"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net45/Google.Apis.dll": {},
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {}
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {},
|
||||
"lib/net45/Google.Apis.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net45/Google.Apis.dll": {},
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {}
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {},
|
||||
"lib/net45/Google.Apis.dll": {}
|
||||
}
|
||||
},
|
||||
"Google.Apis.Core/1.11.1": {
|
||||
@ -4383,6 +4377,9 @@
|
||||
"lib/net45/Microsoft.CodeAnalysis.CSharp.dll": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.DiaSymReader.Native/1.5.0": {
|
||||
"type": "package"
|
||||
},
|
||||
"Microsoft.Dnx.Compilation.Abstractions/1.0.0-rc1-final": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
@ -5307,15 +5304,6 @@
|
||||
"lib/net451/Microsoft.Net.WebSockets.dll": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/1.0.1-beta-23516": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Targets": "1.0.1-beta-23516"
|
||||
}
|
||||
},
|
||||
"Microsoft.NETCore.Targets/1.0.1-beta-23516": {
|
||||
"type": "package"
|
||||
},
|
||||
"Microsoft.Owin/2.1.0": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
@ -5933,12 +5921,12 @@
|
||||
"Zlib.Portable.Signed": "1.11.0"
|
||||
},
|
||||
"compile": {
|
||||
"lib/net45/Google.Apis.dll": {},
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {}
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {},
|
||||
"lib/net45/Google.Apis.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net45/Google.Apis.dll": {},
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {}
|
||||
"lib/net45/Google.Apis.PlatformServices.dll": {},
|
||||
"lib/net45/Google.Apis.dll": {}
|
||||
}
|
||||
},
|
||||
"Google.Apis.Core/1.11.1": {
|
||||
@ -7241,6 +7229,9 @@
|
||||
"lib/net45/Microsoft.CodeAnalysis.CSharp.dll": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.DiaSymReader.Native/1.5.0": {
|
||||
"type": "package"
|
||||
},
|
||||
"Microsoft.Dnx.Compilation.Abstractions/1.0.0-rc1-final": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
@ -8165,15 +8156,6 @@
|
||||
"lib/net451/Microsoft.Net.WebSockets.dll": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/1.0.1-beta-23516": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Targets": "1.0.1-beta-23516"
|
||||
}
|
||||
},
|
||||
"Microsoft.NETCore.Targets/1.0.1-beta-23516": {
|
||||
"type": "package"
|
||||
},
|
||||
"Microsoft.Owin/2.1.0": {
|
||||
"type": "package",
|
||||
"dependencies": {
|
||||
@ -9720,6 +9702,22 @@
|
||||
"ThirdPartyNotices.rtf"
|
||||
]
|
||||
},
|
||||
"Microsoft.DiaSymReader.Native/1.5.0": {
|
||||
"type": "package",
|
||||
"sha512": "Zs1Cm0z1G9QLkKZ/k9O2/z47fN84ZbhWCrdBYv0ArC2lU4H1pOTkjah6RgCm/ZnS8ZdOMFC+We6shG6SCRaXeg==",
|
||||
"files": [
|
||||
"build/Microsoft.DiaSymReader.Native.props",
|
||||
"Microsoft.DiaSymReader.Native.1.5.0.nupkg",
|
||||
"Microsoft.DiaSymReader.Native.1.5.0.nupkg.sha512",
|
||||
"Microsoft.DiaSymReader.Native.nuspec",
|
||||
"runtimes/win/native/Microsoft.DiaSymReader.Native.amd64.dll",
|
||||
"runtimes/win/native/Microsoft.DiaSymReader.Native.arm.dll",
|
||||
"runtimes/win/native/Microsoft.DiaSymReader.Native.x86.dll",
|
||||
"runtimes/win8-arm/native/Microsoft.DiaSymReader.Native.arm.dll",
|
||||
"runtimes/win-x64/native/Microsoft.DiaSymReader.Native.amd64.dll",
|
||||
"runtimes/win-x86/native/Microsoft.DiaSymReader.Native.x86.dll"
|
||||
]
|
||||
},
|
||||
"Microsoft.Dnx.Compilation.Abstractions/1.0.0-rc1-final": {
|
||||
"type": "package",
|
||||
"sha512": "kg3kR7H12Bs46TiuF7YT8A3SNXehhBcwsArIMQIH2ecXGkg5MPWDl2OR6bnQu6k0OMu9QUiv1oiwC9yU7rHWfw==",
|
||||
@ -9888,7 +9886,6 @@
|
||||
},
|
||||
"Microsoft.Extensions.Configuration/1.0.0-rc1-final": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "2ayWzqMVGWjr8o8bOSnIsyQbi9sLz9Ya8+YM+9tM/ivSnLHuN7TNHNfJv4jTyRZvoOafdh5Ivlc/OdmsZPXlQQ==",
|
||||
"files": [
|
||||
"lib/dotnet5.4/Microsoft.Extensions.Configuration.dll",
|
||||
@ -9912,7 +9909,6 @@
|
||||
"lib/net451/Microsoft.Extensions.Configuration.Abstractions.xml",
|
||||
"lib/netcore50/Microsoft.Extensions.Configuration.Abstractions.dll",
|
||||
"lib/netcore50/Microsoft.Extensions.Configuration.Abstractions.xml",
|
||||
"Microsoft.Extensions.Configuration.Abstractions.1.0.0-rc1-final.nupkg",
|
||||
"Microsoft.Extensions.Configuration.Abstractions.1.0.0-rc1-final.nupkg.sha512",
|
||||
"Microsoft.Extensions.Configuration.Abstractions.nuspec"
|
||||
]
|
||||
@ -9964,7 +9960,6 @@
|
||||
},
|
||||
"Microsoft.Extensions.Configuration.FileExtensions/1.0.0-rc1-final": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "w2x8nqrp2YUgNBJuZ3SUmexBtjaoZFzCQtObRTjrE4GWceFEmaLZtXFvs4n9IgRQkOqqCza7Fv7NXnD9m2emjQ==",
|
||||
"files": [
|
||||
"lib/dotnet5.4/Microsoft.Extensions.Configuration.FileExtensions.dll",
|
||||
@ -9995,7 +9990,6 @@
|
||||
},
|
||||
"Microsoft.Extensions.Configuration.Json/1.0.0-rc1-final": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "9v+RpswnXEpAP5mx8J1w1yZZT2pPtMBTnOAauNh2c9ju5Dhq3ljxvbm0S9j6o5F/EFSLlbfN/brxTJN3qa/upw==",
|
||||
"files": [
|
||||
"lib/dotnet5.4/Microsoft.Extensions.Configuration.Json.dll",
|
||||
@ -10011,7 +10005,6 @@
|
||||
},
|
||||
"Microsoft.Extensions.Configuration.UserSecrets/1.0.0-rc1-final": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "m2WaXGNWRrbpWquen8PS1oB8GdG5tCSWhXAmFbhacj1mhz3ojFy0TDUZPbx87TX2ZQNNp6MYfzO5Z73hlM47Bw==",
|
||||
"files": [
|
||||
"lib/dotnet5.4/Microsoft.Extensions.Configuration.UserSecrets.dll",
|
||||
@ -10055,7 +10048,6 @@
|
||||
},
|
||||
"Microsoft.Extensions.FileSystemGlobbing/1.0.0-rc1-final": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "7N9IPDU0T1uQBj6hobeGNqiEd+Cuu6RHJ0RcwkUvzTsLq8Vf2Sc72+HEAICTw1CTRXHgW49Zr47PvO0QPxI/5g==",
|
||||
"files": [
|
||||
"lib/dotnet5.4/Microsoft.Extensions.FileSystemGlobbing.dll",
|
||||
@ -10168,7 +10160,6 @@
|
||||
},
|
||||
"Microsoft.Extensions.Logging.TraceSource/1.0.0-rc1-final": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "wIxGpFxTKI+xvh/aVNCUh0tUEq24xmRW/OWpOJrE2c3QrIJJ6vSpvwGJ7cmgvMWK2Ul+HDd9Wxrcd0tUa8rHhg==",
|
||||
"files": [
|
||||
"lib/dotnet5.4/Microsoft.Extensions.Logging.TraceSource.dll",
|
||||
@ -10235,7 +10226,6 @@
|
||||
},
|
||||
"Microsoft.Extensions.Primitives/1.0.0-rc1-final": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "oHWqBARJveyM7LctuqQqvsTC58hxoq0gGnHr6Qsxie71LIkZpfE21IklhSLOsqmv4QIpes/G6k1vZbAQ+cC/nw==",
|
||||
"files": [
|
||||
"lib/dotnet5.4/Microsoft.Extensions.Primitives.dll",
|
||||
@ -10498,26 +10488,6 @@
|
||||
"Microsoft.Net.WebSockets.nuspec"
|
||||
]
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/1.0.1-beta-23516": {
|
||||
"type": "package",
|
||||
"sha512": "YPVzF1z1qhI3am4/I3EWEjn5hxm1wnIbHTRp6nrfKOoj0NBGtubVTTQmC3l5VZIbwmygiMVbWdbFhzJwWJXNEw==",
|
||||
"files": [
|
||||
"Microsoft.NETCore.Platforms.1.0.1-beta-23516.nupkg",
|
||||
"Microsoft.NETCore.Platforms.1.0.1-beta-23516.nupkg.sha512",
|
||||
"Microsoft.NETCore.Platforms.nuspec",
|
||||
"runtime.json"
|
||||
]
|
||||
},
|
||||
"Microsoft.NETCore.Targets/1.0.1-beta-23516": {
|
||||
"type": "package",
|
||||
"sha512": "11J+6atPf0UYQnpr8aKy6Xx+O9rAf/46OyODFY8gFbKkW/PVIh7iSHziukpvWZ+hI/ieFklGMopDU1MiUELutQ==",
|
||||
"files": [
|
||||
"Microsoft.NETCore.Targets.1.0.1-beta-23516.nupkg",
|
||||
"Microsoft.NETCore.Targets.1.0.1-beta-23516.nupkg.sha512",
|
||||
"Microsoft.NETCore.Targets.nuspec",
|
||||
"runtime.json"
|
||||
]
|
||||
},
|
||||
"Microsoft.Owin/2.1.0": {
|
||||
"type": "package",
|
||||
"sha512": "lk0kK64mlmcmtWX8YOYkZsnZKDoGEzMZhe8e1bcP+FFcgD4f2QfKwvu5Z8Bh8WS0VO7Rgk+DJ0hwW0k+S/UGMg==",
|
||||
@ -10796,6 +10766,7 @@
|
||||
},
|
||||
"System.Diagnostics.DiagnosticSource/4.0.0-beta-23516": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "0uDR/UOmFCNPDCyHEPHhCrk6c1iRnDp00YqwSZ8Qf5aaaJjm4WXnf4Q9xZw4OoApsSiODSypDMdpQU24IxR16A==",
|
||||
"files": [
|
||||
"lib/dotnet5.2/System.Diagnostics.DiagnosticSource.dll",
|
||||
@ -11020,6 +10991,7 @@
|
||||
},
|
||||
"System.Numerics.Vectors/4.1.1-beta-23516": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "FCYCEjc3BXBTpVZTxMqf2m/sGYyDzLwICy5lNKgZzT8WfshJhsTGjJuETwsh1Cwi6bksw9YiTB6yeeWBBJDnTA==",
|
||||
"files": [
|
||||
"lib/dotnet5.4/System.Numerics.Vectors.dll",
|
||||
@ -11172,7 +11144,6 @@
|
||||
},
|
||||
"System.Resources.ResourceManager/4.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "qmqeZ4BJgjfU+G2JbrZt4Dk1LsMxO4t+f/9HarNY6w8pBgweO6jT+cknUH7c3qIrGvyUqraBhU45Eo6UtA0fAw==",
|
||||
"files": [
|
||||
"lib/DNXCore50/System.Resources.ResourceManager.dll",
|
||||
@ -11521,8 +11492,8 @@
|
||||
"EntityFramework.Core >= 7.0.0-rc1-*",
|
||||
"EntityFramework.MicrosoftSqlServer >= 7.0.0-rc1-*",
|
||||
"EntityFramework.Relational >= 7.0.0-rc1-*",
|
||||
"EntityFramework7.Npgsql >= 3.1.0-*",
|
||||
"EntityFramework7.Npgsql.Design >= 3.1.0-*",
|
||||
"EntityFramework7.Npgsql >= 3.1.0-rc1-*",
|
||||
"EntityFramework7.Npgsql.Design >= 3.1.0-rc1-*",
|
||||
"Google.Apis.Core >= 1.11.1",
|
||||
"Google.Apis >= 1.11.1",
|
||||
"MailKit >= 1.3.0-beta7",
|
||||
@ -11544,11 +11515,11 @@
|
||||
"Microsoft.AspNet.SignalR.JS >= 2.2.1",
|
||||
"Microsoft.AspNet.StaticFiles >= 1.0.0-rc1-*",
|
||||
"Microsoft.AspNet.Tooling.Razor >= 1.0.0-rc1-*",
|
||||
"Microsoft.AspNet.WebSockets.Server >= 1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.WebSockets.Server >= 1.0.0-*",
|
||||
"Microsoft.Extensions.Configuration.Abstractions >= 1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Configuration.FileProviderExtensions >= 1.0.0-rc1-*",
|
||||
"Microsoft.Extensions.Configuration.Json >= 1.0.0-rc1-*",
|
||||
"Microsoft.Extensions.Configuration.UserSecrets >= 1.0.0-rc1-*",
|
||||
"Microsoft.Extensions.Configuration.FileProviderExtensions >= 1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Configuration.Json >= 1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Configuration.UserSecrets >= 1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging >= 1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.Console >= 1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.Debug >= 1.0.0-rc1-final",
|
||||
@ -11560,12 +11531,11 @@
|
||||
"Microsoft.Extensions.CodeGeneration >= 1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.PlatformAbstractions >= 1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.CodeGenerators.Mvc >= 1.0.0-rc1-final",
|
||||
"Microsoft.Framework.ConfigurationModel.Json >= 1.0.0-beta4",
|
||||
"Microsoft.Framework.Configuration.Abstractions >= 1.0.0-beta8",
|
||||
"Microsoft.Framework.Configuration.Binder >= 1.0.0-beta8",
|
||||
"Microsoft.Framework.Configuration.Json >= 1.0.0-beta8",
|
||||
"Microsoft.Framework.ConfigurationModel.Json >= 1.0.0-*",
|
||||
"Microsoft.Framework.Configuration.Abstractions >= 1.0.0-*",
|
||||
"Microsoft.Framework.Configuration.Binder >= 1.0.0-*",
|
||||
"Microsoft.Framework.Configuration.Json >= 1.0.0-*",
|
||||
"Microsoft.AspNet.Session >= 1.0.0-rc1-final",
|
||||
"Microsoft.NETCore.Platforms >= 1.0.1-beta-23516",
|
||||
"Microsoft.AspNet.Web.Optimization >= 1.1.3",
|
||||
"Microsoft.Extensions.WebEncoders.Core >= 1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Options >= 0.0.1-alpha",
|
||||
@ -11581,7 +11551,8 @@
|
||||
"YavscLib >= 1.0.0-*",
|
||||
"Extensions.AspNet.Authentication.Instagram >= 1.0.0-t150809211713",
|
||||
"PayPalMerchantSDK >= 2.16.204",
|
||||
"Microsoft.AspNet.Http.Extensions >= 1.0.0-rc1-final"
|
||||
"Microsoft.AspNet.Http.Extensions >= 1.0.0-rc1-final",
|
||||
"Microsoft.DiaSymReader.Native >= 1.5.0"
|
||||
],
|
||||
"DNX,Version=v4.5.1": [
|
||||
"fx/System.Drawing >= 4.0.0"
|
||||
|
@ -114,7 +114,13 @@ select,
|
||||
-webkit-transform: initial;
|
||||
transform: initial;
|
||||
}
|
||||
.container {
|
||||
-webkit-transition: background-color 2s color 1s;
|
||||
-moz-transition: background-color 2s color 1s;
|
||||
transition: background-color 2s color 1s;
|
||||
}
|
||||
.disabled {
|
||||
color: #999;
|
||||
background-color: #555;
|
||||
}
|
||||
/* Set widths on image and video, since otherwise they use their native resolution */
|
||||
|
2
Yavsc/wwwroot/css/main/site.min.css
vendored
2
Yavsc/wwwroot/css/main/site.min.css
vendored
@ -1 +1 @@
|
||||
.discussion,.notif,.pv{font-family:monospace}.smalltofhol,tr.visiblepost{max-height:3em}.blog a:active,.blog a:hover,a:active,a:hover{outline:0}#discussion,.blogphoto{float:left}.smalltofhol{max-width:3em;float:left;margin:.5em}.price,.total{font-weight:700;padding:.2em;margin:.2em}.price{font-size:x-large;border:2px solid #000;border-radius:1em}.total{font-size:xx-large;background-color:#f8f;border:3px solid #000;border-radius:1em}.blog,.panel{padding:1em}.blog a{font-weight:900}.discussion{color:#000}.notif{color:#006}.pv{color:#251;font-style:bold}#targets{display:block}tr.hiddenpost{background-color:#888;font-size:smaller;max-height:2em}a.bloglink{font-weight:700;text-shadow:0 0 8px #000}a{font-weight:900}.panel{display:inline-block;margin:1em;color:#000;background-color:inherit;border:1px solid #000}button,input,select,textarea{background-color:#bbb;color:#000}.jumbotron{padding:.5em}.carousel .item .btn{-webkit-transition:-webkit-transform 2s;transition:transform 2s;transform:scale3d(0,0,0);-webkit-transform:scale3d(0,0,0)}.carousel .active .btn{-webkit-transform:initial;transform:initial}.disabled{background-color:#555}.carousel-caption-s p{font-family:jubilat;font-weight:600;font-size:large;line-height:1.1;text-decoration:overline;text-decoration-line:overline;text-shadow:3px 3px 7px #000;-webkit-text-shadow:inset 0 3px 5px #000;color:#000;margin:.5em;padding:.5em;animation:mymove 3s infinite;background-color:rgba(256,256,256,.6)}.carousel-caption-s{right:3em;top:1em;left:3em;z-index:10;padding-top:20px;padding-bottom:20px;text-align:center;text-shadow:0 4px 8px rgba(0,0,0,.6);min-height:16em;overflow:auto}.carousel-inner .item{padding-left:15%;padding-right:15%}.carousel-indicators{position:absolute;z-index:15;padding:0;text-align:center;list-style:none;top:.1em;height:1em}main.container{padding-right:1em;padding-left:1em;margin-left:1em;margin-right:1em}@-webkit-keyframes mymove{from,to{text-decoration-color:red}50%{text-decoration-color:#00f}}@keyframes mymove{from,to{text-decoration-color:red}50%{text-decoration-color:#00f}}ul.actiongroup li{display:inline}ul.actiongroup li a:hover{background-color:rgba(200,200,200,.6);color:#400}.display-field{font-kerning:none;display:inline-flex;color:#008}.display-label{font-family:'Lucida Sans','Lucida Sans Regular','Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,sans-serif;font-stretch:condensed;display:inline-flex;color:#444;background-color:#210912}footer{vertical-align:bottom;padding:1.5em;color:grey;font-weight:bolder;font-size:x-small}.meta{color:#444;font-style:italic;font-size:smaller}.activity{font-family:fantasy}.blogtitle{display:inline-block;font-size:x-large}.blogphoto{margin:1em}
|
||||
.discussion,.notif,.pv{font-family:monospace}.smalltofhol,tr.visiblepost{max-height:3em}.blog a:active,.blog a:hover,a:active,a:hover{outline:0}#discussion,.blogphoto{float:left}.smalltofhol{max-width:3em;float:left;margin:.5em}.price,.total{font-weight:700;padding:.2em;margin:.2em}.price{font-size:x-large;border:2px solid #000;border-radius:1em}.total{font-size:xx-large;background-color:#f8f;border:3px solid #000;border-radius:1em}.blog,.panel{padding:1em}.blog a{font-weight:900}.discussion{color:#000}.notif{color:#006}.pv{color:#251;font-style:bold}#targets{display:block}tr.hiddenpost{background-color:#888;font-size:smaller;max-height:2em}a.bloglink{font-weight:700;text-shadow:0 0 8px #000}a{font-weight:900}.panel{display:inline-block;margin:1em;color:#000;background-color:inherit;border:1px solid #000}button,input,select,textarea{background-color:#bbb;color:#000}.jumbotron{padding:.5em}.carousel .item .btn{-webkit-transition:-webkit-transform 2s;transition:transform 2s;transform:scale3d(0,0,0);-webkit-transform:scale3d(0,0,0)}.carousel .active .btn{-webkit-transform:initial;transform:initial}.container{-webkit-transition:background-color 2s color 1s;-moz-transition:background-color 2s color 1s;transition:background-color 2s color 1s}.disabled{color:#999;background-color:#555}.carousel-caption-s p{font-family:jubilat;font-weight:600;font-size:large;line-height:1.1;text-decoration:overline;text-decoration-line:overline;text-shadow:3px 3px 7px #000;-webkit-text-shadow:inset 0 3px 5px #000;color:#000;margin:.5em;padding:.5em;animation:mymove 3s infinite;background-color:rgba(256,256,256,.6)}.carousel-caption-s{right:3em;top:1em;left:3em;z-index:10;padding-top:20px;padding-bottom:20px;text-align:center;text-shadow:0 4px 8px rgba(0,0,0,.6);min-height:16em;overflow:auto}.carousel-inner .item{padding-left:15%;padding-right:15%}.carousel-indicators{position:absolute;z-index:15;padding:0;text-align:center;list-style:none;top:.1em;height:1em}main.container{padding-right:1em;padding-left:1em;margin-left:1em;margin-right:1em}@-webkit-keyframes mymove{from,to{text-decoration-color:red}50%{text-decoration-color:#00f}}@keyframes mymove{from,to{text-decoration-color:red}50%{text-decoration-color:#00f}}ul.actiongroup li{display:inline}ul.actiongroup li a:hover{background-color:rgba(200,200,200,.6);color:#400}.display-field{font-kerning:none;display:inline-flex;color:#008}.display-label{font-family:'Lucida Sans','Lucida Sans Regular','Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,sans-serif;font-stretch:condensed;display:inline-flex;color:#444;background-color:#210912}footer{vertical-align:bottom;padding:1.5em;color:grey;font-weight:bolder;font-size:x-small}.meta{color:#444;font-style:italic;font-size:smaller}.activity{font-family:fantasy}.blogtitle{display:inline-block;font-size:x-large}.blogphoto{margin:1em}
|
@ -1,179 +1,184 @@
|
||||
var chatinit = function() {
|
||||
+(function ($) {
|
||||
var pvuis
|
||||
|
||||
var pvuis;
|
||||
var audio = new Audio('/sounds/bell.mp3')
|
||||
|
||||
var audio = new Audio('/sounds/bell.mp3');
|
||||
function addULI (uname, cxids) {
|
||||
$('<li class="user"><button><img src="/Avatars/' + uname + '.xs.png"> ' + uname + '</button></li>')
|
||||
.data('name', uname)
|
||||
.data('cxids', cxids)
|
||||
.css('cursor', 'pointer')
|
||||
.click(function () { setPrivate(this); })
|
||||
.appendTo('#userlist')
|
||||
}
|
||||
|
||||
function addULI(uname, cxids)
|
||||
{
|
||||
$('<li class="user"><button><img src="/Avatars/' + uname + '.xs.png"> ' + uname + '</button></li>')
|
||||
.data("name", uname)
|
||||
.data("cxids", cxids)
|
||||
.css('cursor', 'pointer')
|
||||
.click(function () { setPrivate(this); })
|
||||
.appendTo('#userlist')
|
||||
}
|
||||
function getUsers () {
|
||||
$('#userlist').empty()
|
||||
$('#to').empty()
|
||||
$.get('/api/chat/users').done(
|
||||
function (users) {
|
||||
$.each(users, function () {
|
||||
var user = this
|
||||
var existent = $('#userlist li').filterByData('name', user.UserName)
|
||||
if (existent.length > 0) existent.remove()
|
||||
var cxids = []
|
||||
$.each(user.Connections, function () {
|
||||
cxids.push(this.ConnectionId)
|
||||
})
|
||||
addULI(user.UserName, cxids)
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
function getUsers() {
|
||||
$('#userlist').empty();
|
||||
$('#to').empty();
|
||||
$.get("/api/chat/users").done(
|
||||
function (users) {
|
||||
$.each(users, function () {
|
||||
var user = this;
|
||||
var existent = $('#userlist li').filterByData("name", user.UserName);
|
||||
if (existent.length > 0) existent.remove();
|
||||
var cxids = [];
|
||||
$.each(user.Connections, function () {
|
||||
cxids.push(this.ConnectionId);
|
||||
});
|
||||
addULI(user.UserName,cxids)
|
||||
});
|
||||
}
|
||||
);
|
||||
};
|
||||
function onCx () {
|
||||
setTimeout(function () {
|
||||
getUsers()
|
||||
}, 120),
|
||||
$('#chatview').removeClass('disabled')
|
||||
$('#sendmessage').prop('disabled',false);
|
||||
$('#sendpv').prop('disabled',false);
|
||||
}
|
||||
function onDisCx () {
|
||||
$('#chatview').addClass('disabled');
|
||||
$('#sendmessage').prop('disabled',true);
|
||||
$('#sendpv').prop('disabled',true);
|
||||
|
||||
function onCx() {
|
||||
setTimeout(function () {
|
||||
getUsers();
|
||||
},120),
|
||||
$('#targets').removeClass('disabled')
|
||||
};
|
||||
function onDisCx () {
|
||||
$('#targets').addClass('disabled');
|
||||
};
|
||||
// This optional function html-encodes messages for display in the page.
|
||||
function htmlEncode(value) {
|
||||
var encodedValue = $('<div />').text(value).html();
|
||||
return encodedValue;
|
||||
}
|
||||
}
|
||||
// This optional function html-encodes messages for display in the page.
|
||||
function htmlEncode (value) {
|
||||
var encodedValue = $('<div />').text(value).html()
|
||||
return encodedValue
|
||||
}
|
||||
|
||||
var setPrivate = function (li) {
|
||||
$("#sendmessagebox").addClass("hidden");
|
||||
$("#sendpvbox").removeClass("hidden");
|
||||
pvuis = { CXs: $(li).data("cxids"), UserName: $(li).data("name") };
|
||||
$('#sendpvdest').html(pvuis.UserName)
|
||||
$('#pv').focus();
|
||||
}
|
||||
var setPublic = function () {
|
||||
$("#sendmessagebox").removeClass("hidden");
|
||||
$("#sendpvbox").addClass("hidden");
|
||||
$('#message').focus();
|
||||
}
|
||||
$('#pubChan').css('cursor', 'pointer');
|
||||
$('#pubChan').click(setPublic);
|
||||
setPublic();
|
||||
// Reference the auto-generated proxy for the hub.
|
||||
var chat = $.connection.chatHub;
|
||||
// Create a function that the hub can call back to display messages.
|
||||
chat.client.addMessage = function (name, message) {
|
||||
// Add the message to the page.
|
||||
$('#discussion').append('<li class="discussion"><strong>' + htmlEncode(name)
|
||||
+ '</strong>: ' + htmlEncode(message) + '</li>')
|
||||
};
|
||||
chat.client.addPV = function (name, message) {
|
||||
if (!$("#mute").prop('checked'))
|
||||
{
|
||||
audio.play();
|
||||
}
|
||||
// Add the pv to the page.
|
||||
$('#discussion').append('<li class="pv"><strong>' + htmlEncode(name)
|
||||
+ '</strong>: ' + htmlEncode(message) + '</li>')
|
||||
};
|
||||
$.fn.filterByData = function (prop, val) {
|
||||
return this.filter(
|
||||
function () { return $(this).data(prop) == val; }
|
||||
);
|
||||
}
|
||||
var setPrivate = function (li) {
|
||||
$('#sendmessagebox').addClass('hidden')
|
||||
$('#sendpvbox').removeClass('hidden')
|
||||
pvuis = { CXs: $(li).data('cxids'), UserName: $(li).data('name') }
|
||||
$('#sendpvdest').html(pvuis.UserName)
|
||||
$('#pv').focus()
|
||||
}
|
||||
var setPublic = function () {
|
||||
$('#sendmessagebox').removeClass('hidden')
|
||||
$('#sendpvbox').addClass('hidden')
|
||||
$('#message').focus()
|
||||
}
|
||||
$('#pubChan').css('cursor', 'pointer')
|
||||
$('#pubChan').click(setPublic)
|
||||
setPublic()
|
||||
// Reference the auto-generated proxy for the hub.
|
||||
var chat = $.connection.chatHub
|
||||
// Create a function that the hub can call back to display messages.
|
||||
chat.client.addMessage = function (name, message) {
|
||||
// Add the message to the page.
|
||||
$('#discussion').append('<li class="discussion"><strong>' + htmlEncode(name)
|
||||
+ '</strong>: ' + htmlEncode(message) + '</li>')
|
||||
}
|
||||
chat.client.addPV = function (name, message) {
|
||||
if (!$('#mute').prop('checked')) {
|
||||
audio.play()
|
||||
}
|
||||
// Add the pv to the page.
|
||||
$('#discussion').append('<li class="pv"><strong>' + htmlEncode(name)
|
||||
+ '</strong>: ' + htmlEncode(message) + '</li>')
|
||||
}
|
||||
$.fn.filterByData = function (prop, val) {
|
||||
return this.filter(
|
||||
function () { return $(this).data(prop) == val; }
|
||||
)
|
||||
}
|
||||
|
||||
var onUserDisconnected = function (cxid) {
|
||||
$('#userlist li').filter(function () {
|
||||
var nids = $(this).data("cxids").filter(function () {
|
||||
return $(this) !== cxid
|
||||
});
|
||||
if (nids.Length == 0) $(this).remove();
|
||||
else $(this).data("cxids", nids)
|
||||
});
|
||||
};
|
||||
var onUserConnected = function (cxid, username) {
|
||||
var connected = $('#userlist li').filterByData("name", username);
|
||||
if (connected.length > 0) {
|
||||
var ids = connected.data("cxids");
|
||||
ids.push(cxid);
|
||||
connected.data("cxids", ids)
|
||||
} else {
|
||||
addULI(username, [cxid])
|
||||
}
|
||||
};
|
||||
chat.client.notify = function (tag, message, data) {
|
||||
if (data) {
|
||||
// Add the pv to the page.
|
||||
var onUserDisconnected = function (cxid) {
|
||||
$('#userlist li').filter(function () {
|
||||
var nids = $(this).data('cxids').filter(function () {
|
||||
return $(this) !== cxid
|
||||
})
|
||||
if (nids.Length == 0) $(this).remove()
|
||||
else $(this).data('cxids', nids)
|
||||
})
|
||||
}
|
||||
var onUserConnected = function (cxid, username) {
|
||||
var connected = $('#userlist li').filterByData('name', username)
|
||||
if (connected.length > 0) {
|
||||
var ids = connected.data('cxids')
|
||||
ids.push(cxid)
|
||||
connected.data('cxids', ids)
|
||||
} else {
|
||||
addULI(username, [cxid])
|
||||
}
|
||||
}
|
||||
chat.client.notify = function (tag, message, data) {
|
||||
if (data) {
|
||||
// Add the pv to the page.
|
||||
|
||||
if (tag === 'connected') {
|
||||
onUserConnected(message, data);
|
||||
$('#discussion').append('<li class="notif"><i>' + htmlEncode(tag)
|
||||
+ '</i> ' + htmlEncode(data) + '</li>')
|
||||
}
|
||||
else if (tag === 'disconnected') {
|
||||
onUserDisconnected(message, data);
|
||||
$('#discussion').append('<li class="notif"><i>' + htmlEncode(tag)
|
||||
+ '</i> ' + htmlEncode(data) + '</li>')
|
||||
}
|
||||
else {
|
||||
$('#discussion').append('<li class="notif"><i>' + htmlEncode(tag)
|
||||
+ '</i> ' + htmlEncode(message) + ' : ' + htmlEncode(data) + '</li>')
|
||||
}
|
||||
}
|
||||
};
|
||||
if (tag === 'connected') {
|
||||
onUserConnected(message, data)
|
||||
$('#discussion').append('<li class="notif"><i>' + htmlEncode(tag)
|
||||
+ '</i> ' + htmlEncode(data) + '</li>')
|
||||
}
|
||||
else if (tag === 'disconnected') {
|
||||
onUserDisconnected(message, data)
|
||||
$('#discussion').append('<li class="notif"><i>' + htmlEncode(tag)
|
||||
+ '</i> ' + htmlEncode(data) + '</li>')
|
||||
}else {
|
||||
$('#discussion').append('<li class="notif"><i>' + htmlEncode(tag)
|
||||
+ '</i> ' + htmlEncode(message) + ' : ' + htmlEncode(data) + '</li>')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var sendMessage = function () {
|
||||
chat.server.send($('#displayname').val(), $('#message').val());
|
||||
// Clear text box and reset focus for next comment.
|
||||
$('#message').val('')
|
||||
};
|
||||
var sendMessage = function () {
|
||||
chat.server.send($('#displayname').val(), $('#message').val())
|
||||
// Clear text box and reset focus for next comment.
|
||||
$('#message').val('')
|
||||
}
|
||||
|
||||
var sendPV = function () {
|
||||
var msg = $('#pv').val();
|
||||
// Call the Send method on the hub.
|
||||
$.each(pvuis.CXs, function () {
|
||||
chat.server.sendPV(this, msg);
|
||||
});
|
||||
$('#discussion').append('<li class="pv">' + htmlEncode(pvuis.UserName)
|
||||
+ '<< ' + htmlEncode(msg) +'</li>');
|
||||
// Clear text box and reset focus for next comment.
|
||||
$('#pv').val('');
|
||||
}
|
||||
var sendPV = function () {
|
||||
var msg = $('#pv').val()
|
||||
// Call the Send method on the hub.
|
||||
$.each(pvuis.CXs, function () {
|
||||
chat.server.sendPV(this, msg)
|
||||
})
|
||||
$('#discussion').append('<li class="pv">' + htmlEncode(pvuis.UserName)
|
||||
+ '<< ' + htmlEncode(msg) + '</li>')
|
||||
// Clear text box and reset focus for next comment.
|
||||
$('#pv').val('')
|
||||
}
|
||||
|
||||
// Start the connection.
|
||||
$.connection.hub.start().done(function () {
|
||||
onCx();
|
||||
$('#sendmessage').click(function () {
|
||||
// Call the Send method on the hub.
|
||||
sendMessage();
|
||||
$('#message').focus();
|
||||
});
|
||||
$("#message").keydown(function (event) {
|
||||
if (event.which == 13) {
|
||||
sendMessage()
|
||||
}
|
||||
});
|
||||
$("#pv").keydown(function (event) {
|
||||
if (event.which == 13) {
|
||||
sendPV()
|
||||
}
|
||||
});
|
||||
$('#sendpv').click(function () {
|
||||
// Call the Send method on the hub.
|
||||
sendPV();
|
||||
$("#sendpv").focus()
|
||||
});
|
||||
});
|
||||
// Start the connection.
|
||||
$.connection.hub.start().done(function () {
|
||||
onCx()
|
||||
$('#sendmessage').click(function () {
|
||||
// Call the Send method on the hub.
|
||||
sendMessage()
|
||||
$('#message').focus()
|
||||
})
|
||||
$('#message').keydown(function (event) {
|
||||
if (event.which == 13) {
|
||||
sendMessage()
|
||||
}
|
||||
})
|
||||
$('#pv').keydown(function (event) {
|
||||
if (event.which == 13) {
|
||||
sendPV()
|
||||
}
|
||||
})
|
||||
$('#sendpv').click(function () {
|
||||
// Call the Send method on the hub.
|
||||
sendPV()
|
||||
$('#sendpv').focus()
|
||||
})
|
||||
})
|
||||
|
||||
$.connection.hub.disconnected(function () {
|
||||
onDisCx();
|
||||
});
|
||||
$.connection.hub.disconnected(function () {
|
||||
onDisCx()
|
||||
setTimeout(function () {
|
||||
$.connection.hub.start().done(function () {
|
||||
$('#mySignalRConnectionIdHidden').val($.connection.hub.id)
|
||||
onCx()
|
||||
}, 30000); // Re-start connection after 30 seconds
|
||||
})
|
||||
})
|
||||
|
||||
$(window).unload(function () { chat.server.abort(); });
|
||||
|
||||
};
|
||||
chatinit(this);
|
||||
$(window).unload(function () { chat.server.abort(); })
|
||||
})(jQuery);
|
1
Yavsc/wwwroot/js/chat.min.js
vendored
Normal file
1
Yavsc/wwwroot/js/chat.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
+function(n){function s(s,e){n('<li class="user"><button><img src="/Avatars/'+s+'.xs.png"> '+s+"</button></li>").data("name",s).data("cxids",e).css("cursor","pointer").click(function(){d(this)}).appendTo("#userlist")}function e(){n("#userlist").empty(),n("#to").empty(),n.get("/api/chat/users").done(function(e){n.each(e,function(){var e=this,i=n("#userlist li").filterByData("name",e.UserName);i.length>0&&i.remove();var t=[];n.each(e.Connections,function(){t.push(this.ConnectionId)}),s(e.UserName,t)})})}function i(){setTimeout(function(){e()},120),n("#chatview").removeClass("disabled"),n("#sendmessage").prop("disabled",!1),n("#sendpv").prop("disabled",!1)}function t(){n("#chatview").addClass("disabled"),n("#sendmessage").prop("disabled",!0),n("#sendpv").prop("disabled",!0)}function a(s){var e=n("<div />").text(s).html();return e}var o,c=new Audio("/sounds/bell.mp3"),d=function(s){n("#sendmessagebox").addClass("hidden"),n("#sendpvbox").removeClass("hidden"),o={CXs:n(s).data("cxids"),UserName:n(s).data("name")},n("#sendpvdest").html(o.UserName),n("#pv").focus()},u=function(){n("#sendmessagebox").removeClass("hidden"),n("#sendpvbox").addClass("hidden"),n("#message").focus()};n("#pubChan").css("cursor","pointer"),n("#pubChan").click(u),u();var l=n.connection.chatHub;l.client.addMessage=function(s,e){n("#discussion").append('<li class="discussion"><strong>'+a(s)+"</strong>: "+a(e)+"</li>")},l.client.addPV=function(s,e){n("#mute").prop("checked")||c.play(),n("#discussion").append('<li class="pv"><strong>'+a(s)+"</strong>: "+a(e)+"</li>")},n.fn.filterByData=function(s,e){return this.filter(function(){return n(this).data(s)==e})};var r=function(s){n("#userlist li").filter(function(){var e=n(this).data("cxids").filter(function(){return n(this)!==s});0==e.Length?n(this).remove():n(this).data("cxids",e)})},f=function(e,i){var t=n("#userlist li").filterByData("name",i);if(t.length>0){var a=t.data("cxids");a.push(e),t.data("cxids",a)}else s(i,[e])};l.client.notify=function(s,e,i){i&&("connected"===s?(f(e,i),n("#discussion").append('<li class="notif"><i>'+a(s)+"</i> "+a(i)+"</li>")):"disconnected"===s?(r(e,i),n("#discussion").append('<li class="notif"><i>'+a(s)+"</i> "+a(i)+"</li>")):n("#discussion").append('<li class="notif"><i>'+a(s)+"</i> "+a(e)+" : "+a(i)+"</li>"))};var p=function(){l.server.send(n("#displayname").val(),n("#message").val()),n("#message").val("")},v=function(){var s=n("#pv").val();n.each(o.CXs,function(){l.server.sendPV(this,s)}),n("#discussion").append('<li class="pv">'+a(o.UserName)+"<< "+a(s)+"</li>"),n("#pv").val("")};n.connection.hub.start().done(function(){i(),n("#sendmessage").click(function(){p(),n("#message").focus()}),n("#message").keydown(function(n){13==n.which&&p()}),n("#pv").keydown(function(n){13==n.which&&v()}),n("#sendpv").click(function(){v(),n("#sendpv").focus()})}),n.connection.hub.disconnected(function(){t(),setTimeout(function(){n.connection.hub.start().done(function(){n("#mySignalRConnectionIdHidden").val(n.connection.hub.id),i()},3e4)})}),n(window).unload(function(){l.server.abort()})}(jQuery);
|
5
Yavsc/xunit.runner.json
Normal file
5
Yavsc/xunit.runner.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"diagnosticMessages": false,
|
||||
"methodDisplay": "classAndMethod",
|
||||
"parallelizeTestCollections": true
|
||||
}
|
Reference in New Issue
Block a user