diff --git a/web/Cargo.toml b/web/Cargo.toml index 7516803..03811d1 100644 --- a/web/Cargo.toml +++ b/web/Cargo.toml @@ -5,6 +5,7 @@ authors = ["Sameer Puri "] edition = "2018" description = "Convert vector graphics to g-code for pen plotters, laser engravers, and other CNC machines" repository = "https://github.com/sameer/svg2gcode" +homepage = "https://sameer.github.io/svg2gcode/" license = "MIT" [dependencies] diff --git a/web/src/inputs.rs b/web/src/inputs.rs index 3b06ec6..392b43c 100644 --- a/web/src/inputs.rs +++ b/web/src/inputs.rs @@ -4,7 +4,7 @@ use gloo_file::futures::read_as_text; use gloo_timers::callback::Timeout; use paste::paste; use roxmltree::Document; -use std::{num::ParseFloatError}; +use std::num::ParseFloatError; use web_sys::{FileList, HtmlElement}; use yew::prelude::*; use yewdux::prelude::{BasicStore, Dispatcher}; @@ -16,7 +16,6 @@ use crate::{ state::{AppState, AppStore, FormState, FormStore}, }; - // TODO: make a nice, syntax highlighting editor for g-code. // I started on this but it quickly got too complex. // pub struct GCodeEditor { @@ -508,7 +507,7 @@ pub fn svg_input() -> Html { let parsed = Some(res.map_err(|err| err.to_string()).and_then(move |text| { if let Some(err) = Document::parse(&text).err() { - Err(err.to_string()) + Err(format!("Error parsing SVG: {}", err)) } else { Ok(text) } diff --git a/web/src/main.rs b/web/src/main.rs index a0d1324..1a976cf 100644 --- a/web/src/main.rs +++ b/web/src/main.rs @@ -158,37 +158,46 @@ impl Component for App { }); html! {
-
+

- { env!("CARGO_PKG_NAME") } + { "svg2gcode" }

{ env!("CARGO_PKG_DESCRIPTION") }

+ + +
+
+

+ { "See the project " } + + { "on GitHub" } + + {" for support" } +

- - -
} }