mirror of https://github.com/qwqdanchun/nps.git
show the input of client id, fixed:#453
This commit is contained in:
parent
d4f3e46277
commit
77ed98d407
|
@ -7,7 +7,7 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label font-bold" langtag="word-scheme"></label>
|
||||
<div class="col-sm-10">
|
||||
<span class="help-block m-b-none font-bold" langtag="word-usecase"></span>:
|
||||
<span class="help-block m-b-none font-bold" langtag="word-usecase"></span>:
|
||||
<span id="usecase">
|
||||
<span id="casetcp" langtag="info-casetcp"></span>
|
||||
<span id="caseudp" langtag="info-caseudp"></span>
|
||||
|
@ -24,7 +24,7 @@
|
|||
<option value="socks5" langtag="scheme-socks5"></option>
|
||||
<option value="secret" langtag="scheme-secret"></option>
|
||||
<option value="p2p" langtag="scheme-p2p"></option>
|
||||
{{/*<option value="file" langtag="scheme-file"></option>*/}}
|
||||
{{/*<option value="file" langtag="scheme-file"></option>*/}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -32,47 +32,52 @@
|
|||
<div class="form-group" id="client_id">
|
||||
<label class="control-label font-bold" langtag="word-clientid"></label>
|
||||
<div class="col-sm-10">
|
||||
<input value="{{.client_id}}" class="form-control" type="text" name="client_id" placeholder="" langtag="word-clientid">
|
||||
<input value="{{.client_id}}" class="form-control" type="text" name="client_id"
|
||||
placeholder="" langtag="word-clientid">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label font-bold" langtag="word-remark"></label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" name="remark" placeholder="" langtag="info-unrestricted">
|
||||
<input class="form-control" type="text" name="remark" placeholder=""
|
||||
langtag="info-unrestricted">
|
||||
</div>
|
||||
</div>
|
||||
{{if eq true .allow_multi_ip}}
|
||||
<div class="form-group" id="server_ip">
|
||||
<label class="control-label font-bold" langtag="word-serverip"></label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" value="0.0.0.0" name="server_ip" placeholder="" langtag="info-suchasip">
|
||||
{{if eq true .allow_multi_ip}}
|
||||
<div class="form-group" id="server_ip">
|
||||
<label class="control-label font-bold" langtag="word-serverip"></label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" value="0.0.0.0" name="server_ip" placeholder=""
|
||||
langtag="info-suchasip">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<div class="form-group" id="port">
|
||||
<label class="control-label font-bold" langtag="word-serverport"></label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" name="port" placeholder="" langtag="info-suchasport">
|
||||
<input class="form-control" type="text" name="port" placeholder=""
|
||||
langtag="info-suchasport">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if eq true .allow_local_proxy}}
|
||||
<div class="form-group" id="local_proxy">
|
||||
<label class="control-label font-bold" langtag="word-proxytolocal"></label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" name="local_proxy">
|
||||
<option value="0" langtag="word-no"></option>
|
||||
<option value="1" langtag="word-yes"></option>
|
||||
</select>
|
||||
{{if eq true .allow_local_proxy}}
|
||||
<div class="form-group" id="local_proxy">
|
||||
<label class="control-label font-bold" langtag="word-proxytolocal"></label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" name="local_proxy">
|
||||
<option value="0" langtag="word-no"></option>
|
||||
<option value="1" langtag="word-yes"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
<div class="form-group" id="target">
|
||||
<label class="control-label font-bold" langtag="word-target"></label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" name="target" rows="4" placeholder="" langtag="info-suchasiplist"></textarea>
|
||||
<textarea class="form-control" name="target" rows="4" placeholder=""
|
||||
langtag="info-suchasiplist"></textarea>
|
||||
<span class="help-block m-b-none" langtag="info-targettunnel"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -80,30 +85,34 @@
|
|||
<div class="form-group" id="local_path">
|
||||
<label class="control-label font-bold" langtag="word-localpath"></label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" name="local_path" placeholder="" langtag="info-suchaslocalpath">
|
||||
<input class="form-control" type="text" name="local_path" placeholder=""
|
||||
langtag="info-suchaslocalpath">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="strip_pre">
|
||||
<label class="control-label font-bold" langtag="word-stripprefix"></label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" name="strip_pre" placeholder="" langtag="info-suchasstripprefix">
|
||||
<input class="form-control" type="text" name="strip_pre" placeholder=""
|
||||
langtag="info-suchasstripprefix">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="password">
|
||||
<label class="control-label font-bold" langtag="word-identificationkey"></label>
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" name="password" placeholder="" langtag="word-identificationkey">
|
||||
<input class="form-control" type="text" name="password" placeholder=""
|
||||
langtag="word-identificationkey">
|
||||
<span class="help-block m-b-none" langtag="info-identificationkey"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hr-line-dashed"></div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-4 col-sm-offset-2">
|
||||
<button class="btn btn-success" type="button" onclick="submitform('add', '{{.web_base_url}}/index/add', $('form').serializeArray())">
|
||||
<button class="btn btn-success" type="button"
|
||||
onclick="submitform('add', '{{.web_base_url}}/index/add', $('form').serializeArray())">
|
||||
<i class="fa fa-fw fa-lg fa-check-circle"></i> <span langtag="word-add"></span>
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -114,20 +123,20 @@
|
|||
</div>
|
||||
<script>
|
||||
var arr = []
|
||||
arr["all"] = ["port", "target", "password", "local_path", "strip_pre", "local_proxy"]
|
||||
arr["tcp"] = ["port", "target", "local_proxy"]
|
||||
arr["udp"] = ["port", "target", "local_proxy"]
|
||||
arr["socks5"] = ["port"]
|
||||
arr["httpProxy"] = ["port"]
|
||||
arr["secret"] = ["target", "password"]
|
||||
arr["p2p"] = ["target", "password"]
|
||||
arr["file"] = ["port", "local_path", "strip_pre"]
|
||||
arr["all"] = ["port", "target", "password", "local_path", "strip_pre", "local_proxy", "client_id"]
|
||||
arr["tcp"] = ["port", "target", "local_proxy", "client_id"]
|
||||
arr["udp"] = ["port", "target", "local_proxy", "client_id"]
|
||||
arr["socks5"] = ["port", "client_id"]
|
||||
arr["httpProxy"] = ["port", "client_id"]
|
||||
arr["secret"] = ["target", "password", "client_id"]
|
||||
arr["p2p"] = ["target", "password", "client_id"]
|
||||
arr["file"] = ["port", "local_path", "strip_pre", "client_id"]
|
||||
|
||||
function resetForm() {
|
||||
$(".form-group[id]").css("display", "none");
|
||||
$("#usecase span").css("display", "none");
|
||||
o = $("#type").val();
|
||||
$('#case'+ o).css("display", "inline")
|
||||
$('#case' + o).css("display", "inline")
|
||||
for (var i = 0; i < arr[o].length; i++) {
|
||||
$("#" + arr[o][i]).css("display", "block")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue