Skip to content

Commit

Permalink
Merge pull request #635 from KipK/guiV2switch
Browse files Browse the repository at this point in the history
Gui v2 switch
  • Loading branch information
jeremypoulter authored May 12, 2023
2 parents 8170b69 + 5e6fa21 commit acbd1fc
Show file tree
Hide file tree
Showing 53 changed files with 17,602 additions and 9,141 deletions.
27 changes: 4 additions & 23 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ permissions:
on:
workflow_dispatch:
inputs:
v1_ref:
required: true
description: The branch/tag for the v1 UI
default: master
v2_ref:
required: true
description: The branch/tag for the v2 UI
Expand Down Expand Up @@ -60,13 +56,9 @@ jobs:
- openevse_esp32-poe-iso
- openevse_esp32-heltec-wifi-lora-v2
gui:
- name: gui-v1
repo: OpenEVSE/openevse_wifi_gui
build_flags: ""
ref: ${{ inputs.v1_ref }}
- name: gui-v2
repo: KipK/openevse-gui-v2
build_flags: "-D DISABLE_WIFI_PORTAL -D WEB_SERVER_ROOT_PAGE_INDEX"
repo: OpenEVSE/openevse-gui-v2
build_flags: ""
ref: ${{ inputs.v2_ref }}

steps:
Expand Down Expand Up @@ -130,7 +122,7 @@ jobs:
- name: Upload output to GitHub
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.env }}_${{ matrix.gui.name }}.bin
name: ${{ matrix.env }}.bin
path: .pio/build/${{ matrix.env }}/firmware.bin

release:
Expand Down Expand Up @@ -163,18 +155,7 @@ jobs:
prerelease: true
title: Development Build
files: |
*gui-v1.bin
- name: Upload assets to the v2 GUI release
if: github.ref_name == 'master'
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: v2_gui
prerelease: true
title: V2 GUI pre-release
files: |
*gui-v2.bin
*.bin
- name: Upload assets to release
if: startsWith(github.ref_name, 'v')
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "gui"]
path = gui
url = https://github.com/openevse/openevse_wifi_gui
[submodule "gui-v2"]
path = gui-v2
url = https://github.com/OpenEVSE/openevse-gui-v2
branch = master
1 change: 0 additions & 1 deletion gui
Submodule gui deleted from 5d1d65
1 change: 1 addition & 0 deletions gui-v2
Submodule gui-v2 added at 09d033
2 changes: 1 addition & 1 deletion scripts/extra_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def process_html_app(source, dest, env):

gui_name = environ.get("GUI_NAME")
if gui_name in (None, ""):
gui_name = "gui"
gui_name = "gui-v2"

gui_dir = join(env.subst("$PROJECT_DIR"), gui_name)
dist_dir = join(gui_dir, "dist")
Expand Down
12 changes: 0 additions & 12 deletions src/web_server_static.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,12 @@ struct StaticFile

#define IS_ALIGNED(x) (0 == ((uint32_t)(x) & 0x3))

#ifdef WEB_SERVER_ROOT_PAGE_INDEX
#define WEB_SERVER_INDEX_PAGE "index.html"
#else
#define WEB_SERVER_INDEX_PAGE "home.html"
#endif

// Pages
static const char _HOME_PAGE[] PROGMEM = "/" WEB_SERVER_INDEX_PAGE;
#define HOME_PAGE FPSTR(_HOME_PAGE)

#ifndef DISABLE_WIFI_PORTAL
static const char _WIFI_PAGE[] PROGMEM = "/wifi_portal.html";
#define WIFI_PAGE FPSTR(_WIFI_PAGE)
#endif

class StaticFileResponse: public MongooseHttpServerResponse
{
private:
Expand All @@ -59,9 +50,6 @@ static bool web_static_get_file(MongooseHttpServerRequest *request, StaticFile *
String path = request->uri();
if(path == "/") {
path = String(
#ifndef DISABLE_WIFI_PORTAL
net.isWifiModeApOnly() ? WIFI_PAGE :
#endif
HOME_PAGE);

}
Expand Down
106 changes: 0 additions & 106 deletions src/web_static/web_server.arduinoocpp_png.h

This file was deleted.

Loading

0 comments on commit acbd1fc

Please sign in to comment.