Skip to content

Commit

Permalink
regenerate web
Browse files Browse the repository at this point in the history
  • Loading branch information
sidoh committed Oct 26, 2024
1 parent 58312f5 commit 42b3a36
Show file tree
Hide file tree
Showing 8 changed files with 496 additions and 11 deletions.
6 changes: 3 additions & 3 deletions dist/bundle.css.gz.h

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/bundle.js.gz.h

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/index.html.gz.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#define index_html_gz_len 1832
static const char index_html_filename[] = "/dist/index.87cf0a9b.html";
static const char index_html_gz[] PROGMEM = {31,139,8,0,0,0,0,0,2,10,237,88,109,115,218,184,22,254,222,153,253,15,90,223,238,140,25,19,139,164,16,8,9,153,43,108,210,164,37,196,180,201,238,166,59,59,91,99,203,47,193,216,92,89,96,72,134,255,126,143,108,3,54,144,182,31,238,183,91,207,96,89,210,209,209,115,30,157,23,13,111,46,126,213,239,180,251,71,163,135,60,62,9,46,223,92,136,6,5,102,232,118,36,26,74,98,128,154,54,52,19,202,77,100,121,38,139,41,239,72,15,247,87,71,45,105,61,28,154,19,218,145,230,62,77,166,17,227,18,178,162,144,211,16,196,18,223,230,94,199,166,115,223,162,71,105,167,138,252,208,231,190,25,28,197,150,25,208,206,177,90,19,106,184,207,3,122,121,235,247,125,215,227,232,122,54,186,192,217,208,155,139,192,15,199,200,99,212,233,72,182,201,205,182,63,49,93,138,23,71,62,236,114,62,50,99,122,90,175,18,66,186,132,244,72,15,222,162,213,72,55,234,14,9,185,114,161,171,137,23,25,138,215,13,89,207,175,159,30,41,63,229,62,126,215,26,144,174,174,104,137,142,159,134,49,57,155,62,220,145,238,167,25,134,254,245,48,33,138,107,48,98,212,111,71,132,124,105,57,45,162,45,70,103,208,127,63,78,180,63,48,137,136,254,248,164,16,163,113,166,13,245,230,21,25,19,13,227,144,124,120,252,136,135,100,136,147,58,177,220,57,38,70,243,88,75,180,207,186,209,34,10,25,63,66,159,129,25,3,172,212,8,94,244,44,98,28,51,45,33,183,56,26,19,221,81,174,201,13,110,130,73,125,220,136,137,110,156,53,8,169,61,0,158,58,118,161,255,39,83,128,137,59,236,234,129,134,65,223,188,54,32,228,29,238,37,221,122,15,240,181,18,214,36,70,237,134,130,254,166,81,39,35,167,213,39,100,246,1,39,218,239,250,28,228,61,235,61,209,174,21,221,237,62,227,36,6,251,154,152,116,239,149,47,67,114,171,205,107,196,116,67,76,62,220,99,125,168,43,61,67,236,223,140,201,157,131,117,162,99,125,1,120,221,19,56,137,250,0,187,221,26,118,19,162,127,121,134,245,125,224,11,240,119,31,137,146,252,231,150,252,124,126,62,63,159,255,243,7,242,92,233,121,136,225,165,12,18,66,222,63,223,108,70,111,158,106,228,163,71,200,181,215,202,71,34,241,26,164,159,221,36,77,209,240,43,172,72,159,9,17,41,95,143,159,10,99,159,251,201,43,80,186,183,225,160,60,194,110,245,228,247,254,167,114,45,208,245,7,251,53,107,62,232,5,89,237,161,46,154,143,122,217,196,43,77,200,88,226,243,180,80,107,254,204,65,136,154,244,71,223,37,38,217,226,236,127,132,170,117,55,20,122,234,101,48,221,177,177,249,54,26,192,129,62,249,2,235,90,99,224,169,63,7,156,154,163,192,218,103,12,233,214,192,130,35,71,129,215,53,118,243,62,84,27,144,15,241,56,151,215,151,247,208,111,76,172,92,31,233,72,136,209,160,35,137,50,43,33,190,156,66,133,47,150,94,9,97,40,206,49,95,138,34,141,208,191,130,200,180,253,208,69,47,208,65,104,26,197,80,229,163,176,141,28,127,65,237,243,116,144,71,211,54,106,212,126,203,122,1,117,120,161,203,153,25,198,78,196,38,237,236,51,48,57,149,143,96,186,138,196,187,146,73,57,112,179,56,138,253,103,218,70,39,245,233,162,48,232,152,19,63,88,182,17,97,112,185,168,162,24,84,28,197,148,249,142,144,89,189,185,192,57,212,139,216,98,254,148,95,202,206,44,180,4,68,36,87,208,203,47,32,4,70,197,28,89,118,216,133,75,5,234,32,201,227,124,26,183,49,134,33,245,41,182,105,224,207,153,26,82,142,93,15,199,190,29,121,152,198,211,214,201,233,233,63,176,181,184,184,252,227,205,70,255,78,232,232,4,167,47,219,143,57,158,83,22,195,46,49,134,155,142,218,192,210,249,118,43,199,15,104,12,27,253,245,75,106,198,75,214,160,148,236,54,146,82,192,177,71,41,151,170,235,41,128,98,152,220,107,111,96,42,72,26,205,66,59,160,170,21,199,91,185,32,130,219,85,38,41,165,48,214,66,244,236,180,57,178,70,101,233,140,208,169,184,219,221,132,92,150,90,239,26,199,82,21,29,215,42,185,200,170,250,10,196,148,203,31,130,247,244,35,232,154,117,243,216,58,113,74,194,187,224,78,142,207,90,103,167,7,224,253,13,212,138,118,115,176,22,163,224,68,159,55,52,246,225,38,41,139,155,100,101,109,72,118,14,233,13,179,131,236,200,154,77,224,218,170,102,235,122,1,21,61,89,18,211,82,229,60,91,33,58,42,4,134,240,143,194,1,21,103,197,14,48,45,154,124,152,81,62,99,97,58,155,142,172,14,3,77,201,148,99,102,237,224,203,88,254,6,194,252,24,214,24,179,174,10,138,96,13,188,203,195,54,117,40,131,9,206,102,180,140,47,19,56,136,144,179,101,31,2,252,129,5,242,140,137,240,130,67,169,138,117,108,169,69,179,80,128,171,85,209,196,92,124,130,33,63,245,234,198,198,138,92,189,67,185,229,137,229,149,245,209,170,220,163,161,44,51,8,35,48,148,86,80,231,114,235,98,8,249,14,146,127,93,79,170,209,184,82,156,4,31,244,88,148,160,144,38,168,199,88,196,100,105,64,121,18,177,49,90,47,65,137,25,163,48,226,40,218,158,95,234,46,219,207,28,154,193,162,137,15,123,192,202,40,152,211,45,162,205,170,213,22,180,101,10,59,100,42,54,61,4,185,192,202,69,129,146,29,244,226,104,35,240,249,196,100,161,252,85,200,44,69,250,124,251,2,4,173,144,252,246,165,160,70,65,199,43,252,246,101,171,107,85,249,90,52,104,99,199,119,143,9,52,21,143,169,196,10,162,1,112,118,128,226,212,210,67,252,173,42,223,114,150,43,72,111,178,200,113,59,238,236,199,58,157,211,32,154,10,231,21,113,52,101,145,61,75,151,74,168,211,129,1,123,59,191,142,44,65,108,105,97,129,206,125,227,197,174,234,38,203,84,211,76,171,102,100,128,155,214,214,102,239,154,252,138,162,60,171,237,171,89,187,130,240,130,45,61,63,140,163,177,241,169,13,160,67,116,138,202,106,64,225,149,55,38,7,20,234,212,140,49,160,65,144,124,19,218,116,33,34,48,79,128,59,107,7,116,145,138,201,5,202,4,157,123,26,46,59,89,73,82,3,26,186,220,43,57,236,38,245,184,148,231,121,167,187,188,177,33,59,102,117,95,170,168,105,58,84,33,159,79,3,115,41,206,53,140,66,42,157,239,6,219,54,164,214,104,139,245,16,229,24,254,218,69,247,247,249,86,124,207,193,182,123,124,39,165,124,55,169,28,72,43,87,38,108,97,195,237,37,101,51,133,39,149,163,111,117,32,20,55,91,140,130,104,36,151,2,109,31,174,144,217,135,154,177,2,129,12,164,60,124,234,231,89,255,110,244,68,45,14,253,108,85,9,136,112,12,154,157,78,129,174,181,217,169,247,137,202,157,69,89,161,124,237,145,144,43,129,141,15,22,81,145,196,203,12,100,145,116,104,151,188,54,125,119,135,172,250,237,107,46,219,177,241,67,241,183,148,106,78,167,52,180,53,207,15,108,57,87,88,94,189,235,69,138,82,230,171,20,30,175,157,209,183,18,254,54,145,167,211,242,215,3,222,210,134,172,94,76,36,171,175,213,44,167,254,175,176,110,179,71,246,129,49,250,204,77,198,209,250,82,158,134,84,158,59,246,213,228,235,54,212,154,182,221,155,195,71,31,174,102,52,164,16,2,250,221,173,150,253,167,39,226,142,218,112,251,146,139,76,108,83,84,166,80,52,171,74,218,131,139,119,118,225,134,175,252,175,196,81,100,47,145,21,152,113,44,254,210,99,99,241,7,160,237,207,145,111,119,164,41,104,41,246,215,233,229,178,159,125,168,170,122,1,23,235,185,80,151,55,66,93,170,61,253,3,243,191,212,80,90,180,210,20,0,0};
static const char index_html_filename[] = "/dist/index.10148807.html";
static const char index_html_gz[] PROGMEM = {31,139,8,0,0,0,0,0,2,10,237,88,91,115,218,56,20,126,239,204,254,7,213,219,157,49,99,98,145,20,18,66,66,102,133,77,154,180,132,152,54,217,221,116,103,103,107,108,249,18,140,205,202,2,67,50,252,247,61,178,13,216,64,218,62,236,219,214,51,88,150,116,116,244,157,79,231,162,225,213,249,107,253,86,187,123,48,186,200,227,227,224,226,213,185,104,80,96,134,110,91,162,161,36,6,168,105,67,51,166,220,68,150,103,178,152,242,182,116,127,119,121,208,148,86,195,161,57,166,109,105,230,211,100,18,49,46,33,43,10,57,13,65,44,241,109,238,181,109,58,243,45,122,144,118,170,200,15,125,238,155,193,65,108,153,1,109,31,170,53,161,134,251,60,160,23,55,126,207,119,61,142,174,166,195,115,156,13,189,58,15,252,112,132,60,70,157,182,100,155,220,108,249,99,211,165,120,126,224,195,46,103,67,51,166,199,245,42,33,164,67,72,151,116,225,45,90,141,116,162,206,128,144,75,23,186,154,120,145,129,120,93,147,213,252,234,233,146,242,83,238,227,183,205,62,233,232,138,150,232,248,113,16,147,211,201,253,45,233,124,156,98,232,95,13,18,162,184,6,35,70,253,102,72,200,231,166,211,36,218,124,120,10,253,119,163,68,251,29,147,136,232,15,143,10,49,26,167,218,64,63,185,36,35,162,97,28,146,247,15,31,240,128,12,112,82,39,150,59,195,196,56,57,212,18,237,147,110,52,137,66,70,15,208,103,96,70,31,43,53,130,231,93,139,24,135,76,75,200,13,142,70,68,119,148,43,114,141,79,192,164,30,110,196,68,55,78,27,132,212,238,1,79,29,187,208,255,131,41,192,196,45,118,245,64,195,160,111,86,235,19,242,22,119,147,78,189,11,248,154,9,59,33,70,237,154,130,254,19,163,78,134,78,179,71,200,244,61,78,180,223,244,25,200,123,214,59,162,93,41,186,219,121,194,73,12,246,157,96,210,185,83,62,15,200,141,54,171,17,211,13,49,121,127,135,245,129,174,116,13,177,255,73,76,110,29,172,19,29,235,115,192,235,30,193,73,212,251,216,237,212,176,155,16,253,243,19,172,239,1,95,128,191,243,64,148,228,159,27,242,227,249,241,252,120,254,231,15,228,185,210,115,31,195,75,233,39,132,188,123,186,94,143,94,63,214,200,7,143,144,43,175,153,143,68,226,213,79,63,59,73,154,162,225,87,88,145,62,99,34,82,190,30,63,22,198,62,245,146,23,160,116,110,194,126,121,132,221,232,201,111,189,143,229,90,160,235,247,246,75,214,188,215,11,178,218,125,93,52,31,244,178,137,151,154,144,177,196,231,113,161,214,252,145,131,16,53,233,247,158,75,76,178,193,217,251,0,85,235,118,32,244,212,203,96,58,35,99,253,109,52,128,3,125,252,25,214,53,71,192,83,111,6,56,53,71,129,181,79,24,210,173,129,5,71,142,2,175,43,236,230,125,168,54,32,31,226,81,46,175,47,238,160,223,24,91,185,62,210,150,16,163,65,91,18,101,86,66,124,49,129,10,95,44,189,18,194,80,156,99,190,16,69,26,161,159,131,200,180,253,208,69,207,208,65,104,18,197,80,229,163,176,133,28,127,78,237,179,116,144,71,147,22,106,212,126,201,122,1,117,120,161,203,153,25,198,78,196,198,173,236,51,48,57,149,15,96,186,138,196,187,146,73,57,112,179,56,136,253,39,218,66,71,245,201,188,48,232,152,99,63,88,180,16,97,112,185,168,162,24,84,28,196,148,249,142,144,89,190,58,199,57,212,243,216,98,254,132,95,200,206,52,180,4,68,36,87,208,243,79,32,4,70,197,28,89,118,216,129,75,5,106,35,201,227,124,18,183,48,134,33,245,49,182,105,224,207,152,26,82,142,93,15,199,190,29,121,152,198,147,230,209,241,241,223,176,181,184,184,252,237,77,135,191,38,116,120,132,211,151,237,199,28,207,40,139,97,151,24,195,77,71,61,198,210,217,102,43,199,15,104,12,27,253,249,83,106,198,115,214,160,148,236,22,146,82,192,177,71,41,151,170,171,41,128,98,152,220,107,173,97,42,72,26,78,67,59,160,170,21,199,27,185,32,130,219,85,38,41,165,48,114,161,183,39,195,134,217,116,204,178,116,70,232,68,220,237,174,67,46,75,205,250,225,169,84,69,135,181,74,46,178,172,190,0,49,229,242,187,224,61,126,15,186,134,109,55,143,106,102,73,120,27,220,209,81,173,241,182,177,7,222,95,64,173,104,215,7,107,49,10,78,244,105,77,99,15,110,146,178,184,73,86,86,134,100,231,144,222,48,219,200,142,172,233,24,174,173,106,182,174,27,80,209,147,37,49,45,85,206,178,21,162,163,66,96,8,255,40,28,80,113,86,236,0,211,162,201,135,25,229,83,22,166,179,233,200,114,63,208,148,76,57,102,214,22,190,140,229,175,32,204,143,97,133,49,235,170,160,8,214,192,187,60,108,83,135,50,152,224,108,74,203,248,50,129,189,8,57,91,244,32,192,239,89,32,79,153,8,47,56,148,170,88,199,22,90,52,13,5,184,90,21,141,205,249,71,24,242,83,175,110,172,173,200,213,59,148,91,158,88,94,89,29,173,202,61,26,202,50,131,48,2,67,105,5,181,47,54,46,134,144,239,32,249,245,106,82,141,70,149,226,36,248,160,199,162,4,133,52,65,93,198,34,38,75,125,202,147,136,141,208,106,9,74,204,24,133,17,71,209,230,252,82,119,217,124,230,208,12,22,141,125,216,3,86,70,193,140,110,16,173,87,45,55,160,45,83,216,33,83,177,233,62,200,5,86,206,11,148,108,161,23,71,27,129,207,39,38,11,229,47,66,102,33,210,231,155,103,32,104,137,228,55,207,5,53,10,58,92,226,55,207,27,93,203,202,151,162,65,107,59,190,121,76,160,169,120,76,37,86,16,13,128,179,61,20,167,150,238,227,111,89,249,154,179,92,66,122,147,69,142,219,114,103,63,214,233,140,6,209,68,56,175,136,163,9,139,236,105,186,84,66,237,54,12,216,155,249,85,100,9,98,75,11,11,116,238,26,47,118,85,215,89,166,154,102,90,53,35,3,220,180,182,50,123,219,228,23,20,229,89,109,87,205,202,21,132,23,108,232,249,110,28,141,181,79,173,1,237,163,83,84,86,3,10,175,188,54,57,160,80,167,166,140,1,13,130,228,235,208,166,115,17,129,121,2,220,90,219,167,243,84,76,46,80,38,232,220,209,112,209,206,74,146,26,208,208,229,94,201,97,215,169,199,165,60,207,59,157,197,181,13,217,49,171,251,82,69,77,211,161,10,249,124,18,152,11,113,174,97,20,82,233,108,59,216,54,33,181,66,91,172,135,40,199,240,231,54,186,191,206,54,226,59,14,182,217,227,27,41,229,155,73,101,79,90,185,52,97,11,27,110,47,41,155,41,60,169,28,125,203,61,161,184,222,98,24,68,67,185,20,104,187,112,133,204,46,212,140,21,8,100,32,229,254,99,47,207,250,183,195,71,106,113,232,103,171,74,64,132,99,208,236,116,10,116,173,204,78,189,79,84,238,44,202,10,229,107,135,132,92,9,108,188,183,136,138,36,94,102,32,139,164,125,187,228,181,233,155,59,100,213,111,87,115,217,142,181,31,138,191,165,84,115,50,161,161,173,121,126,96,203,185,194,242,234,109,47,82,148,50,95,165,240,120,233,140,190,150,240,55,137,60,157,150,191,236,241,150,22,100,245,98,34,89,126,169,102,57,245,191,194,186,201,30,217,7,198,232,19,55,25,71,171,75,121,26,82,121,238,216,85,147,175,91,83,107,218,118,119,6,31,61,184,154,209,144,66,8,232,183,55,90,246,159,158,136,59,106,195,237,75,46,50,177,73,81,153,66,209,44,43,105,15,46,222,217,133,27,190,242,191,18,135,145,189,64,86,96,198,177,248,75,143,141,196,31,128,182,63,67,190,221,150,38,160,165,216,95,165,151,139,94,246,161,170,234,57,92,172,103,66,93,222,8,117,169,246,244,15,204,127,1,181,10,198,145,210,20,0,0};
1 change: 1 addition & 0 deletions web2/dist/versions/1.0.6/bundle.css

Large diffs are not rendered by default.

351 changes: 351 additions & 0 deletions web2/dist/versions/1.0.6/bundle.js

Large diffs are not rendered by default.

133 changes: 133 additions & 0 deletions web2/dist/versions/1.0.6/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MiLight Hub</title>
<link href="data:image/x-icon;base64,AAABAAEAEBAAAAEACABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAA/38NABD+CwD/jQsA9pUOABRu/wD/HQwA+gPrAP4MbAAZ8f8ACxb9AP4GkwCW/AoADYj+AP59CQD7FAkAC//nAJYK/QAQ/w4Acgv/AP71CwCSDP8A+AkYAP7rBAAN/+0A/xEcAP1rCwAM/okADf+HAI/7CgAL/5sADP95AA0U/wD4/gsADXr+ABAO/gDlC/8A+v0NAA3/EwB4Ef8A8wr7AP0IeAAN7P4Abf8LAAuJ/wCVDv8A+hcGACH+DgBz/wsA+g7/ABT+ZQAMCv0Aagn/AJT/DQD+EPsADP7sAOf/DAD/Dx0A/g2AAB4N/gB0/gwADZz/ABLu/wAM/BYA+wqMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkYAAAAAAAAAAAAAAUsAAA+NwAAGzIAAAAAAAAAIj0AKhAAHh8AAAAAAAoAAAANAAAAABwAAAA/AAAzIAAAAAAAAAAAAAAmAgAAADsjAAAAAAAAAAASLwAAAAAAAAAAAAAAAAAAAAAAABMnNAAAAAAAAAAAAAArMDwVLREAAAAAAAAAAAAADDUdAAAAAAAAAAAAAAAAAAAAAAAAJDEAAAAAAAAAACU4AAAAKDYAAAAAAAAAAAAAFCEAAAcAAAA6AAAAAAEAAAAXAAAAAABACAAWLgAaAwAAAAAAAAALKQAAOQYAAA4EAAAAAAAAAAAAABkPAAAAAAAAAP5/AADmZwAA8k8AALvdAACf+QAAz/MAAP//AAAf+AAAH/gAAP//AADP8wAAn/kAALvdAADyTwAA5mcAAP5/AAA=" rel="icon" type="image/x-icon" />
<style>
#loading {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 24px;
font-family: Arial, sans-serif;
}
</style>
<script>(function () {
const cdnBase = "https://cdn.jsdelivr.net/gh/sidoh/esp8266_milight_hub@web2/web2/dist/versions/1.0.6/";
const files = [
{
type: "stylesheet",
cdnPath: cdnBase + "bundle.css",
localPath: "dist/bundle.37b5a8fa.css",
size: parseInt("8419", 10),
},
{
type: "script",
cdnPath: cdnBase + "bundle.js",
localPath: "dist/bundle.35dd820a.js",
size: parseInt("220535", 10),
},
];

function createStylesheetLink(href) {
const link = document.createElement("link");
link.rel = "stylesheet";
link.href = href;
return link;
}

function createScript(src) {
const script = document.createElement("script");
script.src = src;
script.defer = true;
return script;
}

function tryLoadUrl(url, size, retryCount = 0, maxRetries = 5) {
return fetch(url)
.then((response) => {
if (!response.ok) {
throw new Error("Network response was not ok");
}
return Promise.resolve(response);
})
.catch((error) => {
if (retryCount < maxRetries) {
console.warn(`Retrying ${url} (${retryCount + 1}/${maxRetries})`);
return tryLoadUrl(url, size, retryCount + 1, maxRetries);
} else {
throw error;
}
});
}

function tryLoadFile(file) {
const isDevelopment = "production" === "development";
if (isDevelopment) {
return tryLoadUrl(file.localPath, file.size, 0, 0);
} else {
return tryLoadUrl(file.cdnPath, file.size, 0, 0).catch(() =>
tryLoadUrl(file.localPath, file.size, 0, 5)
);
}
}

function loadPage() {
let currentFileIndex = 0;

function loadNextFile() {
if (currentFileIndex >= files.length) {
document.getElementById("loading").style.display = "none";
return;
}

const file = files[currentFileIndex];

tryLoadFile(file)
.then((response) => {
if (!response.ok) {
throw new Error("Failed to load file");
}
return response.blob();
})
.then((blob) => {
const url = URL.createObjectURL(blob);
let element;

if (file.type === "stylesheet") {
element = createStylesheetLink(url);
} else if (file.type === "script") {
element = createScript(url);
}

document.head.appendChild(element);
currentFileIndex++;
loadNextFile();
})
.catch((error) => {
console.error(`Failed to load file: ${file.cdnPath}`, error);
currentFileIndex++;
loadNextFile();
});
}

// Start loading files
loadNextFile();
}

document.addEventListener("DOMContentLoaded", () => {
loadPage();
});
})();
</script>
</head>
<body class="dark">
<div id="page">
<div id="loading">Loading...</div>
</div>
</body>
</html>
4 changes: 2 additions & 2 deletions web2/package-lock.json

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

2 changes: 1 addition & 1 deletion web2/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "esp8266_milight_hub_ui",
"version": "1.0.5",
"version": "1.0.6",
"description": "",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 42b3a36

Please sign in to comment.