Skip to content

Commit

Permalink
chore: Update style.css to rename resetButton to restartButton
Browse files Browse the repository at this point in the history
  • Loading branch information
melkati committed May 15, 2024
1 parent 2137d8c commit 4642e20
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 123 deletions.
228 changes: 118 additions & 110 deletions data/preferences.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<a href="index.html">Home</a>
<a href="preferences.html" class="active">Preferences</a>
<a href="status.html">Status</a>
<div id="otaLink" style="float: right;">
<a href="ota.html">OTA</a>
</div>
</div>

<div class="content">
Expand Down Expand Up @@ -103,95 +106,95 @@ <h1>CO2 Gadget Preferences</h1>
</label>
</div>
</fieldset>
</div>
</fieldset>
<!-- MQTT Configuration Group -->
<div id="mqttConfig">
<fieldset>
<legend>MQTT Configuration</legend>

<div>
<label for="mqttClientId">MQTT Client ID:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The client ID for the MQTT connection. Must be unique for each
device.</span>
<input type="text" id="mqttClientId" name="mqttClientId" value="">
</label>
</div>
</fieldset>
<!-- MQTT Configuration Group -->
<div id="mqttConfig">
<fieldset>
<legend>MQTT Configuration</legend>

<div>
<label for="mqttClientId">MQTT Client ID:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The client ID for the MQTT connection. Must be unique for each
device.</span>
<input type="text" id="mqttClientId" name="mqttClientId" value="">
</label>
</div>

<div>
<label for="rootTopic">Root Topic:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The root topic for the MQTT connection. All MQTT messages will be
published under this topic.</span>
<input type="text" id="rootTopic" name="rootTopic" value="">
</label>
</div>

<div>
<label for="mqttBroker">MQTT Broker:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The MQTT broker address. Use the IP address or hostname of the
MQTT
broker.</span>
<input type="text" id="mqttBroker" name="mqttBroker" value="">
</label>
</div>

<div>
<label for="mqttUser">MQTT User:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The user name for the MQTT connection. Leave empty if not
used.</span>
<input type="text" id="mqttUser" name="mqttUser" value="">
</label>
</div>
<div>
<label for="mqttPass">MQTT Password:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The password for the MQTT connection. Leave empty if not used.
Disabled for security reasons.</span>
<input type="password" id="mqttPass" name="mqttPass" value="" disabled>
</label>
</div>
</fieldset>

<div>
<label for="rootTopic">Root Topic:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The root topic for the MQTT connection. All MQTT messages will be
published under this topic.</span>
<input type="text" id="rootTopic" name="rootTopic" value="">
</label>
</div>

<div>
<label for="mqttBroker">MQTT Broker:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The MQTT broker address. Use the IP address or hostname of the
MQTT
broker.</span>
<input type="text" id="mqttBroker" name="mqttBroker" value="">
</label>
</div>

<div>
<label for="mqttUser">MQTT User:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The user name for the MQTT connection. Leave empty if not
used.</span>
<input type="text" id="mqttUser" name="mqttUser" value="">
</label>
</div>

<div>
<label for="mqttPass">MQTT Password:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The password for the MQTT connection. Leave empty if not used.
Disabled for security reasons.</span>
<input type="password" id="mqttPass" name="mqttPass" value="" disabled>
</label>
</div>
</fieldset>
</div>

<!-- ESP-NOW Configuration Group -->
<div id="espNowConfig">
<fieldset>
<legend>ESP-NOW Configuration</legend>

<div>
<label for="channelESPNow">Channel:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The channel for the ESP-NOW connection. Must be the same for all
devices.</span>
<input type="number" id="channelESPNow" name="channelESPNow" value="">
</label>
</div>

<!-- ESP-NOW Configuration Group -->
<div id="espNowConfig">
<fieldset>
<legend>ESP-NOW Configuration</legend>

<div>
<label for="channelESPNow">Channel:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The channel for the ESP-NOW connection. Must be the same for all
devices.</span>
<input type="number" id="channelESPNow" name="channelESPNow" value="">
</label>
</div>

<div>
<label for="boardIdESPNow">Board ID:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The board ID for the ESP-NOW connection. Must be unique for each
device.</span>
<input type="number" id="boardIdESPNow" name="boardIdESPNow" value="">
</label>
</div>

<div>
<label for="peerESPNowAddress">Peer Address:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The address of the peer device for the ESP-NOW connection. Must
be
unique for each device.</span>
<input type="text" id="peerESPNowAddress" name="peerESPNowAddress" value="">
</label>
</div>
</fieldset>

<div>
<label for="boardIdESPNow">Board ID:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The board ID for the ESP-NOW connection. Must be unique for each
device.</span>
<input type="number" id="boardIdESPNow" name="boardIdESPNow" value="">
</label>
</div>

<div>
<label for="peerESPNowAddress">Peer Address:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The address of the peer device for the ESP-NOW connection. Must
be
unique for each device.</span>
<input type="text" id="peerESPNowAddress" name="peerESPNowAddress" value="">
</label>
</div>
</fieldset>
</div>

<!-- Sensors Group -->
<fieldset>
Expand Down Expand Up @@ -301,13 +304,23 @@ <h1>CO2 Gadget Preferences</h1>
<legend>NeoPixel</legend>

<div>
<label for="neopixBright">NeoPixel Brightness:</label>
<input type="number" id="neopixBright" name="neopixBright" value="">
<label for="neopixBright">NeoPixel Brightness:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">Set the brightness of the NeoPixel. Lower values will decrease
the
brightness of the NeoPixel.</span>
<input type="number" id="neopixBright" name="neopixBright" value="">
</label>
</div>

<div>
<label for="selNeopxType">Selected NeoPixel Type:</label>
<input type="number" id="selNeopxType" name="selNeopxType" value="">
<label for="selNeopxType">Selected NeoPixel Type:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The type of NeoPixel used. 0 = NEO_GRB + NEO_KHZ800, 1 = NEO_RGB
+ NEO_KHZ800, 2 =
NEO_RGBW + NEO_KHZ800
<input type="number" id="selNeopxType" name="selNeopxType" value="">
</label>
</div>
</fieldset>

Expand Down Expand Up @@ -358,8 +371,12 @@ <h1>CO2 Gadget Preferences</h1>


<div>
<label for="outModeRelay">GPIO Outputs in Relay Mode:</label>
<input type="checkbox" id="outModeRelay" name="outModeRelay">
<label for="outModeRelay">GPIO Outputs in Relay Mode:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">Check this box if you are using a relay to control the GPIO outputs.
This will adjust the logic of the outputs.</span>
<input type="checkbox" id="outModeRelay" name="outModeRelay">
</label>
</div>
</fieldset>

Expand All @@ -381,7 +398,8 @@ <h1>CO2 Gadget Preferences</h1>
<label for="batChargd">Battery Fully Charged Millivolts:
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">The voltage at which the battery is considered fully charged. Used to
calculate the battery level. <br>You should have a very good reason to modify this value.</span>
calculate the battery level. <br>You should have a very good reason to modify this
value.</span>
<input type="number" id="batChargd" name="batChargd" value="">
</label>
</div>
Expand Down Expand Up @@ -518,10 +536,10 @@ <h1>CO2 Gadget Preferences</h1>

<div>
<label for="DisplayBright">Display Brightness:
<input type="number" id="DisplayBright" name="DisplayBright" value="">
<span class="tooltip-icon">ℹ️</span>
<span class="tooltip-text">Set the display brightness. Lower values will decrease the brightness
of the display.</span>
<input type="number" id="DisplayBright" name="DisplayBright" value="">
</label>
</div>
</fieldset>
Expand All @@ -540,22 +558,12 @@ <h1>CO2 Gadget Preferences</h1>
</div>
</fieldset>

<div id="backupRestoreButtons">
<button type="button" id="backupButton" onclick="backupPreferences()">
<span class="tooltip-icon">ℹ️</span> Backup
<span class="tooltip-text">Make a backup of your current preferences</span>
</button>

<button type="button" id="restoreButton" onclick="chooseFileAndRestore()">
<span class="tooltip-icon">ℹ️</span> Restore
<span class="tooltip-text">Restore previously backed up preferences</span>
</button>
</div>

<div id="resetSaveButtons">
<button type="button" id="resetButton" onclick="restartESP32()">Restart device</button>

<button type="button" id="savePreferencesButton" onclick="savePreferences()">Save Preferences</button>
<div class="buttonGroup">
<button type="button" id="backupButton" onclick="backupPreferences()">Backup</button>
<button type="button" id="restoreButton" onclick="chooseFileAndRestore()">Restore</button>
<button type="button" id="restartButton" onclick="restartESP32()">Restart</button>
<button type="button" id="savePreferencesButton" onclick="savePreferences()">Save
Preferences</button>
</div>
</form>

Expand Down
Binary file modified data/preferences.html.gz
Binary file not shown.
14 changes: 1 addition & 13 deletions data/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,6 @@ input[type="checkbox"] {
font-size: 14px;
}

/* Estilos para botones de backup y restore */
#backupRestoreButtons {
float: left;
/* Alinea los botones a la izquierda */
}

/* Estilos para botones de reset y save */
#resetSaveButtons {
float: right;
/* Alinea los botones a la derecha */
}

button {
background-color: #4caf50;
color: white;
Expand All @@ -128,7 +116,7 @@ button {
margin-left: 10px;
}

#resetButton {
#restartButton {
background-color: red;
color: white;
padding: 10px 20px;
Expand Down
Binary file modified data/style.css.gz
Binary file not shown.

0 comments on commit 4642e20

Please sign in to comment.