Skip to content

Commit

Permalink
Merge pull request #29 from RushikeshPatange/test/smol-toml
Browse files Browse the repository at this point in the history
Feature : Added smol-toml Parser To Support User Friendly App Name
  • Loading branch information
RushikeshPatange committed Sep 28, 2023
2 parents 2de46fd + 394abec commit abdab20
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
1 change: 1 addition & 0 deletions config/rainmaker_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ image.esp32-s2 = "esp32s2_rainmaker_fan_merged.bin"
image.esp32-c3 = "esp32c3_rainmaker_fan_merged.bin"
android_app_url = "https://play.google.com/store/apps/details?id=com.espressif.rainmaker"
ios_app_url = "https://apps.apple.com/app/esp-rainmaker/id1497491540"
name = "My name is Rushi"

[RainMaker-GPIO]
chipsets = ["ESP32", "ESP32-S2", "ESP32-C3"]
Expand Down
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ <h4 class=" mb-4" style="color: #e63f36;"><b>Publish your own firmware apps</b><
<script src="node_modules/xterm-addon-fit/lib/xterm-addon-fit.js"></script>
<script src="node_modules/crypto-js/crypto-js.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pako/2.0.3/pako.js"></script>
<script type="text/javascript" src="node_modules/toml-js/src/toml.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>

<script src="js/index.js" type="module"></script>
Expand Down
4 changes: 3 additions & 1 deletion js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ let resizeTimeout = false;

import * as utilities from "./utils.js";
import * as esptooljs from "../node_modules/esptool-js/bundle.js";
import * as toml from '../node_modules/smol-toml/dist/index.js';

const ESPLoader = esptooljs.ESPLoader;
const Transport = esptooljs.Transport;

Expand Down Expand Up @@ -178,7 +180,7 @@ function populateSupportedChipsets(deviceConfig) {
inputElement.setAttribute("class", "form-check-input");
inputElement.name = "chipType";
inputElement.id = "radio-" + chipset;
inputElement.value = deviceConfig["image." + chipset.toLowerCase()];
inputElement.value = deviceConfig["image"][chipset.toLowerCase()];
if (chipset.toLowerCase() === chip.toLowerCase())
inputElement.checked = true;

Expand Down
22 changes: 13 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dependencies": {
"crypto-js": "^4.1.1",
"esptool-js": "^0.3.0",
"toml-js": "^0.0.8",
"smol-toml": "^1.1.2",
"xterm": "^4.17.0",
"xterm-addon-fit": "^0.5.0"
}
Expand Down

0 comments on commit abdab20

Please sign in to comment.