From 4a84a5459149bd5989f19c1dae278c29780b0b00 Mon Sep 17 00:00:00 2001 From: Alexander Baranov Date: Sat, 23 May 2026 10:46:08 +0300 Subject: [PATCH] =?UTF-8?q?smart-house-web:=20leptos=20=D1=8D=D1=81=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B8=D0=BC=D0=B5=D0=BD=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- smart-house-web/frontend/.gitignore | 1 + smart-house-web/frontend/Cargo.toml | 3 ++- smart-house-web/frontend/README.md | 10 ++++++++++ smart-house-web/frontend/src/main.rs | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 smart-house-web/frontend/.gitignore create mode 100644 smart-house-web/frontend/README.md diff --git a/smart-house-web/frontend/.gitignore b/smart-house-web/frontend/.gitignore new file mode 100644 index 0000000..178135c --- /dev/null +++ b/smart-house-web/frontend/.gitignore @@ -0,0 +1 @@ +/dist/ diff --git a/smart-house-web/frontend/Cargo.toml b/smart-house-web/frontend/Cargo.toml index 1a91109..a9dcb9a 100644 --- a/smart-house-web/frontend/Cargo.toml +++ b/smart-house-web/frontend/Cargo.toml @@ -4,4 +4,5 @@ version = "0.1.0" edition = "2024" [dependencies] -leptos = { version = "0.8.19", features = ["csr"] } +console_error_panic_hook = "0.1" +leptos = { version = "0.8", features = ["csr"] } diff --git a/smart-house-web/frontend/README.md b/smart-house-web/frontend/README.md new file mode 100644 index 0000000..5ae60b0 --- /dev/null +++ b/smart-house-web/frontend/README.md @@ -0,0 +1,10 @@ +# Фронтэнд умного дома + +Запуск сервера разработки (sh): + + RUSTFLAGS="--cfg erase_components" trunk serve + +Запуск сервера разработки (powershell): + + $env:RUSTFLAGS = '--cfg erase_components' + trunk serve diff --git a/smart-house-web/frontend/src/main.rs b/smart-house-web/frontend/src/main.rs index 3bfc6b4..c0cfc82 100644 --- a/smart-house-web/frontend/src/main.rs +++ b/smart-house-web/frontend/src/main.rs @@ -1,5 +1,6 @@ use leptos::prelude::*; fn main() { + console_error_panic_hook::set_once(); leptos::mount::mount_to_body(|| view! {

"Hello, world!"

}) }