mirror of
https://github.com/PotentiaRobotics/robot-gui.git
synced 2025-04-21 03:10:17 -04:00
Merge branch 'master' of https://github.com/PotentiaRobotics/robot-gui
This commit is contained in:
commit
4ae5626846
13
app.py
13
app.py
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
from flask import Flask, render_template, request
|
from flask import Flask, render_template, request
|
||||||
from flask_assets import Bundle, Environment
|
from flask_assets import Bundle, Environment
|
||||||
|
import jyserver.Flask as jsf
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
@ -11,10 +12,20 @@ css = Bundle("src/main.css", output="dist/main.css")
|
||||||
assets.register("css", css)
|
assets.register("css", css)
|
||||||
css.build()
|
css.build()
|
||||||
|
|
||||||
|
@jsf.use(app)
|
||||||
|
class App:
|
||||||
|
def __init__(self) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def printinput(self):
|
||||||
|
x = self.js.document.getElementById('userInput').value
|
||||||
|
print(x)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def homepage():
|
def homepage():
|
||||||
return render_template("index.html")
|
|
||||||
|
return App.render(render_template("index.html"))
|
||||||
|
|
||||||
@app.route("/base.html", methods =["GET", "POST"])
|
@app.route("/base.html", methods =["GET", "POST"])
|
||||||
def sendData():
|
def sendData():
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
/>
|
/>
|
||||||
<p class="measure">360</p>
|
<p class="measure">360</p>
|
||||||
|
|
||||||
|
|
||||||
<form
|
<form
|
||||||
action='{{ url_for("sendData")}}'
|
action='{{ url_for("sendData")}}'
|
||||||
class="enter-angle"
|
class="enter-angle"
|
||||||
|
@ -43,6 +44,7 @@
|
||||||
/>
|
/>
|
||||||
<input type="submit" value="Enter" />
|
<input type="submit" value="Enter" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<p class="units">Deg</p>
|
<p class="units">Deg</p>
|
||||||
<select name="input" id="unit">
|
<select name="input" id="unit">
|
||||||
<option value="Position">Position</option>
|
<option value="Position">Position</option>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user