From fbcb4a52db6293c0c35005f9fd3945cac6efe079 Mon Sep 17 00:00:00 2001 From: kenzok8 Date: Tue, 28 Jan 2025 20:37:17 +0800 Subject: [PATCH] update 2025-01-28 20:37:17 --- .../nekobox/assets/theme/transparent.css | 174 ++++++------------ luci-app-nekobox/htdocs/nekobox/settings.php | 41 ++++- luci-app-nekobox/htdocs/nekobox/theme.php | 68 ++++--- .../model/cbi/shadowsocksr/client-config.lua | 1 + .../luasrc/view/shadowsocksr/server_list.htm | 21 ++- .../usr/share/shadowsocksr/gen_config.lua | 4 +- 6 files changed, 160 insertions(+), 149 deletions(-) diff --git a/luci-app-nekobox/htdocs/nekobox/assets/theme/transparent.css b/luci-app-nekobox/htdocs/nekobox/assets/theme/transparent.css index a48bbc989..0b216eb87 100644 --- a/luci-app-nekobox/htdocs/nekobox/assets/theme/transparent.css +++ b/luci-app-nekobox/htdocs/nekobox/assets/theme/transparent.css @@ -3,7 +3,7 @@ @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700&family=Noto+Serif+SC:wght@400;700&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Roboto:wght@400;700&family=Cinzel+Decorative:wght@700;900&display=swap'); - [data-bs-theme=transparent] { + [data-bs-theme='transparent'] { color-scheme: dark; --bs-primary: #0ceda2; --bs-secondary: #00ffff; @@ -17,6 +17,10 @@ --bs-btn-warning-bg: #ffc107; --bs-btn-pink-bg: #f82af2; --bs-btn-danger-bg: #dc3545; + --bs-controlr-bg: #0eaf3e; + --bs-check-bg: #0eaf3e; + --bs-label-bg: #0eaf3e; + --bs-line-bg: #f515f9; --bs-primary-border-subtle: #1815d1; --bs-tertiary: #46e1ec; @@ -37,118 +41,12 @@ --bs-heading-letter-spacing: 0.05em; --bs-heading-text-transform: uppercase; - --bs-shadow-light: 0 4px 8px rgba(255, 0, 124, 0.4); - --bs-shadow-medium: 0 8px 16px rgba(0, 255, 133, 0.3); - --bs-shadow-heavy: 0 12px 24px rgba(125, 95, 255, 0.5); - --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-disabled-color: #fff; --bs-body-font-family: 'Avant Garde', Avantgarde, 'Century Gothic', CenturyGothic, AppleGothic, sans-serif; } - #snow-container { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - pointer-events: none; - z-index: 9999; - display: block; - } - - .snowflake { - position: absolute; - top: -10px; - width: 10px; - height: 10px; - background-color: white; - border-radius: 50%; - animation: fall linear infinite; - } - - @keyframes fall { - 0% { - transform: translateY(0) rotate(0deg); - } - 100% { - transform: translateY(100vh) rotate(360deg); - } - } - - .snowflake:nth-child(1) { - animation-duration: 8s; - animation-delay: -2s; - left: 10%; - width: 12px; - height: 12px; - } - - .snowflake:nth-child(2) { - animation-duration: 10s; - animation-delay: -3s; - left: 20%; - width: 8px; - height: 8px; - } - - .snowflake:nth-child(3) { - animation-duration: 12s; - animation-delay: -1s; - left: 30%; - width: 15px; - height: 15px; - } - - .snowflake:nth-child(4) { - animation-duration: 9s; - animation-delay: -5s; - left: 40%; - width: 10px; - height: 10px; - } - - .snowflake:nth-child(5) { - animation-duration: 11s; - animation-delay: -4s; - left: 50%; - width: 14px; - height: 14px; - } - - .snowflake:nth-child(6) { - animation-duration: 7s; - animation-delay: -6s; - left: 60%; - width: 9px; - height: 9px; - } - - .snowflake:nth-child(7) { - animation-duration: 8s; - animation-delay: -7s; - left: 70%; - width: 11px; - height: 11px; - } - - .snowflake:nth-child(8) { - animation-duration: 10s; - animation-delay: -8s; - left: 80%; - width: 13px; - height: 13px; - } - - .snowflake:nth-child(9) { - animation-duration: 6s; - animation-delay: -9s; - left: 90%; - width: 10px; - height: 10px; - } - body { background-color: var(--bs-body-bg); @@ -179,13 +77,37 @@ } #lineColumnDisplay, #charCountDisplay { - color: white !important; + color: var(--bs-line-bg) !important; } label[for="newPath"], label[for="permissions"], .form-text { color: white !important; } + .form-label { + color: var(--bs-check-bg) + } + + .form-check-label { + color: var(--bs-check-bg) + } + + label { + color: var(--bs-label-bg) + } + + .form-control { + color: var(--bs-controlr-bg) + } + + form .form-control { + color: var(--bs-controlr-bg) !important; + } + + .card .card-body pre { + color: var(--log-text-color) !important; + } + .close { color: white !important; } @@ -200,12 +122,6 @@ color: #FF00FF; } - #plugin_log, - #bin_logs, - #singbox_log { - color: var(--log-text-color); - } - .detail-label { color: #FF00FF !important; } @@ -356,7 +272,7 @@ .container-bg { border-radius: 12px; - box-shadow: var(--bs-shadow-medium); + box-shadow: none; padding: 2rem; margin-top: 2rem; margin-bottom: 2rem; @@ -377,6 +293,34 @@ border: none !important; } + ::-webkit-scrollbar { + width: 8px; + height: 8px; + } + + ::-webkit-scrollbar-thumb { + background: rgba(0, 0, 0, 0.5); + border-radius: 4px; + transition: background 0.3s ease; + } + + ::-webkit-scrollbar-thumb:hover { + background: rgba(0, 0, 0, 0.7); + } + + ::-webkit-scrollbar-track { + background: transparent; + } + + .scrollable-container { + overflow: hidden; + position: relative; + } + + .scrollable-container:hover { + overflow: auto; + } + button, .btn-warning, .btn-info, .card, .modal-content { transition: transform 0.2s ease, box-shadow 0.2s ease; } button:active, .btn-warning:active, .btn-info:active, .card:active, .modal-content:active { transform: translateY(-6px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); } button:hover, .btn-warning:hover, .btn-info:hover, .card:hover, .modal-content:hover { transform: translateY(-6px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); } diff --git a/luci-app-nekobox/htdocs/nekobox/settings.php b/luci-app-nekobox/htdocs/nekobox/settings.php index fc8b2d005..15068443d 100644 --- a/luci-app-nekobox/htdocs/nekobox/settings.php +++ b/luci-app-nekobox/htdocs/nekobox/settings.php @@ -652,7 +652,23 @@ $razordVersion = getRazordVersion();
- + + +
+
+ + +
+
+ + +
+
+ + +
+
+
@@ -724,6 +740,11 @@ $razordVersion = getRazordVersion();
+
+ + +
+
@@ -744,7 +765,7 @@ $razordVersion = getRazordVersion();
- + @@ -948,6 +969,10 @@ function formatSize($size) { document.getElementById('infoBgSubtle').value = '#23407e'; document.getElementById('selectColor').value = '#23407e'; document.getElementById('tertiaryColor').value = '#46e1ec'; + document.getElementById('controlColor').value = '#0eaf3e'; + document.getElementById('checkColor').value = '#0eaf3e'; + document.getElementById('labelColor').value = '#0eaf3e'; + document.getElementById('lineColor').value = '#f515f9'; document.getElementById('tertiaryRgbColor').value = '#1e90ff'; document.getElementById('heading1Color').value = '#21e4f2'; document.getElementById('heading2Color').value = '#65f1fb'; @@ -979,6 +1004,10 @@ function formatSize($size) { bodyColor: document.getElementById('bodyColor').value, tertiaryColor: document.getElementById('tertiaryColor').value, tertiaryRgbColor: document.getElementById('tertiaryRgbColor').value, + controlColor: document.getElementById('controlColor').value, + checkColor: document.getElementById('checkColor').value, + labelColor: document.getElementById('labelColor').value, + lineColor: document.getElementById('lineColor').value, heading1Color: document.getElementById('heading1Color').value, heading2Color: document.getElementById('heading2Color').value, heading3Color: document.getElementById('heading3Color').value, @@ -1022,6 +1051,10 @@ function formatSize($size) { document.getElementById('bodyColor').value = settings.bodyColor; document.getElementById('tertiaryColor').value = settings.tertiaryColor; document.getElementById('tertiaryRgbColor').value = settings.tertiaryRgbColor; + document.getElementById('controlColor').value = settings.controlColor; + document.getElementById('checkColor').value = settings.checkColor; + document.getElementById('labelColor').value = settings.labelColor; + document.getElementById('lineColor').value = settings.lineColor; document.getElementById('heading1Color').value = settings.heading1Color; document.getElementById('heading2Color').value = settings.heading2Color; document.getElementById('heading3Color').value = settings.heading3Color; @@ -1052,6 +1085,10 @@ function formatSize($size) { localStorage.setItem('bodyColor', settings.bodyColor); localStorage.setItem('tertiaryColor', settings.tertiaryColor); localStorage.setItem('tertiaryRgbColor', settings.tertiaryRgbColor); + localStorage.setItem('controlColor', settings.controlColor); + localStorage.setItem('checkColor', settings.checkColor); + localStorage.setItem('labelColor', settings.labelColor); + localStorage.setItem('lineColor', settings.lineColor); localStorage.setItem('heading1Color', settings.heading1Color); localStorage.setItem('heading2Color', settings.heading2Color); localStorage.setItem('heading3Color', settings.heading3Color); diff --git a/luci-app-nekobox/htdocs/nekobox/theme.php b/luci-app-nekobox/htdocs/nekobox/theme.php index de51bb89e..ccc61f307 100644 --- a/luci-app-nekobox/htdocs/nekobox/theme.php +++ b/luci-app-nekobox/htdocs/nekobox/theme.php @@ -24,6 +24,18 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $warningColor = $_POST['warningColor'] ?? '#ffc107'; $pinkColor = $_POST['pinkColor'] ?? '#f82af2'; $dangerColor = $_POST['dangerColor'] ?? '#dc3545'; + $controlColor = $_POST['controlColor'] ?? '#0eaf3e'; + $checkColor = $_POST['checkColor'] ?? '#0eaf3e'; + $labelColor = $_POST['labelColor'] ?? '#0eaf3e'; + $lineColor = $_POST['lineColor'] ?? '#f515f9'; + $themeName = isset($_POST['themeName']) ? $_POST['themeName'] : 'transparent'; + + $themeName = preg_replace('/[^a-zA-Z]/', '', $themeName); + if (empty($themeName)) { + $themeName = 'transparent'; + } + + $themeFileName = $themeName . '.css'; $uploadedImagePath = ''; if (isset($_FILES['imageFile']) && $_FILES['imageFile']['error'] === UPLOAD_ERR_OK) { @@ -43,7 +55,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700&family=Noto+Serif+SC:wght@400;700&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Roboto:wght@400;700&family=Cinzel+Decorative:wght@700;900&display=swap'); - [data-bs-theme=transparent] { + [data-bs-theme='$themeName'] { color-scheme: dark; --bs-primary: $primaryColor; --bs-secondary: $secondaryColor; @@ -57,6 +69,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { --bs-btn-warning-bg: $warningColor; --bs-btn-pink-bg: $pinkColor; --bs-btn-danger-bg: $dangerColor; + --bs-controlr-bg: $controlColor; + --bs-check-bg: $checkColor; + --bs-label-bg: $labelColor; + --bs-line-bg: $lineColor; --bs-primary-border-subtle: $primaryBorderSubtle; --bs-tertiary: $tertiaryColor; @@ -77,10 +93,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { --bs-heading-letter-spacing: 0.05em; --bs-heading-text-transform: uppercase; - --bs-shadow-light: 0 4px 8px rgba(255, 0, 124, 0.4); - --bs-shadow-medium: 0 8px 16px rgba(0, 255, 133, 0.3); - --bs-shadow-heavy: 0 12px 24px rgba(125, 95, 255, 0.5); - --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; @@ -117,7 +129,31 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { } #lineColumnDisplay, #charCountDisplay { - color: white !important; + color: var(--bs-line-bg) !important; + } + + .form-label { + color: var(--bs-check-bg) + } + + .form-check-label { + color: var(--bs-check-bg) + } + + label { + color: var(--bs-label-bg) + } + + .form-control { + color: var(--bs-controlr-bg) + } + + form .form-control { + color: var(--bs-controlr-bg) !important; + } + + .card .card-body pre { + color: var(--log-text-color) !important; } .close { @@ -134,12 +170,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { color: #FF00FF; } - #plugin_log, - #bin_logs, - #singbox_log { - color: var(--log-text-color); - } - .detail-label { color: #FF00FF !important; } @@ -290,7 +320,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { .container-bg { border-radius: 12px; - box-shadow: var(--bs-shadow-medium); + box-shadow: none; padding: 2rem; margin-top: 2rem; margin-bottom: 2rem; @@ -365,7 +395,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { .container-sm.container-bg.callout a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background-color: var(--bs-primary); transform: scaleX(0); transition: transform var(--bs-transition-speed); } .container-sm.container-bg.callout a:hover, .container-sm.container-bg.callout a:focus, .container-sm.container-bg.callout a.active { color: var(--bs-secondary); } .container-sm.container-bg.callout a:hover::after, .container-sm.container-bg.callout a:focus::after, .container-sm.container-bg.callout a.active::after { transform: scaleX(1); } - .royal-style { font-family: 'Cinzel Decorative', cursive; font-weight: 900; font-size: 80px; color: var(--bs-primary); text-shadow: 2px 2px 4px rgba(142, 68, 173, 0.7); letter-spacing: 4px; text-align: center; margin-top: 20px; } + .royal-style { font-family: 'Cinzel Decorative', cursive; font-weight: 900; font-size: 80px; letter-spacing: 4px; text-align: center; margin-top: 20px; } .royal-style:hover { transform: skew(-5deg); } @media (max-width: 991.98px) { .container-sm.container-bg.callout { flex-direction: column; align-items: center; } .container-sm.container-bg.callout a { margin: 0.5rem 0; } } h1 { color: var(--bs-heading-1); font-size: 2.5rem; } @@ -379,7 +409,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { .text-3d:hover { transform: rotateY(15deg) rotateX(15deg); text-shadow: 3px 3px 1px rgba(0, 0, 0, 0.3), 4px 4px 2px rgba(0, 0, 0, 0.25), 5px 5px 3px rgba(0, 0, 0, 0.2); } .card { border-radius: 12px; overflow: hidden; box-shadow: var(--bs-shadow-medium); } .card-header { background-color: var(--bs-primary); color: #fff; } - .royal-style { font-family: 'Cinzel Decorative', cursive; font-weight: 900; font-size: 80px; color: var(--bs-primary); text-shadow: 2px 2px 4px rgba(142, 68, 173, 0.7), 0 0 20px rgba(142, 68, 173, 0.3); letter-spacing: 4px; text-align: center; margin-top: 20px; transition: all var(-- bs-transition-speed); } + .royal-style { font-family: 'Cinzel Decorative', cursive; font-weight: 900; font-size: 80px; letter-spacing: 4px; text-align: center; margin-top: 20px; transition: all var(-- bs-transition-speed); } .royal-style:hover { transform: skew(-5deg); text-shadow: 3px 3px 6px rgba(0,0,0,0.2); } @media (max-width: 991.98px) { .container-sm.container-bg.callout { @@ -467,10 +497,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { font-family: 'Cinzel Decorative', cursive; font-weight: 900; font-size: 80px; - color: var(--bs-primary); - text-shadow: - 2px 2px 4px rgba(142, 68, 173, 0.7), - 0 0 20px rgba(142, 68, 173, 0.3); letter-spacing: 4px; text-align: center; margin-top: 20px; @@ -577,10 +603,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { } "; - $filePath = $_SERVER['DOCUMENT_ROOT'] . '/nekobox/assets/theme/transparent.css'; + $filePath = $_SERVER['DOCUMENT_ROOT'] . '/nekobox/assets/theme/' . $themeFileName; file_put_contents($filePath, $cssContent); echo ""; } else { diff --git a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua index 3db565373..f51e11adc 100644 --- a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua +++ b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua @@ -1076,6 +1076,7 @@ o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "splithttp"}) o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "h2"}) o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "quic"}) o:depends({type = "v2ray", v2ray_protocol = "vless", transport = "grpc"}) +o:depends({type = "v2ray", v2ray_protocol = "vmess"}) o:depends({type = "v2ray", v2ray_protocol = "trojan"}) o:depends({type = "v2ray", v2ray_protocol = "shadowsocks"}) o:depends({type = "v2ray", v2ray_protocol = "socks"}) diff --git a/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_list.htm b/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_list.htm index d0b77f10f..f9befe53f 100644 --- a/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_list.htm +++ b/luci-app-ssr-plus/luasrc/view/shadowsocksr/server_list.htm @@ -4,7 +4,7 @@ -%> diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua index 375a4eac3..dfb318a3d 100755 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua @@ -310,7 +310,7 @@ end } or nil, sockopt = { mark = 250, - tcpFastOpen = (server.tcpfastOpen == "1") and true or false, -- XHTTP Tcp Fast Open + tcpFastOpen = ((server.transport == "xhttp" and server.tcpfastopen == "1") and true or false) or (server.transport ~= "xhttp") and nil, -- XHTTP Tcp Fast Open tcpMptcp = (server.mptcp == "1") and true or nil, -- MPTCP Penetrate = (server.mptcp == "1") and true or nil, -- Penetrate MPTCP tcpcongestion = server.custom_tcpcongestion, -- 连接服务器节点的 TCP 拥塞控制算法 @@ -350,7 +350,7 @@ if xray_fragment.fragment ~= "0" or (xray_fragment.noise ~= "0" and xray_noise.e streamSettings = { sockopt = { mark = 250, - tcpFastOpen = (server.tcpfastOpen == "1") and true or false, -- XHTTP Tcp Fast Open + tcpFastOpen = ((server.transport == "xhttp" and server.tcpfastopen == "1") and true or false) or (server.transport ~= "xhttp") and nil, -- XHTTP Tcp Fast Open tcpMptcp = (server.mptcp == "1") and true or nil, -- MPTCP Penetrate = (server.mptcp == "1") and true or nil, -- Penetrate MPTCP tcpcongestion = server.custom_tcpcongestion -- 连接服务器节点的 TCP 拥塞控制算法