Add sweet new live sync homepage

This commit is contained in:
Lucien Greathouse
2019-01-28 18:30:42 -08:00
parent aeb18eb124
commit aa243d1b8a
3 changed files with 58 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
# Rojo Changelog
## [Unreleased]
* Added new (empty) diagnostic page served from the server
## [0.5.0 Alpha 2](https://github.com/LPGhatguy/rojo/releases/tag/v0.5.0-alpha.2) (January 28, 2019)
* Added support for `.model.json` files, compatible with 0.4.x

54
server/assets/index.html Normal file
View File

@@ -0,0 +1,54 @@
<!DOCTYPE html>
<html>
<head>
<title>Rojo</title>
<style>
* {
margin: 0;
padding: 0;
font: inherit;
}
html {
font-family: sans-serif;
height: 100%;
}
body {
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}
.main {
padding: 1rem;
text-align: center;
margin: 0 auto;
width: 100%;
max-width: 60rem;
background-color: #efefef;
border: 1px solid #666;
border-radius: 4px;
}
.title {
font-size: 2rem;
font-weight: bold;
}
.docs {
font-size: 1.5rem;
font-weight: bold;
}
</style>
</head>
<body>
<div class="main">
<h1 class="title">Rojo Live Sync is up and running!</h1>
<a class="docs" href="https://lpghatguy.github.io/rojo">Rojo Documentation</a>
</div>
</body>
</html>

View File

@@ -22,6 +22,8 @@ use crate::{
rbx_session::{MetadataPerInstance},
};
static HOME_CONTENT: &str = include_str!("../assets/index.html");
/// Contains the instance metadata relevant to Rojo clients.
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
@@ -132,7 +134,7 @@ impl Server {
}
fn handle_home(&self) -> Response {
Response::text("Rojo is up and running!")
Response::html(HOME_CONTENT)
}
/// Get a summary of information about the server