mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-06 05:30:05 +00:00
📝 添加 Terminal 一直黑屏解决方案
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>tty#{{.SessionID}} - {{.Title}}</title>
|
||||
<title>tty@{{.ServerName}} - {{.Title}}</title>
|
||||
<link rel="shortcut icon" type="image/png" href="/static/logo.svg?v20210804" />
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/xterm@4.13.0/css/xterm.css">
|
||||
</head>
|
||||
@@ -20,6 +20,10 @@
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: black;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body onresize="onResize()">
|
||||
@@ -44,6 +48,10 @@
|
||||
onResize()
|
||||
}
|
||||
|
||||
socket.onerror = () => {
|
||||
alert('Terminal 连接失败,请检查 /terminal/* 的 WebSocket 反代情况')
|
||||
}
|
||||
|
||||
function onResize() {
|
||||
fitAddon.fit()
|
||||
const w = fitAddon.proposeDimensions();
|
||||
|
||||
Reference in New Issue
Block a user