update 2023-03-18 23:35:15
This commit is contained in:
parent
14f6313e08
commit
949d7aa4ab
|
@ -14,7 +14,7 @@ start_service() {
|
|||
config_get_bool enabled config enabled
|
||||
config_get WORK_DIR config workdir
|
||||
|
||||
[ "$enabled" -eq "1" ] || return 1
|
||||
[ "$enabled" -eq "1" ] || exit 2
|
||||
[ -d "$WORK_DIR" ] || mkdir -m 0755 -p "$WORK_DIR"
|
||||
|
||||
procd_open_instance
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
<div align="center">
|
||||
</a><a href="https://github.com/gngpp/luci-app-design-config/releases">
|
||||
<img src="https://img.shields.io/github/release/gngpp/luci-app-design-config.svg?style=flat">
|
||||
</a><a href="hhttps://github.com/gngpp/luci-app-design-config/releases">
|
||||
<img src="https://img.shields.io/github/downloads/gngpp/luci-app-design-config/total?style=flat">
|
||||
</a>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
# luci-app-design-config
|
||||
Design Theme Config Plugin
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
LUCI_TITLE:=Design Theme
|
||||
LUCI_DEPENDS:=
|
||||
PKG_VERSION:=5.5.0
|
||||
PKG_RELEASE:=20230317
|
||||
PKG_VERSION:=5.5.1
|
||||
PKG_RELEASE:=20230318
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
|
|
@ -2416,7 +2416,6 @@ header > .container > .pull-right > * {
|
|||
border-radius: 10px;
|
||||
z-index: 10;
|
||||
top: 22px;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
#refresh_on, #refresh_off {
|
||||
|
@ -3347,4 +3346,7 @@ form[action="/cgi-bin/luci/admin/network/wireless_join"] input[class="cbi-button
|
|||
.node-services-watchcat-plus select[id*="cbi.opt.watchcat"] {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/* fix node-nas-fileassistant table overflow style */
|
||||
.node-nas-fileassistant #list-content {
|
||||
overflow: auto;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,241 @@
|
|||
/*
|
||||
* 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
|
@ -0,0 +1,68 @@
|
|||
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,7 +161,7 @@
|
|||
<%-= css %>
|
||||
</style>
|
||||
<% end -%>
|
||||
<script src="<%=resource%>/xhr.js?<%= ver.luciversion %>"></script>
|
||||
<script src="<%=media%>/js/xhr.js?v=<%= ver.luciversion %>"></script>
|
||||
<style title="text/css" id="global-scroll">
|
||||
::-webkit-scrollbar {
|
||||
width: 4px
|
||||
|
@ -180,16 +180,16 @@
|
|||
>
|
||||
|
||||
<header>
|
||||
|
||||
<script>
|
||||
<% if mode == 'normal' then %>
|
||||
<script>
|
||||
function setTheme() {
|
||||
let color_scheme = window.matchMedia('(prefers-color-scheme: dark)');
|
||||
document.body.setAttribute('data-theme', color_scheme.matches? 'dark' : 'light');
|
||||
window.matchMedia && color_scheme.addEventListener('change', (event) => {
|
||||
document.body.setAttribute('data-theme', event.matches? 'dark' : 'light');
|
||||
})
|
||||
<% end -%>
|
||||
document.body.setAttribute('data-theme', color_scheme.matches && 'dark');
|
||||
}
|
||||
setTheme();
|
||||
window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', setTheme);
|
||||
</script>
|
||||
<% end -%>
|
||||
|
||||
<% if navbar == 'display' then %>
|
||||
<style>
|
||||
|
@ -235,34 +235,12 @@
|
|||
end
|
||||
%>
|
||||
<% if ucichanges > 0 then %>
|
||||
<a class="label notice" style="margin-right: 30px;" href="<%=url(category, 'uci/changes')%>?redir=<%=http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/"))%>"><%=translate('Unsaved Changes')%>: <%=ucichanges%></a>
|
||||
<a id="notice_status" class="label notice" href="<%=url(category, 'uci/changes')%>?redir=<%=http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/"))%>"><%=translate('Unsaved Changes')%>: <%=ucichanges%></a>
|
||||
<% end %>
|
||||
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
|
||||
<span class="label success" id="xhr_poll_status_on"><span id="refresh_on" class="mobile-hide"></span></span>
|
||||
<span class="label" id="xhr_poll_status_off" style="display:none"><span id="refresh_off" class="mobile-hide"></span></span>
|
||||
</span>
|
||||
<script>
|
||||
const pollStatus = document.querySelector('#xhr_poll_status');
|
||||
const notice = document.querySelector('.notice');
|
||||
function updateMarginRight() {
|
||||
const style = notice.style; // 缓存样式对象
|
||||
if (pollStatus.style.display === '') {
|
||||
style.setProperty('margin-right', '30px', 'important');
|
||||
} else if (pollStatus.style.display === 'none') {
|
||||
style.setProperty('margin-right', '0', 'important');
|
||||
}
|
||||
}
|
||||
const observer = new MutationObserver(function(mutationsList) {
|
||||
for (let mutation of mutationsList) {
|
||||
if (mutation.type === 'attributes' && mutation.attributeName === 'style') {
|
||||
updateMarginRight();
|
||||
}
|
||||
}
|
||||
});
|
||||
const config = { attributes: true, attributeFilter: ['style'] };
|
||||
observer.observe(pollStatus, config);
|
||||
updateMarginRight();
|
||||
</script>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -21,13 +21,13 @@ define Download/geoip
|
|||
HASH:=30e7bd8478f9ab601b755e46c2a410467640c57fca9926e8ab9e4899e014c862
|
||||
endef
|
||||
|
||||
GEOSITE_VER:=20230317061858
|
||||
GEOSITE_VER:=20230318081709
|
||||
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)
|
||||
define Download/geosite
|
||||
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/
|
||||
URL_FILE:=dlc.dat
|
||||
FILE:=$(GEOSITE_FILE)
|
||||
HASH:=08601238e6137829c4ca4c15340a18d4bbbfd93392afde4a050659649ef1b591
|
||||
HASH:=65fd60cedc440d82456884a85d78ac789664228049927aa8a2fa30788fcc2323
|
||||
endef
|
||||
|
||||
define Package/v2ray-geodata/template
|
||||
|
|
Loading…
Reference in New Issue