~starkingdoms/starkingdoms

c1f889edb6d9f42211a66388eca41289749cb055 — core 2 years ago b38ebf3
fixup! fixup! fixup asset packer
2 files changed, 3 insertions(+), 3 deletions(-)

M spacetime_rs/src/commands/docker.rs
M web/index.html
M spacetime_rs/src/commands/docker.rs => spacetime_rs/src/commands/docker.rs +1 -1
@@ 32,7 32,7 @@ fn _build(img: &str, channel: &str, root: &PathBuf) -> Result<(), Box<dyn Error>
        let index_html_src = fs::read_to_string(&index_html_path)?;
        let index_html_patched = find_and_replace(&index_html_src, &[
            format!("s/let api_server = \"http:\\/\\/localhost:8080\";/let api_server = \"https:\\/\\/api.{}.{}\";/", a, b),
            format!("s/let servers = \\[\"localhost:3000\"\\];/let servers = [\"{}.{}\"];/", a, b)
            format!("s/let servers = \\[\"http://localhost:3000\"\\];/let servers = [\"https://{}.{}\"];/", a, b)
        ])?;

        fs::write(&index_html_path, index_html_patched.as_bytes())?;

M web/index.html => web/index.html +2 -2
@@ 33,9 33,9 @@

        <script>

            let servers = ["localhost:3000"];
            let servers = ["http://localhost:3000"];

            function server_url_to_ping_url(server) { return window.location.protocol + "//" + server + "/ping" }
            function server_url_to_ping_url(server) { return server + "/ping" }
            function server_url_to_gateway_url(server) { return "ws://" + server + "/ws" }

            function load_server(server) {