Build [v1.9.11] (The Convergence: Manual Login & Runtime Discovery)
This commit is contained in:
@@ -1 +1 @@
|
|||||||
{"version": "1.9.9", "last_build": "2026-04-13-2157", "codename": "DirectAccess", "commit": "a2f6cab4"}
|
{"version": "1.9.10", "last_build": "2026-04-13-2207", "codename": "AccessRecovery", "commit": "bdf6d605"}
|
||||||
|
|||||||
@@ -88,11 +88,13 @@ export default function LoginPage() {
|
|||||||
<User size={32} />
|
<User size={32} />
|
||||||
</div>
|
</div>
|
||||||
<h2 className="text-2xl font-black text-white tracking-tight">Identity Check</h2>
|
<h2 className="text-2xl font-black text-white tracking-tight">Identity Check</h2>
|
||||||
<p className="text-slate-500 text-sm">Select operator profile or use enterprise login</p>
|
<p className="text-slate-500 text-sm">Select operator profile or use direct login</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid gap-3">
|
<div className="grid gap-3">
|
||||||
{!selectedUserForLogin && !isEnterprise ? (
|
{!selectedUserForLogin && !isEnterprise ? (
|
||||||
|
<>
|
||||||
|
{users.length > 0 ? (
|
||||||
<>
|
<>
|
||||||
{users.map(user => (
|
{users.map(user => (
|
||||||
<button
|
<button
|
||||||
@@ -112,13 +114,30 @@ export default function LoginPage() {
|
|||||||
<ChevronRight size={16} className="text-slate-600 group-hover:text-primary transition-colors" />
|
<ChevronRight size={16} className="text-slate-600 group-hover:text-primary transition-colors" />
|
||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
<div className="pt-2">
|
</>
|
||||||
|
) : (
|
||||||
|
<div className="text-center p-4 text-slate-500 text-xs font-bold animate-pulse">
|
||||||
|
Connectivity issues? Use manual login below.
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<div className="pt-2 grid grid-cols-2 gap-3">
|
||||||
<button
|
<button
|
||||||
onClick={() => setIsEnterprise(true)}
|
onClick={() => setIsEnterprise(true)}
|
||||||
className="w-full flex items-center justify-center gap-2 py-4 rounded-2xl border border-dashed border-slate-700 text-slate-500 hover:text-primary hover:border-primary/40 transition-all font-bold text-xs"
|
className="flex items-center justify-center gap-2 py-4 rounded-2xl border border-dashed border-slate-700 text-slate-500 hover:text-white hover:border-slate-500 transition-all font-bold text-[10px]"
|
||||||
>
|
>
|
||||||
<Shield size={14} />
|
<Lock size={12} />
|
||||||
Enterprise Login
|
Enterprise
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
onClick={() => {
|
||||||
|
setSelectedUserForLogin({ username: '' });
|
||||||
|
// We use an empty username object to trigger the manual input view
|
||||||
|
}}
|
||||||
|
className="flex items-center justify-center gap-2 py-4 rounded-2xl border border-primary/20 bg-primary/5 text-primary hover:bg-primary/10 transition-all font-bold text-[10px]"
|
||||||
|
>
|
||||||
|
<User size={12} />
|
||||||
|
Manual Login
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
@@ -180,10 +199,26 @@ export default function LoginPage() {
|
|||||||
</button>
|
</button>
|
||||||
<div>
|
<div>
|
||||||
<p className="text-sm font-bold text-slate-500">Logging in as</p>
|
<p className="text-sm font-bold text-slate-500">Logging in as</p>
|
||||||
<p className="text-white font-black">{selectedUserForLogin.username}</p>
|
<p className="text-white font-black">{selectedUserForLogin.username || "Manual Input"}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{!selectedUserForLogin.username && (
|
||||||
|
<div className="space-y-2">
|
||||||
|
<label className="text-xs font-black text-slate-500 px-1">Username</label>
|
||||||
|
<div className="relative">
|
||||||
|
<User className="absolute left-4 top-1/2 -translate-y-1/2 text-slate-500" size={16} />
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
autoFocus
|
||||||
|
onChange={(e) => setSelectedUserForLogin({...selectedUserForLogin, username: e.target.value})}
|
||||||
|
className="w-full bg-slate-800/50 border border-slate-800 focus:border-primary rounded-2xl py-4 pl-12 pr-4 text-white focus:outline-none transition-all placeholder:text-slate-700 font-mono"
|
||||||
|
placeholder="Admin"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<label className="text-xs font-black text-slate-500 px-1">Password</label>
|
<label className="text-xs font-black text-slate-500 px-1">Password</label>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
@@ -209,9 +244,10 @@ export default function LoginPage() {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{users.length === 0 && (
|
{/* Progress bar hint */}
|
||||||
<div className="text-center p-8 text-slate-500 animate-pulse">
|
{users.length === 0 && !selectedUserForLogin && !isEnterprise && (
|
||||||
Initializing users...
|
<div className="w-full bg-slate-800 h-1 rounded-full overflow-hidden">
|
||||||
|
<div className="bg-primary h-full animate-progress-fast shadow-[0_0_8px_rgba(var(--primary-rgb),0.5)]"></div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,6 +14,17 @@ if [ -d "/app/logs" ]; then
|
|||||||
chown -R nextjs:nodejs /app/logs
|
chown -R nextjs:nodejs /app/logs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Generate network.json for frontend runtime discovery
|
||||||
|
echo "🐳 [Docker] Generating public/network.json..."
|
||||||
|
cat <<EOF > /app/public/network.json
|
||||||
|
{
|
||||||
|
"SERVER_IP": "${SERVER_IP:-localhost}",
|
||||||
|
"BACKEND_PORT": ${BACKEND_PORT:-8000},
|
||||||
|
"BACKEND_SSL_PORT": ${BACKEND_SSL_PORT:-8908}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
chown nextjs:nodejs /app/public/network.json
|
||||||
|
|
||||||
# Hand off to the application server as the nextjs user
|
# Hand off to the application server as the nextjs user
|
||||||
echo "🐳 [Docker] Starting Next.js standalone server as nextjs user..."
|
echo "🐳 [Docker] Starting Next.js standalone server as nextjs user..."
|
||||||
exec su-exec nextjs node server.js
|
exec su-exec nextjs node server.js
|
||||||
|
|||||||
Reference in New Issue
Block a user