mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-09-11 02:44:57 +08:00
Update luci-app-passwall2.patch
This commit is contained in:
@@ -128,7 +128,7 @@ new file mode 100644
|
||||
index 000000000000..a00fff9c79b3
|
||||
--- /dev/null
|
||||
+++ b/luci-app-passwall2/luasrc/view/passwall2/global/status_bottom.htm
|
||||
@@ -0,0 +1,129 @@
|
||||
@@ -0,0 +1,128 @@
|
||||
+<style>
|
||||
+.pure-img {
|
||||
+ max-height: 100%;
|
||||
@@ -209,10 +209,13 @@ index 000000000000..a00fff9c79b3
|
||||
+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';
|
||||
+
|
||||
@@ -256,5 +259,7 @@ index 000000000000..a00fff9c79b3
|
||||
+});
|
||||
+
|
||||
+window.addEventListener('resize', resize);
|
||||
+if (mainContent && window.getComputedStyle(mainContent).getPropertyValue("contain")=== "paint") {
|
||||
+document.body.appendChild(statusBar);
|
||||
+}
|
||||
+</script>
|
||||
|
||||
Reference in New Issue
Block a user