diff --git a/luci-app-passwall2/Makefile b/luci-app-passwall2/Makefile index 5fbb34db..1c2eb51e 100644 --- a/luci-app-passwall2/Makefile +++ b/luci-app-passwall2/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall2 PKG_VERSION:=26.8.20 -PKG_RELEASE:=94 +PKG_RELEASE:=95 PKG_PO_VERSION:=$(PKG_VERSION) PKG_CONFIG_DEPENDS:= \ diff --git a/luci-app-passwall2/luasrc/view/passwall2/global/status_bottom.htm b/luci-app-passwall2/luasrc/view/passwall2/global/status_bottom.htm index 92293398..78c3cd3f 100644 --- a/luci-app-passwall2/luasrc/view/passwall2/global/status_bottom.htm +++ b/luci-app-passwall2/luasrc/view/passwall2/global/status_bottom.htm @@ -78,10 +78,13 @@ const _ASSETS = '/luci-static/passwall2/'; const CHECK_IP_URL = '<%=url([[admin]], [[services]], [[passwall2]], [[ip]])%>'; -let statusBar = document.querySelector(".status-bar"); +let mainContent = document.getElementById("maincontent"); function resize() { - statusBar.style.width = document.getElementById("maincontent").offsetWidth + 'px'; + wW = window.innerWidth; + let lw = document.querySelector(".main-left, .fs-sidebar")?.offsetWidth ?? 5; + let statusBar = document.querySelector(".status-bar"); + statusBar.style.width = (wW - lw) + 'px'; let flagElement = statusBar.querySelector(".flag"); flagElement.style.width = (flagElement.offsetHeight / 3 * 4) + 'px'; @@ -123,7 +126,3 @@ document.addEventListener('DOMContentLoaded', function() { }) .catch(error => console.error('Error:', error)); }); - -window.addEventListener('resize', resize); -document.body.appendChild(statusBar); - diff --git a/luci-app-ssr-plus/Makefile b/luci-app-ssr-plus/Makefile index 83b8c4ea..93d80cdc 100644 --- a/luci-app-ssr-plus/Makefile +++ b/luci-app-ssr-plus/Makefile @@ -4,7 +4,7 @@ LUCI_TITLE:=luci-app-ssr-plus LUCI_PKGARCH:=all PKG_NAME:=luci-app-ssr-plus PKG_VERSION:=196 -PKG_RELEASE:=61 +PKG_RELEASE:=62 PKG_CONFIG_DEPENDS:= \ CONFIG_PACKAGE_$(PKG_NAME)_Iptables_Transparent_Proxy \ diff --git a/luci-app-ssr-plus/luasrc/view/shadowsocksr/status_bottom.htm b/luci-app-ssr-plus/luasrc/view/shadowsocksr/status_bottom.htm index 2d62e418..cd56260a 100644 --- a/luci-app-ssr-plus/luasrc/view/shadowsocksr/status_bottom.htm +++ b/luci-app-ssr-plus/luasrc/view/shadowsocksr/status_bottom.htm @@ -78,10 +78,13 @@ const _ASSETS = '/luci-static/shadowsocksr/'; const CHECK_IP_URL = '<%=url([[admin]], [[services]], [[shadowsocksr]], [[ip]])%>'; -let statusBar = document.querySelector(".status-bar"); +let mainContent = document.getElementById("maincontent"); function resize() { - statusBar.style.width = document.getElementById("maincontent").offsetWidth + 'px'; + wW = window.innerWidth; + let lw = document.querySelector(".main-left, .fs-sidebar")?.offsetWidth ?? 5; + let statusBar = document.querySelector(".status-bar"); + statusBar.style.width = (wW - lw) + 'px'; let flagElement = statusBar.querySelector(".flag"); flagElement.style.width = (flagElement.offsetHeight / 3 * 4) + 'px'; @@ -123,7 +126,3 @@ document.addEventListener('DOMContentLoaded', function() { }) .catch(error => console.error('Error:', error)); }); - -window.addEventListener('resize', resize); -document.body.appendChild(statusBar); -