mirror of
https://github.com/yhl452493373/frpc-panel.git
synced 2026-04-04 14:27:01 +08:00
optimze
This commit is contained in:
@@ -65,5 +65,6 @@
|
||||
"Param Error": "Param error",
|
||||
"Frp Client Error": "Frp client error",
|
||||
"Proxy Exist,": "Proxy name exist",
|
||||
"Proxy Not Exist": "Proxy name not exist"
|
||||
"Proxy Not Exist": "Proxy name not exist",
|
||||
"Client Tips": "Client tips"
|
||||
}
|
||||
@@ -65,5 +65,6 @@
|
||||
"Param Error": "参数错误",
|
||||
"Frp Client Error": "Frp客户端错误",
|
||||
"Proxy Exist": "代理名称重复",
|
||||
"Proxy Not Exist": "代理名称不存在"
|
||||
"Proxy Not Exist": "代理名称不存在",
|
||||
"Client Tips": "客户端提示"
|
||||
}
|
||||
@@ -81,11 +81,11 @@ section {
|
||||
}
|
||||
|
||||
.layui-form-label {
|
||||
width: 100px;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.layui-input-block {
|
||||
margin-left: 130px;
|
||||
margin-left: 150px;
|
||||
}
|
||||
|
||||
.layui-btn-sm {
|
||||
|
||||
@@ -46,6 +46,7 @@ var loadProxyInfo = (function ($) {
|
||||
temp.local_ip = temp.local_ip || '-';
|
||||
temp.local_port = temp.local_port || '-';
|
||||
temp.use_encryption = temp.use_encryption || false;
|
||||
temp.use_compression = temp.use_compression || false;
|
||||
if (currentProxyType === 'http' || currentProxyType === 'https') {
|
||||
temp.custom_domains = temp.custom_domains || '-';
|
||||
temp.subdomain = temp.subdomain || '-';
|
||||
@@ -180,7 +181,7 @@ var loadProxyInfo = (function ($) {
|
||||
type: 1,
|
||||
title: false,
|
||||
skin: 'proxy-popup',
|
||||
area: ['400px', '400px'],
|
||||
area: ['450px', '400px'],
|
||||
content: content,
|
||||
btn: [i18n['Confirm'], i18n['Cancel']],
|
||||
btn1: function (index) {
|
||||
@@ -254,13 +255,15 @@ var loadProxyInfo = (function ($) {
|
||||
data: JSON.stringify(data),
|
||||
success: function (result) {
|
||||
if (result.success) {
|
||||
reloadTable();
|
||||
layui.layer.close(index);
|
||||
layui.layer.msg(i18n['OperateSuccess'], function (index) {
|
||||
layui.layer.close(index);
|
||||
});
|
||||
reloadTable();
|
||||
layui.layer.msg(i18n['OperateSuccess']);
|
||||
} else {
|
||||
errorMsg(result);
|
||||
if (result.code === 5) {
|
||||
layui.layer.close(index);
|
||||
reloadTable();
|
||||
}
|
||||
}
|
||||
},
|
||||
complete: function () {
|
||||
@@ -278,10 +281,19 @@ var loadProxyInfo = (function ($) {
|
||||
layui.layer.msg(i18n['ShouldCheckProxy']);
|
||||
return;
|
||||
}
|
||||
data.forEach(function (temp) {
|
||||
for (var key in temp) {
|
||||
if (typeof temp[key] === 'boolean') {
|
||||
temp[key] = temp[key] + '';
|
||||
}
|
||||
}
|
||||
});
|
||||
layui.layer.confirm(i18n['ConfirmRemoveProxy'], {
|
||||
title: i18n['OperationConfirm'],
|
||||
btn: [i18n['Confirm'], i18n['Cancel']]
|
||||
}, function (index) {
|
||||
layui.layer.close(index);
|
||||
|
||||
var loading = layui.layer.load();
|
||||
$.post({
|
||||
url: '/remove',
|
||||
@@ -290,13 +302,15 @@ var loadProxyInfo = (function ($) {
|
||||
data: JSON.stringify(data),
|
||||
success: function (result) {
|
||||
if (result.success) {
|
||||
reloadTable();
|
||||
layui.layer.close(index);
|
||||
layui.layer.msg(i18n['OperateSuccess'], function (index) {
|
||||
layui.layer.close(index);
|
||||
});
|
||||
reloadTable();
|
||||
layui.layer.msg(i18n['OperateSuccess']);
|
||||
} else {
|
||||
errorMsg(result);
|
||||
if (result.code === 5) {
|
||||
layui.layer.close(index);
|
||||
reloadTable();
|
||||
}
|
||||
}
|
||||
},
|
||||
complete: function () {
|
||||
@@ -327,7 +341,15 @@ var loadProxyInfo = (function ($) {
|
||||
reason = i18n['ProxyExist'];
|
||||
else if (result.code === 4)
|
||||
reason = i18n['ProxyNotExist'];
|
||||
layui.layer.msg(i18n['OperateFailed'] + ',' + reason)
|
||||
if (result.code === 5) {
|
||||
layui.layer.alert(result.message, {
|
||||
title: i18n['ClientTips'],
|
||||
maxWidth: 350,
|
||||
btn: [i18n['Confirm']]
|
||||
});
|
||||
} else {
|
||||
layui.layer.msg(i18n['OperateFailed'] + ',' + reason);
|
||||
}
|
||||
}
|
||||
|
||||
return loadProxyInfo;
|
||||
|
||||
@@ -39,7 +39,7 @@ var loadOverview = (function ($) {
|
||||
var $section = $('#content > section');
|
||||
var cols = [
|
||||
{field: 'name', title: i18n['Name'], sort: true},
|
||||
{field: 'type', title: i18n['Type'], width: 100, sort: true},
|
||||
{field: 'type', title: i18n['Type'], width: 110, sort: true},
|
||||
{
|
||||
field: 'local_addr',
|
||||
title: i18n['LocalAddress'],
|
||||
|
||||
Reference in New Issue
Block a user