Spaces:
Paused
Paused
Update templates/index.html
Browse files- templates/index.html +51 -4
templates/index.html
CHANGED
|
@@ -8,23 +8,68 @@
|
|
| 8 |
<style>
|
| 9 |
body {
|
| 10 |
font-family: Arial, sans-serif;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
}
|
| 12 |
h1 {
|
| 13 |
-
color: #
|
|
|
|
|
|
|
| 14 |
}
|
| 15 |
#output {
|
| 16 |
-
border: 1px solid #
|
| 17 |
padding: 10px;
|
| 18 |
height: 200px;
|
| 19 |
overflow-y: scroll;
|
| 20 |
-
background-color: #
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
}
|
| 22 |
</style>
|
| 23 |
</head>
|
| 24 |
<body>
|
| 25 |
<h1>Shell</h1>
|
| 26 |
<div id="output"></div>
|
| 27 |
-
<input id="input" type="text" />
|
| 28 |
<button onclick="sendInput()">Send</button>
|
| 29 |
|
| 30 |
<h1>File Upload</h1>
|
|
@@ -39,6 +84,8 @@
|
|
| 39 |
|
| 40 |
socket.on('output', function(data) {
|
| 41 |
document.getElementById('output').innerHTML += data;
|
|
|
|
|
|
|
| 42 |
});
|
| 43 |
|
| 44 |
function sendInput() {
|
|
|
|
| 8 |
<style>
|
| 9 |
body {
|
| 10 |
font-family: Arial, sans-serif;
|
| 11 |
+
background-color: #2e2e2e;
|
| 12 |
+
color: #ffffff;
|
| 13 |
+
margin: 0;
|
| 14 |
+
padding: 20px;
|
| 15 |
}
|
| 16 |
h1 {
|
| 17 |
+
color: #ffffff;
|
| 18 |
+
border-bottom: 1px solid #444;
|
| 19 |
+
padding-bottom: 10px;
|
| 20 |
}
|
| 21 |
#output {
|
| 22 |
+
border: 1px solid #444;
|
| 23 |
padding: 10px;
|
| 24 |
height: 200px;
|
| 25 |
overflow-y: scroll;
|
| 26 |
+
background-color: #1e1e1e;
|
| 27 |
+
color: #ffffff;
|
| 28 |
+
font-family: 'Courier New', Courier, monospace;
|
| 29 |
+
}
|
| 30 |
+
#input {
|
| 31 |
+
width: calc(100% - 22px);
|
| 32 |
+
padding: 10px;
|
| 33 |
+
margin-top: 10px;
|
| 34 |
+
border: 1px solid #444;
|
| 35 |
+
background-color: #1e1e1e;
|
| 36 |
+
color: #ffffff;
|
| 37 |
+
font-family: 'Courier New', Courier, monospace;
|
| 38 |
+
}
|
| 39 |
+
button {
|
| 40 |
+
padding: 10px 15px;
|
| 41 |
+
background-color: #444;
|
| 42 |
+
color: #ffffff;
|
| 43 |
+
border: none;
|
| 44 |
+
cursor: pointer;
|
| 45 |
+
margin-left: 5px;
|
| 46 |
+
}
|
| 47 |
+
button:hover {
|
| 48 |
+
background-color: #555;
|
| 49 |
+
}
|
| 50 |
+
.dropzone {
|
| 51 |
+
border: 2px dashed #444;
|
| 52 |
+
background-color: #1e1e1e;
|
| 53 |
+
color: #ffffff;
|
| 54 |
+
padding: 20px;
|
| 55 |
+
margin-top: 20px;
|
| 56 |
+
}
|
| 57 |
+
.dropzone .dz-message {
|
| 58 |
+
color: #ffffff;
|
| 59 |
+
}
|
| 60 |
+
a {
|
| 61 |
+
color: #1e90ff;
|
| 62 |
+
text-decoration: none;
|
| 63 |
+
}
|
| 64 |
+
a:hover {
|
| 65 |
+
text-decoration: underline;
|
| 66 |
}
|
| 67 |
</style>
|
| 68 |
</head>
|
| 69 |
<body>
|
| 70 |
<h1>Shell</h1>
|
| 71 |
<div id="output"></div>
|
| 72 |
+
<input id="input" type="text" placeholder="Type your command here..." />
|
| 73 |
<button onclick="sendInput()">Send</button>
|
| 74 |
|
| 75 |
<h1>File Upload</h1>
|
|
|
|
| 84 |
|
| 85 |
socket.on('output', function(data) {
|
| 86 |
document.getElementById('output').innerHTML += data;
|
| 87 |
+
var outputDiv = document.getElementById('output');
|
| 88 |
+
outputDiv.scrollTop = outputDiv.scrollHeight; // 自动滚动到最新输出
|
| 89 |
});
|
| 90 |
|
| 91 |
function sendInput() {
|