aboutsummaryrefslogtreecommitdiffstats
path: root/ui/src/state/client.ts
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2024-05-28 14:54:05 +0100
committerGitHub <noreply@github.com>2024-05-28 14:54:05 +0100
commitfc4dfe4fffce05c91f6766024891bdb39b2a3299 (patch)
treea9a0923645a4e6f6047f25db0d2f4f25a984b4b0 /ui/src/state/client.ts
parentchore(deps): bump uuid from 1.7.0 to 1.8.0 (#2047) (diff)
downloadatuin-fc4dfe4fffce05c91f6766024891bdb39b2a3299.zip
feat(ui): use correct username on welcome screen (#2050)
* wip * fetch and use username
Diffstat (limited to '')
-rw-r--r--ui/src/state/client.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/src/state/client.ts b/ui/src/state/client.ts
new file mode 100644
index 00000000..f43683c1
--- /dev/null
+++ b/ui/src/state/client.ts
@@ -0,0 +1,13 @@
+// At some point, I'd like to replace some of the Atuin calls
+// with separate state handling here
+
+import { invoke } from "@tauri-apps/api/core";
+import { Settings } from "@/state/models";
+
+export async function sessionToken(): Promise<String> {
+ return await invoke("session");
+}
+
+export async function settings(): Promise<Settings> {
+ return await invoke("config");
+}