diff --git a/config/config.toml b/config/config.toml index 87f334d..e97f967 100644 --- a/config/config.toml +++ b/config/config.toml @@ -8,6 +8,10 @@ firmware_images_url = "" # There should be a config section per listed App supported_apps = ["YOUR_FIRMWARE_APP_NAME"] +# Optional: This should be a publicly accessible URL of the application configuration markdown file +# The markdown file will display the application configuration. +# It might include details such as the revisions of esp-idf, esp-matter, etc. or any other application configuration +config_readme_url = "" [YOUR_FIRMWARE_APP_NAME] # ESP32 Chipsets for which you have a supported Firmware App. Define a property for each supported chipset in the given format. diff --git a/css/custom.css b/css/custom.css index a03d394..a98c5fd 100644 --- a/css/custom.css +++ b/css/custom.css @@ -260,6 +260,11 @@ td img { margin-top: 3rem; } +.app-config-info-container { + max-width: 25rem; + max-height: 20rem; +} + @media (min-width: 1400px) { .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container { max-width: 1320px; @@ -271,6 +276,10 @@ td img { .navbar-brand .tagline { display: none; } + .app-config-info-container { + min-width: 100%; + margin: 2rem 0rem; + } } @media (max-width: 992px) { @@ -296,6 +305,10 @@ td img { .form > .field-container > label { margin-bottom: 15px; } + + .form-config-info-container-wrapper { + display: block !important; + } } @keyframes fadeInDown { from { diff --git a/index.html b/index.html index 0c60834..fba9844 100644 --- a/index.html +++ b/index.html @@ -170,73 +170,67 @@

Choose from some of ESP's pre-built, out-of-the-box examples to flash and play
-
- -
- -
-
- -
- -
-
-
- +
+
+
+ +
+
-
- +
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+
+
-
- -
- -
- +
-
+ -

-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-

diff --git a/js/index.js b/js/index.js index 111e297..7631343 100644 --- a/js/index.js +++ b/js/index.js @@ -30,6 +30,9 @@ const appInfoContainer = document.getElementById("appInfoContainer"); const terminalContainer = document.getElementById("terminalContainer"); const appInfo = document.getElementById("appInfo"); const consolePageWrapper = document.getElementById("consolePageWrapper"); +const appConfigInfoContainer = document.getElementById("appConfigInfoContainer"); +const appConfigInfo = document.getElementById("appConfigInfo"); +const progressMsgContainerQS = document.getElementById("progressMsgContainerQS"); let resizeTimeout = false; @@ -69,6 +72,7 @@ let setup_qrcode_payload = ""; let markdown_payload_url = ""; let isFlashByDIYMode = false; let isFlashByQuickTryMode = false; +let config_readme_url = ""; disconnectButton.style.display = "none"; eraseButton.style.display = "none"; @@ -133,8 +137,20 @@ async function buildQuickTryUI() { //Parsing of toml based on v1.0 and builing UI accordingly. -function buildQuickTryUI_v1_0() { +async function buildQuickTryUI_v1_0() { const supported_apps = config["supported_apps"]; + config_readme_url = config['config_readme_url'] || ''; + if (config_readme_url) { + try { + let response = await fetch(config_readme_url); + let mdContent = await response.text(); + let htmlText = utilities.mdToHtmlConverter(mdContent); + appConfigInfoContainer.style.display = "flex"; + appConfigInfo.innerHTML = htmlText; + } catch (e) { + appConfigInfoContainer.style.display = "none"; + } + } if(supported_apps) { addDeviceTypeOption(supported_apps); populateSupportedChipsets(config[supported_apps[0]]); @@ -707,6 +723,7 @@ flashButton.onclick = async () => { var file_server_url = config.firmware_images_url; progressMsgQS.style.display = "inline"; + progressMsgContainerQS.style.display = "block"; cleanUpOldFlashHistory(); clearAppInfoHistory();