aboutsummaryrefslogtreecommitdiffstats
path: root/ui/backend/src
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@atuin.sh>2024-07-10 15:56:33 +0100
committerGitHub <noreply@github.com>2024-07-10 15:56:33 +0100
commit8d9f677c4e9ccfcc6dc9297864dc49446fb5ee59 (patch)
tree1fe507403c4d690937834a815a663336bf104039 /ui/backend/src
parentchore(deps): update to tonic 0.12, prost 0.13 (#2250) (diff)
downloadatuin-8d9f677c4e9ccfcc6dc9297864dc49446fb5ee59.zip
feat(gui): use fancy new side nav (#2243)
* feat(gui): use fancy new side nav * compact only sidebar, no expand-collapse * custom drag region, remove titlebar * add user popup * wire up login/logout/register, move user button to bottom and add menu * link help and feedback to forum
Diffstat (limited to 'ui/backend/src')
-rw-r--r--ui/backend/src/main.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/ui/backend/src/main.rs b/ui/backend/src/main.rs
index 7adbbbe5..147bf413 100644
--- a/ui/backend/src/main.rs
+++ b/ui/backend/src/main.rs
@@ -111,6 +111,16 @@ async fn login(username: String, password: String, key: String) -> Result<String
}
#[tauri::command]
+async fn logout() -> Result<(), String> {
+ let settings = Settings::new().map_err(|e| e.to_string())?;
+
+ atuin_client::logout::logout(&settings)
+ .map_err(|e| e.to_string())?;
+
+ Ok(())
+}
+
+#[tauri::command]
async fn register(username: String, email: String, password: String) -> Result<String, String> {
let settings = Settings::new().map_err(|e| e.to_string())?;
@@ -257,6 +267,7 @@ fn main() {
config,
session,
login,
+ logout,
register,
history_calendar,
run::pty::pty_open,