Skip to content
Permalink
Browse files

Add objects allowed, and add launch server page.

  • Loading branch information...
roncli committed Jul 5, 2015
1 parent 772a6aa commit d2a4f9c7eaf4c64ccb3c33c0a1dc5f7ac9347a80
Showing with 101 additions and 51 deletions.
  1. +2 −1 public/index.htm
  2. +9 −0 public/js/ddsn.js
  3. +53 −50 public/templates/add-server-allowed.htm
  4. +18 −0 public/templates/add-server-launch.htm
  5. +19 −0 websocket.js
@@ -21,6 +21,7 @@ <h1>Descent DSN</h1>
<content></content>
</div>
</div>
</div>
</div><br />
<div class="text-center text-muted small">Descent DSN &copy;2015 roncli Productions</div>
</body>
</html>
@@ -354,6 +354,14 @@ var app = angular.module("ddsn", []),
data.settings.addServer.allowed.shipsValid = data.settings.addServer.allowed.ships.blackpyro || data.settings.addServer.allowed.ships.magnumaht || data.settings.addServer.allowed.ships.phoenix || data.settings.addServer.allowed.ships.pyrogl;
};

$scope.launchServer = function() {
data.settings.addServer.server.directory = data.settings.descent3.path;
ws.send(JSON.stringify({
message: "launchserver",
settings: data.settings.addServer
}));
};

$scope.updateSettingsDescent3Path = function() {
ws.send(JSON.stringify({
message: "settings.descent3.path",
@@ -413,6 +421,7 @@ var app = angular.module("ddsn", []),
scope.$apply();
break;
case "warning":
console.log(message);
// TODO: Handle warning
break;
}
@@ -1,5 +1,5 @@
<div class="row">
<div class="col-xs-6">
<div class="col-xs-3">
<div class="input-group">
<label for="addServerAllowedPyroGl" class="input-group-addon" style="white-space: nowrap; width: 1px;">Pyro GL:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
@@ -29,142 +29,143 @@
<br ng-if="!data.settings.addServer.allowed.shipsValid" />

<div class="input-group">
<label for="addServerAllowedSuperLaser" class="input-group-addon" style="white-space: nowrap; width: 1px;">Super Laser:</label>
<label for="addServerAllowedConcussion" class="input-group-addon" style="white-space: nowrap; width: 1px;">Concussion:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedSuperLaser" ng-model="data.settings.addServer.allowed.primaries.superlaser" />
<input type="checkbox" id="addServerAllowedConcussion" ng-model="data.settings.addServer.allowed.secondaries.concussion" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedVauss" class="input-group-addon" style="white-space: nowrap; width: 1px;">Vauss:</label>
<label for="addServerAllowedFourPackConc" class="input-group-addon" style="white-space: nowrap; width: 1px;">4-pack Concussion:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedVauss" ng-model="data.settings.addServer.allowed.primaries.vauss" />
<input type="checkbox" id="addServerAllowedFourPackConc" ng-model="data.settings.addServer.allowed.secondaries.fourpackconc" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedMassDriver" class="input-group-addon" style="white-space: nowrap; width: 1px;">Mass Driver:</label>
<label for="addServerAllowedFrag" class="input-group-addon" style="white-space: nowrap; width: 1px;">Frag:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedMassDriver" ng-model="data.settings.addServer.allowed.primaries.massdriver" />
<input type="checkbox" id="addServerAllowedFrag" ng-model="data.settings.addServer.allowed.secondaries.frag" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedNapalm" class="input-group-addon" style="white-space: nowrap; width: 1px;">Napalm:</label>
<label for="addServerAllowedFourPackFrag" class="input-group-addon" style="white-space: nowrap; width: 1px;">4-pack Frag:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedNapalm" ng-model="data.settings.addServer.allowed.primaries.napalm" />
<input type="checkbox" id="addServerAllowedFourPackFrag" ng-model="data.settings.addServer.allowed.secondaries.fourpackfrag" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedEmdLauncher" class="input-group-addon" style="white-space: nowrap; width: 1px;">EMD Launcher:</label>
<label for="addServerAllowedHoming" class="input-group-addon" style="white-space: nowrap; width: 1px;">Homing:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedEmdLauncher" ng-model="data.settings.addServer.allowed.primaries.emdlauncher" />
<input type="checkbox" id="addServerAllowedHoming" ng-model="data.settings.addServer.allowed.secondaries.homing" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedPlasmaCannon" class="input-group-addon" style="white-space: nowrap; width: 1px;">Plasma Cannon:</label>
<label for="addServerAllowedFourPackHoming" class="input-group-addon" style="white-space: nowrap; width: 1px;">4-pack Homing:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedPlasmaCannon" ng-model="data.settings.addServer.allowed.primaries.plasmacannon" />
<input type="checkbox" id="addServerAllowedFourPackHoming" ng-model="data.settings.addServer.allowed.secondaries.fourpackhoming" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedMicrowave" class="input-group-addon" style="white-space: nowrap; width: 1px;">Microwave:</label>
<label for="addServerAllowedGuided" class="input-group-addon" style="white-space: nowrap; width: 1px;">Guided:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedMicrowave" ng-model="data.settings.addServer.allowed.primaries.microwave" />
<input type="checkbox" id="addServerAllowedGuided" ng-model="data.settings.addServer.allowed.secondaries.guided" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedFusionCannon" class="input-group-addon" style="white-space: nowrap; width: 1px;">Fusion Cannon:</label>
<label for="addServerAllowedFourPackGuided" class="input-group-addon" style="white-space: nowrap; width: 1px;">4-pack Guided:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedFusionCannon" ng-model="data.settings.addServer.allowed.primaries.fusioncannon" />
<input type="checkbox" id="addServerAllowedFourPackGuided" ng-model="data.settings.addServer.allowed.secondaries.fourpackguided" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedOmegaCannon" class="input-group-addon" style="white-space: nowrap; width: 1px;">Omega Cannon:</label>
<label for="addServerAllowedImpactMortar" class="input-group-addon" style="white-space: nowrap; width: 1px;">Impact Mortar:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedOmegaCannon" ng-model="data.settings.addServer.allowed.primaries.omegacannon" />
<input type="checkbox" id="addServerAllowedImpactMortar" ng-model="data.settings.addServer.allowed.secondaries.impactmortar" />
</span>
</div><br />

</div>
<div class="input-group">
<label for="addServerAllowedConcussion" class="input-group-addon" style="white-space: nowrap; width: 1px;">Concussion:</label>
<label for="addServerAllowedNapalmRocket" class="input-group-addon" style="white-space: nowrap; width: 1px;">Napalm Rocket:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedConcussion" ng-model="data.settings.addServer.allowed.secondaries.concussion" />
<input type="checkbox" id="addServerAllowedNapalmRocket" ng-model="data.settings.addServer.allowed.secondaries.napalmrocket" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedFourPackConc" class="input-group-addon" style="white-space: nowrap; width: 1px;">4-pack Concussion:</label>
<label for="addServerAllowedSmart" class="input-group-addon" style="white-space: nowrap; width: 1px;">Smart:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedFourPackConc" ng-model="data.settings.addServer.allowed.secondaries.fourpackconc" />
<input type="checkbox" id="addServerAllowedSmart" ng-model="data.settings.addServer.allowed.secondaries.smart" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedFrag" class="input-group-addon" style="white-space: nowrap; width: 1px;">Frag:</label>
<label for="addServerAllowedCyclone" class="input-group-addon" style="white-space: nowrap; width: 1px;">Cyclone:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedFrag" ng-model="data.settings.addServer.allowed.secondaries.frag" />
<input type="checkbox" id="addServerAllowedCyclone" ng-model="data.settings.addServer.allowed.secondaries.cyclone" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedFourPackFrag" class="input-group-addon" style="white-space: nowrap; width: 1px;">4-pack Frag:</label>
<label for="addServerAllowedMega" class="input-group-addon" style="white-space: nowrap; width: 1px;">Mega:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedFourPackFrag" ng-model="data.settings.addServer.allowed.secondaries.fourpackfrag" />
<input type="checkbox" id="addServerAllowedMega" ng-model="data.settings.addServer.allowed.secondaries.mega" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedHoming" class="input-group-addon" style="white-space: nowrap; width: 1px;">Homing:</label>
<label for="addServerAllowedBlackShark" class="input-group-addon" style="white-space: nowrap; width: 1px;">Black Shark:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedHoming" ng-model="data.settings.addServer.allowed.secondaries.homing" />
<input type="checkbox" id="addServerAllowedBlackShark" ng-model="data.settings.addServer.allowed.secondaries.blackshark" />
</span>
</div>
</div>
<div class="col-xs-3">
<div class="input-group">
<label for="addServerAllowedFourPackHoming" class="input-group-addon" style="white-space: nowrap; width: 1px;">4-pack Homing:</label>
<label for="addServerAllowedSuperLaser" class="input-group-addon" style="white-space: nowrap; width: 1px;">Super Laser:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedFourPackHoming" ng-model="data.settings.addServer.allowed.secondaries.fourpackhoming" />
<input type="checkbox" id="addServerAllowedSuperLaser" ng-model="data.settings.addServer.allowed.primaries.superlaser" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedGuided" class="input-group-addon" style="white-space: nowrap; width: 1px;">Guided:</label>
<label for="addServerAllowedVauss" class="input-group-addon" style="white-space: nowrap; width: 1px;">Vauss:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedGuided" ng-model="data.settings.addServer.allowed.secondaries.guided" />
<input type="checkbox" id="addServerAllowedVauss" ng-model="data.settings.addServer.allowed.primaries.vauss" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedFourPackGuided" class="input-group-addon" style="white-space: nowrap; width: 1px;">4-pack Guided:</label>
<label for="addServerAllowedMassDriver" class="input-group-addon" style="white-space: nowrap; width: 1px;">Mass Driver:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedFourPackGuided" ng-model="data.settings.addServer.allowed.secondaries.fourpackguided" />
<input type="checkbox" id="addServerAllowedMassDriver" ng-model="data.settings.addServer.allowed.primaries.massdriver" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedImpactMortar" class="input-group-addon" style="white-space: nowrap; width: 1px;">Impact Mortar:</label>
<label for="addServerAllowedNapalm" class="input-group-addon" style="white-space: nowrap; width: 1px;">Napalm:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedImpactMortar" ng-model="data.settings.addServer.allowed.secondaries.impactmortar" />
<input type="checkbox" id="addServerAllowedNapalm" ng-model="data.settings.addServer.allowed.primaries.napalm" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedNapalmRocket" class="input-group-addon" style="white-space: nowrap; width: 1px;">Napalm Rocket:</label>
<label for="addServerAllowedEmdLauncher" class="input-group-addon" style="white-space: nowrap; width: 1px;">EMD Launcher:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedNapalmRocket" ng-model="data.settings.addServer.allowed.secondaries.napalmrocket" />
<input type="checkbox" id="addServerAllowedEmdLauncher" ng-model="data.settings.addServer.allowed.primaries.emdlauncher" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedSmart" class="input-group-addon" style="white-space: nowrap; width: 1px;">Smart:</label>
<label for="addServerAllowedPlasmaCannon" class="input-group-addon" style="white-space: nowrap; width: 1px;">Plasma Cannon:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedSmart" ng-model="data.settings.addServer.allowed.secondaries.smart" />
<input type="checkbox" id="addServerAllowedPlasmaCannon" ng-model="data.settings.addServer.allowed.primaries.plasmacannon" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedCyclone" class="input-group-addon" style="white-space: nowrap; width: 1px;">Cyclone:</label>
<label for="addServerAllowedMicrowave" class="input-group-addon" style="white-space: nowrap; width: 1px;">Microwave:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedCyclone" ng-model="data.settings.addServer.allowed.secondaries.cyclone" />
<input type="checkbox" id="addServerAllowedMicrowave" ng-model="data.settings.addServer.allowed.primaries.microwave" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedMega" class="input-group-addon" style="white-space: nowrap; width: 1px;">Mega:</label>
<label for="addServerAllowedFusionCannon" class="input-group-addon" style="white-space: nowrap; width: 1px;">Fusion Cannon:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedMega" ng-model="data.settings.addServer.allowed.secondaries.mega" />
<input type="checkbox" id="addServerAllowedFusionCannon" ng-model="data.settings.addServer.allowed.primaries.fusioncannon" />
</span>
</div>
<div class="input-group">
<label for="addServerAllowedBlackShark" class="input-group-addon" style="white-space: nowrap; width: 1px;">Black Shark:</label>
<label for="addServerAllowedOmegaCannon" class="input-group-addon" style="white-space: nowrap; width: 1px;">Omega Cannon:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
<input type="checkbox" id="addServerAllowedBlackShark" ng-model="data.settings.addServer.allowed.secondaries.blackshark" />
<input type="checkbox" id="addServerAllowedOmegaCannon" ng-model="data.settings.addServer.allowed.primaries.omegacannon" />
</span>
</div><br />

@@ -277,7 +278,7 @@
</span>
</div>
</div>
<div class="col-xs-6">
<div class="col-xs-3">
<div class="input-group">
<label for="addServerAllowedAntivirusProgram" class="input-group-addon" style="white-space: nowrap; width: 1px;">Antivirus Program:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">
@@ -452,6 +453,8 @@
<input type="checkbox" id="addServerAllowedFlagGreen" ng-model="data.settings.addServer.allowed.miscellaneous.flaggreen" />
</span>
</div>
</div>
<div class="col-xs-3">
<div class="input-group">
<label for="addServerAllowedFlagRed" class="input-group-addon" style="white-space: nowrap; width: 1px;">Flag Red:</label>
<span class="input-group-addon" style="width: 100%; text-align: left;">

0 comments on commit d2a4f9c

Please sign in to comment.
You can’t perform that action at this time.