summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DiscoBot.sln32
-rw-r--r--WebInterface/NodeJSServer/NodeJSServer.njsproj84
-rw-r--r--WebInterface/NodeJSServer/dist/chat.js12
-rw-r--r--WebInterface/NodeJSServer/dist/index.html11
4 files changed, 127 insertions, 12 deletions
diff --git a/DiscoBot.sln b/DiscoBot.sln
index 7aab504..0ac2cf2 100644
--- a/DiscoBot.sln
+++ b/DiscoBot.sln
@@ -7,11 +7,29 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscoBot", "DiscoBot\DiscoB
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZooBOTanica", "ZooBOTanica\ZooBOTanica.csproj", "{58917D99-DC94-4CDD-AD2B-C6E0BAFFCF47}"
EndProject
-Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "NodeJSServer", "NodeJSServer\NodeJSServer.njsproj", "{57064377-C08C-4218-9C55-0552D40F3877}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DSALib", "DSALib\DSALib.csproj", "{388DD4ED-29C4-4127-AC8F-34DD3FE9F9B0}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DSACore", "DSACore\DSACore.csproj", "{35A5E2CC-0FD4-4BC0-ACBF-38599CAED1C4}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DSACore", "DSACore\DSACore.csproj", "{35A5E2CC-0FD4-4BC0-ACBF-38599CAED1C4}"
+EndProject
+Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "WebInterface", "WebInterface\", "{9B03E3A4-E233-41DF-AC13-BED4812B3D27}"
+ ProjectSection(WebsiteProperties) = preProject
+ TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
+ Debug.AspNetCompiler.VirtualPath = "/localhost_3664"
+ Debug.AspNetCompiler.PhysicalPath = "WebInterface\"
+ Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_3664\"
+ Debug.AspNetCompiler.Updateable = "true"
+ Debug.AspNetCompiler.ForceOverwrite = "true"
+ Debug.AspNetCompiler.FixedNames = "false"
+ Debug.AspNetCompiler.Debug = "True"
+ Release.AspNetCompiler.VirtualPath = "/localhost_3664"
+ Release.AspNetCompiler.PhysicalPath = "WebInterface\"
+ Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_3664\"
+ Release.AspNetCompiler.Updateable = "true"
+ Release.AspNetCompiler.ForceOverwrite = "true"
+ Release.AspNetCompiler.FixedNames = "false"
+ Release.AspNetCompiler.Debug = "False"
+ VWDPort = "3664"
+ EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -27,10 +45,6 @@ Global
{58917D99-DC94-4CDD-AD2B-C6E0BAFFCF47}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58917D99-DC94-4CDD-AD2B-C6E0BAFFCF47}.Release|Any CPU.ActiveCfg = Release|Any CPU
{58917D99-DC94-4CDD-AD2B-C6E0BAFFCF47}.Release|Any CPU.Build.0 = Release|Any CPU
- {57064377-C08C-4218-9C55-0552D40F3877}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {57064377-C08C-4218-9C55-0552D40F3877}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {57064377-C08C-4218-9C55-0552D40F3877}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {57064377-C08C-4218-9C55-0552D40F3877}.Release|Any CPU.Build.0 = Release|Any CPU
{388DD4ED-29C4-4127-AC8F-34DD3FE9F9B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{388DD4ED-29C4-4127-AC8F-34DD3FE9F9B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{388DD4ED-29C4-4127-AC8F-34DD3FE9F9B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -39,6 +53,10 @@ Global
{35A5E2CC-0FD4-4BC0-ACBF-38599CAED1C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35A5E2CC-0FD4-4BC0-ACBF-38599CAED1C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{35A5E2CC-0FD4-4BC0-ACBF-38599CAED1C4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9B03E3A4-E233-41DF-AC13-BED4812B3D27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9B03E3A4-E233-41DF-AC13-BED4812B3D27}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9B03E3A4-E233-41DF-AC13-BED4812B3D27}.Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {9B03E3A4-E233-41DF-AC13-BED4812B3D27}.Release|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/WebInterface/NodeJSServer/NodeJSServer.njsproj b/WebInterface/NodeJSServer/NodeJSServer.njsproj
new file mode 100644
index 0000000..6181774
--- /dev/null
+++ b/WebInterface/NodeJSServer/NodeJSServer.njsproj
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{687040f4-1ffd-41aa-b4ca-e132a3d1fb15}</ProjectGuid>
+ <ProjectHome>.</ProjectHome>
+ <ProjectView>ShowAllFiles</ProjectView>
+ <StartupFile>webpack.config.js</StartupFile>
+ <WorkingDirectory>.</WorkingDirectory>
+ <OutputPath>.</OutputPath>
+ <ProjectTypeGuids>{3AF33F2E-1136-4D97-BBB7-1795711AC8B8};{349c5851-65df-11da-9384-00065b846f21};{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}</ProjectTypeGuids>
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
+ <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)' == 'Debug'" />
+ <PropertyGroup Condition="'$(Configuration)' == 'Release'" />
+ <ItemGroup>
+ <Content Include="package-lock.json" />
+ <Content Include="package.json" />
+ <Content Include="webpack.config.js" />
+ <Content Include="dist\404.html" />
+ <Content Include="dist\index.html" />
+ <Content Include="dist\index.css" />
+ <Content Include="dist\chat.js" />
+ <Content Include="dist\index.js" />
+ <Content Include="src\index.js" />
+ <Content Include="dist\ressources\Logo768.png" />
+ <Content Include="dist\ressources\menu.png" />
+ <Content Include="dist\ressources\menu_close.png" />
+ <Content Include="src\modules\ui\backdrop.js" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="dist" />
+ <Folder Include="dist\ressources" />
+ <Folder Include="src" />
+ <Folder Include="src\modules" />
+ <Folder Include="src\modules\ui" />
+ <Folder Include="src\style" />
+ <Folder Include="src\style\partials" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <!--Do not delete the following Import Project. While this appears to do nothing it is a marker for setting TypeScript properties before our import that depends on them.-->
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="False" />
+ <Import Project="$(VSToolsPath)\Node.js Tools\Microsoft.NodejsTools.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
+ <WebProjectProperties>
+ <UseIIS>False</UseIIS>
+ <AutoAssignPort>True</AutoAssignPort>
+ <DevelopmentServerPort>0</DevelopmentServerPort>
+ <DevelopmentServerVPath>/</DevelopmentServerVPath>
+ <IISUrl>http://localhost:48022/</IISUrl>
+ <NTLMAuthentication>False</NTLMAuthentication>
+ <UseCustomServer>True</UseCustomServer>
+ <CustomServerUrl>http://localhost:1337</CustomServerUrl>
+ <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
+ </WebProjectProperties>
+ </FlavorProperties>
+ <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}" User="">
+ <WebProjectProperties>
+ <StartPageUrl>
+ </StartPageUrl>
+ <StartAction>CurrentPage</StartAction>
+ <AspNetDebugging>True</AspNetDebugging>
+ <SilverlightDebugging>False</SilverlightDebugging>
+ <NativeDebugging>False</NativeDebugging>
+ <SQLDebugging>False</SQLDebugging>
+ <ExternalProgram>
+ </ExternalProgram>
+ <StartExternalURL>
+ </StartExternalURL>
+ <StartCmdLineArguments>
+ </StartCmdLineArguments>
+ <StartWorkingDirectory>
+ </StartWorkingDirectory>
+ <EnableENC>False</EnableENC>
+ <AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug>
+ </WebProjectProperties>
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/WebInterface/NodeJSServer/dist/chat.js b/WebInterface/NodeJSServer/dist/chat.js
index 6832cc2..1be6fbc 100644
--- a/WebInterface/NodeJSServer/dist/chat.js
+++ b/WebInterface/NodeJSServer/dist/chat.js
@@ -14,10 +14,20 @@ connection.start().catch(function (err) {
return console.error(err.toString());
});
+document.getElementById("loginButton").addEventListener("click", function (event) {
+ var group = document.getElementById("userInput").value;
+ var password = document.getElementById("messageInput").value;
+ connection.invoke("Login", group, password).catch(function (err) {
+ return console.error(err.toString());
+ });
+ event.preventDefault();
+});
+
document.getElementById("sendButton").addEventListener("click", function (event) {
var user = document.getElementById("userInput").value;
var message = document.getElementById("messageInput").value;
- connection.invoke("SendMessage", user, message).catch(function (err) {
+ var group = "TheCrew";
+ connection.invoke("SendMessage",group, user, message).catch(function (err) {
return console.error(err.toString());
});
event.preventDefault();
diff --git a/WebInterface/NodeJSServer/dist/index.html b/WebInterface/NodeJSServer/dist/index.html
index 4264b39..d54470c 100644
--- a/WebInterface/NodeJSServer/dist/index.html
+++ b/WebInterface/NodeJSServer/dist/index.html
@@ -1,4 +1,4 @@
-<!doctype html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
@@ -42,9 +42,12 @@
</ul>
<input type="text" id="user-input">
<input type="text" id="message-input">
- <button id="send-button">
- Senden
- </button>
+ <button id="send-button">
+ Senden
+ </button>
+ <button id="login-button">
+ Login
+ </button>
</div>
<!-- <div class="server-entries">
<p>Server 1</p>