mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-01 10:23:56 +08:00
Update luci-app-passwall2.patch
This commit is contained in:
1 parent
653001b87f
commit
20ccaf8368
1 file changed
+8
-3
@@ -128,7 +128,7 @@ new file mode 100644
|
|||||||
index 000000000000..a00fff9c79b3
|
index 000000000000..a00fff9c79b3
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/luci-app-passwall2/luasrc/view/passwall2/global/status_bottom.htm
|
+++ b/luci-app-passwall2/luasrc/view/passwall2/global/status_bottom.htm
|
||||||
@@ -0,0 +1,129 @@
|
@@ -0,0 +1,128 @@
|
||||||
+<style>
|
+<style>
|
||||||
+.pure-img {
|
+.pure-img {
|
||||||
+ max-height: 100%;
|
+ max-height: 100%;
|
||||||
@@ -209,10 +209,13 @@ index 000000000000..a00fff9c79b3
|
|||||||
+const _ASSETS = '/luci-static/passwall2/';
|
+const _ASSETS = '/luci-static/passwall2/';
|
||||||
+const CHECK_IP_URL = '<%=url([[admin]], [[services]], [[passwall2]], [[ip]])%>';
|
+const CHECK_IP_URL = '<%=url([[admin]], [[services]], [[passwall2]], [[ip]])%>';
|
||||||
+
|
+
|
||||||
+let statusBar = document.querySelector(".status-bar");
|
+let mainContent = document.getElementById("maincontent");
|
||||||
+
|
+
|
||||||
+function resize() {
|
+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");
|
+ let flagElement = statusBar.querySelector(".flag");
|
||||||
+ flagElement.style.width = (flagElement.offsetHeight / 3 * 4) + 'px';
|
+ flagElement.style.width = (flagElement.offsetHeight / 3 * 4) + 'px';
|
||||||
+
|
+
|
||||||
@@ -256,5 +259,7 @@ index 000000000000..a00fff9c79b3
|
|||||||
+});
|
+});
|
||||||
+
|
+
|
||||||
+window.addEventListener('resize', resize);
|
+window.addEventListener('resize', resize);
|
||||||
|
+if (mainContent && window.getComputedStyle(mainContent).getPropertyValue("contain")=== "paint") {
|
||||||
+document.body.appendChild(statusBar);
|
+document.body.appendChild(statusBar);
|
||||||
|
+}
|
||||||
+</script>
|
+</script>
|
||||||
Reference in new issue
Block a user