Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WEBUI] Add Favicon.ico #1703

Merged
merged 18 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
e4d5683
Fixes for DT24 Triggering restart during discovery
NorthernMan54 Apr 21, 2023
0677a67
Merge remote-tracking branch 'upstream/development' into localDev
NorthernMan54 May 1, 2023
9d3257a
Merge remote-tracking branch 'upstream/development' into localDev
NorthernMan54 May 3, 2023
6705fd0
Merge branch 'localDev' of https://github.com/NorthernMan54/OpenMQTTG…
NorthernMan54 May 4, 2023
a13d2a5
Merge remote-tracking branch 'upstream/development' into localDev
NorthernMan54 May 4, 2023
bb60a0c
Merge remote-tracking branch 'upstream/development' into localDev
NorthernMan54 May 8, 2023
cdd0fcc
Merge remote-tracking branch 'upstream/development' into localDev
NorthernMan54 May 11, 2023
67ac943
Merge remote-tracking branch 'upstream/development' into localDev
NorthernMan54 May 29, 2023
8624836
Merge remote-tracking branch 'upstream/development' into localDev
NorthernMan54 Jun 6, 2023
521982f
Update to rtl_433_ESP v0.3.0
NorthernMan54 Jun 7, 2023
ab497dc
Merge remote-tracking branch 'upstream/development' into localDev
NorthernMan54 Jun 8, 2023
73b2fd7
Merge remote-tracking branch 'upstream/development' into localDev
NorthernMan54 Jun 27, 2023
146618f
Merge branch 'localDev' of https://github.com/NorthernMan54/OpenMQTTG…
NorthernMan54 Jun 27, 2023
bf4a9c9
Add Favicon.ico to the WebUI
NorthernMan54 Jun 28, 2023
8906cd4
Update config_WebContent.h
NorthernMan54 Jun 28, 2023
0e80c6b
Update config_WebContent.h
NorthernMan54 Jun 28, 2023
ec88822
Merge remote-tracking branch 'upstream/development' into localDev
NorthernMan54 Jun 28, 2023
bf1fe9b
Update ZwebUI.ino
NorthernMan54 Jun 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions main/ZwebUI.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,16 @@ void handleIN() {
}
}

/**
* @brief /handleFavicon - Send Favicon
*
*/
void handleFavicon() {
WEBUI_TRACE_LOG(F("handleCN: uri: %s, args: %d, method: %d" CR), server.uri(), server.args(), server.method());
server.sendHeader("Content-Type", "image/x-icon");
server.send_P(200, "image/x-icon", reinterpret_cast<const char*>(Openmqttgateway_logo_mini_ico), sizeof(Openmqttgateway_logo_mini_ico));
}

# if defined(ESP32) && defined(MQTT_HTTPS_FW_UPDATE)
/**
* @brief /UP - Firmware Upgrade Page
Expand Down Expand Up @@ -1273,6 +1283,7 @@ void WebUISetup() {
server.on("/lo", handleLO); // Configure Logging

server.on("/rt", handleRT); // Reset configuration ( Erase and Restart )
server.on("/favicon.ico", handleFavicon); // Information
server.begin();

Log.begin(LOG_LEVEL, &WebLog);
Expand Down
102 changes: 102 additions & 0 deletions main/config_WebContent.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,106 @@ const char config_webui_body[] = body_header "<fieldset class=\"set1\"><legend><

const char footer[] = "<div style='text-align:right;font-size:11px;'><hr/><a href='https://community.openmqttgateway.com' target='_blank' style='color:#aaa;'>%s</a></div></div></body></html>";

// Source file - https://github.com/1technophile/OpenMQTTGateway/blob/54decb4b65c7894b926ac3a89de0c6b2a3021506/docs/.vuepress/public/favicon-16x16.png
// Workflow was, convert to ICO format using an online convertor, then use the desktop utility xxd to convert to byte array

const unsigned char Openmqttgateway_logo_mini_ico[] = {
0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x10, 0x10, 0x00, 0x00, 0x01, 0x00,
0x20, 0x00, 0x68, 0x04, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x28, 0x00,
0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00,
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0xa8, 0x6a, 0x00, 0x4f, 0xa8,
0x6a, 0x0a, 0x4f, 0xa8, 0x6a, 0x62, 0x4f, 0xa8, 0x6a, 0xb0, 0x4f, 0xa8,
0x6a, 0xbc, 0x4f, 0xa8, 0x6a, 0xb0, 0x4f, 0xa8, 0x6a, 0x61, 0x4f, 0xa8,
0x6a, 0x0a, 0x4f, 0xa8, 0x6a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0xa8, 0x6a, 0x00, 0x4f, 0xa8,
0x6a, 0x03, 0x4f, 0xa8, 0x6a, 0x6a, 0x4f, 0xa8, 0x6a, 0x9a, 0x4f, 0xa8,
0x6a, 0x41, 0x4f, 0xa8, 0x6a, 0x22, 0x4f, 0xa8, 0x6a, 0x41, 0x4f, 0xa8,
0x6a, 0x9a, 0x4f, 0xa8, 0x6a, 0x68, 0x4f, 0xa8, 0x6a, 0x04, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0xa8,
0x6a,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,
0xff, 0x66, 0x25, 0x95, 0xda, 0x61, 0xbc, 0x86, 0x47, 0x65, 0xc8, 0x85,
0x3b, 0x31, 0xc6, 0x85, 0x3d, 0x03, 0x73, 0x9d, 0x5c, 0x00, 0x39, 0xae,
0x72, 0x09, 0x83, 0x98, 0x56, 0x59, 0x7c, 0x9a, 0x59, 0x76, 0x4b, 0xa9,
0x6b, 0x31, 0x4f, 0xa8, 0x6a, 0x0a, 0x4f, 0xa8, 0x6a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x99, 0xff, 0x5c, 0x00, 0x99, 0xff, 0x43, 0x00, 0x99,
0xff, 0x01, 0x00, 0x99, 0xff, 0x0a, 0x06, 0x99, 0xf9, 0x66, 0x1d, 0x96,
0xe2, 0x33, 0x00, 0x9b, 0xff, 0x00, 0xc6, 0x85, 0x3d, 0x00, 0x00, 0x00,
0x00, 0x00, 0xc8, 0x84, 0x3c, 0x00, 0xc8, 0x84, 0x3c, 0x4d, 0xc9, 0x84,
0x3c, 0x44, 0xc9, 0x84, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0xff, 0x6c, 0x00, 0x99,
0xff, 0x26, 0x00, 0x99, 0xff, 0x00, 0x00, 0x99, 0xff, 0x00, 0x00, 0x99,
0xff, 0x4f, 0x00, 0x99, 0xff, 0x3b, 0x00, 0x99, 0xff, 0x00, 0x00, 0x00,
0x00, 0x00, 0xc7, 0x85, 0x39, 0x00, 0xbc, 0x85, 0x64, 0x00, 0xc6, 0x85,
0x3d, 0x5e, 0xc6, 0x85, 0x3d, 0x34, 0xc6, 0x85, 0x3d, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99,
0xff, 0x45, 0x00, 0x99, 0xff, 0x5f, 0x00, 0x99, 0xff, 0x1d, 0x00, 0x99,
0xff, 0x2d, 0x00, 0x99, 0xff, 0x6c, 0x00, 0x99, 0xff, 0x1a, 0x00, 0x99,
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x82, 0x60, 0x00, 0xb5, 0x81,
0x78, 0x06, 0xc3, 0x84, 0x48, 0x64, 0xc4, 0x84, 0x44, 0x23, 0xc4, 0x84,
0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x99, 0xff, 0x07, 0x00, 0x99, 0xff, 0x40, 0x00, 0x99,
0xff, 0x64, 0x00, 0x99, 0xff, 0x60, 0x00, 0x99, 0xff, 0x29, 0x00, 0x99,
0xff, 0x00, 0x00, 0x99, 0xff, 0x00, 0xa0, 0x7b, 0xc2, 0x00, 0xa0, 0x7b,
0xc3, 0x0a, 0xa1, 0x7b, 0xc0, 0x42, 0xa7, 0x7d, 0xaa, 0x61, 0xa3, 0x7c,
0xb8, 0x40, 0x9e, 0x7b, 0xc8, 0x06, 0xa0, 0x7b, 0xc2, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0xff, 0x00, 0x00, 0x99,
0xff, 0x00, 0x00, 0x99, 0xff, 0x06, 0x00, 0x99, 0xff, 0x04, 0x00, 0x99,
0xff, 0x00, 0x00, 0x99, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x7b,
0xc2, 0x00, 0xa0, 0x7b, 0xc2, 0x33, 0xa0, 0x7b, 0xc2, 0x3e, 0x9d, 0x7a,
0xce, 0x0c, 0xa0, 0x7b, 0xc3, 0x47, 0xa0, 0x7b, 0xc2, 0x27, 0xa0, 0x7b,
0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xa0, 0x7b, 0xc2, 0x00, 0xa0, 0x7b, 0xc2, 0x35, 0xa0, 0x7b,
0xc2, 0x39, 0xa0, 0x7b, 0xc2, 0x07, 0xa0, 0x7b, 0xc2, 0x43, 0xa0, 0x7b,
0xc2, 0x2a, 0xa0, 0x7b, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x7b, 0xc2, 0x00, 0xa0, 0x7b,
0xc2, 0x0e, 0xa0, 0x7b, 0xc2, 0x52, 0xa0, 0x7b, 0xc2, 0x60, 0xa0, 0x7b,
0xc2, 0x4b, 0xa0, 0x7b, 0xc2, 0x09, 0xa0, 0x7b, 0xc2, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xfe, 0x00,
0x00, 0x00, 0xfe, 0x38, 0x00, 0x00, 0xfe, 0x38, 0x00, 0x00, 0xfe, 0x7c,
0x00, 0x00, 0xfe, 0x38, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x80, 0x01,
0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x03, 0xcf, 0x00, 0x00, 0x33, 0xcf,
0x00, 0x00, 0x03, 0x8f, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0xcf, 0x07,
0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00};
unsigned int Openmqttgateway_logo_mini_ico_len = 1150;

#endif