mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-04 21:53:56 +08:00
Update ssr-plus.patch
This commit is contained in:
1 parent
52bad63809
commit
10d689f85b
1 file changed
+13
-24
@@ -127,10 +127,13 @@
|
|||||||
|
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..a00fff9c79b3
|
index 000000000000..a00fff9c79b3
|
||||||
--- /dev/null
|
@@ -0,0 +1,126 @@
|
||||||
+++ b/luci-app-ssr-plus/luasrc/view/shadowsocksr/status_bottom.htm
|
|
||||||
@@ -0,0 +1,135 @@
|
|
||||||
+<style>
|
+<style>
|
||||||
|
+.pure-1-2 {
|
||||||
|
+ width: 50%;
|
||||||
|
+ display: inline-block;
|
||||||
|
+ letter-spacing: normal;
|
||||||
|
+}
|
||||||
+.pure-img {
|
+.pure-img {
|
||||||
+ max-height: 100%;
|
+ max-height: 100%;
|
||||||
+ width: auto;
|
+ width: auto;
|
||||||
@@ -152,7 +155,7 @@ index 000000000000..a00fff9c79b3
|
|||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+.status-bar .inner {
|
+.status-bar .inner {
|
||||||
+ margin: 0.5em;
|
+ padding: 0.5em;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+.status-bar .inner .flag {
|
+.status-bar .inner .flag {
|
||||||
@@ -171,17 +174,10 @@ index 000000000000..a00fff9c79b3
|
|||||||
+ text-align: right;
|
+ text-align: right;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+.pure-u-1-2 {
|
+#cbi-passwall+.cbi-page-actions.control-group.fixed {
|
||||||
+ width: 49%;
|
+ bottom: 3.3rem;
|
||||||
+ display: inline-block;
|
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+@media screen and (max-width: 720px) {
|
|
||||||
+ .pure-u-1-2 {
|
|
||||||
+ width: 100%;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+@media screen and (max-width: 700px) {
|
+@media screen and (max-width: 700px) {
|
||||||
+.status-bar .icon-con {
|
+.status-bar .icon-con {
|
||||||
+ height: 2.5em;
|
+ height: 2.5em;
|
||||||
@@ -191,11 +187,11 @@ index 000000000000..a00fff9c79b3
|
|||||||
+<div class="status-bar">
|
+<div class="status-bar">
|
||||||
+ <div class="inner">
|
+ <div class="inner">
|
||||||
+ <div class="pure-g">
|
+ <div class="pure-g">
|
||||||
+ <div class="pure-u-1-2">
|
+ <div class="pure-1-2">
|
||||||
+ <span class="flag"><img src="/luci-static/shadowsocksr/flags/loading.svg" class="pure-img"></span> <span
|
+ <span class="flag"><img src="/luci-static/shadowsocksr/flags/loading.svg" class="pure-img"></span> <span
|
||||||
+ class="status-info">获取中...</span>
|
+ class="status-info">获取中...</span>
|
||||||
+ </div>
|
+ </div>
|
||||||
+ <div class="pure-u-1-2">
|
+ <div class="pure-1-2">
|
||||||
+ <div class="icon-con">
|
+ <div class="icon-con">
|
||||||
+ <img src="/luci-static/shadowsocksr/img/site_icon1_01.png" class="pure-img i1">
|
+ <img src="/luci-static/shadowsocksr/img/site_icon1_01.png" class="pure-img i1">
|
||||||
+ <img src="/luci-static/shadowsocksr/img/site_icon1_02.png" class="pure-img i2">
|
+ <img src="/luci-static/shadowsocksr/img/site_icon1_02.png" class="pure-img i2">
|
||||||
@@ -211,13 +207,9 @@ index 000000000000..a00fff9c79b3
|
|||||||
+const _ASSETS = '/luci-static/shadowsocksr/';
|
+const _ASSETS = '/luci-static/shadowsocksr/';
|
||||||
+const CHECK_IP_URL = '<%=url([[admin]], [[services]], [[shadowsocksr]], [[ip]])%>';
|
+const CHECK_IP_URL = '<%=url([[admin]], [[services]], [[shadowsocksr]], [[ip]])%>';
|
||||||
+
|
+
|
||||||
+let mainContent = document.getElementById("maincontent");
|
|
||||||
+let statusBar = document.querySelector(".status-bar");
|
+let statusBar = document.querySelector(".status-bar");
|
||||||
+
|
+
|
||||||
+function resize() {
|
+function resize() {
|
||||||
+ wW = window.innerWidth;
|
|
||||||
+ let lw = document.querySelector(".main-left, :root[data-layout='sidebar'] .fs-sidebar")?.offsetWidth ?? 5;
|
|
||||||
+ 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';
|
||||||
+
|
+
|
||||||
@@ -251,7 +243,7 @@ index 000000000000..a00fff9c79b3
|
|||||||
+ );
|
+ );
|
||||||
+
|
+
|
||||||
+document.addEventListener('DOMContentLoaded', function() {
|
+document.addEventListener('DOMContentLoaded', function() {
|
||||||
+ setTimeout("resize()",100)
|
+ setTimeout("resize()",200)
|
||||||
+ fetch(CHECK_IP_URL)
|
+ fetch(CHECK_IP_URL)
|
||||||
+ .then(response => response.json())
|
+ .then(response => response.json())
|
||||||
+ .then(data => {
|
+ .then(data => {
|
||||||
@@ -261,9 +253,6 @@ index 000000000000..a00fff9c79b3
|
|||||||
+});
|
+});
|
||||||
+
|
+
|
||||||
+window.addEventListener('resize', resize);
|
+window.addEventListener('resize', resize);
|
||||||
+if (mainContent && window.getComputedStyle(mainContent).getPropertyValue("contain")=== "paint") {
|
|
||||||
+document.body.appendChild(statusBar);
|
|
||||||
+}
|
|
||||||
+</script>
|
+</script>
|
||||||
|
|
||||||
--- a/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus
|
--- a/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus
|
||||||
|
|||||||
Reference in new issue
Block a user