Update index.html
This commit is contained in:
parent
72b7ba39ef
commit
3242aa464b
|
@ -1,14 +1,14 @@
|
||||||
{% args settings, patterns %}
|
{% args settings, patterns, mac %}
|
||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>LED Control</title>
|
<title>LED Control</title>
|
||||||
<script src="static/main.js"></script>
|
<script src="static/main.js"></script>
|
||||||
<link rel="stylesheet" href="static/main.css">
|
<link rel="stylesheet" href="static/main.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Control LEDs</h1>
|
<h1>Control LEDs</h1>
|
||||||
<button onclick="selectControls()">Controls</button>
|
<button onclick="selectControls()">Controls</button>
|
||||||
<button onclick="selectSettings()">Settings</button>
|
<button onclick="selectSettings()">Settings</button>
|
||||||
|
@ -24,48 +24,74 @@
|
||||||
</div>
|
</div>
|
||||||
<form id="delay_form" method="post" action="/delay">
|
<form id="delay_form" method="post" action="/delay">
|
||||||
<label for="delay">Delay:</label>
|
<label for="delay">Delay:</label>
|
||||||
<input type="range" id="delay" name="delay" min="1" max="1000" value="{{settings['delay']}}" step="10">
|
<input
|
||||||
|
type="range"
|
||||||
|
id="delay"
|
||||||
|
name="delay"
|
||||||
|
min="1"
|
||||||
|
max="1000"
|
||||||
|
value="{{settings['delay']}}"
|
||||||
|
step="10"
|
||||||
|
/>
|
||||||
</form>
|
</form>
|
||||||
<form id="brightness_form" method="post" action="/brightness">
|
<form id="brightness_form" method="post" action="/brightness">
|
||||||
<label for="brightness">Brightness:</label>
|
<label for="brightness">Brightness:</label>
|
||||||
<input type="range" id="brightness" name="brightness" min="0" max="100" value="{{settings['brightness']}}" step="1">
|
<input
|
||||||
|
type="range"
|
||||||
|
id="brightness"
|
||||||
|
name="brightness"
|
||||||
|
min="0"
|
||||||
|
max="100"
|
||||||
|
value="{{settings['brightness']}}"
|
||||||
|
step="1"
|
||||||
|
/>
|
||||||
</form>
|
</form>
|
||||||
<form id="color_form" method="post" action="/color">
|
<form id="color_form" method="post" action="/color">
|
||||||
<input type="color" id="color" name="color" value="{{settings['color1']}}">
|
<input
|
||||||
|
type="color"
|
||||||
|
id="color"
|
||||||
|
name="color"
|
||||||
|
value="{{settings['color1']}}"
|
||||||
|
/>
|
||||||
</form>
|
</form>
|
||||||
<form id="color2_form" method="post" action="/color2">
|
<form id="color2_form" method="post" action="/color2">
|
||||||
<input type="color" id="color2" name="color2" value="{{settings['color2']}}">
|
<input
|
||||||
|
type="color"
|
||||||
|
id="color2"
|
||||||
|
name="color2"
|
||||||
|
value="{{settings['color2']}}"
|
||||||
|
/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Settings Menu for num_leds, Wi-Fi SSID, and Password -->
|
<!-- Settings Menu for num_leds, Wi-Fi SSID, and Password -->
|
||||||
|
|
||||||
<div id="settings_menu" style="display: none;">
|
<div id="settings_menu" style="display: none">
|
||||||
<h2>Settings</h2>
|
<h2>Settings</h2>
|
||||||
|
|
||||||
|
<form id="name_form" method="post" action="/name">
|
||||||
|
<label for="name">Name:</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
id="name"
|
||||||
|
name="num_leds"
|
||||||
|
value="{{settings['name']}}"
|
||||||
|
/>
|
||||||
|
<input type="submit" value="Update Name" />
|
||||||
|
</form>
|
||||||
<!-- Separate form for submitting num_leds -->
|
<!-- Separate form for submitting num_leds -->
|
||||||
<form id="num_leds_form" method="post" action="/num_leds">
|
<form id="num_leds_form" method="post" action="/num_leds">
|
||||||
<label for="num_leds">Number of LEDs:</label>
|
<label for="num_leds">Number of LEDs:</label>
|
||||||
<input type="text" id="num_leds" name="num_leds" value="{{settings['num_leds']}}">
|
<input
|
||||||
<input type="submit" value="Update Number of LEDs">
|
type="text"
|
||||||
</form>
|
id="num_leds"
|
||||||
|
name="num_leds"
|
||||||
<!-- Form for Wi-Fi SSID and password -->
|
value="{{settings['num_leds']}}"
|
||||||
<form id="wifi_form" method="post" action="/wifi_settings">
|
/>
|
||||||
<label for="ssid">Wi-Fi SSID:</label>
|
<input type="submit" value="Update Number of LEDs" />
|
||||||
<input type="text" id="ssid" name="ssid" value="{{settings['wifi']['ssid']}}">
|
|
||||||
<br>
|
|
||||||
<label for="password">Wi-Fi Password:</label>
|
|
||||||
<input type="password" id="password" name="password">
|
|
||||||
<br>
|
|
||||||
<label for="ip">Wi-Fi IP:</label>
|
|
||||||
<input type="ip" id="ip" name="ip" value="{{settings.get('wifi', {}).get('ip', '')}}">
|
|
||||||
<br>
|
|
||||||
<label for="gateway">Wi-Fi Gateway:</label>
|
|
||||||
<input type="gateway" id="gateway" name="gateway" value="{{settings.get('wifi', {}).get('gateway', '')}}">
|
|
||||||
<br>
|
|
||||||
<input type="submit" value="Save Wi-Fi Settings">
|
|
||||||
</form>
|
</form>
|
||||||
|
<p>Mac address: {{mac}}</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
<div id="connection-status"></div>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue