Polish up the FE a bit
This commit is contained in:
parent
6d68b4e5ab
commit
6c32af061b
@ -52,12 +52,12 @@ struct DomainGetArgs {
|
||||
#[derive(Deserialize)]
|
||||
struct DomainInitArgs {
|
||||
domain: domain::Name,
|
||||
passphrase: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct DomainSyncArgs {
|
||||
domain: domain::Name,
|
||||
passphrase: String,
|
||||
}
|
||||
|
||||
impl<'svc> Service<'svc> {
|
||||
@ -195,10 +195,6 @@ impl<'svc> Service<'svc> {
|
||||
}
|
||||
|
||||
fn domain_init(&self, args: DomainInitArgs, domain_config: util::FlatConfig) -> SvcResponse {
|
||||
if args.passphrase != self.passphrase.as_str() {
|
||||
return self.render_error_page(401, "Incorrect passphrase");
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct Response {
|
||||
domain: domain::Name,
|
||||
@ -239,6 +235,10 @@ impl<'svc> Service<'svc> {
|
||||
args: DomainSyncArgs,
|
||||
domain_config: util::FlatConfig,
|
||||
) -> SvcResponse {
|
||||
if args.passphrase != self.passphrase.as_str() {
|
||||
return self.render_error_page(401, "Incorrect passphrase");
|
||||
}
|
||||
|
||||
let config: domain::config::Config = match domain_config.try_into() {
|
||||
Ok(Some(config)) => config,
|
||||
Ok(None) => return self.render_error_page(400, "domain config is required"),
|
||||
|
@ -17,6 +17,12 @@
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/static/bamboo.css" />
|
||||
|
||||
<style>
|
||||
form {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -14,11 +14,6 @@ automatically updated too!</p>
|
||||
<input name="domain" type="hidden" value="{{ data.domain }}" />
|
||||
<input name="config_origin_descr_kind" type="hidden" value="git" />
|
||||
|
||||
<label>
|
||||
Passphrase (required during closed-beta):
|
||||
<input name="passphrase" placeholder="shhhh" required />
|
||||
</label>
|
||||
|
||||
<fieldset>
|
||||
<legend>Git Repository</legend>
|
||||
<p>
|
||||
|
@ -22,5 +22,13 @@ and set up your domain.</p>
|
||||
{{ #each data.flat_config }}
|
||||
<input name="{{ @key }}" type="hidden" value="{{ this }}" />
|
||||
{{ /each }}
|
||||
|
||||
<fieldset>
|
||||
<label>
|
||||
Passphrase (required during closed-beta):
|
||||
<input name="passphrase" placeholder="shhhh" required />
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
<input type="submit" value="Next" />
|
||||
</form>
|
||||
|
@ -5,27 +5,20 @@ server, and you're done!</p>
|
||||
<p><strong>Domiply is currently only a proof-of-concept with limited features,
|
||||
but will continue to be expanded as development time permits</strong></p>
|
||||
|
||||
<p>The following backends are supported for serving a domain:</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Git repository</strong>: Your domain will be served out of a
|
||||
branch of a public git repository, a la Github Pages.</li>
|
||||
<li><strong>IPFS/IPNS Hash</strong>: TODO</li>
|
||||
<li><strong>Alternative URL (reverse proxy)</strong>: TODO</li>
|
||||
<li><strong>Google Drive</strong>: TODO (maybe)</li>
|
||||
<li><strong>Dropbox</strong>: TODO (maybe)</li>
|
||||
</ul>
|
||||
|
||||
<h2>Get Started</h2>
|
||||
|
||||
<p>Input your domain name below to set it up, or reconfigure it if you have used
|
||||
it before:</p>
|
||||
<p>Input your domain name below to set it up, or to reconfigure it has already
|
||||
been set up.</p>
|
||||
|
||||
<form method="get" action="/domain.html">
|
||||
<label>
|
||||
Domain name:
|
||||
<input type="text" name="domain" placeholder="example.org" required />
|
||||
</label>
|
||||
|
||||
<fieldset>
|
||||
<label>
|
||||
Domain name:
|
||||
<input type="text" name="domain" placeholder="example.org" required />
|
||||
</label>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<input type="submit" value="Go!" />
|
||||
</form>
|
||||
@ -33,10 +26,9 @@ it before:</p>
|
||||
<p>Alternatively you can do any of the following alternative actions:</p>
|
||||
|
||||
<ul>
|
||||
<li>List all existing domains</li>
|
||||
<li>List all existing domains (TODO)</li>
|
||||
<li>View the Source Code (TODO)</li>
|
||||
<li>View the Project Roadmap (TODO)</li>
|
||||
<li>Report a Bug (TODO)</li>
|
||||
<li><a href="mailto:me@mediocregopher.com">Report a Bug</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>About</h2>
|
||||
@ -45,3 +37,22 @@ it before:</p>
|
||||
individuals for their community of friends and family. By making it super easy
|
||||
to set up a domain we can help our non-technical folk own their own slice of
|
||||
the internet, the way it was always intended.</p>
|
||||
|
||||
<h2>Roadmap</h2>
|
||||
|
||||
<p>Domiply is very much a work in progress. The following functionality is
|
||||
planned but not yet implemented:</p>
|
||||
|
||||
<ul>
|
||||
<li>Support for IPv4 and CNAME records</li>
|
||||
<li>HTTPS support, with automatic certificate syncing via Let's Encrypt.</li>
|
||||
<li>
|
||||
Support for more backends than just git repositories, including:
|
||||
<ul>
|
||||
<li>IPFS/IPNS Hash</li>
|
||||
<li>Alternative URL (reverse proxy)</li>
|
||||
<li>Google Drive / Dropbox</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Scalable backend which requires only an S3 compatible database</li>
|
||||
</ul>
|
||||
|
Loading…
Reference in New Issue
Block a user