Skip to content

Commit

Permalink
Merge pull request #24 from Grovkillen/dash_functionality
Browse files Browse the repository at this point in the history
Dash functionality
  • Loading branch information
Grovkillen authored Mar 24, 2020
2 parents f804fea + 7ea00a9 commit c75a5dd
Show file tree
Hide file tree
Showing 26 changed files with 1,559 additions and 1,359 deletions.
11 changes: 5 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//TODO: add git commit functionality for auto-release tag (https://github.com/rubenv/grunt-git)
/* GUIEasy Copyright (C) 2019-2020 Jimmy "Grovkillen" Westberg */

module.exports = function(grunt) {
// Project configuration.
Expand All @@ -18,18 +18,19 @@ module.exports = function(grunt) {
'src/gui_easy_settings_config_table.js',
'src/gui_easy_default_settings.js',
'src/gui_easy_helper.js',
'src/gui_easy_helper_esp_specific.js',
'src/gui_easy_curly.js',
'src/gui_easy_curly_unit.js',
'src/gui_easy_curly_page.js',
'src/gui_easy_curly_icons.js',
'src/gui_easy_curly_forms.js',
'src/gui_easy_scrubber.js',
'src/gui_easy_popper.js',
'src/gui_easy_popper_rules.js',
'src/gui_easy_popper_extra.js',
'src/gui_easy_pitcher.js',
'src/gui_easy_butler.js',
'src/gui_easy_tender.js',
'src/gui_easy_ini.js'
'src/gui_easy_ini.js',
],
'build/temp/forms.min.js': [
'src/forms/gui_easy_forms.js',
Expand All @@ -41,9 +42,6 @@ module.exports = function(grunt) {
'src/dash/gui_easy_dash.js',
'src/dash/gui_easy_dash_d*.js'
],
'build/temp/patreon.min.js': [
'src/gui_easy_popper_extra.js'
],
'build/temp/mini.min.js': [
'src/index-minimal.js'
]
Expand Down Expand Up @@ -529,6 +527,7 @@ module.exports = function(grunt) {
}
if (level === "revision") {
guiEasy.revision++;
guiEasy.releaseCandidate = 0;
guiEasy.development = true;
}
if (level === "minor") {
Expand Down
32 changes: 18 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ you may use the **noDash** version.
If you plan on contributing to the project you need to be able to compile stuff yourself in
order to bug test as close as release conditions as possible. What you need to do:

1. Install [Node.js](https://nodejs.org/en/download/), this will include [npm](https://www.npmjs.com/get-npm) which is what we use
to compile the project.
2. Install [Grunt.js](https://gruntjs.com/) + dependencies ([package.json](/package.json), run ``npm install`` from the project root level)
1. Install [Node.js](https://nodejs.org/en/download/), this will include [npm](https://www.npmjs.com/get-npm)
which is what we use to compile the project.
2. Install [Grunt.js](https://gruntjs.com/) + dependencies ([package.json](/package.json), run ``npm install``
from the project root level)
3. Install Grunt Command Line Interface using your terminal/cmd, and thanks to npm it's this easy:

```
Expand Down Expand Up @@ -400,25 +401,28 @@ ready.
Release candidates are by definition never set to the future major and/or minor level. See this example:

```
1.0.0 is already released and we want to create a new version with extra stuff
1.0.nightly.1 is created and we start adding the stuff
[grunt bump:major] 1.0.0 is already released and we want to create a new version with extra stuff
[grunt bump:revision] 1.0.nightly.1 is created and we start adding the stuff
...
1.0.nightly.123 is ready to be tested by a broader user base
1.0.rc1.124 is created
[grunt bump:revision] 1.0.nightly.123 is ready to be tested by a broader user base
[grunt bump:rc] 1.0.rc1.124 is created
...
1.0.rc3.126 is the version that is finally accepted
1.1.0 is created and released.
[grunt bump:rc] 1.0.rc3.126 is the version that is finally accepted
[grunt bump:minor] 1.1.0 is created and released
```

Another example

```
1.1.0 is already released but we found a bug that cannot wait for next version to be resolved
1.1.nightly.1 is created and we start fixing the bug
[grunt bump:minor] 1.1.0 is already released but we found a bug that cannot wait for next
version to be resolved
[grunt bump:revision] 1.1.nightly.1 is created and we start fixing the bug
...
1.1.nightly.5 is ready to be tested by a broader user base
1.1.rc1.6 is created and after testing accepted
1.1.7 is created and released.
[grunt bump:revision] 1.1.nightly.5 is ready to be tested by a broader user base
[grunt bump:rc] 1.1.rc1.6 is created and after testing accepted
[grunt bump:revision] 1.1.nightly.7 (since this is the one we want to release as the patched version,
so we need to remove the dev. flag)
[grunt bump:dev=false] 1.1.7 is created and released
```

As you can see, ``nightly`` and ``rc`` is **only a state** of the code, the revision is still
Expand Down
1 change: 1 addition & 0 deletions build/0.1.nightly.5/gui.min.css

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions build/0.1.nightly.5/info/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "gui-easy",
"timestamp": 1583609727357,
"version": "0.1.5",
"versionName": "0.1.nightly.5",
"author": "Jimmy 'Grovkillen' Westberg <[email protected]> (https://grovkillen.com)",
"description": "Front End for ESP Easy",
"main": "build/0.1.nightly.5/main/index.html.gz",
"repository": {
"type": "git",
"url": "git+https://github.com/letscontrolit/GUIEasy.git"
},
"license": "SEE LICENSE IN LICENSE.md",
"bugs": {
"url": "https://github.com/letscontrolit/GUIEasy/issues"
},
"homepage": "https://github.com/letscontrolit/GUIEasy#readme",
"devDependencies": {
"grunt": "^1.0.4",
"grunt-contrib-uglify-es": "^3.3.0",
"grunt-contrib-cssmin": "^3.0.0",
"grunt-contrib-rename": "^0.2.0",
"grunt-contrib-clean": "^2.0.0",
"grunt-contrib-compress": "^1.6.0",
"grunt-zopfli-native": "^2.0.0",
"grunt-processhtml": "^0.4.2",
"grunt-file-append": "^0.0.7",
"grunt-contrib-copy": "^1.0.0",
"grunt-folder-list": "^1.1.0",
"grunt-size-report": "^0.1.4",
"grunt-filesize": "^0.0.7",
"grunt-contrib-htmlmin": "^3.1.0",
"npm": "^6.13.4"
},
"scripts": {
"build": "node Gruntfile.js"
},
"keywords": [
"ESP Easy",
"CSS framework",
"GUI",
"Frontend"
]
}
7 changes: 7 additions & 0 deletions build/0.1.nightly.5/info/release.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
timestamp:1583609727357
major:0
minor:1
revision:5
rc:0
dev:true
files:[{"build":"main","size":78337},{"build":"noDash","size":67267},{"build":"mini","size":4339}]
1 change: 1 addition & 0 deletions build/0.1.nightly.5/info/source_files.json

Large diffs are not rendered by default.

Binary file added build/0.1.nightly.5/main/index.htm.gz
Binary file not shown.
1 change: 1 addition & 0 deletions build/0.1.nightly.5/mini.min.css

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

Binary file added build/0.1.nightly.5/mini/index.htm.gz
Binary file not shown.
Binary file added build/0.1.nightly.5/noDash/index.htm.gz
Binary file not shown.
Binary file added build/0.1.nightly.5/src-0.1.nightly.5.zip
Binary file not shown.
1 change: 1 addition & 0 deletions build/releases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
0.1.nightly.2
0.1.nightly.3
0.1.nightly.4
0.1.nightly.5
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "gui-easy",
"timestamp": 1583567613037,
"version": "0.1.4",
"versionName": "0.1.nightly.4",
"timestamp": 1583609727357,
"version": "0.1.5",
"versionName": "0.1.nightly.5",
"author": "Jimmy 'Grovkillen' Westberg <[email protected]> (https://grovkillen.com)",
"description": "Front End for ESP Easy",
"main": "build/0.1.nightly.4/main/index.html.gz",
"main": "build/0.1.nightly.5/main/index.html.gz",
"repository": {
"type": "git",
"url": "git+https://github.com/letscontrolit/GUIEasy.git"
Expand Down
77 changes: 1 addition & 76 deletions src/forms/gui_easy_forms_p002.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,80 +9,5 @@ guiEasy.forms.plugin.P002.category = "analog input";
guiEasy.forms.plugin.P002.state = "normal"; //normal, testing, development
//------------------------------- HTML or CURLY -------------------------------//
guiEasy.forms.plugin.P002.html = `
{{TOGGLE--configs-0--P002-1--oversampling is active|oversampling is disabled}}
<hr>
<div hidden id="task-_tasknumber_-y=kx+m">
<svg
id="task-_tasknumber_-y=kx+m-svg"
viewbox="0 0 500 100"
class="chart"
>
<g class="grid x-grid">
<line
x1="90"
x2="90"
y1="5"
y2="371"
></line>
</g>
<g class="grid y-grid">
<line
x1="90"
x2="705"
y1="370"
y2="370"
></line>
</g>
<g class="labels x-labels">
<text x="100" y="400">2008</text>
<text x="246" y="400">2009</text>
<text x="392" y="400">2010</text>
<text x="538" y="400">2011</text>
<text x="684" y="400">2012</text>
<text x="400" y="440" class="label-title">Year</text>
</g>
<g class="labels y-labels">
<text x="80" y="15">15</text>
<text x="80" y="131">10</text>
<text x="80" y="248">5</text>
<text x="80" y="373">0</text>
<text x="50" y="200" class="label-title">Price</text>
</g>
<polyline
id="task-_tasknumber_-y=kx+m-line"
fill="none"
stroke="#0074d9"
stroke-width="3"
points="
0,120
20,60
40,80
60,20
"
/>
<g class="data">
<circle cx="90" cy="192" r="4"></circle>
<circle cx="240" cy="141" r="4"></circle>
</g>
</svg>
</div>
<script defer>
let task_tasknumber_toggle = document.getElementById("task-_tasknumber_-P002-2");
let task_tasknumber_input1 = document.getElementById("task-_tasknumber_-P002-3");
let task_tasknumber_input2 = document.getElementById("task-_tasknumber_-P002-4");
let task_tasknumber_input3 = document.getElementById("task-_tasknumber_-P002-5");
let task_tasknumber_input4 = document.getElementById("task-_tasknumber_-P002-6");
let task_tasknumber_graph = document.getElementById("task-_tasknumber_-y=kx+m");
task_tasknumber_toggle.addEventListener("change", function() {
task_tasknumber_graph.hidden = task_tasknumber_toggle.checked;
})
function task_tasknumber_updateGraph() {
task_tasknumber_graph = "..";
}
</script>
{{TOGGLE--configs-3--P002-2--calibration is active|calibration is disabled}}
{{NUMBER--configs_long-0--P002-3--point 1 (x)--0--0--1023--1}}
{{NUMBER--configs_float-0--P002-4--point 1 (y)--0}}
{{NUMBER--configs_long-1--P002-5--point 2 (x)--0--0--1023--1}}
{{NUMBER--configs_float-1--P002-6--point 2 (y)--0}}
Add html or curly syntax here...
`; //--------------------------- HTML or CURLY -------------------------------//
2 changes: 2 additions & 0 deletions src/gui_easy_curly.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,12 +451,14 @@ guiEasy.curly.drawer = function (arg) {
}
html += guiEasy.curly.drawer.theme(x[i]);
}
// the space between "main-info" button and the "main-bg" button is needed for the grunt to minify correctly
html += `
<hr>
<div class="row">
<button class="main-success" data-click="theme-save">Save</button>
<button class="main-sunny" data-click="theme-copy">Copy</button>
<button class="main-info" data-click="theme-default">Default</button>
<button class="main-bg" data-click="modal-theme-import">Import</button>
</div>
</div>
Expand Down
Loading

0 comments on commit c75a5dd

Please sign in to comment.