diff --git a/Yavsc/Constants.cs b/Yavsc/Constants.cs index a2297577..51f62070 100644 --- a/Yavsc/Constants.cs +++ b/Yavsc/Constants.cs @@ -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 = diff --git a/Yavsc/Controllers/HomeController.cs b/Yavsc/Controllers/HomeController.cs index b57a9704..21ffdd02 100644 --- a/Yavsc/Controllers/HomeController.cs +++ b/Yavsc/Controllers/HomeController.cs @@ -34,7 +34,9 @@ namespace Yavsc.Controllers public async Task 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) { diff --git a/Yavsc/Migrations/20170317213255_cxRequiresUserName.Designer.cs b/Yavsc/Migrations/20170317213255_cxRequiresUserName.Designer.cs index d40ebf20..6e275e81 100644 --- a/Yavsc/Migrations/20170317213255_cxRequiresUserName.Designer.cs +++ b/Yavsc/Migrations/20170317213255_cxRequiresUserName.Designer.cs @@ -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; diff --git a/Yavsc/Migrations/20170317213255_cxRequiresUserName.cs b/Yavsc/Migrations/20170317213255_cxRequiresUserName.cs index 712e60a3..0697a68a 100644 --- a/Yavsc/Migrations/20170317213255_cxRequiresUserName.cs +++ b/Yavsc/Migrations/20170317213255_cxRequiresUserName.cs @@ -1,5 +1,3 @@ -using System; -using System.Collections.Generic; using Microsoft.Data.Entity.Migrations; namespace Yavsc.Migrations diff --git a/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs b/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs index eecf894d..2a4a98a1 100644 --- a/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs @@ -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 diff --git a/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx b/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx index fd2d7859..09e6d335 100644 --- a/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx +++ b/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx @@ -293,7 +293,9 @@ Non approuvé Non validée Non validé + inactif Hors ligne + actif En ligne Seuls les utilisateurs authorisés peuvent contacter un préstataire par courrier. Mot de passe diff --git a/Yavsc/Views/Home/Chat.cshtml b/Yavsc/Views/Home/Chat.cshtml index 5cb98020..af5f186a 100644 --- a/Yavsc/Views/Home/Chat.cshtml +++ b/Yavsc/Views/Home/Chat.cshtml @@ -2,7 +2,7 @@

Chat

-
+
Salons @@ -15,7 +15,7 @@
-
+
diff --git a/Yavsc/Views/Home/Index.cshtml b/Yavsc/Views/Home/Index.cshtml index bbcabe60..a39e544b 100755 --- a/Yavsc/Views/Home/Index.cshtml +++ b/Yavsc/Views/Home/Index.cshtml @@ -63,4 +63,25 @@
} +@if (!ViewBag.IsFromSecureProx) { +
+ +# 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.' + + Lien vers le site sécurisé +
+} diff --git a/Yavsc/Views/Shared/_Layout.cshtml b/Yavsc/Views/Shared/_Layout.cshtml index 071e5410..7f8016bc 100755 --- a/Yavsc/Views/Shared/_Layout.cshtml +++ b/Yavsc/Views/Shared/_Layout.cshtml @@ -51,8 +51,7 @@ @if (ViewData ["Notify"] != null) { foreach (Notification n in ViewData ["Notify"] as IEnumerable) {
-

@n.title

- @n.body +

@n.title

@n.body @((n.click_action==null)?SR["Fermer"]:SR[n.click_action])
} diff --git a/Yavsc/Yavsc.csproj b/Yavsc/Yavsc.csproj new file mode 100644 index 00000000..58bbf63c --- /dev/null +++ b/Yavsc/Yavsc.csproj @@ -0,0 +1,23 @@ + + + + Exe + netcoreapp1.0 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Yavsc/project.json b/Yavsc/project.json index 5f73cc49..5b20e9e5 100755 --- a/Yavsc/project.json +++ b/Yavsc/project.json @@ -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" } \ No newline at end of file diff --git a/Yavsc/project.lock.json b/Yavsc/project.lock.json index 8f69d1c9..0f7963d1 100644 --- a/Yavsc/project.lock.json +++ b/Yavsc/project.lock.json @@ -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" diff --git a/Yavsc/wwwroot/css/main/site.css b/Yavsc/wwwroot/css/main/site.css index 663c9cd9..d0060e52 100644 --- a/Yavsc/wwwroot/css/main/site.css +++ b/Yavsc/wwwroot/css/main/site.css @@ -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 */ diff --git a/Yavsc/wwwroot/css/main/site.min.css b/Yavsc/wwwroot/css/main/site.min.css index 3ef4e95d..64410668 100644 --- a/Yavsc/wwwroot/css/main/site.min.css +++ b/Yavsc/wwwroot/css/main/site.min.css @@ -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} \ No newline at end of file +.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} \ No newline at end of file diff --git a/Yavsc/wwwroot/js/chat.js b/Yavsc/wwwroot/js/chat.js index aa047704..e84745a0 100644 --- a/Yavsc/wwwroot/js/chat.js +++ b/Yavsc/wwwroot/js/chat.js @@ -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) - { - $('
  • ') - .data("name", uname) - .data("cxids", cxids) - .css('cursor', 'pointer') - .click(function () { setPrivate(this); }) - .appendTo('#userlist') - } + function addULI (uname, cxids) { + $('
  • ') + .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), - $('#targets').removeClass('disabled') - }; - function onDisCx () { - $('#targets').addClass('disabled'); - }; - // This optional function html-encodes messages for display in the page. - function htmlEncode(value) { - var encodedValue = $('
    ').text(value).html(); - return encodedValue; - } + 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); - 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('
  • ' + htmlEncode(name) - + ': ' + htmlEncode(message) + '
  • ') - }; - chat.client.addPV = function (name, message) { - if (!$("#mute").prop('checked')) - { - audio.play(); - } - // Add the pv to the page. - $('#discussion').append('
  • ' + htmlEncode(name) - + ': ' + htmlEncode(message) + '
  • ') - }; - $.fn.filterByData = function (prop, val) { - return this.filter( - function () { return $(this).data(prop) == val; } - ); - } + } + // This optional function html-encodes messages for display in the page. + function htmlEncode (value) { + var encodedValue = $('
    ').text(value).html() + return encodedValue + } - 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 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('
  • ' + htmlEncode(name) + + ': ' + htmlEncode(message) + '
  • ') + } + chat.client.addPV = function (name, message) { + if (!$('#mute').prop('checked')) { + audio.play() + } + // Add the pv to the page. + $('#discussion').append('
  • ' + htmlEncode(name) + + ': ' + htmlEncode(message) + '
  • ') + } + $.fn.filterByData = function (prop, val) { + return this.filter( + function () { return $(this).data(prop) == val; } + ) + } - if (tag === 'connected') { - onUserConnected(message, data); - $('#discussion').append('
  • ' + htmlEncode(tag) - + ' ' + htmlEncode(data) + '
  • ') - } - else if (tag === 'disconnected') { - onUserDisconnected(message, data); - $('#discussion').append('
  • ' + htmlEncode(tag) - + ' ' + htmlEncode(data) + '
  • ') - } - else { - $('#discussion').append('
  • ' + htmlEncode(tag) - + ' ' + htmlEncode(message) + ' : ' + htmlEncode(data) + '
  • ') - } - } - }; + 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 sendMessage = function () { - chat.server.send($('#displayname').val(), $('#message').val()); - // Clear text box and reset focus for next comment. - $('#message').val('') - }; + if (tag === 'connected') { + onUserConnected(message, data) + $('#discussion').append('
  • ' + htmlEncode(tag) + + ' ' + htmlEncode(data) + '
  • ') + } + else if (tag === 'disconnected') { + onUserDisconnected(message, data) + $('#discussion').append('
  • ' + htmlEncode(tag) + + ' ' + htmlEncode(data) + '
  • ') + }else { + $('#discussion').append('
  • ' + htmlEncode(tag) + + ' ' + htmlEncode(message) + ' : ' + htmlEncode(data) + '
  • ') + } + } + } - 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('
  • ' + htmlEncode(pvuis.UserName) - + '<< ' + htmlEncode(msg) +'
  • '); - // Clear text box and reset focus for next comment. - $('#pv').val(''); - } + var sendMessage = function () { + chat.server.send($('#displayname').val(), $('#message').val()) + // Clear text box and reset focus for next comment. + $('#message').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() - }); - }); + 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('
  • ' + htmlEncode(pvuis.UserName) + + '<< ' + htmlEncode(msg) + '
  • ') + // Clear text box and reset focus for next comment. + $('#pv').val('') + } -$.connection.hub.disconnected(function () { - onDisCx(); -}); + // 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() + }) + }) -$(window).unload(function () { chat.server.abort(); }); + $.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 + }) + }) -}; -chatinit(this); \ No newline at end of file + $(window).unload(function () { chat.server.abort(); }) +})(jQuery); \ No newline at end of file diff --git a/Yavsc/wwwroot/js/chat.min.js b/Yavsc/wwwroot/js/chat.min.js new file mode 100644 index 00000000..e40ca1ab --- /dev/null +++ b/Yavsc/wwwroot/js/chat.min.js @@ -0,0 +1 @@ ++function(n){function s(s,e){n('
  • ").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("
    ").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('
  • '+a(s)+": "+a(e)+"
  • ")},l.client.addPV=function(s,e){n("#mute").prop("checked")||c.play(),n("#discussion").append('
  • '+a(s)+": "+a(e)+"
  • ")},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('
  • '+a(s)+" "+a(i)+"
  • ")):"disconnected"===s?(r(e,i),n("#discussion").append('
  • '+a(s)+" "+a(i)+"
  • ")):n("#discussion").append('
  • '+a(s)+" "+a(e)+" : "+a(i)+"
  • "))};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('
  • '+a(o.UserName)+"<< "+a(s)+"
  • "),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); \ No newline at end of file diff --git a/Yavsc/xunit.runner.json b/Yavsc/xunit.runner.json new file mode 100644 index 00000000..6b3f1f87 --- /dev/null +++ b/Yavsc/xunit.runner.json @@ -0,0 +1,5 @@ +{ + "diagnosticMessages": false, + "methodDisplay": "classAndMethod", + "parallelizeTestCollections": true +}