mirror of
https://github.com/esphome/esphome.git
synced 2025-09-01 10:52:19 +01:00
[web_server] Use oi.esphome.io for css and js assets (#10296)
This commit is contained in:
@@ -52,9 +52,9 @@ def default_url(config: ConfigType) -> ConfigType:
|
||||
config = config.copy()
|
||||
if config[CONF_VERSION] == 1:
|
||||
if CONF_CSS_URL not in config:
|
||||
config[CONF_CSS_URL] = "https://esphome.io/_static/webserver-v1.min.css"
|
||||
config[CONF_CSS_URL] = "https://oi.esphome.io/v1/webserver-v1.min.css"
|
||||
if CONF_JS_URL not in config:
|
||||
config[CONF_JS_URL] = "https://esphome.io/_static/webserver-v1.min.js"
|
||||
config[CONF_JS_URL] = "https://oi.esphome.io/v1/webserver-v1.min.js"
|
||||
if config[CONF_VERSION] == 2:
|
||||
if CONF_CSS_URL not in config:
|
||||
config[CONF_CSS_URL] = ""
|
||||
|
@@ -173,14 +173,14 @@ class WebServer : public Controller, public Component, public AsyncWebHandler {
|
||||
|
||||
#if USE_WEBSERVER_VERSION == 1
|
||||
/** Set the URL to the CSS <link> that's sent to each client. Defaults to
|
||||
* https://esphome.io/_static/webserver-v1.min.css
|
||||
* https://oi.esphome.io/v1/webserver-v1.min.css
|
||||
*
|
||||
* @param css_url The url to the web server stylesheet.
|
||||
*/
|
||||
void set_css_url(const char *css_url);
|
||||
|
||||
/** Set the URL to the script that's embedded in the index page. Defaults to
|
||||
* https://esphome.io/_static/webserver-v1.min.js
|
||||
* https://oi.esphome.io/v1/webserver-v1.min.js
|
||||
*
|
||||
* @param js_url The url to the web server script.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user