Compare commits
7 Commits
master
..
a8d48ad745
| Author | SHA1 | Date | |
|---|---|---|---|
| a8d48ad745 | |||
| 93bc10a795 | |||
| d3a79ee028 | |||
| e228ec3973 | |||
| 9d5a92a4a2 | |||
| 3c75ea4775 | |||
| 925acb8a40 |
@@ -1,6 +0,0 @@
|
|||||||
ACCESS_MANAGE_API_BASE_URL=http://127.0.0.1:3500/api
|
|
||||||
ROLE_USER_SESSION_COOKIE=role_user_session
|
|
||||||
APP_ENV=production
|
|
||||||
APP_ENV_LABEL=生产环境
|
|
||||||
PORT=3210
|
|
||||||
HOSTNAME=0.0.0.0
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
ACCESS_MANAGE_API_BASE_URL=http://127.0.0.1:3501/api
|
|
||||||
ROLE_USER_SESSION_COOKIE=role_user_session_test
|
|
||||||
APP_ENV=test
|
|
||||||
APP_ENV_LABEL=测试环境
|
|
||||||
PORT=3211
|
|
||||||
HOSTNAME=0.0.0.0
|
|
||||||
@@ -5,8 +5,6 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 3210",
|
"dev": "next dev -p 3210",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"build:test": "next build",
|
|
||||||
"build:prod": "next build",
|
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "eslint",
|
"lint": "eslint",
|
||||||
"typecheck": "tsc --noEmit --incremental false"
|
"typecheck": "tsc --noEmit --incremental false"
|
||||||
|
|||||||
@@ -1029,22 +1029,6 @@ textarea:focus-visible {
|
|||||||
color: var(--accent-ink);
|
color: var(--accent-ink);
|
||||||
}
|
}
|
||||||
|
|
||||||
.environment-badge {
|
|
||||||
background: rgba(20, 20, 24, 0.86);
|
|
||||||
border-radius: 999px;
|
|
||||||
box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
|
|
||||||
color: #ffffff;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 750;
|
|
||||||
letter-spacing: 0;
|
|
||||||
line-height: 1;
|
|
||||||
padding: 8px 10px;
|
|
||||||
position: fixed;
|
|
||||||
right: 12px;
|
|
||||||
top: 12px;
|
|
||||||
z-index: 60;
|
|
||||||
}
|
|
||||||
|
|
||||||
.skeleton {
|
.skeleton {
|
||||||
animation: pulse 1.2s ease-in-out infinite;
|
animation: pulse 1.2s ease-in-out infinite;
|
||||||
background: linear-gradient(90deg, #ececef, #fafafa, #ececef);
|
background: linear-gradient(90deg, #ececef, #fafafa, #ececef);
|
||||||
|
|||||||
+2
-12
@@ -1,5 +1,4 @@
|
|||||||
import type { Metadata, Viewport } from "next";
|
import type { Metadata, Viewport } from "next";
|
||||||
import { connection } from "next/server";
|
|
||||||
|
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
|
|
||||||
@@ -25,19 +24,10 @@ export const viewport: Viewport = {
|
|||||||
themeColor: "#ffffff"
|
themeColor: "#ffffff"
|
||||||
};
|
};
|
||||||
|
|
||||||
export default async function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
|
export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
|
||||||
await connection();
|
|
||||||
|
|
||||||
const environmentLabel = process.env.APP_ENV_LABEL || "生产环境";
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<html lang="zh-CN">
|
<html lang="zh-CN">
|
||||||
<body>
|
<body>{children}</body>
|
||||||
<div className="environment-badge" aria-label={`当前环境:${environmentLabel}`}>
|
|
||||||
{environmentLabel}
|
|
||||||
</div>
|
|
||||||
{children}
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user