feat: add Ship-Class Silhouettes and Red Sunk Markers
This commit is contained in:
+3
-1
@@ -311,6 +311,7 @@ static esp_err_t start_wifi(void) {
|
||||
|
||||
static const char *mime_type_for_path(const char *path) {
|
||||
if (strcmp(path, "/index.html") == 0) return "text/html; charset=utf-8";
|
||||
if (strcmp(path, "/ship-sprite.svg") == 0) return "image/svg+xml";
|
||||
return strcmp(path, "/styles.css") == 0 ? "text/css; charset=utf-8" : "application/javascript; charset=utf-8";
|
||||
}
|
||||
|
||||
@@ -355,7 +356,8 @@ static esp_err_t static_file_handler(httpd_req_t *request) {
|
||||
httpd_resp_set_status(request, "503 Service Unavailable");
|
||||
return httpd_resp_send(request, "LittleFS is unavailable", HTTPD_RESP_USE_STRLEN);
|
||||
}
|
||||
if (strcmp(request->uri, "/styles.css") != 0 && strcmp(request->uri, "/app.js") != 0) return httpd_resp_send_err(request, HTTPD_404_NOT_FOUND, "asset not found");
|
||||
if (strcmp(request->uri, "/styles.css") != 0 && strcmp(request->uri, "/app.js") != 0 &&
|
||||
strcmp(request->uri, "/target_interaction.js") != 0 && strcmp(request->uri, "/ship-sprite.svg") != 0) return httpd_resp_send_err(request, HTTPD_404_NOT_FOUND, "asset not found");
|
||||
return send_static_file(request, request->uri);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user