Add script to format js/scss/css/json files using prettier

Update .prettierrc config file to be same as others projects
Update style using updated .prettierrc file
This commit is contained in:
Luc
2024-05-29 18:50:17 +08:00
parent 23edd02d2f
commit 1db0a09a55
31 changed files with 902 additions and 730 deletions

View File

@@ -1,7 +1,16 @@
{
"trailingComma": "es5",
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"semi": false,
"singleQuote": false,
"trailingComma": "es5",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always",
"requirePragma": false,
"insertPragma": false,
"proseWrap": "preserve",
"overrides": [
{
"files": "*.js",
@@ -9,10 +18,20 @@
"parser": "babel"
}
},
{"files": "*.scss",
{"files": "*.css",
"options": {
"parser": "css"
}
},
{"files": "*.scss",
"options": {
"parser": "scss"
}
},
{"files": "*.json",
"options": {
"printWidth": 120,
}
}
]
}

View File

@@ -13,4 +13,3 @@ const serverpath = path.normalize(__dirname + "/../server/")
app.listen(port, () => console.log("Devt server"))
app.timeout = 2000

View File

@@ -1,72 +1,72 @@
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const path = require("path")
const HtmlWebpackPlugin = require("html-webpack-plugin")
const MiniCssExtractPlugin = require("mini-css-extract-plugin")
module.exports = {
mode: "development", // this will trigger some webpack default stuffs for dev
entry: path.resolve(__dirname, "../src/index.js"), // if not set, default path to './src/index.js'. Accepts an object with multiple key-value pairs, with key as your custom bundle filename(substituting the [name]), and value as the corresponding file path
output: {
filename: "[name].bundle.js", // [name] will take whatever the input filename is. defaults to 'main' if only a single entry value
path: path.resolve(__dirname, "../dist"), // the folder containing you final dist/build files. Default to './dist'
},
devServer: {
historyApiFallback: true, // to make our SPA works after a full reload, so that it serves 'index.html' when 404 response
open: true,
static: {
directory: path.resolve(__dirname, "server", "public"),
mode: "development", // this will trigger some webpack default stuffs for dev
entry: path.resolve(__dirname, "../src/index.js"), // if not set, default path to './src/index.js'. Accepts an object with multiple key-value pairs, with key as your custom bundle filename(substituting the [name]), and value as the corresponding file path
output: {
filename: "[name].bundle.js", // [name] will take whatever the input filename is. defaults to 'main' if only a single entry value
path: path.resolve(__dirname, "../dist"), // the folder containing you final dist/build files. Default to './dist'
},
port: 8088,
proxy: {
context: () => true,
target: "http://localhost:8080",
},
},
stats: "minimal", // default behaviour spit out way too much info. adjust to your need.
devtool: "source-map", // a sourcemap type. map to original source with line number
plugins: [
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// all options are optional
filename: "[name].css",
chunkFilename: "[id].css",
ignoreOrder: false, // Enable to remove warnings about conflicting order
}),
new HtmlWebpackPlugin({
template: path.join(__dirname, "../src/index.html"),
inlineSource: ".(js|css)$",
inject: true,
}),
], // automatically creates a 'index.html' for us with our <link>, <style>, <script> tags inserted! Visit https://github.com/jantimon/html-webpack-plugin for more options
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /(node_modules)/,
use: {
loader: "babel-loader",
options: {
presets: ["preact"],
},
devServer: {
historyApiFallback: true, // to make our SPA works after a full reload, so that it serves 'index.html' when 404 response
open: true,
static: {
directory: path.resolve(__dirname, "server", "public"),
},
},
{
test: /\.(sa|sc|c)ss$/,
use: [
{ loader: "style-loader" },
{
loader: "css-loader",
options: {
sourceMap: true,
port: 8088,
proxy: {
context: () => true,
target: "http://localhost:8080",
},
},
stats: "minimal", // default behaviour spit out way too much info. adjust to your need.
devtool: "source-map", // a sourcemap type. map to original source with line number
plugins: [
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// all options are optional
filename: "[name].css",
chunkFilename: "[id].css",
ignoreOrder: false, // Enable to remove warnings about conflicting order
}),
new HtmlWebpackPlugin({
template: path.join(__dirname, "../src/index.html"),
inlineSource: ".(js|css)$",
inject: true,
}),
], // automatically creates a 'index.html' for us with our <link>, <style>, <script> tags inserted! Visit https://github.com/jantimon/html-webpack-plugin for more options
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /(node_modules)/,
use: {
loader: "babel-loader",
options: {
presets: ["preact"],
},
},
},
},
{
loader: "sass-loader",
options: {
sourceMap: true,
{
test: /\.(sa|sc|c)ss$/,
use: [
{ loader: "style-loader" },
{
loader: "css-loader",
options: {
sourceMap: true,
},
},
{
loader: "sass-loader",
options: {
sourceMap: true,
},
},
],
},
},
],
},
],
},
};
},
}

View File

@@ -32,23 +32,19 @@ import { HelpCircle, Layout } from "preact-feather"
*/
const ViewContainer = () => {
return (
<Fragment>
<Menu />
<MainContainer />
</Fragment>
)
return (
<Fragment>
<Menu />
<MainContainer />
</Fragment>
)
}
const ContentContainer = () => {
const { toasts, modals } = useUiContext()
useEffect(() => {
//To init settings
}, [])
return <ViewContainer />
}

View File

@@ -22,11 +22,10 @@ import { h } from "preact"
import { useState, useEffect, useRef } from "preact/hooks"
import { Router } from "../components/Router"
import { useUiContext} from "../contexts"
import { useUiContext } from "../contexts"
import About from "../pages/about"
import Config from "../pages/config"
import { FooterContainer } from "./footer"
const defRoutes = {

View File

@@ -32,13 +32,13 @@ const App = () => {
return (
<div id="app">
<DatasContextProvider>
<RouterContextProvider>
<UiContextProvider>
<ToastsContainer />
<Modal />
<ContentContainer />
</UiContextProvider>
</RouterContextProvider>
<RouterContextProvider>
<UiContextProvider>
<ToastsContainer />
<Modal />
<ContentContainer />
</UiContextProvider>
</RouterContextProvider>
</DatasContextProvider>
</div>
)

View File

@@ -50,8 +50,8 @@ const ButtonImg = ({
width
? `${showlow ? "" : "hide-low"}`
: showlow
? ""
: "hide-low"
? ""
: "hide-low"
}
style={
"display:inline" +

View File

@@ -18,14 +18,7 @@ Field.js - ESP3D WebUI component file
*/
import { Fragment, h } from "preact"
import {
FormGroup,
Input,
Select,
Boolean,
PickUp,
LabelCtrl,
} from "./Fields"
import { FormGroup, Input, Select, Boolean, PickUp, LabelCtrl } from "./Fields"
const Field = (props) => {
const { type, id } = props

View File

@@ -46,7 +46,6 @@ const Boolean = ({
if (setValue) setValue(e.target.checked)
}
useEffect(() => {
//to update state
if (setValue) setValue(null, true)

View File

@@ -25,10 +25,4 @@ import Input from "./Input"
import Select from "./Select"
import LabelCtrl from "./Label"
export {
Boolean,
FormGroup,
Input,
Select,
LabelCtrl,
}
export { Boolean, FormGroup, Input, Select, LabelCtrl }

View File

@@ -30,8 +30,8 @@ const sortedFilesList = (filesList) => {
return a.size == -1 && b.size != -1
? 1
: a.size != -1 && b.size == -1
? -1
: 0
? -1
: 0
})
return filesList
}

View File

@@ -34,12 +34,17 @@ function getCookie(cname) {
//generate an URL with server host and base address
//args is array of argumments: [{'cmd':'[ESP800]},...]
const espHttpURL = (base = '', args = {}) => {
const espHttpURL = (base = "", args = {}) => {
const url = (() => {
try { return new URL(base) }
catch (error) { return new URL(base, `http://${window.location.host}`) }
try {
return new URL(base)
} catch (error) {
return new URL(base, `http://${window.location.host}`)
}
})()
Object.entries(args).forEach(([key, value]) => url.searchParams.append(key, value))
Object.entries(args).forEach(([key, value]) =>
url.searchParams.append(key, value)
)
return url.toString()
}

View File

@@ -29,45 +29,45 @@ const AppLogo = ({
color = "currentColor",
bgcolor = "white",
}) => {
return (
<svg
height={height}
viewBox="22 56 240 180"
fill={bgcolor}
stroke={color}
class="esp3dlogo"
>
<path d="m 227,91.9 -97,-0.3 0,100.4 83,0 c 20,0 46,-6 47,-36 l 0,-24 c 1,-20 -13,-40 -33,-40.1 z" />
<path
fill={color}
stroke={bgcolor}
d="M79.7,200.2h124c-15.5,16.5-37.6,26.7-62,26.7S95.3,216.7,79.7,200.2z"
/>
<path
fill={color}
stroke={bgcolor}
d="M203.7,83.2h-124c15.5-16.5,37.6-26.7,62-26.7S188.2,66.8,203.7,83.2z"
/>
<path
fill={color}
stroke={bgcolor}
d="M200.3,152.7c0,2.7-0.5,5-1.5,7.1s-2.4,3.8-4.2,5.2c-1.8,1.4-4,2.5-6.5,3.2c-2.5,0.7-5.3,1.1-8.3,1.1c-1.8,0-3.5-0.1-5.1-0.4c-1.6-0.3-3-0.6-4.2-1c-1.2-0.4-2.2-0.8-3-1.2c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-1.2,0-2.2,0.1-3.1,0.4c-0.9,0.3-1.6,0.7-2.2,1.2c-0.6,0.5-1,1.1-1.3,1.8c-0.3,0.7-0.4,1.5-0.4,2.3c0,1.2,0.3,2.2,1,3.1c0.6,0.9,1.5,1.6,2.6,2.3c1.1,0.7,2.3,1.3,3.7,1.9c1.4,0.6,2.8,1.2,4.2,1.9c1.4,0.7,2.8,1.4,4.2,2.2c1.4,0.8,2.6,1.8,3.7,3c1.1,1.2,1.9,2.5,2.6,4.1C109.1,148.4,109.4,150.2,109.4,152.4z" />
<path d="M151.4,131.2c0,3-0.5,5.6-1.4,7.9c-0.9,2.3-2.3,4.2-4.1,5.8c-1.8,1.6-4,2.8-6.6,3.6c-2.6,0.8-5.6,1.2-9.1,1.2h-4.4v17c0,0.3-0.1,0.5-0.3,0.7c-0.2,0.2-0.5,0.4-0.9,0.5c-0.4,0.1-1,0.2-1.6,0.3c-0.7,0.1-1.6,0.1-2.6,0.1c-1,0-1.9,0-2.6-0.1c-0.7-0.1-1.3-0.2-1.7-0.3c-0.4-0.1-0.7-0.3-0.9-0.5c-0.2-0.2-0.2-0.5-0.2-0.7v-47.8c0-1.3,0.3-2.3,1-2.9c0.7-0.6,1.6-1,2.7-1h12.5c1.3,0,2.5,0,3.6,0.1c1.1,0.1,2.5,0.3,4.1,0.6c1.6,0.3,3.2,0.9,4.8,1.7c1.6,0.8,3,1.9,4.2,3.2c1.2,1.3,2,2.8,2.6,4.6C151.1,127.1,151.4,129,151.4,131.2z M140.1,132c0-1.9-0.3-3.4-1-4.6c-0.7-1.2-1.5-2.1-2.4-2.7c-1-0.6-2-0.9-3-1.1c-1.1-0.2-2.1-0.2-3.3-0.2h-4.6v18h4.8c1.7,0,3.2-0.2,4.3-0.7c1.2-0.5,2.1-1.1,2.9-2c0.7-0.8,1.3-1.8,1.7-3C139.9,134.6,140.1,133.3,140.1,132z" />
</svg>
)
return (
<svg
height={height}
viewBox="22 56 240 180"
fill={bgcolor}
stroke={color}
class="esp3dlogo"
>
<path d="m 227,91.9 -97,-0.3 0,100.4 83,0 c 20,0 46,-6 47,-36 l 0,-24 c 1,-20 -13,-40 -33,-40.1 z" />
<path
fill={color}
stroke={bgcolor}
d="M79.7,200.2h124c-15.5,16.5-37.6,26.7-62,26.7S95.3,216.7,79.7,200.2z"
/>
<path
fill={color}
stroke={bgcolor}
d="M203.7,83.2h-124c15.5-16.5,37.6-26.7,62-26.7S188.2,66.8,203.7,83.2z"
/>
<path
fill={color}
stroke={bgcolor}
d="M200.3,152.7c0,2.7-0.5,5-1.5,7.1s-2.4,3.8-4.2,5.2c-1.8,1.4-4,2.5-6.5,3.2c-2.5,0.7-5.3,1.1-8.3,1.1c-1.8,0-3.5-0.1-5.1-0.4c-1.6-0.3-3-0.6-4.2-1c-1.2-0.4-2.2-0.8-3-1.2c-0.8-0.4-1.3-0.7-1.6-0.9c-0.2-0.2-0.4-0.5-0.6-0.7c-0.1-0.3-0.2-0.6-0.3-1c-0.1-0.4-0.2-0.8-0.2-1.4c0-0.6-0.1-1.2-0.1-2c0-1.3,0.1-2.2,0.3-2.7c0.2-0.5,0.5-0.8,1-0.8c0.3,0,0.7,0.2,1.4,0.6c0.7,0.4,1.5,0.8,2.6,1.2c1,0.4,2.3,0.8,3.7,1.2c1.4,0.4,3,0.6,4.8,0.6c1.5,0,2.8-0.2,4-0.5c1.2-0.4,2.1-0.9,2.9-1.5c0.8-0.6,1.4-1.4,1.8-2.3c0.4-0.9,0.6-1.9,0.6-3.1c0-1.2-0.2-2.3-0.7-3.3c-0.5-1-1.2-1.8-2.1-2.5c-0.9-0.7-2.1-1.2-3.6-1.6c-1.4-0.4-3.1-0.6-5.1-0.6h-4.6c-0.4,0-0.7,0-0.9-0.1c-0.2-0.1-0.5-0.3-0.6-0.6c-0.2-0.3-0.3-0.7-0.3-1.3c-0.1-0.5-0.1-1.2-0.1-2.1c0-0.8,0-1.4,0.1-2c0.1-0.5,0.2-0.9,0.3-1.2c0.2-0.3,0.3-0.5,0.6-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4-0.9-2.6v-46.4c0-1.2,0.3-2.1,0.9-2.6c0.6-0.5,1.4-0.8,2.3-0.8h13.6c4.7,0,8.8,0.6,12.1,1.7c3.3,1.1,6.1,2.8,8.3,4.9c2.3,2.2,4,4.9,5.2,8.1C249,133,249.6,136.7,249.6,141z M238.5,141.3c0-2.5-0.3-4.9-0.9-7c-0.6-2.2-1.5-4-2.8-5.6c-1.3-1.6-3-2.8-5-3.7c-2-0.9-4.7-1.3-8-1.3h-5.5v36.2h5.6c3,0,5.5-0.4,7.5-1.2c2-0.8,3.7-1.9,5.1-3.5c1.4-1.5,2.4-3.5,3-5.8C238.1,147.1,238.5,144.4,238.5,141.3z"
/>
<path
fill={color}
stroke={bgcolor}
d="M222.1,90.3h-34.9H61.4c-21.5,0-39,17.5-39,39v24.9c0,21.5,17.5,39,39,39h68.4h92.3c21.5,0,39-17.5,39-39v-24.9C261.1,107.8,243.6,90.3,222.1,90.3z M155.1,179.4c5-7,4.9-16.5,4.9-16.5v-42.5c0-15,12.2-27.2,27.2-27.2h34.9c19.8,0,36,16.1,36,36v24.9c0,19.8-16.1,36-36,36h-79.2C142.9,190.2,149.6,187.2,155.1,179.4z"
/>
<path d="M69.7,164.1c0,0.8,0,1.5-0.1,2c-0.1,0.5-0.2,1-0.3,1.3c-0.1,0.3-0.3,0.6-0.5,0.7c-0.2,0.2-0.4,0.2-0.7,0.2H41.4c-0.9,0-1.7-0.3-2.3-0.8c-0.6-0.5-0.9-1.4-0.9-2.6v-46.4c0-1.2,0.3-2.1,0.9-2.6c0.6-0.5,1.4-0.8,2.3-0.8H68c0.2,0,0.5,0.1,0.7,0.2c0.2,0.1,0.4,0.4,0.5,0.7c0.1,0.3,0.2,0.8,0.3,1.3c0.1,0.5,0.1,1.2,0.1,2c0,0.8,0,1.4-0.1,2c-0.1,0.5-0.2,1-0.3,1.3c-0.1,0.3-0.3,0.6-0.5,0.7c-0.2,0.2-0.4,0.2-0.7,0.2H49v13H65c0.2,0,0.5,0.1,0.7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2.3,1-2.9c0.7-0.6,1.6-1,2.7-1h12.5c1.3,0,2.5,0,3.6,0.1c1.1,0.1,2.5,0.3,4.1,0.6c1.6,0.3,3.2,0.9,4.8,1.7c1.6,0.8,3,1.9,4.2,3.2c1.2,1.3,2,2.8,2.6,4.6C151.1,127.1,151.4,129,151.4,131.2z M140.1,132c0-1.9-0.3-3.4-1-4.6c-0.7-1.2-1.5-2.1-2.4-2.7c-1-0.6-2-0.9-3-1.1c-1.1-0.2-2.1-0.2-3.3-0.2h-4.6v18h4.8c1.7,0,3.2-0.2,4.3-0.7c1.2-0.5,2.1-1.1,2.9-2c0.7-0.8,1.3-1.8,1.7-3C139.9,134.6,140.1,133.3,140.1,132z" />
</svg>
)
}
export { AppLogo }

View File

@@ -87,9 +87,4 @@ const Modal = () => {
)
}
export {
Modal,
showConfirmationModal,
showProgressModal,
showModal,
}
export { Modal, showConfirmationModal, showProgressModal, showModal }

View File

@@ -38,8 +38,8 @@ function T(id, base = false, ressourcelanguage = null) {
let translatedText = base
? baseLangRessource[id]
: ressourcelanguage
? ressourcelanguage[id]
: currentLanguage[id]
? ressourcelanguage[id]
: currentLanguage[id]
if (!id || typeof id == "object" || !isNaN(id) || !isNaN(id.charAt(0)))
return id
if (typeof translatedText === "undefined") {

View File

@@ -2,4 +2,4 @@
"en": "English",
"fr": "Français",
"zh_cn": "简体中文"
}
}

View File

@@ -98,7 +98,7 @@
}
]
},
{
"id": "flash_mod1",
"define": "flash_mode",
@@ -177,17 +177,17 @@
{
"label": "ck",
"value": "ck",
"help":"Need to manually set GPIO 0 to gnd"
"help": "Need to manually set GPIO 0 to gnd"
},
{
"label": "nodemcu",
"value": "nodemcu",
"help":"Automatically set GPIO 0 to gnd via 2 NPN transistors"
"help": "Automatically set GPIO 0 to gnd via 2 NPN transistors"
},
{
"label": "wifio",
"value": "wifio",
"help":"Automatically set GPIO 0 to gnd via TX and DTR controls"
"help": "Automatically set GPIO 0 to gnd via TX and DTR controls"
}
]
},
@@ -213,12 +213,12 @@
"value": "qio_qspi",
"depend": [
{
"id": "targetmcu",
"value": ["esp32s3"]
},
"id": "targetmcu",
"value": ["esp32s3"]
},
{
"id": "has_psram",
"value": [true]
"id": "has_psram",
"value": [true]
}
],
"setting": false,
@@ -976,12 +976,7 @@
"help": "Only on ESP32 with large flash",
"depend": {
"id": "targetmcu",
"value": [
"esp32",
"esp32s2",
"esp32s3",
"esp32c3"
]
"value": ["esp32", "esp32s2", "esp32s3", "esp32c3"]
}
}
]
@@ -1062,12 +1057,7 @@
"help": "Used by SDMMC",
"depend": {
"id": "targetmcu",
"value": [
"esp32",
"esp32s2",
"esp32s3",
"esp32c3"
]
"value": ["esp32", "esp32s2", "esp32s3", "esp32c3"]
}
}
]
@@ -1211,7 +1201,7 @@
"value": "-1",
"depend": [
{ "id": "sdfs", "notvalue": ["ESP_SDIO"] },
{ "id": "targetmcu", "notvalue": ["esp8266","esp8285"] }
{ "id": "targetmcu", "notvalue": ["esp8266", "esp8285"] }
],
"setting": true,
"usedescforoptions": true
@@ -1227,7 +1217,7 @@
"value": "-1",
"depend": [
{ "id": "sdfs", "notvalue": ["ESP_SDIO"] },
{ "id": "targetmcu", "notvalue": ["esp8266","esp8285"] }
{ "id": "targetmcu", "notvalue": ["esp8266", "esp8285"] }
],
"setting": true,
"usedescforoptions": true
@@ -1243,7 +1233,7 @@
"value": "-1",
"depend": [
{ "id": "sdfs", "notvalue": ["ESP_SDIO"] },
{ "id": "targetmcu", "notvalue": ["esp8266","esp8285"] }
{ "id": "targetmcu", "notvalue": ["esp8266", "esp8285"] }
],
"setting": true,
"usedescforoptions": true
@@ -1296,8 +1286,10 @@
"ispin": true,
"usedefault": true,
"value": "-1",
"depend": [{ "id": "sdfs", "value": ["ESP_SDIO"] },
{ "id": "sdio", "value": ["SD_FOUR_BIT_MODE"]}],
"depend": [
{ "id": "sdfs", "value": ["ESP_SDIO"] },
{ "id": "sdio", "value": ["SD_FOUR_BIT_MODE"] }
],
"setting": true,
"usedescforoptions": true
},
@@ -1310,8 +1302,10 @@
"ispin": true,
"usedefault": true,
"value": "-1",
"depend": [{ "id": "sdfs", "value": ["ESP_SDIO"] },
{ "id": "sdio", "value": ["SD_FOUR_BIT_MODE"]}],
"depend": [
{ "id": "sdfs", "value": ["ESP_SDIO"] },
{ "id": "sdio", "value": ["SD_FOUR_BIT_MODE"] }
],
"setting": true,
"usedescforoptions": true
},
@@ -1324,8 +1318,10 @@
"ispin": true,
"usedefault": true,
"value": "-1",
"depend": [{ "id": "sdfs", "value": ["ESP_SDIO"] },
{ "id": "sdio", "value": ["SD_FOUR_BIT_MODE"]}],
"depend": [
{ "id": "sdfs", "value": ["ESP_SDIO"] },
{ "id": "sdio", "value": ["SD_FOUR_BIT_MODE"] }
],
"setting": true,
"usedescforoptions": true
}
@@ -1567,10 +1563,7 @@
"value": "0x3c",
"depend": {
"id": "displaytype",
"value": [
"OLED_I2C_SSD1306_128X64",
"OLED_I2C_SSDSH1106_132X64"
]
"value": ["OLED_I2C_SSD1306_128X64", "OLED_I2C_SSDSH1106_132X64"]
},
"setting": true
},
@@ -1584,10 +1577,7 @@
"value": "-1",
"depend": {
"id": "displaytype",
"value": [
"OLED_I2C_SSD1306_128X64",
"OLED_I2C_SSDSH1106_132X64"
]
"value": ["OLED_I2C_SSD1306_128X64", "OLED_I2C_SSDSH1106_132X64"]
},
"setting": true,
"usedescforoptions": true
@@ -1602,10 +1592,7 @@
"value": "-1",
"depend": {
"id": "displaytype",
"value": [
"TFT_SPI_ST7789_135X240",
"TFT_SPI_ST7789_240X240"
]
"value": ["TFT_SPI_ST7789_135X240", "TFT_SPI_ST7789_240X240"]
},
"setting": true,
"usedescforoptions": true
@@ -1620,10 +1607,7 @@
"value": "-1",
"depend": {
"id": "displaytype",
"value": [
"TFT_SPI_ST7789_135X240",
"TFT_SPI_ST7789_240X240"
]
"value": ["TFT_SPI_ST7789_135X240", "TFT_SPI_ST7789_240X240"]
},
"setting": true,
"usedescforoptions": true
@@ -1638,10 +1622,7 @@
"value": "-1",
"depend": {
"id": "displaytype",
"value": [
"TFT_SPI_ST7789_135X240",
"TFT_SPI_ST7789_240X240"
]
"value": ["TFT_SPI_ST7789_135X240", "TFT_SPI_ST7789_240X240"]
},
"setting": true,
"usedescforoptions": true
@@ -1657,10 +1638,7 @@
"value": "-1",
"depend": {
"id": "displaytype",
"value": [
"TFT_SPI_ST7789_135X240",
"TFT_SPI_ST7789_240X240"
]
"value": ["TFT_SPI_ST7789_135X240", "TFT_SPI_ST7789_240X240"]
},
"setting": true,
"usedescforoptions": true
@@ -1676,10 +1654,7 @@
"value": "-1",
"depend": {
"id": "displaytype",
"value": [
"TFT_SPI_ST7789_135X240",
"TFT_SPI_ST7789_240X240"
]
"value": ["TFT_SPI_ST7789_135X240", "TFT_SPI_ST7789_240X240"]
},
"setting": true,
"usedescforoptions": true
@@ -1695,10 +1670,7 @@
"value": "-1",
"depend": {
"id": "displaytype",
"value": [
"TFT_SPI_ST7789_135X240",
"TFT_SPI_ST7789_240X240"
]
"value": ["TFT_SPI_ST7789_135X240", "TFT_SPI_ST7789_240X240"]
},
"setting": true,
"usedescforoptions": true
@@ -1789,12 +1761,7 @@
"value": "0x76",
"depend": {
"id": "sensortype",
"notvalue": [
"-1",
"ANALOG_DEVICE",
"DHT11_DEVICE",
"DHT22_DEVICE"
]
"notvalue": ["-1", "ANALOG_DEVICE", "DHT11_DEVICE", "DHT22_DEVICE"]
},
"setting": true
},
@@ -1806,13 +1773,9 @@
"type": "select",
"ispin": true,
"value": "-1",
"depend": {
"depend": {
"id": "sensortype",
"notvalue": [
"-1",
"BMP280_DEVICE",
"BME280_DEVICE"
]
"notvalue": ["-1", "BMP280_DEVICE", "BME280_DEVICE"]
},
"setting": true,
"usedescforoptions": true
@@ -1869,7 +1832,7 @@
"depend": [
{ "id": "targetmcu", "value": ["esp32", "esp32s2", "esp32s3"] },
{ "id": "formfactor", "notvalue": ["esp01"] },
{"id": "has_psram","value": [true] }
{ "id": "has_psram", "value": [true] }
],
"type": "group",
"value": [
@@ -2113,7 +2076,8 @@
"type": "boolean",
"value": false,
"disableiffalse": true
}, {
},
{
"id": "get_ip_hook",
"define": "ESP_GOT_IP_HOOK",
"label": "Commands to run when got IP",
@@ -2135,7 +2099,8 @@
"type": "boolean",
"value": false,
"disableiffalse": true
}, {
},
{
"id": "get_datetime_hook",
"define": "ESP_GOT_DATE_TIME_HOOK",
"label": "Commands to run when got date/time",
@@ -2150,7 +2115,6 @@
"disableiffalse": true,
"setting": true
}
]
}
],

View File

@@ -85,19 +85,18 @@ const UiContextProvider = ({ children }) => {
setModal([])
}
useUiContextFn.getValue = (v)=>{console.log(v, "not found")}
useUiContextFn.getElement = (v)=>{console.log(v, "not found")}
useUiContextFn.getValue = (v) => {
console.log(v, "not found")
}
useUiContextFn.getElement = (v) => {
console.log(v, "not found")
}
useUiContextFn.toasts = { addToast, removeToast, toastList: toasts }
useEffect(() => {
}, [])
useEffect(() => {}, [])
const store = {
toasts: { toastList: toasts, addToast, removeToast },
modals: {
modalList: modals,
@@ -106,7 +105,6 @@ const UiContextProvider = ({ children }) => {
getModalIndex,
clearModals,
},
}
return <UiContext.Provider value={store}>{children}</UiContext.Provider>

View File

@@ -7,4 +7,4 @@
@import "node_modules/spectre.css/src/mixins/position";
@import "node_modules/spectre.css/src/mixins/shadow";
@import "node_modules/spectre.css/src/mixins/text";
@import "node_modules/spectre.css/src/mixins/toast";
@import "node_modules/spectre.css/src/mixins/toast";

View File

@@ -45,17 +45,17 @@ $link-color-light: lighten($link-color, 10%) !default;
// Fonts
// Credit: https://www.smashingmagazine.com/2015/11/using-system-ui-fonts-practical-guide/
$base-font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI",
Roboto !default;
Roboto !default;
$mono-font-family: "SF Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Courier,
monospace !default;
monospace !default;
$fallback-font-family: "Helvetica Neue", sans-serif !default;
$cjk-zh-hans-font-family: $base-font-family, "PingFang SC", "Hiragino Sans GB",
"Microsoft YaHei", $fallback-font-family !default;
"Microsoft YaHei", $fallback-font-family !default;
$cjk-zh-hant-font-family: $base-font-family, "PingFang TC", "Hiragino Sans CNS",
"Microsoft JhengHei", $fallback-font-family !default;
"Microsoft JhengHei", $fallback-font-family !default;
$cjk-jp-font-family: $base-font-family, "Hiragino Sans",
"Hiragino Kaku Gothic Pro", "Yu Gothic", YuGothic, Meiryo,
$fallback-font-family !default;
"Hiragino Kaku Gothic Pro", "Yu Gothic", YuGothic, Meiryo,
$fallback-font-family !default;
$cjk-ko-font-family: $base-font-family, "Malgun Gothic", $fallback-font-family !default;
$body-font-family: $base-font-family, $fallback-font-family !default;
@@ -98,9 +98,9 @@ $control-padding-x-sm: $unit-2 * 0.75 !default;
$control-padding-x-lg: $unit-2 * 1.5 !default;
$control-padding-y: math.div(($control-size - $line-height), 2) - $border-width !default;
$control-padding-y-sm: math.div(($control-size-sm - $line-height), 2) -
$border-width !default;
$border-width !default;
$control-padding-y-lg: math.div(($control-size-lg - $line-height), 2) -
$border-width !default;
$border-width !default;
$control-icon-size: 0.8rem !default;
$control-width-xs: 180px !default;

View File

@@ -1,95 +1,95 @@
html,
body {
height: 100vh;
margin: 0;
overflow-y: hidden;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
height: 100vh;
margin: 0;
overflow-y: hidden;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}
#app {
display: flex;
flex-flow: column;
height: 100%;
display: flex;
flex-flow: column;
height: 100%;
}
.fullscreen {
height: 100vh;
height: 100vh;
}
.menu-container,
.information-container {
flex: 0 1 auto;
flex: 0 1 auto;
}
.main-page-container {
flex: 1 1 auto;
overflow-y: auto;
height: 100%;
margin-bottom: 2rem;
flex: 1 1 auto;
overflow-y: auto;
height: 100%;
margin-bottom: 2rem;
}
#main-container {
padding: 1em;
padding: 1em;
@media (max-width: $size-sm) {
padding: 0em;
}
@media (max-width: $size-sm) {
padding: 0em;
}
}
.toasts-container {
position: fixed;
z-index: 1000;
right: 0.5rem;
top: 0.5rem;
position: fixed;
z-index: 1000;
right: 0.5rem;
top: 0.5rem;
> .toast {
margin: 0.2rem 0;
}
> .toast {
margin: 0.2rem 0;
}
}
.footer-container {
height: 3rem;
height: 3rem;
}
.no-box {
box-shadow: 0 0 0 0.1rem rgba(0, 0, 0, 0) !important;
box-shadow: 0 0 0 0.1rem rgba(0, 0, 0, 0) !important;
}
.centered {
position: fixed;
top: 50%;
left: 50%;
-ms-transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
position: fixed;
top: 50%;
left: 50%;
-ms-transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.hide-low {
}
.mobile-view .hide-low {
display: none !important;
display: none !important;
}
.mobile-view .show-low {
display: block !important;
display: block !important;
}
.show-low {
display: none;
display: none;
}
.panels-container {
display: grid;
grid-gap: 5px;
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
display: grid;
grid-gap: 5px;
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}
.flex-cols {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
}

View File

@@ -1,397 +1,407 @@
.image-button-bar {
text-align: center;
text-align: center;
}
.buttons-bar {
display: flex;
display: flex;
}
.btn-xs {
font-size: 0.4rem;
height: 1rem;
margin-top: 0.1rem;
padding: 0.035rem 0.15rem;
font-size: 0.4rem;
height: 1rem;
margin-top: 0.1rem;
padding: 0.035rem 0.15rem;
}
.btn-close {
padding-left: 3px !important;
padding-left: 3px !important;
}
.btn-header {
background-color: #f1f1fc;
background-color: #f1f1fc;
}
.emergency-btn{
color:#FF5160;
background-color:#FFFFFF;
border-color:#FF5160;
.emergency-btn {
color: #ff5160;
background-color: #ffffff;
border-color: #ff5160;
}
.emergency-btn:hover{
background-color:#FF0000;
color:#FFFFFF;
.emergency-btn:hover {
background-color: #ff0000;
color: #ffffff;
}
.emergency-btn:active{
color:#FF0000;
background-color:#FFFFFF;
.emergency-btn:active {
color: #ff0000;
background-color: #ffffff;
}
.itemEditor {
display: flex;
flex-direction: column;
border: 0.05rem solid #dadee4;
border-radius: $border-radius;
margin-bottom: 0.4rem;
width: 100%;
display: flex;
flex-direction: column;
border: 0.05rem solid #dadee4;
border-radius: $border-radius;
margin-bottom: 0.4rem;
width: 100%;
}
.information-buttons-bar {
display: flex;
align-content: center;
justify-content: center;
display: flex;
align-content: center;
justify-content: center;
}
.drop-zone {
border: none;
height: 100%;
border: none;
height: 100%;
}
.selection-list {
list-style-type: none;
list-style-type: none;
}
.item-selection-list {
cursor: pointer;
text-align: center;
border-radius: 10px;
cursor: pointer;
text-align: center;
border-radius: 10px;
}
.item-selection-list:hover {
background-color: #f1f1fc;
background-color: #f1f1fc;
}
.files-list {
border: 0.05rem solid #dadee4;
border-radius: $border-radius;
padding: 5px 5px !important;
overflow-x: hidden;
overflow-y: scroll !important;
border: 0.05rem solid #dadee4;
border-radius: $border-radius;
padding: 5px 5px !important;
overflow-x: hidden;
overflow-y: scroll !important;
}
.drop-zone--over {
border-radius: 10px;
background: linear-gradient(90deg, blue 50%, transparent 50%),
linear-gradient(90deg, blue 50%, transparent 50%),
linear-gradient(0deg, blue 50%, transparent 50%),
linear-gradient(0deg, blue 50%, transparent 50%);
background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
background-size: 15px 4px, 15px 4px, 4px 15px, 4px 15px;
animation: border-dance 4s infinite linear;
border-radius: 10px;
background: linear-gradient(90deg, blue 50%, transparent 50%),
linear-gradient(90deg, blue 50%, transparent 50%),
linear-gradient(0deg, blue 50%, transparent 50%),
linear-gradient(0deg, blue 50%, transparent 50%);
background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
background-size:
15px 4px,
15px 4px,
4px 15px,
4px 15px;
animation: border-dance 4s infinite linear;
}
.fieldset-no-top-separator {
margin-top: -1.8rem;
margin-top: -1.8rem;
}
.fieldset-bottom-separator {
border-bottom: 0.05rem solid #dadee4;
border-bottom: 0.05rem solid #dadee4;
}
.fieldset-top-separator {
border-top: 0.05rem solid #dadee4;
.fieldset-top-separator {
border-top: 0.05rem solid #dadee4;
}
.fieldset-bottom-separator legend {
margin-left: -0.5rem;
margin-left: -0.5rem;
}
.field-group {
color: blue;
font-size: 0.8rem;
color: blue;
font-size: 0.8rem;
}
.fields-line {
display: flex;
width: 100%;
flex-direction: row;
justify-content: space-between;
align-items: center;
display: flex;
width: 100%;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.items-group-content {
display: flex;
flex-direction: column;
margin-top: -1rem;
padding-bottom: 0.5rem;
width: 100%;
display: flex;
flex-direction: column;
margin-top: -1rem;
padding-bottom: 0.5rem;
width: 100%;
}
.item-list-move {
flex-grow: 1;
flex-grow: 1;
}
.item-list-name {
display: flex;
justify-content: center;
display: flex;
justify-content: center;
}
.field-group-content {
display: flex;
flex-direction: column;
padding-left: 0.5rem;
margin-top: -1rem;
padding-bottom: 0.5rem;
max-width: fit-content;
display: flex;
flex-direction: column;
padding-left: 0.5rem;
margin-top: -1rem;
padding-bottom: 0.5rem;
max-width: fit-content;
}
.maxwidth {
width:100%;
max-width: 100%;
width: 100%;
max-width: 100%;
}
.terminal {
font-size: $font-size-sm;
white-space: pre-wrap;
word-break: break-all;
border: 0.05rem solid #dadee4;
border-radius: $border-radius;
padding: 5px 5px !important;
margin-top: 0px !important;
overflow-x: hidden;
overflow-y: scroll !important;
user-select: text;
-moz-user-select: text;
-webkit-user-select: text;
-ms-user-select: text;
.echo {
color: blue;
}
.error {
color: red;
font-weight: bolder;
}
pre {
margin: 0px 5px;
font-size: $font-size-sm;
white-space: pre-wrap;
word-break: break-all;
}
border: 0.05rem solid #dadee4;
border-radius: $border-radius;
padding: 5px 5px !important;
margin-top: 0px !important;
overflow-x: hidden;
overflow-y: scroll !important;
user-select: text;
-moz-user-select: text;
-webkit-user-select: text;
-ms-user-select: text;
.echo {
color: blue;
}
.error {
color: red;
font-weight: bolder;
}
pre {
margin: 0px 5px;
white-space: pre-wrap;
word-break: break-all;
}
}
@keyframes border-dance {
0% {
background-position: 0 0, 100% 100%, 0 100%, 100% 0;
}
100% {
background-position: 100% 0, 0 100%, 0 0, 100% 100%;
}
0% {
background-position:
0 0,
100% 100%,
0 100%,
100% 0;
}
100% {
background-position:
100% 0,
0 100%,
0 0,
100% 100%;
}
}
.comment {
background: #f1f1fc;
color: #5755d9;
padding-left: 0.5rem;
background: #f1f1fc;
color: #5755d9;
padding-left: 0.5rem;
}
.submitBtn {
display: none;
display: none;
}
.has-modification .submitBtn {
display: block;
display: block;
}
.drop-zone-over {
}
.files-list-footer {
color: #5755d9;
color: #5755d9;
}
.file-line-controls {
flex-grow: 1;
display: flex;
flex-flow: row nowrap;
justify-content: flex-end;
align-items: center;
flex-grow: 1;
display: flex;
flex-flow: row nowrap;
justify-content: flex-end;
align-items: center;
}
.flex-pack,
.file-line-name {
align-items: center;
justify-content: flex-start;
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: flex-start;
display: flex;
flex-wrap: nowrap;
}
.file-line-action label,
.file-line-action {
cursor: pointer;
cursor: pointer;
}
.file-line-action:active {
color: blue;
font-weight: bolder;
color: blue;
font-weight: bolder;
}
.file-line {
display: -ms-flexbox;
display: flex;
flex-flow: row wrap;
justify-content: space-between;
align-items: center;
line-height: 2.2rem;
display: -ms-flexbox;
display: flex;
flex-flow: row wrap;
justify-content: space-between;
align-items: center;
line-height: 2.2rem;
}
.bordered {
border: 0.05rem solid #dadee4;
border-radius: $border-radius;
border: 0.05rem solid #dadee4;
border-radius: $border-radius;
}
.bordered_warning {
border: 0.1rem solid $warning-color;
border-radius: $border-radius;
border: 0.1rem solid $warning-color;
border-radius: $border-radius;
}
.file-line:hover {
color: #5755d9;
background-color: #f1f1fc;
border-radius: $border-radius;
color: #5755d9;
background-color: #f1f1fc;
border-radius: $border-radius;
}
.image-container,
.camera-container {
border: none;
width: 100%;
border: none;
width: 100%;
}
.m-05 {
margin: 0.05rem !important;
margin: 0.05rem !important;
}
.error-login-message{
color: red;
background-color: white;
font-weight: bolder;
text-align: center;
.error-login-message {
color: red;
background-color: white;
font-weight: bolder;
text-align: center;
}
.content-container,
.extensionContainer {
border: none;
height: 100%;
width: 100%;
border: none;
height: 100%;
width: 100%;
}
.body-extension {
overflow-y: auto !important;
overflow-y: auto !important;
}
.mobile-view .btn-header,
.btn-header:hover,
.mobile-view .btn-close,
.btn-close:hover {
color: white !important;
background-color: blue !important;
color: white !important;
background-color: blue !important;
}
.logo {
padding-top: 7px;
padding-left: 4px;
padding-right: 4px;
border-radius: 5px;
padding-top: 7px;
padding-left: 4px;
padding-right: 4px;
border-radius: 5px;
}
.passwordReveal {
color: #c0c0c0;
cursor: pointer;
margin-top: -0.22rem !important;
margin-right: 0.9rem !important;
color: #c0c0c0;
cursor: pointer;
margin-top: -0.22rem !important;
margin-right: 0.9rem !important;
}
.passwordReveal:hover {
color: blue;
color: blue;
}
.align-top {
align-items: top !important;
-ms-flex-align: top !important;
align-items: top !important;
-ms-flex-align: top !important;
}
a label {
cursor: pointer;
cursor: pointer;
}
.flex-wrap .form-label {
margin-right: 10px;
margin-right: 10px;
}
.notification-line {
overflow-x: hidden;
line-height: 24px !important;
padding-top: 4px !important;
padding-left: 4px;
padding-right: 4px;
cursor: pointer;
overflow-x: hidden;
line-height: 24px !important;
padding-top: 4px !important;
padding-left: 4px;
padding-right: 4px;
cursor: pointer;
}
.notification-line:hover {
background-color: #f1f1fc;
background-color: #f1f1fc;
}
.feather-icon-container .text-menu-item,
.feather-icon-container .text-ellipsis,
.feather-icon-container label {
vertical-align: top;
margin-left: 0.25rem;
margin-right: 0.25rem
vertical-align: top;
margin-left: 0.25rem;
margin-right: 0.25rem;
}
.tooltip > svg,
.tooltip > span {
pointer-events: none;
pointer-events: none;
}
.form-group .form-label,
.form-switch {
cursor: pointer;
user-select: none;
cursor: pointer;
user-select: none;
}
.fit-content{
width: fit-content;
.fit-content {
width: fit-content;
}
.has-modification svg {
color: $warning-color;
color: $warning-color;
}
.has-error svg {
color: $error-color;
color: $error-color;
}
.has-success svg {
color: $success-color;
color: $success-color;
}
.has-modification label,
.has-modification .form-input-hint,
.is-modified + .form-input-hint {
color: $warning-color;
color: $warning-color;
}
.has-modification .form-input,
.form-input.is-modified,
.has-modification .form-select,
.form-select.is-modified {
background: #fffaf7;
border-color: $warning-color;
background: #fffaf7;
border-color: $warning-color;
}
.has-modification .form-input:focus,
.form-input.is-modified:focus,
.has-modification .form-select:focus,
.form-select.is-modified:focus {
box-shadow: 0 0 0 0.1rem rgba(232, 86, 0, 0.2);
box-shadow: 0 0 0 0.1rem rgba(232, 86, 0, 0.2);
}
.has-modification .form-checkbox .form-icon,
@@ -400,7 +410,7 @@ a label {
.form-radio.is-modified .form-icon,
.has-modification .form-switch .form-icon,
.form-switch.is-modified .form-icon {
border-color: $warning-color;
border-color: $warning-color;
}
.has-modification .form-checkbox input:checked + .form-icon,
@@ -409,8 +419,8 @@ a label {
.form-radio.is-modified input:checked + .form-icon,
.has-modification .form-switch input:checked + .form-icon,
.form-switch.is-modified input:checked + .form-icon {
background: $warning-color;
border-color: $warning-color;
background: $warning-color;
border-color: $warning-color;
}
.has-modification .form-checkbox input:focus + .form-icon,
@@ -419,63 +429,63 @@ a label {
.form-radio.is-modified input:focus + .form-icon,
.has-modification .form-switch input:focus + .form-icon,
.form-switch.is-modified input:focus + .form-icon {
border-color: $warning-color;
box-shadow: 0 0 0 0.1rem rgba(232, 86, 0, 0.2);
border-color: $warning-color;
box-shadow: 0 0 0 0.1rem rgba(232, 86, 0, 0.2);
}
.has-modification .form-checkbox input:indeterminate + .form-icon,
.form-checkbox.is-modified input:indeterminate + .form-icon {
background: $warning-color;
border-color: $warning-color;
background: $warning-color;
border-color: $warning-color;
}
.has-button-submit .form-input {
border-radius: 0.2rem !important;
border-radius: 0.2rem !important;
}
.has-modification {
.has-button-submit .form-input {
border-top-right-radius: 0px !important;
border-bottom-right-radius: 0px !important;
}
.has-button-submit .form-input {
border-top-right-radius: 0px !important;
border-bottom-right-radius: 0px !important;
}
}
.flatbtn {
input[type="radio"] {
display: none;
&:not(:disabled) ~ label {
cursor: pointer;
input[type="radio"] {
display: none;
&:not(:disabled) ~ label {
cursor: pointer;
}
&:disabled ~ label {
color: hsla(150, 5%, 75%, 1);
border-color: hsla(150, 5%, 75%, 1);
box-shadow: none;
cursor: not-allowed;
}
}
&:disabled ~ label {
color: hsla(150, 5%, 75%, 1);
border-color: hsla(150, 5%, 75%, 1);
box-shadow: none;
cursor: not-allowed;
label {
font-size: 0.8rem;
height: 1.8rem;
line-height: 1.8rem;
display: block;
background: white;
border: 0.05rem solid #5755d9;
border-top: 0em;
text-align: center;
color: #5755d9;
position: relative;
min-width: 2rem;
}
}
label {
font-size: 0.8rem;
height: 1.8rem;
line-height: 1.8rem;
display: block;
background: white;
border: 0.05rem solid #5755d9;
border-top: 0em;
text-align: center;
color: #5755d9;
position: relative;
min-width: 2rem;
}
input[type="radio"]:active + label {
background: blue;
color: white;
}
input[type="radio"]:checked + label {
background: #5755d9;
color: white;
}
.last-button {
border-radius: 0px 0px 5px 5px;
}
input[type="radio"]:active + label {
background: blue;
color: white;
}
input[type="radio"]:checked + label {
background: #5755d9;
color: white;
}
.last-button {
border-radius: 0px 0px 5px 5px;
}
}

View File

@@ -1,17 +1,17 @@
@media (max-width: 480px) {
.hide-low {
display: none !important;
}
.show-low {
display: block !important;
}
section .active,
li .active {
background-color: rgba(100, 100, 100, 0.1) !important;
}
.btn-header,
.btn-close {
color: white !important;
background-color: blue !important;
}
.hide-low {
display: none !important;
}
.show-low {
display: block !important;
}
section .active,
li .active {
background-color: rgba(100, 100, 100, 0.1) !important;
}
.btn-header,
.btn-close {
color: white !important;
background-color: blue !important;
}
}

View File

@@ -2,50 +2,50 @@
}
.menu-panel-item {
display: flex;
justify-content: space-between;
display: flex;
justify-content: space-between;
}
.text-menu-item {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-right: 5px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-right: 5px;
}
.menu-panel-item .feather-icon-container {
vertical-align: middle;
margin-top: 0.2rem;
vertical-align: middle;
margin-top: 0.2rem;
}
.menu-item {
color: #5755d9;
color: #5755d9;
}
.menu .menu-item > .menu-entry {
border-radius: 0.2rem;
color: inherit;
display: block;
margin: 0 -0.4rem;
padding: 0.2rem 0.4rem;
text-decoration: none;
cursor: pointer;
border-radius: 0.2rem;
color: inherit;
display: block;
margin: 0 -0.4rem;
padding: 0.2rem 0.4rem;
text-decoration: none;
cursor: pointer;
}
.menu .menu-item > .menu-entry:focus,
.menu .menu-item > .menu-entry:hover {
background: #f1f1fc;
color: #5755d9;
background: #f1f1fc;
color: #5755d9;
}
.menu .menu-item > .menu-entry:active,
.menu .menu-item > .menu-entry.active {
background: inherit;
color: inherit;
background: inherit;
color: inherit;
}
.panel .menu-item:active,
.panel .menu-item.active {
background: #5755d9;
color: #f1f1fc;
border-radius: 0.2rem;
background: #5755d9;
color: #f1f1fc;
border-radius: 0.2rem;
}

View File

@@ -1,30 +1,30 @@
.tab-item {
color: #8080ff !important;
color: #8080ff !important;
}
section .active,
li .active {
color: blue !important;
font-weight: 700; // bold
color: blue !important;
font-weight: 700; // bold
}
.mobile-view section .active,
.mobile-view li .active {
background-color: rgba(0, 0, 255, 0.1) !important;
background-color: rgba(0, 0, 255, 0.1) !important;
}
.navbar {
padding: 0rem;
padding-left: 15px;
background-color: $bg-color-dark;
padding: 0rem;
padding-left: 15px;
background-color: $bg-color-dark;
}
.tab-item{
pointer-events: none;
.tab-item {
pointer-events: none;
}
.tab {
.tab-item {
.btn {
border-radius: 0;
.tab-item {
.btn {
border-radius: 0;
}
}
}
}

View File

@@ -1,56 +1,56 @@
.panel-dashboard,
.panel-interface,
.panel-features {
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}
.macro-buttons-panel {
display: -ms-flexbox;
display: flex;
flex-flow: row wrap;
justify-content: space-between;
align-content: stretch;
display: -ms-flexbox;
display: flex;
flex-flow: row wrap;
justify-content: space-between;
align-content: stretch;
}
.panel {
min-height: 300px;
max-height: 650px;
min-height: 300px;
max-height: 650px;
}
.panel-body-dashboard,
.panel-body-interface,
.panel-body-features {
display: flex;
flex-flow: column;
display: flex;
flex-flow: column;
}
.panel .navbar,
.panel .navbar-section {
background: #f1f1fc;
color: #5755d9;
background: #f1f1fc;
color: #5755d9;
}
.panel-item {
flex: 0 1 auto;
flex: 0 1 auto;
}
.files-list-footer {
padding: 0.2rem 0.8rem !important;
padding: 0.2rem 0.8rem !important;
}
.column {
.panel {
height: 100%;
box-shadow: 0px 0px 14px -5px rgba(0, 0, 0, 0.05);
}
.panel {
height: 100%;
box-shadow: 0px 0px 14px -5px rgba(0, 0, 0, 0.05);
}
}
.loading-panel {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
width: 100%;
}

View File

@@ -93,7 +93,7 @@ const sections = {
";board_build.f_flash = 80000000L\n" +
"board_build.flash_mode = $flash_mode\n" +
"upload_speed = 460800\n" +
"extra_scripts = pre:platformIO/extra_script.py\n"+
"extra_scripts = pre:platformIO/extra_script.py\n" +
"board_build.filesystem = $filesystem\n",
build_flags: " -DCORE_DEBUG_LEVEL=0\n",
defaultMosi: 23,
@@ -119,7 +119,7 @@ const sections = {
"board_build.f_flash = 80000000L\n" +
"board_build.flash_mode = $flash_mode\n" +
"upload_speed = 460800\n" +
"extra_scripts = pre:platformIO/extra_script.py\n"+
"extra_scripts = pre:platformIO/extra_script.py\n" +
"board_build.filesystem = $filesystem\n",
build_flags:
"\n -DCORE_DEBUG_LEVEL=0\n -DARDUINO_USB_CDC_ON_BOOT=0\n -DARDUINO_USB_MSC_ON_BOOT=0\n -DARDUINO_USB_DFU_ON_BOOT=0\n -DCONFIG_IDF_TARGET_ESP32S2=1\n",
@@ -148,7 +148,7 @@ const sections = {
"board_build.f_flash = 80000000L\n" +
"board_build.flash_mode = $flash_mode\n" +
"upload_speed = 460800\n" +
"extra_scripts = pre:platformIO/extra_script.py\n"+
"extra_scripts = pre:platformIO/extra_script.py\n" +
"board_build.filesystem = $filesystem\n",
build_flags:
@@ -177,7 +177,7 @@ const sections = {
"board_build.f_flash = 80000000L\n" +
"board_build.flash_mode = $flash_mode\n" +
"upload_speed = 460800\n" +
"extra_scripts = pre:platformIO/extra_script.py\n"+
"extra_scripts = pre:platformIO/extra_script.py\n" +
"board_build.filesystem = $filesystem\n",
build_flags:
" -DCORE_DEBUG_LEVEL=0\n -DCONFIG_IDF_TARGET_ESP32C3=1\n",
@@ -204,7 +204,7 @@ const sections = {
"board_build.flash_mode = $flash_mode\n" +
"upload_resetmethod = $resetmethod\n" +
"upload_speed = 115200\n" +
"extra_scripts = pre:platformIO/extra_script.py\n"+
"extra_scripts = pre:platformIO/extra_script.py\n" +
"board_build.filesystem = $filesystem\n",
build_flags:
"\n -D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY\n -DNONOSDK221=1\n -DNDEBUG -DVTABLES_IN_FLASH\n -DWAVEFORM_LOCKED_PWM\n",
@@ -231,7 +231,7 @@ const sections = {
"board_build.flash_mode = $flash_mode\n" +
"upload_resetmethod = $resetmethod\n" +
"upload_speed = 115200\n" +
"extra_scripts = pre:platformIO/extra_script.py\n"+
"extra_scripts = pre:platformIO/extra_script.py\n" +
"board_build.filesystem = $filesystem\n",
build_flags:
"\n -D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY\n -DNONOSDK221=1\n -DNDEBUG -DVTABLES_IN_FLASH\n -DWAVEFORM_LOCKED_PWM\n",
@@ -241,8 +241,8 @@ const sections = {
defaultCs: 15,
defaultMiso: 12,
defaultSda: 4,
defaultScl: 5
}
defaultScl: 5,
},
}
const libIgnore = ({
@@ -391,44 +391,43 @@ const convertToPioEnv = ({
resetmethod,
memory_type,
}) => {
let res = "[env:" +
envName +
"]\n" +
sections[target].common +
partitionScheme(
target,
targetsize,
hasWifi,
hasEthernet,
hasBT,
cameraName
) +
libIgnore({
target,
targetsize,
hasWifi,
hasEthernet,
hasBT,
cameraName,
displayName,
}) +
buildFlags({
target,
targetsize,
hasWifi,
hasEthernet,
hasBT,
has_psram,
displayName,
})
res = res.replace(/\$flash_mode/g, flash_mode)
let res =
"[env:" +
envName +
"]\n" +
sections[target].common +
partitionScheme(
target,
targetsize,
hasWifi,
hasEthernet,
hasBT,
cameraName
) +
libIgnore({
target,
targetsize,
hasWifi,
hasEthernet,
hasBT,
cameraName,
displayName,
}) +
buildFlags({
target,
targetsize,
hasWifi,
hasEthernet,
hasBT,
has_psram,
displayName,
})
res = res.replace(/\$flash_mode/g, flash_mode)
res = res.replace(/\$filesystem/g, filesystem)
res = res.replace(/\$resetmethod/g, resetmethod)
res = res.replace(/\$memory_type/g, memory_type)
return (
res
)
return res
}
const convertPioToText = () => {
@@ -440,8 +439,14 @@ const convertPioToText = () => {
const cameraName = useDatasContextFn.getValueId("cameratype")
const has_psram = useDatasContextFn.getValueId("has_psram")
const displayName = useDatasContextFn.getValueId("displaytype")
const flash_mode = target=="esp8285" || target == "esp8266"?useDatasContextFn.getValueId("flash_mod1"):useDatasContextFn.getValueId("flash_mode")
const filesystem = useDatasContextFn.getValueId("flashFS")=="ESP_LITTLEFS_FILESYSTEM"?"littlefs":"fatfs"
const flash_mode =
target == "esp8285" || target == "esp8266"
? useDatasContextFn.getValueId("flash_mod1")
: useDatasContextFn.getValueId("flash_mode")
const filesystem =
useDatasContextFn.getValueId("flashFS") == "ESP_LITTLEFS_FILESYSTEM"
? "littlefs"
: "fatfs"
const resetmethod = useDatasContextFn.getValueId("resetmethod")
const memory_type = useDatasContextFn.getValueId("memory_type")
console.log("filesystem", filesystem)
@@ -554,8 +559,8 @@ const convertToText = (data) => {
help
? "// " + help + "\n"
: label
? "// " + label + "\n"
: ""
? "// " + label + "\n"
: ""
}` +
`${
element.usedescforoptions
@@ -563,7 +568,9 @@ const convertToText = (data) => {
: ""
}` +
(element.header ? element.header : "") +
(element.define?`#define ${element.define} ${element.value}\n`:"")
(element.define
? `#define ${element.define} ${element.value}\n`
: "")
)
} else if (element.type == "boolean") {
return (
@@ -571,9 +578,13 @@ const convertToText = (data) => {
`\n// ${element.label}\n` +
`// ${element.description}\n` +
(element.header ? element.header : "") +
(element.define?`#define ${element.define} ${
!element.disableiffalse ? element.value : ""
}\n`:"")
(element.define
? `#define ${element.define} ${
!element.disableiffalse
? element.value
: ""
}\n`
: "")
)
} else if (
element.type == "text" ||

View File

@@ -18,6 +18,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
import { h } from "preact"
const piofooter = "\n\
const piofooter =
"\n\
"
export default piofooter

View File

@@ -218,23 +218,23 @@ const StepTab = ({ previous, current, next }) => {
options
)
: subelement.isport
? subelement.usedefault
? JSON.parse(
JSON.stringify(
mergeListOptions(
portsList,
options
)
).replaceAll(
"None",
"Default"
)
)
: mergeListOptions(
portsList,
options
)
: options
? subelement.usedefault
? JSON.parse(
JSON.stringify(
mergeListOptions(
portsList,
options
)
).replaceAll(
"None",
"Default"
)
)
: mergeListOptions(
portsList,
options
)
: options
const filteredOptions =
optionsList
? optionsList.filter(
@@ -252,8 +252,8 @@ const StepTab = ({ previous, current, next }) => {
subelement.ispin
? usedPinsList
: subelement.isport
? usedPortsList
: null
? usedPortsList
: null
)
}
)

View File

@@ -6,17 +6,23 @@
{
"label": "GPIO 0",
"value": "0",
"depend":{"id":"targetmcu","value":["esp8266","esp32","esp32s2","esp32s3"]}
"depend": { "id": "targetmcu", "value": ["esp8266", "esp32", "esp32s2", "esp32s3"] }
},
{
"label": "GPIO 0",
"value": "0",
"depend":[{"id":"targetmcu","value":["esp32c3"]}, {"id":"formfactor","notvalue":["esp01"]}]
"depend": [
{ "id": "targetmcu", "value": ["esp32c3"] },
{ "id": "formfactor", "notvalue": ["esp01"] }
]
},
{
"label": "GPIO 1",
"value": "1",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s2","esp32s3","esp32c3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s2", "esp32s3", "esp32c3"] }
]
},
{
"label": "GPIO 2",
@@ -25,222 +31,342 @@
{
"label": "GPIO 3",
"value": "3",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s2","esp32s3","esp32c3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s2", "esp32s3", "esp32c3"] }
]
},
{
"label": "GPIO 4",
"value": "4",
"depend":{"id":"formfactor","notvalue":["esp01"]}
"depend": { "id": "formfactor", "notvalue": ["esp01"] }
},
{
"label": "GPIO 5",
"value": "5",
"depend":{"id":"formfactor","notvalue":["esp01"]}
"depend": { "id": "formfactor", "notvalue": ["esp01"] }
},
{
"label": "GPIO 6",
"value": "6",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s2","esp32s3","esp32c3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s2", "esp32s3", "esp32c3"] }
]
},
{
"label": "GPIO 7",
"value": "7",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s2","esp32s3","esp32c3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s2", "esp32s3", "esp32c3"] }
]
},
{
"label": "GPIO 8",
"value": "8",
"depend":{"id":"targetmcu","value":["esp32s2","esp32s3","esp32c3"]}
"depend": { "id": "targetmcu", "value": ["esp32s2", "esp32s3", "esp32c3"] }
},
{
"label": "GPIO 9",
"value": "9",
"depend":{"id":"targetmcu","value":["esp32s2","esp32s3","esp32c3"]}
"depend": { "id": "targetmcu", "value": ["esp32s2", "esp32s3", "esp32c3"] }
},
{
"label": "GPIO 10",
"value": "10",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s2","esp32s3","esp32c3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s2", "esp32s3", "esp32c3"] }
]
},
{
"label": "GPIO 11",
"value": "11",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 12",
"value": "12",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp8266","esp32","esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp8266", "esp32", "esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 13",
"value": "13",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp8266","esp32","esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp8266", "esp32", "esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 14",
"value": "14",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp8266","esp32","esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp8266", "esp32", "esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 15",
"value": "15",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp8266","esp32","esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp8266", "esp32", "esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 16",
"value": "16",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp8266","esp32","esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp8266", "esp32", "esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 17",
"value": "17",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32","esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32", "esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 18",
"value": "18",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32","esp32s2","esp32s3","esp32c3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32", "esp32s2", "esp32s3", "esp32c3"] }
]
},
{
"label": "GPIO 19",
"value": "19",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32","esp32s2","esp32s3","esp32c3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32", "esp32s2", "esp32s3", "esp32c3"] }
]
},
{
"label": "GPIO 21",
"value": "21",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32","esp32s2","esp32s3","esp32c3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32", "esp32s2", "esp32s3", "esp32c3"] }
]
},
{
"label": "GPIO 22",
"value": "22",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32"] }
]
},
{
"label": "GPIO 23",
"value": "23",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32", "esp32s3"] }
]
},
{
"label": "GPIO 25",
"value": "25",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32"] }
]
},
{
"label": "GPIO 26",
"value": "26",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32","esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32", "esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 27",
"value": "27",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32","esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32", "esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 28",
"value": "28",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s3"] }
]
},
{
"label": "GPIO 29",
"value": "29",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s3"] }
]
},
{
"label": "GPIO 30",
"value": "30",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s3"] }
]
},
{
"label": "GPIO 31",
"value": "31",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32","esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32", "esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 32",
"value": "32",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32", "esp32s3"] }
]
},
{
"label": "GPIO 33",
"value": "33",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32","esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32", "esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 34",
"value": "34",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32","esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32", "esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 35",
"value": "35",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32","esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32", "esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 36",
"value": "36",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32","esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32", "esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 37",
"value": "37",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 38",
"value": "38",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 39",
"value": "39",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32","esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32", "esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 40",
"value": "40",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 41",
"value": "41",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 42",
"value": "42",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 43",
"value": "43",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 44",
"value": "44",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 45",
"value": "45",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 46",
"value": "46",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s2","esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s2", "esp32s3"] }
]
},
{
"label": "GPIO 47",
"value": "47",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s3"] }
]
},
{
"label": "GPIO 48",
"value": "48",
"depend":[{"id":"formfactor","notvalue":["esp01"]},{"id":"targetmcu","value":["esp32s3"]}]
"depend": [
{ "id": "formfactor", "notvalue": ["esp01"] },
{ "id": "targetmcu", "value": ["esp32s3"] }
]
}
]
]

63
tools/format_sources.py Normal file
View File

@@ -0,0 +1,63 @@
#!/usr/bin/python
import os
import subprocess
from shutil import which
def format_sources():
"""
Format JavaScript and CSS files using Prettier.
This script locates all JavaScript and CSS files in the 'src' and 'config' directories
(including subdirectories) and formats them using the Prettier tool. It requires Node.js
and the Prettier package to be installed.
Returns:
None
"""
# Base directory of the script
script_path = os.path.abspath(__file__)
# Extract dir path
script_dir = os.path.dirname(script_path)
# Build paths of sources dirs: ../src and ../config
src_dir = os.path.abspath(os.path.normpath(os.path.join(script_dir, '..', 'src')))
config_dir = os.path.abspath(os.path.normpath(os.path.join(script_dir, '..', 'config')))
# Parse all c, h , cpp, js, css files in all directories and sub directories
file_paths = []
for base_dir in [src_dir, config_dir]:
for root, dirs, files in os.walk(base_dir):
for file in files:
if file.endswith(('.js', '.css', '.scss', '.json')):
file_path = os.path.join(root, file)
file_paths.append(os.path.abspath(os.path.normpath(file_path)))
#print(os.path.abspath(os.path.normpath(file_path)))
# Locate the Prettier binary
node_path = which('node')
#print(node_path)
if not node_path:
print("node not found in PATH. Please install it globally or locally.")
exit(1)
node_dir = os.path.dirname(node_path)
client_path = os.path.join('node_modules', 'npm', 'bin', 'npx-cli.js')
#print(client_path)
# Now format all files one by one with prettier
prettierrc_path = os.path.abspath(os.path.normpath(os.path.join(script_dir, '..', '.prettierrc')))
#print("Using:" + prettierrc_path)
for file_path in file_paths:
tmpPath = file_path
print("Formating " + tmpPath, end="")
try:
command = ['node', client_path, 'prettier', '--write', tmpPath]
#print(command)
subprocess.run(command, check=False, cwd=node_dir)
print("=> Ok")
except subprocess.CalledProcessError as e:
print(f'=>Error : {e}')
# Call the format_sources function
format_sources()