mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-26 22:42:51 +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
|
||||
index 000000000000..a00fff9c79b3
|
||||
--- /dev/null
|
||||
+++ b/luci-app-ssr-plus/luasrc/view/shadowsocksr/status_bottom.htm
|
||||
@@ -0,0 +1,135 @@
|
||||
@@ -0,0 +1,126 @@
|
||||
+<style>
|
||||
+.pure-1-2 {
|
||||
+ width: 50%;
|
||||
+ display: inline-block;
|
||||
+ letter-spacing: normal;
|
||||
+}
|
||||
+.pure-img {
|
||||
+ max-height: 100%;
|
||||
+ width: auto;
|
||||
@@ -152,7 +155,7 @@ index 000000000000..a00fff9c79b3
|
||||
+}
|
||||
+
|
||||
+.status-bar .inner {
|
||||
+ margin: 0.5em;
|
||||
+ padding: 0.5em;
|
||||
+}
|
||||
+
|
||||
+.status-bar .inner .flag {
|
||||
@@ -171,17 +174,10 @@ index 000000000000..a00fff9c79b3
|
||||
+ text-align: right;
|
||||
+}
|
||||
+
|
||||
+.pure-u-1-2 {
|
||||
+ width: 49%;
|
||||
+ display: inline-block;
|
||||
+#cbi-passwall+.cbi-page-actions.control-group.fixed {
|
||||
+ bottom: 3.3rem;
|
||||
+}
|
||||
+
|
||||
+@media screen and (max-width: 720px) {
|
||||
+ .pure-u-1-2 {
|
||||
+ width: 100%;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+@media screen and (max-width: 700px) {
|
||||
+.status-bar .icon-con {
|
||||
+ height: 2.5em;
|
||||
@@ -191,11 +187,11 @@ index 000000000000..a00fff9c79b3
|
||||
+<div class="status-bar">
|
||||
+ <div class="inner">
|
||||
+ <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
|
||||
+ class="status-info">获取中...</span>
|
||||
+ </div>
|
||||
+ <div class="pure-u-1-2">
|
||||
+ <div class="pure-1-2">
|
||||
+ <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_02.png" class="pure-img i2">
|
||||
@@ -211,13 +207,9 @@ index 000000000000..a00fff9c79b3
|
||||
+const _ASSETS = '/luci-static/shadowsocksr/';
|
||||
+const CHECK_IP_URL = '<%=url([[admin]], [[services]], [[shadowsocksr]], [[ip]])%>';
|
||||
+
|
||||
+let mainContent = document.getElementById("maincontent");
|
||||
+let statusBar = document.querySelector(".status-bar");
|
||||
+
|
||||
+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");
|
||||
+ flagElement.style.width = (flagElement.offsetHeight / 3 * 4) + 'px';
|
||||
+
|
||||
@@ -251,7 +243,7 @@ index 000000000000..a00fff9c79b3
|
||||
+ );
|
||||
+
|
||||
+document.addEventListener('DOMContentLoaded', function() {
|
||||
+ setTimeout("resize()",100)
|
||||
+ setTimeout("resize()",200)
|
||||
+ fetch(CHECK_IP_URL)
|
||||
+ .then(response => response.json())
|
||||
+ .then(data => {
|
||||
@@ -261,9 +253,6 @@ index 000000000000..a00fff9c79b3
|
||||
+});
|
||||
+
|
||||
+window.addEventListener('resize', resize);
|
||||
+if (mainContent && window.getComputedStyle(mainContent).getPropertyValue("contain")=== "paint") {
|
||||
+document.body.appendChild(statusBar);
|
||||
+}
|
||||
+</script>
|
||||
|
||||
--- a/luci-app-ssr-plus/root/etc/uci-defaults/luci-ssr-plus
|
||||
|
||||
Reference in new issue
Block a user