Manually select port for server in settings

This commit is contained in:
Björn Dahlgren 2015-01-16 23:09:53 +01:00
parent 1c452329b2
commit be6bdb781a
4 changed files with 12 additions and 2 deletions

View File

@ -20,14 +20,14 @@ Server.prototype.update = function (options) {
this.admin_password = options.admin_password;
this.battle_eye = options.battle_eye;
this.max_players = options.max_players;
this.mods = options.mods;
this.mods = options.mods || [];
this.password = options.password;
this.persistent = options.persistent;
this.port = options.port || 2302;
this.title = options.title;
this.von = options.von;
this.id = slug(this.title).replace('.', '-');
this.port = 2302;
};
Server.prototype.queryStatus = function() {

View File

@ -14,6 +14,7 @@ define(function (require) {
mods: [],
password: '',
persistent: false,
port: 2302,
state: null,
title: '',
von: false,

View File

@ -24,6 +24,7 @@ define(function (require) {
max_players: this.$("form .max-players").val(),
password: this.$("form .password").val(),
persistent: this.$("form .persistent").prop("checked"),
port: this.$("form .port").val(),
title: this.$("form .title").val(),
von: this.$("form .von").prop("checked"),
};

View File

@ -6,6 +6,14 @@
</div>
</div>
<div class="form-group">
<label for="port" class="col-sm-2 control-label">Port</label>
<div class="col-sm-10">
<input type="number" class="form-control port" data-field="port" placeholder="Port" value="<%- port %>">
<p class="help-block">Server will use the designated port and the three following ports</p>
</div>
</div>
<div class="form-group">
<label for="max-players" class="col-sm-2 control-label">Max Players</label>
<div class="col-sm-10">