feat: site wide sidebar

This commit is contained in:
Per Stark
2025-04-22 11:58:54 +02:00
parent 6e4aa12fb2
commit 0c09b13a38
16 changed files with 348 additions and 109 deletions

View File

@@ -252,7 +252,7 @@ pub async fn show_conversation_editing_title(
}
Ok(TemplateResponse::new_template(
"chat/drawer.html",
"sidebar.html",
DrawerContext {
user,
conversation_archive,
@@ -273,7 +273,7 @@ pub async fn patch_conversation_title(
let updated_conversations = User::get_user_conversations(&user.id, &state.db).await?;
Ok(TemplateResponse::new_template(
"chat/drawer.html",
"sidebar.html",
DrawerContext {
user,
conversation_archive: updated_conversations,
@@ -306,7 +306,7 @@ pub async fn delete_conversation(
let conversation_archive = User::get_user_conversations(&user.id, &state.db).await?;
Ok(TemplateResponse::new_template(
"chat/drawer.html",
"sidebar.html",
DrawerContext {
user,
conversation_archive,
@@ -322,7 +322,7 @@ pub async fn reload_sidebar(
let conversation_archive = User::get_user_conversations(&user.id, &state.db).await?;
Ok(TemplateResponse::new_template(
"chat/drawer.html",
"sidebar.html",
DrawerContext {
user,
conversation_archive,