🌴 Sync 2026-03-05 23:51:42

This commit is contained in:
github-actions[bot] committed 2026-03-05 23:51:42 +08:00
1 parent 97c049ed0a
commit 0acff03804
14253 files changed
+3893239

No files matched your search

@@ -0,0 +1,5 @@
map $request_method:$query_string $login_request {
default 0;
~^POST:istorenextlogin=1$ 1;
~^GET:istorenextlogin=1$ 2;
}
@@ -0,0 +1,24 @@
if ($login_request = 2) {
return 302 $uri;
}
proxy_intercept_errors on;
uwsgi_intercept_errors on;
error_page 403 /cgi-bin/luci/istorenext-login;
location ~ ^/cgi-bin/luci/istorenext(/|$) {
include uwsgi_params;
uwsgi_param SERVER_ADDR $server_addr;
uwsgi_modifier1 9;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
if ($login_request = 0) {
proxy_pass http://127.0.0.1:8080;
}
if ($login_request = 1) {
uwsgi_pass unix:////var/run/luci-webui.socket;
}
}
@@ -0,0 +1,5 @@
#!/bin/sh
rm -f /tmp/luci-indexcache
/etc/init.d/nginx reload 2>/dev/null
exit 0
@@ -0,0 +1,10 @@
<%
local url=luci.http.getenv("REQUEST_URI")
local prefix="/cgi-bin/luci/istorenext"
if string.sub(url, 1, #prefix) == prefix then
-%>
<%=url%>
<% else
luci.http.redirect(prefix)
end %>
@@ -0,0 +1,185 @@
<%
local util = require "luci.util"
local http = require "luci.http"
local boardinfo = util.ubus("system", "board")
http.prepare_content("text/html; charset=UTF-8")
-%>
<!DOCTYPE html>
<html lang="<%=luci.i18n.context.lang%>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%=striptags( boardinfo.hostname or "?" ) %> - LuCI</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
padding: 20px;
}
.login-container {
background: white;
border-radius: 10px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
width: 100%;
max-width: 400px;
padding: 40px;
}
.login-header {
text-align: center;
margin-bottom: 30px;
}
.login-header h1 {
color: #333;
font-size: 28px;
margin-bottom: 10px;
}
.login-header p {
color: #666;
font-size: 14px;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
color: #333;
font-size: 14px;
font-weight: 500;
margin-bottom: 8px;
}
.form-group input {
width: 100%;
padding: 12px 15px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 14px;
transition: border-color 0.3s;
}
.form-group input:focus {
outline: none;
border-color: #667eea;
}
.login-button {
width: 100%;
padding: 12px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
border-radius: 5px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: transform 0.2s, box-shadow 0.2s;
}
.login-button:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.login-button:active {
transform: translateY(0);
}
.error-message {
background: #fee;
color: #c33;
padding: 10px;
border-radius: 5px;
margin-bottom: 20px;
font-size: 14px;
display: none;
}
.error-message.show {
display: block;
}
</style>
</head>
<body>
<div class="login-container">
<div class="login-header">
<h1><%:Log in%></h1>
<p><%:Welcome back, please enter your credentials%></p>
</div>
<div id="errorMessage" class="error-message"></div>
<form action="?istorenextlogin=1" method="post" id="loginForm">
<div class="form-group">
<label for="username"><%:Username%></label>
<input
type="text"
id="username"
name="luci_username"
required
autocomplete="username"
placeholder="<%:Please enter username%>"
value="root">
</div>
<div class="form-group">
<label for="password"><%:Password%></label>
<input
type="password"
id="password"
name="luci_password"
autocomplete="current-password"
placeholder="<%:Please enter password%>">
</div>
<button type="submit" class="login-button"><%:Log in%></button>
</form>
</div>
<script>
const errorMessage = document.getElementById('errorMessage');
if ("?istorenextlogin=1" == location.search) {
errorMessage.textContent = '<%:Invalid username and/or password! Please try again.%>';
errorMessage.classList.add('show');
}
document.getElementById('loginForm').addEventListener('submit', function(e) {
const username = document.getElementById('username').value.trim();
if (!username) {
e.preventDefault();
errorMessage.textContent = '<%:Please enter username%>';
errorMessage.classList.add('show');
return false;
}
errorMessage.classList.remove('show');
});
const inputs = document.querySelectorAll('input');
inputs.forEach(input => {
input.addEventListener('input', function() {
errorMessage.classList.remove('show');
});
});
</script>
</body>
</html>
@@ -0,0 +1,20 @@
{
"istorenext": {
"order": 0,
"leaf": true,
"action": {
"type": "template",
"path": "istorenext/index"
},
"auth": {
"methods": [ "cookie:sysauth_https", "cookie:sysauth_http" ],
"login": true
}
},
"istorenext-login": {
"action": {
"type": "template",
"path": "istorenext/login"
}
}
}