update 2023-04-08 23:35:27
This commit is contained in:
parent
bf8b292048
commit
035f38b334
|
@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
LUCI_TITLE:=Design Theme
|
LUCI_TITLE:=Design Theme
|
||||||
LUCI_DEPENDS:=
|
LUCI_DEPENDS:=
|
||||||
PKG_VERSION:=5.6.9-20230406
|
PKG_VERSION:=5.7.0-20230408
|
||||||
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
include $(TOPDIR)/feeds/luci/luci.mk
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,246 @@
|
||||||
(function ($) {
|
/*
|
||||||
const global = $('head #global-scroll');
|
* xhr.js - XMLHttpRequest helper class
|
||||||
const isMobile = /phone|pad|pod|iPhone|iPod|ios|iOS|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone/i.test(navigator.userAgent);
|
* (c) 2008-2010 Jo-Philipp Wich
|
||||||
|
*/
|
||||||
|
|
||||||
// Fixed scrollbar styles for browsers on different platforms
|
XHR = function()
|
||||||
function settingGlobalScroll() {
|
{
|
||||||
if (!isMobile && global.length === 0) {
|
this.reinit = function()
|
||||||
const style = document.createElement('style');
|
{
|
||||||
style.id = 'global-scroll';
|
if (window.XMLHttpRequest) {
|
||||||
style.textContent = `*::-webkit-scrollbar { width: 4px;height: 4px; } *::-webkit-scrollbar-thumb { background: var(--scrollbarColor); border-radius: 2px; }`;
|
this._xmlHttp = new XMLHttpRequest();
|
||||||
$('head').append(style);
|
}
|
||||||
} else if (isMobile && global.length > 0) {
|
else if (window.ActiveXObject) {
|
||||||
global.remove();
|
this._xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
|
||||||
}
|
}
|
||||||
}
|
else {
|
||||||
|
alert("xhr.js: XMLHttpRequest is not supported by this browser!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.busy = function() {
|
||||||
|
if (!this._xmlHttp)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
switch (this._xmlHttp.readyState)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.abort = function() {
|
||||||
|
if (this.busy())
|
||||||
|
this._xmlHttp.abort();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.get = function(url,data,callback)
|
||||||
|
{
|
||||||
|
this.reinit();
|
||||||
|
|
||||||
|
var xhr = this._xmlHttp;
|
||||||
|
var code = this._encode(data);
|
||||||
|
|
||||||
|
url = location.protocol + '//' + location.host + url;
|
||||||
|
|
||||||
|
if (code)
|
||||||
|
if (url.substr(url.length-1,1) == '&')
|
||||||
|
url += code;
|
||||||
|
else
|
||||||
|
url += '?' + code;
|
||||||
|
|
||||||
|
xhr.open('GET', url, true);
|
||||||
|
|
||||||
|
xhr.onreadystatechange = function()
|
||||||
|
{
|
||||||
|
if (xhr.readyState == 4) {
|
||||||
|
var json = null;
|
||||||
|
if (xhr.getResponseHeader("Content-Type") == "application/json") {
|
||||||
|
try {
|
||||||
|
json = eval('(' + xhr.responseText + ')');
|
||||||
|
}
|
||||||
|
catch(e) {
|
||||||
|
json = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
callback(xhr, json);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
xhr.send(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.post = function(url,data,callback)
|
||||||
|
{
|
||||||
|
this.reinit();
|
||||||
|
|
||||||
|
var xhr = this._xmlHttp;
|
||||||
|
var code = this._encode(data);
|
||||||
|
|
||||||
|
xhr.onreadystatechange = function()
|
||||||
|
{
|
||||||
|
if (xhr.readyState == 4)
|
||||||
|
callback(xhr);
|
||||||
|
}
|
||||||
|
|
||||||
|
xhr.open('POST', url, true);
|
||||||
|
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||||
|
xhr.send(code);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.cancel = function()
|
||||||
|
{
|
||||||
|
this._xmlHttp.onreadystatechange = function(){};
|
||||||
|
this._xmlHttp.abort();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.send_form = function(form,callback,extra_values)
|
||||||
|
{
|
||||||
|
var code = '';
|
||||||
|
|
||||||
|
for (var i = 0; i < form.elements.length; i++)
|
||||||
|
{
|
||||||
|
var e = form.elements[i];
|
||||||
|
|
||||||
|
if (e.options)
|
||||||
|
{
|
||||||
|
code += (code ? '&' : '') +
|
||||||
|
form.elements[i].name + '=' + encodeURIComponent(
|
||||||
|
e.options[e.selectedIndex].value
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else if (e.length)
|
||||||
|
{
|
||||||
|
for (var j = 0; j < e.length; j++)
|
||||||
|
if (e[j].name) {
|
||||||
|
code += (code ? '&' : '') +
|
||||||
|
e[j].name + '=' + encodeURIComponent(e[j].value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
code += (code ? '&' : '') +
|
||||||
|
e.name + '=' + encodeURIComponent(e.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof extra_values == 'object')
|
||||||
|
for (var key in extra_values)
|
||||||
|
code += (code ? '&' : '') +
|
||||||
|
key + '=' + encodeURIComponent(extra_values[key]);
|
||||||
|
|
||||||
|
return(
|
||||||
|
(form.method == 'get')
|
||||||
|
? this.get(form.getAttribute('action'), code, callback)
|
||||||
|
: this.post(form.getAttribute('action'), code, callback)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
this._encode = function(obj)
|
||||||
|
{
|
||||||
|
obj = obj ? obj : { };
|
||||||
|
obj['_'] = Math.random();
|
||||||
|
|
||||||
|
if (typeof obj == 'object')
|
||||||
|
{
|
||||||
|
var code = '';
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
for (var k in obj)
|
||||||
|
code += (code ? '&' : '') +
|
||||||
|
k + '=' + encodeURIComponent(obj[k]);
|
||||||
|
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
XHR.get = function(url, data, callback)
|
||||||
|
{
|
||||||
|
(new XHR()).get(url, data, callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
XHR.poll = function(interval, url, data, callback)
|
||||||
|
{
|
||||||
|
if (isNaN(interval) || interval < 1)
|
||||||
|
interval = 5;
|
||||||
|
|
||||||
|
if (!XHR._q)
|
||||||
|
{
|
||||||
|
XHR._t = 0;
|
||||||
|
XHR._q = [ ];
|
||||||
|
XHR._r = function() {
|
||||||
|
for (var i = 0, e = XHR._q[0]; i < XHR._q.length; e = XHR._q[++i])
|
||||||
|
{
|
||||||
|
if (!(XHR._t % e.interval) && !e.xhr.busy())
|
||||||
|
e.xhr.get(e.url, e.data, e.callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
XHR._t++;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
XHR._q.push({
|
||||||
|
interval: interval,
|
||||||
|
callback: callback,
|
||||||
|
url: url,
|
||||||
|
data: data,
|
||||||
|
xhr: new XHR()
|
||||||
|
});
|
||||||
|
|
||||||
|
XHR.run();
|
||||||
|
}
|
||||||
|
|
||||||
|
XHR.halt = function()
|
||||||
|
{
|
||||||
|
if (XHR._i)
|
||||||
|
{
|
||||||
|
/* show & set poll indicator */
|
||||||
|
try {
|
||||||
|
document.getElementById('xhr_poll_status').style.display = '';
|
||||||
|
document.getElementById('xhr_poll_status_on').style.display = 'none';
|
||||||
|
document.getElementById('xhr_poll_status_off').style.display = '';
|
||||||
|
document.getElementById('notice_status').style.marginRight = '30px'
|
||||||
|
} catch(e) { }
|
||||||
|
|
||||||
|
window.clearInterval(XHR._i);
|
||||||
|
XHR._i = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
XHR.run = function()
|
||||||
|
{
|
||||||
|
if (XHR._r && !XHR._i)
|
||||||
|
{
|
||||||
|
/* show & set poll indicator */
|
||||||
|
try {
|
||||||
|
document.getElementById('xhr_poll_status').style.display = '';
|
||||||
|
document.getElementById('xhr_poll_status_on').style.display = '';
|
||||||
|
document.getElementById('xhr_poll_status_off').style.display = 'none';
|
||||||
|
document.getElementById('notice_status').style.marginRight = '30px'
|
||||||
|
} catch(e) { }
|
||||||
|
|
||||||
|
/* kick first round manually to prevent one second lag when setting up
|
||||||
|
* the poll interval */
|
||||||
|
XHR._r();
|
||||||
|
XHR._i = window.setInterval(XHR._r, 1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
XHR.running = function()
|
||||||
|
{
|
||||||
|
return !!(XHR._r && XHR._i);
|
||||||
|
}
|
||||||
|
|
||||||
|
;(function ($) {
|
||||||
// Fixed status realtime table overflow style
|
// Fixed status realtime table overflow style
|
||||||
function settingsStatusRealtimeOverflow() {
|
function settingsStatusRealtimeOverflow() {
|
||||||
if (self.location.pathname.includes("status/realtime")) {
|
if (self.location.pathname.includes("status/realtime")) {
|
||||||
|
@ -33,13 +260,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(() => {
|
$(document).ready(() => {
|
||||||
settingGlobalScroll();
|
|
||||||
settingsStatusRealtimeOverflow();
|
settingsStatusRealtimeOverflow();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(window).on('resize', () => {
|
|
||||||
settingGlobalScroll();
|
|
||||||
});
|
|
||||||
|
|
||||||
$(window)
|
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
|
@ -241,9 +241,14 @@ select[multiple="multiple"] {
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.node-docker-images input[type='text'] {
|
||||||
|
width: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
input[type='text'],input[type='password'] {
|
input[type='text'],input[type='password'] {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
color: #0099CC;
|
color: #0099CC;
|
||||||
}
|
}
|
||||||
|
@ -1659,11 +1664,11 @@ table > tbody > tr:last-child {
|
||||||
}
|
}
|
||||||
|
|
||||||
.cbi-section-table-cell {
|
.cbi-section-table-cell {
|
||||||
text-align: center !important;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cbi-section-table-row {
|
.cbi-section-table-row {
|
||||||
text-align: center !important;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cbi-section-remove{
|
.cbi-section-remove{
|
||||||
|
@ -2773,6 +2778,10 @@ header > .container > .pull-right > * {
|
||||||
/* border: none; **/
|
/* border: none; **/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#cbi-firewall-redirect .cbi-section-table-titles .cbi-section-table-cell {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
#cbi-firewall-redirect table *,
|
#cbi-firewall-redirect table *,
|
||||||
#cbi-network-switch_vlan table *,
|
#cbi-network-switch_vlan table *,
|
||||||
#cbi-firewall-zone table *{
|
#cbi-firewall-zone table *{
|
||||||
|
|
|
@ -1,241 +0,0 @@
|
||||||
/*
|
|
||||||
* xhr.js - XMLHttpRequest helper class
|
|
||||||
* (c) 2008-2010 Jo-Philipp Wich
|
|
||||||
*/
|
|
||||||
|
|
||||||
XHR = function()
|
|
||||||
{
|
|
||||||
this.reinit = function()
|
|
||||||
{
|
|
||||||
if (window.XMLHttpRequest) {
|
|
||||||
this._xmlHttp = new XMLHttpRequest();
|
|
||||||
}
|
|
||||||
else if (window.ActiveXObject) {
|
|
||||||
this._xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
alert("xhr.js: XMLHttpRequest is not supported by this browser!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.busy = function() {
|
|
||||||
if (!this._xmlHttp)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
switch (this._xmlHttp.readyState)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
case 2:
|
|
||||||
case 3:
|
|
||||||
return true;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.abort = function() {
|
|
||||||
if (this.busy())
|
|
||||||
this._xmlHttp.abort();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.get = function(url,data,callback)
|
|
||||||
{
|
|
||||||
this.reinit();
|
|
||||||
|
|
||||||
var xhr = this._xmlHttp;
|
|
||||||
var code = this._encode(data);
|
|
||||||
|
|
||||||
url = location.protocol + '//' + location.host + url;
|
|
||||||
|
|
||||||
if (code)
|
|
||||||
if (url.substr(url.length-1,1) == '&')
|
|
||||||
url += code;
|
|
||||||
else
|
|
||||||
url += '?' + code;
|
|
||||||
|
|
||||||
xhr.open('GET', url, true);
|
|
||||||
|
|
||||||
xhr.onreadystatechange = function()
|
|
||||||
{
|
|
||||||
if (xhr.readyState == 4) {
|
|
||||||
var json = null;
|
|
||||||
if (xhr.getResponseHeader("Content-Type") == "application/json") {
|
|
||||||
try {
|
|
||||||
json = eval('(' + xhr.responseText + ')');
|
|
||||||
}
|
|
||||||
catch(e) {
|
|
||||||
json = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
callback(xhr, json);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
xhr.send(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.post = function(url,data,callback)
|
|
||||||
{
|
|
||||||
this.reinit();
|
|
||||||
|
|
||||||
var xhr = this._xmlHttp;
|
|
||||||
var code = this._encode(data);
|
|
||||||
|
|
||||||
xhr.onreadystatechange = function()
|
|
||||||
{
|
|
||||||
if (xhr.readyState == 4)
|
|
||||||
callback(xhr);
|
|
||||||
}
|
|
||||||
|
|
||||||
xhr.open('POST', url, true);
|
|
||||||
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
|
||||||
xhr.send(code);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.cancel = function()
|
|
||||||
{
|
|
||||||
this._xmlHttp.onreadystatechange = function(){};
|
|
||||||
this._xmlHttp.abort();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.send_form = function(form,callback,extra_values)
|
|
||||||
{
|
|
||||||
var code = '';
|
|
||||||
|
|
||||||
for (var i = 0; i < form.elements.length; i++)
|
|
||||||
{
|
|
||||||
var e = form.elements[i];
|
|
||||||
|
|
||||||
if (e.options)
|
|
||||||
{
|
|
||||||
code += (code ? '&' : '') +
|
|
||||||
form.elements[i].name + '=' + encodeURIComponent(
|
|
||||||
e.options[e.selectedIndex].value
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else if (e.length)
|
|
||||||
{
|
|
||||||
for (var j = 0; j < e.length; j++)
|
|
||||||
if (e[j].name) {
|
|
||||||
code += (code ? '&' : '') +
|
|
||||||
e[j].name + '=' + encodeURIComponent(e[j].value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
code += (code ? '&' : '') +
|
|
||||||
e.name + '=' + encodeURIComponent(e.value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof extra_values == 'object')
|
|
||||||
for (var key in extra_values)
|
|
||||||
code += (code ? '&' : '') +
|
|
||||||
key + '=' + encodeURIComponent(extra_values[key]);
|
|
||||||
|
|
||||||
return(
|
|
||||||
(form.method == 'get')
|
|
||||||
? this.get(form.getAttribute('action'), code, callback)
|
|
||||||
: this.post(form.getAttribute('action'), code, callback)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
this._encode = function(obj)
|
|
||||||
{
|
|
||||||
obj = obj ? obj : { };
|
|
||||||
obj['_'] = Math.random();
|
|
||||||
|
|
||||||
if (typeof obj == 'object')
|
|
||||||
{
|
|
||||||
var code = '';
|
|
||||||
var self = this;
|
|
||||||
|
|
||||||
for (var k in obj)
|
|
||||||
code += (code ? '&' : '') +
|
|
||||||
k + '=' + encodeURIComponent(obj[k]);
|
|
||||||
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
XHR.get = function(url, data, callback)
|
|
||||||
{
|
|
||||||
(new XHR()).get(url, data, callback);
|
|
||||||
}
|
|
||||||
|
|
||||||
XHR.poll = function(interval, url, data, callback)
|
|
||||||
{
|
|
||||||
if (isNaN(interval) || interval < 1)
|
|
||||||
interval = 5;
|
|
||||||
|
|
||||||
if (!XHR._q)
|
|
||||||
{
|
|
||||||
XHR._t = 0;
|
|
||||||
XHR._q = [ ];
|
|
||||||
XHR._r = function() {
|
|
||||||
for (var i = 0, e = XHR._q[0]; i < XHR._q.length; e = XHR._q[++i])
|
|
||||||
{
|
|
||||||
if (!(XHR._t % e.interval) && !e.xhr.busy())
|
|
||||||
e.xhr.get(e.url, e.data, e.callback);
|
|
||||||
}
|
|
||||||
|
|
||||||
XHR._t++;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
XHR._q.push({
|
|
||||||
interval: interval,
|
|
||||||
callback: callback,
|
|
||||||
url: url,
|
|
||||||
data: data,
|
|
||||||
xhr: new XHR()
|
|
||||||
});
|
|
||||||
|
|
||||||
XHR.run();
|
|
||||||
}
|
|
||||||
|
|
||||||
XHR.halt = function()
|
|
||||||
{
|
|
||||||
if (XHR._i)
|
|
||||||
{
|
|
||||||
/* show & set poll indicator */
|
|
||||||
try {
|
|
||||||
document.getElementById('xhr_poll_status').style.display = '';
|
|
||||||
document.getElementById('xhr_poll_status_on').style.display = 'none';
|
|
||||||
document.getElementById('xhr_poll_status_off').style.display = '';
|
|
||||||
document.getElementById('notice_status').style.marginRight = '30px'
|
|
||||||
} catch(e) { }
|
|
||||||
|
|
||||||
window.clearInterval(XHR._i);
|
|
||||||
XHR._i = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
XHR.run = function()
|
|
||||||
{
|
|
||||||
if (XHR._r && !XHR._i)
|
|
||||||
{
|
|
||||||
/* show & set poll indicator */
|
|
||||||
try {
|
|
||||||
document.getElementById('xhr_poll_status').style.display = '';
|
|
||||||
document.getElementById('xhr_poll_status_on').style.display = '';
|
|
||||||
document.getElementById('xhr_poll_status_off').style.display = 'none';
|
|
||||||
document.getElementById('notice_status').style.marginRight = '30px'
|
|
||||||
} catch(e) { }
|
|
||||||
|
|
||||||
/* kick first round manually to prevent one second lag when setting up
|
|
||||||
* the poll interval */
|
|
||||||
XHR._r();
|
|
||||||
XHR._i = window.setInterval(XHR._r, 1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
XHR.running = function()
|
|
||||||
{
|
|
||||||
return !!(XHR._r && XHR._i);
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,69 @@
|
||||||
(function($){const global=$('head #global-scroll');const isMobile=/phone|pad|pod|iPhone|iPod|ios|iOS|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone/i.test(navigator.userAgent);function settingGlobalScroll(){if(!isMobile&&global.length===0){const style=document.createElement('style');style.id='global-scroll';style.textContent=`*::-webkit-scrollbar { width: 4px;height: 4px; } *::-webkit-scrollbar-thumb { background: var(--scrollbarColor); border-radius: 2px; }`;$('head').append(style);}else if(isMobile&&global.length>0){global.remove();}}
|
XHR=function()
|
||||||
function settingsStatusRealtimeOverflow(){if(self.location.pathname.includes("status/realtime")){const nodeStatusRealtime=$('.node-status-realtime');const selectorValues=['bandwidth','wifirate','wireless'];for(let i=0;i<selectorValues.length;i++){const value=selectorValues[i];const target=nodeStatusRealtime.find(`embed[src="/luci-static/resources/${value}.svg"] + div + br + table`);if(target.length){target.wrap('<div style="overflow-x: auto;"></div>');}}}}
|
{this.reinit=function()
|
||||||
$(document).ready(()=>{settingGlobalScroll();settingsStatusRealtimeOverflow();});$(window).on('resize',()=>{settingGlobalScroll();});$(window)})(jQuery);
|
{if(window.XMLHttpRequest){this._xmlHttp=new XMLHttpRequest();}
|
||||||
|
else if(window.ActiveXObject){this._xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
|
||||||
|
else{alert("xhr.js: XMLHttpRequest is not supported by this browser!");}}
|
||||||
|
this.busy=function(){if(!this._xmlHttp)
|
||||||
|
return false;switch(this._xmlHttp.readyState)
|
||||||
|
{case 1:case 2:case 3:return true;default:return false;}}
|
||||||
|
this.abort=function(){if(this.busy())
|
||||||
|
this._xmlHttp.abort();}
|
||||||
|
this.get=function(url,data,callback)
|
||||||
|
{this.reinit();var xhr=this._xmlHttp;var code=this._encode(data);url=location.protocol+'//'+location.host+url;if(code)
|
||||||
|
if(url.substr(url.length-1,1)=='&')
|
||||||
|
url+=code;else
|
||||||
|
url+='?'+code;xhr.open('GET',url,true);xhr.onreadystatechange=function()
|
||||||
|
{if(xhr.readyState==4){var json=null;if(xhr.getResponseHeader("Content-Type")=="application/json"){try{json=eval('('+xhr.responseText+')');}
|
||||||
|
catch(e){json=null;}}
|
||||||
|
callback(xhr,json);}}
|
||||||
|
xhr.send(null);}
|
||||||
|
this.post=function(url,data,callback)
|
||||||
|
{this.reinit();var xhr=this._xmlHttp;var code=this._encode(data);xhr.onreadystatechange=function()
|
||||||
|
{if(xhr.readyState==4)
|
||||||
|
callback(xhr);}
|
||||||
|
xhr.open('POST',url,true);xhr.setRequestHeader('Content-type','application/x-www-form-urlencoded');xhr.send(code);}
|
||||||
|
this.cancel=function()
|
||||||
|
{this._xmlHttp.onreadystatechange=function(){};this._xmlHttp.abort();}
|
||||||
|
this.send_form=function(form,callback,extra_values)
|
||||||
|
{var code='';for(var i=0;i<form.elements.length;i++)
|
||||||
|
{var e=form.elements[i];if(e.options)
|
||||||
|
{code+=(code?'&':'')+
|
||||||
|
form.elements[i].name+'='+encodeURIComponent(e.options[e.selectedIndex].value);}
|
||||||
|
else if(e.length)
|
||||||
|
{for(var j=0;j<e.length;j++)
|
||||||
|
if(e[j].name){code+=(code?'&':'')+
|
||||||
|
e[j].name+'='+encodeURIComponent(e[j].value);}}
|
||||||
|
else
|
||||||
|
{code+=(code?'&':'')+
|
||||||
|
e.name+'='+encodeURIComponent(e.value);}}
|
||||||
|
if(typeof extra_values=='object')
|
||||||
|
for(var key in extra_values)
|
||||||
|
code+=(code?'&':'')+
|
||||||
|
key+'='+encodeURIComponent(extra_values[key]);return((form.method=='get')?this.get(form.getAttribute('action'),code,callback):this.post(form.getAttribute('action'),code,callback));}
|
||||||
|
this._encode=function(obj)
|
||||||
|
{obj=obj?obj:{};obj['_']=Math.random();if(typeof obj=='object')
|
||||||
|
{var code='';var self=this;for(var k in obj)
|
||||||
|
code+=(code?'&':'')+
|
||||||
|
k+'='+encodeURIComponent(obj[k]);return code;}
|
||||||
|
return obj;}}
|
||||||
|
XHR.get=function(url,data,callback)
|
||||||
|
{(new XHR()).get(url,data,callback);}
|
||||||
|
XHR.poll=function(interval,url,data,callback)
|
||||||
|
{if(isNaN(interval)||interval<1)
|
||||||
|
interval=5;if(!XHR._q)
|
||||||
|
{XHR._t=0;XHR._q=[];XHR._r=function(){for(var i=0,e=XHR._q[0];i<XHR._q.length;e=XHR._q[++i])
|
||||||
|
{if(!(XHR._t%e.interval)&&!e.xhr.busy())
|
||||||
|
e.xhr.get(e.url,e.data,e.callback);}
|
||||||
|
XHR._t++;};}
|
||||||
|
XHR._q.push({interval:interval,callback:callback,url:url,data:data,xhr:new XHR()});XHR.run();}
|
||||||
|
XHR.halt=function()
|
||||||
|
{if(XHR._i)
|
||||||
|
{try{document.getElementById('xhr_poll_status').style.display='';document.getElementById('xhr_poll_status_on').style.display='none';document.getElementById('xhr_poll_status_off').style.display='';document.getElementById('notice_status').style.marginRight='30px'}catch(e){}
|
||||||
|
window.clearInterval(XHR._i);XHR._i=null;}}
|
||||||
|
XHR.run=function()
|
||||||
|
{if(XHR._r&&!XHR._i)
|
||||||
|
{try{document.getElementById('xhr_poll_status').style.display='';document.getElementById('xhr_poll_status_on').style.display='';document.getElementById('xhr_poll_status_off').style.display='none';document.getElementById('notice_status').style.marginRight='30px'}catch(e){}
|
||||||
|
XHR._r();XHR._i=window.setInterval(XHR._r,1000);}}
|
||||||
|
XHR.running=function()
|
||||||
|
{return!!(XHR._r&&XHR._i);};(function($){function settingsStatusRealtimeOverflow(){if(self.location.pathname.includes("status/realtime")){const nodeStatusRealtime=$('.node-status-realtime');const selectorValues=['bandwidth','wifirate','wireless'];for(let i=0;i<selectorValues.length;i++){const value=selectorValues[i];const target=nodeStatusRealtime.find(`embed[src="/luci-static/resources/${value}.svg"] + div + br + table`);if(target.length){target.wrap('<div style="overflow-x: auto;"></div>');}}}}
|
||||||
|
$(document).ready(()=>{settingsStatusRealtimeOverflow();});})(jQuery);
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,68 +0,0 @@
|
||||||
XHR=function()
|
|
||||||
{this.reinit=function()
|
|
||||||
{if(window.XMLHttpRequest){this._xmlHttp=new XMLHttpRequest();}
|
|
||||||
else if(window.ActiveXObject){this._xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
|
|
||||||
else{alert("xhr.js: XMLHttpRequest is not supported by this browser!");}}
|
|
||||||
this.busy=function(){if(!this._xmlHttp)
|
|
||||||
return false;switch(this._xmlHttp.readyState)
|
|
||||||
{case 1:case 2:case 3:return true;default:return false;}}
|
|
||||||
this.abort=function(){if(this.busy())
|
|
||||||
this._xmlHttp.abort();}
|
|
||||||
this.get=function(url,data,callback)
|
|
||||||
{this.reinit();var xhr=this._xmlHttp;var code=this._encode(data);url=location.protocol+'//'+location.host+url;if(code)
|
|
||||||
if(url.substr(url.length-1,1)=='&')
|
|
||||||
url+=code;else
|
|
||||||
url+='?'+code;xhr.open('GET',url,true);xhr.onreadystatechange=function()
|
|
||||||
{if(xhr.readyState==4){var json=null;if(xhr.getResponseHeader("Content-Type")=="application/json"){try{json=eval('('+xhr.responseText+')');}
|
|
||||||
catch(e){json=null;}}
|
|
||||||
callback(xhr,json);}}
|
|
||||||
xhr.send(null);}
|
|
||||||
this.post=function(url,data,callback)
|
|
||||||
{this.reinit();var xhr=this._xmlHttp;var code=this._encode(data);xhr.onreadystatechange=function()
|
|
||||||
{if(xhr.readyState==4)
|
|
||||||
callback(xhr);}
|
|
||||||
xhr.open('POST',url,true);xhr.setRequestHeader('Content-type','application/x-www-form-urlencoded');xhr.send(code);}
|
|
||||||
this.cancel=function()
|
|
||||||
{this._xmlHttp.onreadystatechange=function(){};this._xmlHttp.abort();}
|
|
||||||
this.send_form=function(form,callback,extra_values)
|
|
||||||
{var code='';for(var i=0;i<form.elements.length;i++)
|
|
||||||
{var e=form.elements[i];if(e.options)
|
|
||||||
{code+=(code?'&':'')+
|
|
||||||
form.elements[i].name+'='+encodeURIComponent(e.options[e.selectedIndex].value);}
|
|
||||||
else if(e.length)
|
|
||||||
{for(var j=0;j<e.length;j++)
|
|
||||||
if(e[j].name){code+=(code?'&':'')+
|
|
||||||
e[j].name+'='+encodeURIComponent(e[j].value);}}
|
|
||||||
else
|
|
||||||
{code+=(code?'&':'')+
|
|
||||||
e.name+'='+encodeURIComponent(e.value);}}
|
|
||||||
if(typeof extra_values=='object')
|
|
||||||
for(var key in extra_values)
|
|
||||||
code+=(code?'&':'')+
|
|
||||||
key+'='+encodeURIComponent(extra_values[key]);return((form.method=='get')?this.get(form.getAttribute('action'),code,callback):this.post(form.getAttribute('action'),code,callback));}
|
|
||||||
this._encode=function(obj)
|
|
||||||
{obj=obj?obj:{};obj['_']=Math.random();if(typeof obj=='object')
|
|
||||||
{var code='';var self=this;for(var k in obj)
|
|
||||||
code+=(code?'&':'')+
|
|
||||||
k+'='+encodeURIComponent(obj[k]);return code;}
|
|
||||||
return obj;}}
|
|
||||||
XHR.get=function(url,data,callback)
|
|
||||||
{(new XHR()).get(url,data,callback);}
|
|
||||||
XHR.poll=function(interval,url,data,callback)
|
|
||||||
{if(isNaN(interval)||interval<1)
|
|
||||||
interval=5;if(!XHR._q)
|
|
||||||
{XHR._t=0;XHR._q=[];XHR._r=function(){for(var i=0,e=XHR._q[0];i<XHR._q.length;e=XHR._q[++i])
|
|
||||||
{if(!(XHR._t%e.interval)&&!e.xhr.busy())
|
|
||||||
e.xhr.get(e.url,e.data,e.callback);}
|
|
||||||
XHR._t++;};}
|
|
||||||
XHR._q.push({interval:interval,callback:callback,url:url,data:data,xhr:new XHR()});XHR.run();}
|
|
||||||
XHR.halt=function()
|
|
||||||
{if(XHR._i)
|
|
||||||
{try{document.getElementById('xhr_poll_status').style.display='';document.getElementById('xhr_poll_status_on').style.display='none';document.getElementById('xhr_poll_status_off').style.display='';document.getElementById('notice_status').style.marginRight='30px'}catch(e){}
|
|
||||||
window.clearInterval(XHR._i);XHR._i=null;}}
|
|
||||||
XHR.run=function()
|
|
||||||
{if(XHR._r&&!XHR._i)
|
|
||||||
{try{document.getElementById('xhr_poll_status').style.display='';document.getElementById('xhr_poll_status_on').style.display='';document.getElementById('xhr_poll_status_off').style.display='none';document.getElementById('notice_status').style.marginRight='30px'}catch(e){}
|
|
||||||
XHR._r();XHR._i=window.setInterval(XHR._r,1000);}}
|
|
||||||
XHR.running=function()
|
|
||||||
{return!!(XHR._r&&XHR._i);}
|
|
|
@ -161,18 +161,8 @@
|
||||||
<%-= css %>
|
<%-= css %>
|
||||||
</style>
|
</style>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<script src="<%=media%>/js/xhr.js?v=<%= ver.luciversion %>"></script>
|
|
||||||
<script src="<%=media%>/js/jquery.min.js?v=<%= ver.luciversion %>"></script>
|
<script src="<%=media%>/js/jquery.min.js?v=<%= ver.luciversion %>"></script>
|
||||||
<script src="<%=media%>/js/design.js?v=<%= ver.luciversion %>" async></script>
|
<script src="<%=media%>/js/design.js?v=<%= ver.luciversion %>"></script>
|
||||||
<style title="text/css" id="global-scroll">
|
|
||||||
::-webkit-scrollbar {
|
|
||||||
width: 4px
|
|
||||||
}
|
|
||||||
::-webkit-scrollbar-thumb {
|
|
||||||
background: var(--scrollbarColor) ;
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>"
|
<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>"
|
||||||
|
|
|
@ -27,7 +27,7 @@ PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
PKG_FIXUP:=autoreconf
|
PKG_FIXUP:=autoreconf
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
PKG_USE_MIPS16:=0
|
PKG_BUILD_FLAGS:=no-mips16 lto
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
PKG_BUILD_DEPENDS:=c-ares pcre
|
PKG_BUILD_DEPENDS:=c-ares pcre
|
||||||
|
|
||||||
|
@ -120,7 +120,6 @@ CONFIGURE_ARGS += \
|
||||||
--disable-assert \
|
--disable-assert \
|
||||||
--disable-ssp \
|
--disable-ssp \
|
||||||
|
|
||||||
TARGET_CFLAGS += -flto
|
|
||||||
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
|
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
|
||||||
|
|
||||||
$(eval $(call BuildPackage,shadowsocks-libev-config))
|
$(eval $(call BuildPackage,shadowsocks-libev-config))
|
||||||
|
|
Loading…
Reference in New Issue