diff --git a/app.py b/app.py index dc4c341..0fbe912 100644 --- a/app.py +++ b/app.py @@ -1,4 +1,8 @@ +<<<<<<< HEAD #!/usr/bin/python3 +======= +#!/usr/bi/python3 +>>>>>>> 079d2a0 (terminal intigration) from flask import * from main import launchserver import libtmux @@ -34,6 +38,7 @@ def getlpane() -> libtmux.Pane: @app.route("/term", methods=["GET", "POST"]) def get_terminal_output(): if request.method == "POST": +<<<<<<< HEAD data = request.data.decode() print(data) @@ -47,6 +52,21 @@ def get_terminal_output(): getlpane().send_keys("exit") return ["sucessful"] +======= + data = request.get_json()#json.loads(request.data.decode()) + print(data,type(data)) + content = data["content"] + if content[0] == "command": + if content[1] == "start" and getlpane().pane_current_command == "bash": + launchserver(getlpane()) + + elif content[1] == "stop" and getlpane().pane_current_command == "mono": + getlpane().send_keys("\nexit") + elif content[1] == "terminal-command" and getlpane().pane_current_command == "mono": + getlpane().send_keys(content[2]) + + return ["sucessful"] +>>>>>>> 079d2a0 (terminal intigration) elif request.method == "GET": term = get_term() if term[1] == "mono": diff --git a/main.py b/main.py index 01493c6..7c26969 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,8 @@ +<<<<<<< HEAD #!/usr/bin/python3 +======= +#!/usr/bi/python3 +>>>>>>> 079d2a0 (terminal intigration) import libtmux import settings import libtmux.constants diff --git a/settings.py b/settings.py index ff4b901..d327cb2 100644 --- a/settings.py +++ b/settings.py @@ -1,4 +1,8 @@ +<<<<<<< HEAD #!/usr/bin/python3 +======= +#!/usr/bi/python3 +>>>>>>> 079d2a0 (terminal intigration) from os import path path = ( diff --git a/static/style.css b/static/style.css index 92e01ac..8cd190d 100644 --- a/static/style.css +++ b/static/style.css @@ -1,5 +1,9 @@ a { +<<<<<<< HEAD color: rgb(107, 214, 0); +======= + color: chartreuse; +>>>>>>> 079d2a0 (terminal intigration) } body { @@ -19,7 +23,10 @@ body { padding: 10px; border-radius: 20px; border-style:hidden; +<<<<<<< HEAD margin-bottom: 10px; +======= +>>>>>>> 079d2a0 (terminal intigration) } #buttons { @@ -27,11 +34,17 @@ body { flex-direction: column; padding: 10px; } +<<<<<<< HEAD .input { color: chartreuse; background-color: rgb(0, 0, 0); +======= +input { + color: chartreuse; + background-color: rgba(0, 0, 0, 0.1); +>>>>>>> 079d2a0 (terminal intigration) border-color: chartreuse; padding: 10px; border-style: solid; @@ -39,8 +52,14 @@ body { border-radius: 20px; } +<<<<<<< HEAD #terminal { background-color: #0001002a; +======= + +#terminal { + background-color: rgba(0, 0, 0, 0.1); +>>>>>>> 079d2a0 (terminal intigration) color: chartreuse; border-style: solid; border-color: chartreuse; @@ -48,6 +67,7 @@ body { padding: 15px; font-family: 'Courier New', Courier, monospace; font-size: 16px; +<<<<<<< HEAD width: 100%; height: 100%; overflow-y: auto; @@ -57,4 +77,9 @@ body { #dash { display: flex; height: 100vh; +======= + height: 100%; + overflow-y: auto; + box-shadow: 0 0 10px rgb(0, 255, 0); +>>>>>>> 079d2a0 (terminal intigration) } diff --git a/templates/index.html b/templates/index.html index acbbef5..34bb377 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3,6 +3,7 @@
@@ -48,10 +93,31 @@Reload in _ Seconds
+