Use self-hosted robot font

This commit is contained in:
Pierre HUBERT 2022-03-24 16:30:04 +01:00
parent c4aa025fe3
commit c233e59b9b
3 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
echo Generate flutter release
flutter build web --dart-define API_URL="<<<API_URL>>>" --dart-define API_TOKEN="<<<API_TOKEN>>>"
flutter build web --dart-define API_URL="<<<API_URL>>>" --dart-define API_TOKEN="<<<API_TOKEN>>>" --source-maps
echo Build associated server
cd player-server && cargo build --release && cd ..

View File

@ -31,7 +31,8 @@ async fn main_js_file(data: web::Data<Args>) -> HttpResponse {
let file = std::fs::read_to_string(path).unwrap();
let script = file
.replace("<<<API_URL>>>", &data.api_url)
.replace("<<<API_TOKEN>>>", &data.api_token);
.replace("<<<API_TOKEN>>>", &data.api_token)
.replace("https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Me5WZLCzYlKw.ttf", "/fonts/KFOmCnqEu92Fr1Me5WZLCzYlKw.ttf");
HttpResponse::Ok()
.content_type("application/javascript")

Binary file not shown.