mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-08 17:35:18 +00:00
new tauri packages, and a little more frontend
This commit is contained in:
1 parent
14be87d4b3
commit
329d800586
3 files changed
+679
-15
No files matched your search
Generated
+659
-3
File diff suppressed because it is too large.
Load diff
@@ -11,3 +11,7 @@ serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
rusqlite = { version = "0.38.0", features = ["bundled", "unlock_notify"] }
|
||||
thiserror = "2.0.18"
|
||||
zip = "8.1.0"
|
||||
sha1 = "0.10.6"
|
||||
walkdir = "2.5.0"
|
||||
reqwest = "0.13.2"
|
||||
+16
-12
@@ -2,7 +2,7 @@ import "./App.css";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { Button, Field, Input, Stack } from "@chakra-ui/react";
|
||||
import { Button, Group, Input, Stack } from "@chakra-ui/react";
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
|
||||
import { Provider } from "./components/ui/provider";
|
||||
@@ -18,28 +18,32 @@ function App() {
|
||||
}, [name]);
|
||||
|
||||
async function greet() {
|
||||
invoke("add_entry", { name });
|
||||
await invoke("add_entry", { name });
|
||||
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
||||
|
||||
setName("");
|
||||
}
|
||||
|
||||
return (
|
||||
<Provider>
|
||||
<Stack maxW={"1000px"} margin={"0.5em auto"}>
|
||||
<Field.Root
|
||||
orientation={"horizontal"}
|
||||
<form
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
greet();
|
||||
}}
|
||||
>
|
||||
<Input
|
||||
id="greet-input"
|
||||
onChange={(e) => setName(e.currentTarget.value)}
|
||||
autoComplete="off"
|
||||
placeholder="Enter a name..."
|
||||
/>
|
||||
<Button>Search</Button>
|
||||
</Field.Root>
|
||||
<Group attached w="full">
|
||||
<Input
|
||||
id="greet-input"
|
||||
value={name}
|
||||
onChange={(e) => setName(e.currentTarget.value)}
|
||||
autoComplete="off"
|
||||
placeholder="Enter a name..."
|
||||
/>
|
||||
<Button type="submit">Search</Button>
|
||||
</Group>
|
||||
</form>
|
||||
<p>{greetMsg}</p>
|
||||
</Stack>
|
||||
</Provider>
|
||||
|
||||
Reference in new issue
Block a user