Initial commit. UI localisation works.

This commit is contained in:
2023-08-18 12:22:23 +02:00
commit 9f17393310
100 changed files with 39402 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
use leptos::*;
#[server(SetSession, "/api", "Url", "set_session")]
pub async fn set_session(cx: Scope) -> Result<(), ServerFnError> {
use leptos_actix::extract;
use actix_session::*;
extract(cx, |session: Session| async move {
leptos::log!("extract");
let pok = session.insert("user", "uzivatel");
log!("{pok:?}");
}).await
//Ok(())
}
#[server(GetSession, "/api")]
pub async fn get_session(cx: Scope) -> Result<(), ServerFnError> {
use leptos_actix::extract;
use actix_session::*;
extract(cx, |session: Session| async move {
leptos::log!("extract");
let pok = session.get::<String>("user");
log!("{pok:?}");
}).await
//Ok(())
}