css decide
This commit is contained in:
@@ -13,25 +13,6 @@ terminal_bp = Blueprint('terminal', __name__, url_prefix='/vsc-like')
|
|||||||
# 存储终端进程
|
# 存储终端进程
|
||||||
terminals = {}
|
terminals = {}
|
||||||
|
|
||||||
def start_terminal_process(socket_id):
|
|
||||||
# 启动一个 bash 终端
|
|
||||||
process = subprocess.Popen(
|
|
||||||
['bash'],
|
|
||||||
stdin=subprocess.PIPE,
|
|
||||||
stdout=subprocess.PIPE,
|
|
||||||
stderr=subprocess.PIPE,
|
|
||||||
text=True
|
|
||||||
)
|
|
||||||
|
|
||||||
# 监听进程的输出
|
|
||||||
while True:
|
|
||||||
output = process.stdout.readline()
|
|
||||||
if output:
|
|
||||||
emit('terminal_output', {'data': output}, room=socket_id)
|
|
||||||
if process.poll() is not None:
|
|
||||||
break
|
|
||||||
|
|
||||||
|
|
||||||
def start_terminal_process(socket_id):
|
def start_terminal_process(socket_id):
|
||||||
"""
|
"""
|
||||||
监听多个子进程的输出,并通过 WebSocket 发给前端
|
监听多个子进程的输出,并通过 WebSocket 发给前端
|
||||||
|
|||||||
@@ -19,9 +19,8 @@ body {
|
|||||||
/* 文件树区域(左侧) */
|
/* 文件树区域(左侧) */
|
||||||
#fileTree {
|
#fileTree {
|
||||||
width: 20%; /* 固定宽度为 20% */
|
width: 20%; /* 固定宽度为 20% */
|
||||||
height: 100%;
|
height: 100vh;
|
||||||
border-right: 1px solid #ddd;
|
border-right: 1px solid #ddd;
|
||||||
padding: 10px;
|
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
background-color: #f0f0f0; /* 背景颜色可调整 */
|
background-color: #f0f0f0; /* 背景颜色可调整 */
|
||||||
}
|
}
|
||||||
@@ -35,7 +34,6 @@ body {
|
|||||||
|
|
||||||
/* 编辑器部分 */
|
/* 编辑器部分 */
|
||||||
#editorContainer {
|
#editorContainer {
|
||||||
flex-grow: 3; /* 编辑器占据大部分空间,3:1 */
|
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
background-color: #f5f5f5; /* 可以调整编辑器背景颜色 */
|
background-color: #f5f5f5; /* 可以调整编辑器背景颜色 */
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|||||||
Reference in New Issue
Block a user