diff --git a/showbits-thermal-printer/src/server.rs b/showbits-thermal-printer/src/server.rs index 0a9806f..ab95e20 100644 --- a/showbits-thermal-printer/src/server.rs +++ b/showbits-thermal-printer/src/server.rs @@ -34,7 +34,7 @@ pub async fn run(tx: mpsc::Sender, addr: String) -> anyhow::Result<()> .route("/photo", post(post_photo).fallback(get_static_file)) .route("/text", post(post_text)) .route("/tictactoe", post(post_tictactoe)) - .route("/typst", post(post_typst)) + .route("/typst", post(post_typst).fallback(get_static_file)) .fallback(get(get_static_file)) .layer(DefaultBodyLimit::max(32 * 1024 * 1024)) // 32 MiB .with_state(Server { tx }); diff --git a/showbits-thermal-printer/static/index.html b/showbits-thermal-printer/static/index.html index 97c3a21..00dcfc7 100644 --- a/showbits-thermal-printer/static/index.html +++ b/showbits-thermal-printer/static/index.html @@ -10,6 +10,7 @@ diff --git a/showbits-thermal-printer/static/typst.html b/showbits-thermal-printer/static/typst.html new file mode 100644 index 0000000..0b4e08e --- /dev/null +++ b/showbits-thermal-printer/static/typst.html @@ -0,0 +1,21 @@ + + + + + + TP: Typst + + +

Print typst code

+
+ +
+ +
+ +