Lay out the structure of the project
Parse arguments which can be used to configure the server. Create a WASM client stub and make the server capable of serving it. Document the current state in the readem.
This commit is contained in:
commit
f85a4d7e87
12 changed files with 2250 additions and 0 deletions
16
client/Cargo.toml
Normal file
16
client/Cargo.toml
Normal file
|
@ -0,0 +1,16 @@
|
|||
[package]
|
||||
name = "client"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "A WASM client for lockwatch."
|
||||
license = "GPL-3.0-or-later"
|
||||
readme = "../README.md"
|
||||
repository = "https://git.onders.org/finga/lockwatch"
|
||||
keywords = ["stop-watch", "time-taking", "lock-picking"]
|
||||
categories = ["wasm", "web-programming::http-client"]
|
||||
|
||||
[dependencies]
|
||||
yew = "0.19"
|
||||
console_error_panic_hook = "0.1"
|
||||
log = "0.4"
|
||||
wasm-logger = "0.2"
|
4
client/Trunk.toml
Normal file
4
client/Trunk.toml
Normal file
|
@ -0,0 +1,4 @@
|
|||
[build]
|
||||
target = "index.html"
|
||||
dist = "../dist"
|
||||
public_url = "/client/"
|
10
client/index.html
Normal file
10
client/index.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
|
||||
<title>LockWatch</title>
|
||||
</head>
|
||||
<body>loading...</body>
|
||||
</html>
|
18
client/src/main.rs
Normal file
18
client/src/main.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
use yew::prelude::*;
|
||||
|
||||
#[function_component(LockWatch)]
|
||||
fn lock_watch() -> Html {
|
||||
html! {
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<h1 class="title">{ "LockWatch" }</h1>
|
||||
</div>
|
||||
</section>
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
wasm_logger::init(wasm_logger::Config::new(log::Level::Trace));
|
||||
console_error_panic_hook::set_once();
|
||||
yew::start_app::<LockWatch>();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue