ui: add tooltips & clear table button

This commit is contained in:
rzmk 2024-02-26 21:51:11 -05:00
parent 199abf5553
commit 7f99660309
No known key found for this signature in database
9 changed files with 650 additions and 435 deletions

View file

@ -15,6 +15,7 @@
"@radix-ui/react-scroll-area": "^1.0.5",
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tooltip": "^1.0.7",
"@tanstack/react-table": "^8.12.0",
"@tauri-apps/api": "2.0.0-beta.1",
"@tauri-apps/plugin-dialog": "2.0.0-beta.0",
@ -33,12 +34,12 @@
"@release-it/bumper": "^6.0.1",
"@release-it/conventional-changelog": "^8.0.1",
"@tauri-apps/cli": "2.0.0-beta.1",
"@types/node": "^20.11.19",
"@types/react": "^18.2.56",
"@types/node": "^20.11.20",
"@types/react": "^18.2.58",
"@types/react-dom": "^18.2.19",
"autoprefixer": "^10.4.17",
"clsx": "^2.1.0",
"eslint": "^8.56.0",
"eslint": "^8.57.0",
"eslint-config-next": "14.1.0",
"postcss": "^8.4.35",
"release-it": "^17.1.1",

661
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -2,4 +2,6 @@
# will have compiled files and executables
/target/
/gen/schemas
# personal utility for cargo deny
deny.toml

244
src-tauri/Cargo.lock generated
View file

@ -338,9 +338,9 @@ dependencies = [
[[package]]
name = "bumpalo"
version = "3.15.2"
version = "3.15.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3b1be7772ee4501dba05acbe66bb1e8760f6a6c474a36035631638e4415f130"
checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b"
[[package]]
name = "bytemuck"
@ -441,14 +441,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a969e13a7589e9e3e4207e153bae624ade2b5622fb4684a4923b23ec3d57719"
dependencies = [
"serde",
"toml 0.8.2",
"toml 0.8.10",
]
[[package]]
name = "cc"
version = "1.0.86"
version = "1.0.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f9fa1897e4325be0d68d48df6aa1a71ac2ed4d27723887e7754192705350730"
checksum = "3286b845d0fccbdd15af433f61c5970e711987036cb468f437ff6badd70f4e24"
[[package]]
name = "cesu8"
@ -505,7 +505,7 @@ dependencies = [
"iana-time-zone",
"num-traits",
"serde",
"windows-targets 0.52.0",
"windows-targets 0.52.3",
]
[[package]]
@ -691,9 +691,9 @@ dependencies = [
[[package]]
name = "darling"
version = "0.20.6"
version = "0.20.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c376d08ea6aa96aafe61237c7200d1241cb177b7d3a542d791f2d118e9cbb955"
checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391"
dependencies = [
"darling_core",
"darling_macro",
@ -701,9 +701,9 @@ dependencies = [
[[package]]
name = "darling_core"
version = "0.20.6"
version = "0.20.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33043dcd19068b8192064c704b3f83eb464f91f1ff527b44a4e2b08d9cdb8855"
checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f"
dependencies = [
"fnv",
"ident_case",
@ -715,9 +715,9 @@ dependencies = [
[[package]]
name = "darling_macro"
version = "0.20.6"
version = "0.20.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c5a91391accf613803c2a9bf9abccdbaa07c54b4244a5b64883f9c3c137c86be"
checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f"
dependencies = [
"darling_core",
"quote",
@ -908,7 +908,7 @@ dependencies = [
"cc",
"memchr",
"rustc_version",
"toml 0.8.2",
"toml 0.8.10",
"vswhom",
"winreg 0.51.0",
]
@ -1485,7 +1485,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc"
dependencies = [
"heck",
"proc-macro-crate 2.0.2",
"proc-macro-crate 2.0.0",
"proc-macro-error",
"proc-macro2",
"quote",
@ -1631,9 +1631,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]]
name = "hermit-abi"
version = "0.3.6"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd"
checksum = "379dada1584ad501b383485dd706b8afb7a70fcbc7f4da7d780638a5a6124a60"
[[package]]
name = "hex"
@ -1764,9 +1764,9 @@ dependencies = [
[[package]]
name = "image"
version = "0.24.8"
version = "0.24.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "034bbe799d1909622a74d1193aa50147769440040ff36cb2baa947609b0a4e23"
checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d"
dependencies = [
"bytemuck",
"byteorder",
@ -2683,12 +2683,20 @@ dependencies = [
[[package]]
name = "proc-macro-crate"
version = "2.0.2"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24"
checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8"
dependencies = [
"toml_datetime",
"toml_edit 0.20.2",
"toml_edit 0.20.7",
]
[[package]]
name = "proc-macro-crate"
version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284"
dependencies = [
"toml_edit 0.21.1",
]
[[package]]
@ -3314,12 +3322,12 @@ checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7"
[[package]]
name = "socket2"
version = "0.5.5"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871"
dependencies = [
"libc",
"windows-sys 0.48.0",
"windows-sys 0.52.0",
]
[[package]]
@ -3501,7 +3509,7 @@ dependencies = [
"cfg-expr",
"heck",
"pkg-config",
"toml 0.8.2",
"toml 0.8.10",
"version-compare",
]
@ -3558,15 +3566,15 @@ dependencies = [
[[package]]
name = "target-lexicon"
version = "0.12.13"
version = "0.12.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae"
checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f"
[[package]]
name = "tauri"
version = "2.0.0-beta.4"
version = "2.0.0-beta.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb6b10809e932ed85813fff9ac748cbcc0cf4c78209433b1b6e025660619f2e4"
checksum = "573d402763f2b5d1e9972200de27ef1f24ca5df51acf468eab20af8063b1a21d"
dependencies = [
"anyhow",
"bytes",
@ -3612,9 +3620,9 @@ dependencies = [
[[package]]
name = "tauri-build"
version = "2.0.0-beta.3"
version = "2.0.0-beta.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4ea663cde4862231178215d364b3650dade8cb159fc84a1bea5c365689dacd0"
checksum = "d4e79432741cbce9f09c92c6d059cd6f2825d4d21d257f46459e71326d2bbe38"
dependencies = [
"anyhow",
"cargo_toml",
@ -3628,15 +3636,15 @@ dependencies = [
"serde_json",
"tauri-utils",
"tauri-winres",
"toml 0.8.2",
"toml 0.8.10",
"walkdir 2.4.0",
]
[[package]]
name = "tauri-codegen"
version = "2.0.0-beta.3"
version = "2.0.0-beta.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94a770b18aa021b0c8568c8f0d347044a72d349b6a13dd1db28c558832e8e681"
checksum = "9737464c5f81041d79642f6a93acf9b91bd74f8d3d3b248000d6e14c3b781d73"
dependencies = [
"base64",
"brotli",
@ -3661,9 +3669,9 @@ dependencies = [
[[package]]
name = "tauri-macros"
version = "2.0.0-beta.3"
version = "2.0.0-beta.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85b100bf9f05a013719fa6c9bf096da42511888b3671d9c22bffa12a030d76a9"
checksum = "27030c6775fd26ef8977bafb4063e4667580a0cb812427b62f622c91decdf2ef"
dependencies = [
"heck",
"proc-macro2",
@ -3675,9 +3683,9 @@ dependencies = [
[[package]]
name = "tauri-plugin"
version = "2.0.0-beta.3"
version = "2.0.0-beta.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "140c010cfb7120c9276e6e0b0c271dabb7988be2998011f918b669e766224e55"
checksum = "03ac9259b84b72b048534240874f36bad92222c6c161490683baa5301d18ccdd"
dependencies = [
"anyhow",
"glob",
@ -3686,14 +3694,14 @@ dependencies = [
"serde",
"serde_json",
"tauri-utils",
"toml 0.8.2",
"toml 0.8.10",
"walkdir 1.0.7",
]
[[package]]
name = "tauri-plugin-dialog"
version = "2.0.0-beta.0"
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#b1b9a02f9e7a3b0f2427ce8e1a5ea8fcd1b96dc8"
version = "2.0.0-beta.1"
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#aa25c91bb01e957872fb2b606a3acaf2f2c4ef3a"
dependencies = [
"glib 0.16.9",
"log",
@ -3709,8 +3717,8 @@ dependencies = [
[[package]]
name = "tauri-plugin-fs"
version = "2.0.0-beta.0"
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#b1b9a02f9e7a3b0f2427ce8e1a5ea8fcd1b96dc8"
version = "2.0.0-beta.1"
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#aa25c91bb01e957872fb2b606a3acaf2f2c4ef3a"
dependencies = [
"anyhow",
"glob",
@ -3727,8 +3735,8 @@ dependencies = [
[[package]]
name = "tauri-plugin-shell"
version = "2.0.0-beta.0"
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#b1b9a02f9e7a3b0f2427ce8e1a5ea8fcd1b96dc8"
version = "2.0.0-beta.1"
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v2#aa25c91bb01e957872fb2b606a3acaf2f2c4ef3a"
dependencies = [
"encoding_rs",
"log",
@ -3746,9 +3754,9 @@ dependencies = [
[[package]]
name = "tauri-runtime"
version = "2.0.0-beta.3"
version = "2.0.0-beta.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc687ef6571127f0ad9a9bef141ca3f8d9597b7f99949047d5c69ed731cf36c4"
checksum = "098a2aa50708fb6082092d1cd0507ea0c72eac337c0684dd75f5c2b95ad5a516"
dependencies = [
"gtk",
"http",
@ -3764,9 +3772,9 @@ dependencies = [
[[package]]
name = "tauri-runtime-wry"
version = "2.0.0-beta.3"
version = "2.0.0-beta.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a07b1d76d4159aec5c2cff742e30b0f5b3675a2520b979acbbc66c5f92c99491"
checksum = "01d1bfefac44daa25f2bb5cde23302f86739adcd093a70dac8330f08f3397973"
dependencies = [
"cocoa",
"gtk",
@ -3778,6 +3786,7 @@ dependencies = [
"tao",
"tauri-runtime",
"tauri-utils",
"url",
"webkit2gtk",
"webview2-com",
"windows 0.52.0",
@ -3786,9 +3795,9 @@ dependencies = [
[[package]]
name = "tauri-utils"
version = "2.0.0-beta.3"
version = "2.0.0-beta.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2729b59832a96dd05f4f2ced33e2ab976ca60c58c1d675afe6aabc486eb51143"
checksum = "8b2bfb1f70dd152d3ce5c5d20d18b720f0f66943b2ba7e0f85910cb4472b9633"
dependencies = [
"brotli",
"cargo_metadata",
@ -3812,7 +3821,7 @@ dependencies = [
"serde_with",
"swift-rs",
"thiserror",
"toml 0.8.2",
"toml 0.8.10",
"url",
"walkdir 2.4.0",
]
@ -3990,21 +3999,21 @@ dependencies = [
[[package]]
name = "toml"
version = "0.8.2"
version = "0.8.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d"
checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290"
dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
"toml_edit 0.20.2",
"toml_edit 0.22.6",
]
[[package]]
name = "toml_datetime"
version = "0.6.3"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"
checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
dependencies = [
"serde",
]
@ -4019,20 +4028,42 @@ dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
"winnow",
"winnow 0.5.40",
]
[[package]]
name = "toml_edit"
version = "0.20.2"
version = "0.20.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338"
checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81"
dependencies = [
"indexmap 2.2.3",
"toml_datetime",
"winnow 0.5.40",
]
[[package]]
name = "toml_edit"
version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1"
dependencies = [
"indexmap 2.2.3",
"toml_datetime",
"winnow 0.5.40",
]
[[package]]
name = "toml_edit"
version = "0.22.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6"
dependencies = [
"indexmap 2.2.3",
"serde",
"serde_spanned",
"toml_datetime",
"winnow",
"winnow 0.6.2",
]
[[package]]
@ -4580,7 +4611,7 @@ dependencies = [
"windows-core",
"windows-implement",
"windows-interface",
"windows-targets 0.52.0",
"windows-targets 0.52.3",
]
[[package]]
@ -4589,7 +4620,7 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
"windows-targets 0.52.0",
"windows-targets 0.52.3",
]
[[package]]
@ -4638,7 +4669,7 @@ version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
"windows-targets 0.52.0",
"windows-targets 0.52.3",
]
[[package]]
@ -4673,17 +4704,17 @@ dependencies = [
[[package]]
name = "windows-targets"
version = "0.52.0"
version = "0.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f"
dependencies = [
"windows_aarch64_gnullvm 0.52.0",
"windows_aarch64_msvc 0.52.0",
"windows_i686_gnu 0.52.0",
"windows_i686_msvc 0.52.0",
"windows_x86_64_gnu 0.52.0",
"windows_x86_64_gnullvm 0.52.0",
"windows_x86_64_msvc 0.52.0",
"windows_aarch64_gnullvm 0.52.3",
"windows_aarch64_msvc 0.52.3",
"windows_i686_gnu 0.52.3",
"windows_i686_msvc 0.52.3",
"windows_x86_64_gnu 0.52.3",
"windows_x86_64_gnullvm 0.52.3",
"windows_x86_64_msvc 0.52.3",
]
[[package]]
@ -4692,7 +4723,7 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75aa004c988e080ad34aff5739c39d0312f4684699d6d71fc8a198d057b8b9b4"
dependencies = [
"windows-targets 0.52.0",
"windows-targets 0.52.3",
]
[[package]]
@ -4709,9 +4740,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.0"
version = "0.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6"
[[package]]
name = "windows_aarch64_msvc"
@ -4727,9 +4758,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.0"
version = "0.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f"
[[package]]
name = "windows_i686_gnu"
@ -4745,9 +4776,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
name = "windows_i686_gnu"
version = "0.52.0"
version = "0.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb"
[[package]]
name = "windows_i686_msvc"
@ -4763,9 +4794,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
name = "windows_i686_msvc"
version = "0.52.0"
version = "0.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58"
[[package]]
name = "windows_x86_64_gnu"
@ -4781,9 +4812,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.0"
version = "0.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614"
[[package]]
name = "windows_x86_64_gnullvm"
@ -4799,9 +4830,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.0"
version = "0.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c"
[[package]]
name = "windows_x86_64_msvc"
@ -4817,9 +4848,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.0"
version = "0.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6"
[[package]]
name = "winnow"
@ -4830,6 +4861,15 @@ dependencies = [
"memchr",
]
[[package]]
name = "winnow"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a4191c47f15cc3ec71fcb4913cb83d58def65dd3787610213c649283b5ce178"
dependencies = [
"memchr",
]
[[package]]
name = "winreg"
version = "0.50.0"
@ -4852,9 +4892,9 @@ dependencies = [
[[package]]
name = "wry"
version = "0.36.0"
version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a9e7b81968555303086ef882a0c213896a76099de4ed0b86a798775c2d54304"
checksum = "8b717040ba9771fd88eb428c6ea6b555f8e734ff8534f02c13e8f10d97f5935e"
dependencies = [
"base64",
"block",
@ -4878,6 +4918,7 @@ dependencies = [
"objc",
"objc_id",
"once_cell",
"percent-encoding",
"raw-window-handle 0.6.0",
"serde",
"serde_json",
@ -4885,7 +4926,6 @@ dependencies = [
"soup3",
"tao-macros",
"thiserror",
"url",
"webkit2gtk",
"webkit2gtk-sys",
"webview2-com",
@ -4949,9 +4989,9 @@ dependencies = [
[[package]]
name = "zbus"
version = "4.0.1"
version = "4.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b8e3d6ae3342792a6cc2340e4394334c7402f3d793b390d2c5494a4032b3030"
checksum = "40c6ec5949cc90d623c71dffe9ee72f30a0d403b6280e8e27ecc264c4cb2aef2"
dependencies = [
"async-broadcast",
"async-process",
@ -4983,11 +5023,11 @@ dependencies = [
[[package]]
name = "zbus_macros"
version = "4.0.1"
version = "4.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7a3e850ff1e7217a3b7a07eba90d37fe9bb9e89a310f718afcde5885ca9b6d7"
checksum = "d06597bca5fe34637f315d1dd6eba65d337e56afd761e19e91187a69e8b4f6f6"
dependencies = [
"proc-macro-crate 1.3.1",
"proc-macro-crate 3.1.0",
"proc-macro2",
"quote",
"regex",
@ -5008,9 +5048,9 @@ dependencies = [
[[package]]
name = "zvariant"
version = "4.0.0"
version = "4.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e09e8be97d44eeab994d752f341e67b3b0d80512a8b315a0671d47232ef1b65"
checksum = "a660524eaa9f4a65c673006b034d2167a9a3ef821e9bd7311b2f1c77b904e312"
dependencies = [
"endi",
"enumflags2",
@ -5022,11 +5062,11 @@ dependencies = [
[[package]]
name = "zvariant_derive"
version = "4.0.0"
version = "4.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72a5857e2856435331636a9fbb415b09243df4521a267c5bedcd5289b4d5799e"
checksum = "55b1565fbb82205a83de0bd1293fb2b5c9e34d4e74250fd4aed54903545b1fa2"
dependencies = [
"proc-macro-crate 1.3.1",
"proc-macro-crate 3.1.0",
"proc-macro2",
"quote",
"syn 1.0.109",

View file

@ -29,18 +29,26 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { useState } from "react";
import { DataTableViewOptions } from "@/components/DT/DataTableViewOptions";
import { LucideScanSearch } from "lucide-react";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { LucideScanSearch, Trash2 } from "lucide-react";
import { useState } from "react";
interface DataTableProps<TData, TValue> {
columns: ColumnDef<TData, TValue>[];
data: TData[];
setData: React.Dispatch<React.SetStateAction<TData[]>>;
}
export function DataTable<TData, TValue>({
columns,
data,
setData,
}: DataTableProps<TData, TValue>) {
const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([]);
const [searchColumn, setSearchColumn] = useState("label");
@ -79,10 +87,24 @@ export function DataTable<TData, TValue>({
className="max-w-sm"
/>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="outline" size="icon">
<LucideScanSearch strokeWidth={1.25} />
</Button>
<DropdownMenuTrigger>
<TooltipProvider delayDuration={0}>
<Tooltip>
<TooltipTrigger asChild>
<Button variant="outline" size="icon">
<LucideScanSearch
strokeWidth={1.25}
/>
<span className="sr-only">
Choose a column to search
</span>
</Button>
</TooltipTrigger>
<TooltipContent>
Choose a column to search
</TooltipContent>
</Tooltip>
</TooltipProvider>
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuLabel>Search Column</DropdownMenuLabel>
@ -107,6 +129,21 @@ export function DataTable<TData, TValue>({
</DropdownMenuRadioGroup>
</DropdownMenuContent>
</DropdownMenu>
<TooltipProvider delayDuration={0}>
<Tooltip>
<TooltipTrigger asChild>
<Button
variant="destructive"
size="icon"
onClick={() => setData([])}
>
<Trash2 strokeWidth={1.25} />
<span className="sr-only">Clear table</span>
</Button>
</TooltipTrigger>
<TooltipContent>Clear table</TooltipContent>
</Tooltip>
</TooltipProvider>
</div>
<DataTableViewOptions table={table} />
</div>

View file

@ -19,22 +19,19 @@ const MagikaProcess = () => {
useEffect(() => {
if (loading) return;
const unlisten = listen(
"tauri://file-drop",
async ({ payload }: any) => {
setLoading(true);
const filepaths: string[] = payload.paths;
const filepredictions: any[] = [];
listen("tauri://file-drop", async ({ payload }: any) => {
setLoading(true);
const filepaths: string[] = payload.paths;
const filepredictions: any[] = [];
for await (const filepath of filepaths) {
const prediction = await getPrediction(filepath);
filepredictions.push(prediction);
}
setPredictions(filepredictions);
setLoading(false);
for await (const filepath of filepaths) {
const prediction = await getPrediction(filepath);
filepredictions.push(prediction);
}
);
setPredictions(filepredictions);
setLoading(false);
});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
@ -68,7 +65,6 @@ const MagikaProcess = () => {
}
setPredictions(filePredictions);
} else if (selected === null) {
// user cancelled the selection
console.log("User cancelled selection");
} else {
// user selected a single file
@ -110,7 +106,11 @@ const MagikaProcess = () => {
</p>
</div>
{predictions.length > 0 && (
<DataTable columns={columns} data={predictions} />
<DataTable
columns={columns}
data={predictions}
setData={setPredictions}
/>
)}
</div>
</div>

View file

@ -11,23 +11,38 @@ import {
} from "@/components/ui/dialog";
import { Button } from "@/components/ui/button";
import { Separator } from "@/components/ui/separator";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { open } from "@tauri-apps/plugin-shell";
const Settings = () => {
return (
<Dialog>
<DialogTrigger asChild>
<DialogTrigger>
{/* <SettingsIcon strokeWidth={1.25} /> */}
<Button variant="ghost" size="icon">
<Info strokeWidth={1.25} />
</Button>
<TooltipProvider delayDuration={0}>
<Tooltip>
<TooltipTrigger asChild>
<Button variant="ghost" size="icon">
<Info strokeWidth={1.25} />
<span className="sr-only">About fformat</span>
</Button>
</TooltipTrigger>
<TooltipContent side="right">
About fformat
</TooltipContent>
</Tooltip>
</TooltipProvider>
</DialogTrigger>
<DialogContent>
<DialogHeader>
<DialogTitle>fformat</DialogTitle>
<p className="text-sm text-muted-foreground">
Identify potential file content types on your local
device.
Identify potential file content types on your device.
</p>
<Separator />
<ul className="list-disc text-sm text-muted-foreground ml-4 mt-2">

View file

@ -3,20 +3,35 @@
import { Moon, Sun } from "lucide-react";
import { useTheme } from "next-themes";
import { Button } from "@/components/ui/button";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
const ThemeSwitch = () => {
const { theme, setTheme } = useTheme();
return (
<Button
onClick={() => setTheme(theme === "light" ? "dark" : "light")}
variant="ghost"
size="icon"
>
<Sun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
<Moon className="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
<span className="sr-only">Toggle theme</span>
</Button>
<TooltipProvider delayDuration={0}>
<Tooltip>
<TooltipTrigger asChild>
<Button
onClick={() =>
setTheme(theme === "light" ? "dark" : "light")
}
variant="ghost"
size="icon"
>
<Sun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
<Moon className="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
<span className="sr-only">Toggle theme</span>
</Button>
</TooltipTrigger>
<TooltipContent side="right">Toggle theme</TooltipContent>
</Tooltip>
</TooltipProvider>
);
};

View file

@ -0,0 +1,30 @@
"use client"
import * as React from "react"
import * as TooltipPrimitive from "@radix-ui/react-tooltip"
import { cn } from "@/lib/utils"
const TooltipProvider = TooltipPrimitive.Provider
const Tooltip = TooltipPrimitive.Root
const TooltipTrigger = TooltipPrimitive.Trigger
const TooltipContent = React.forwardRef<
React.ElementRef<typeof TooltipPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
>(({ className, sideOffset = 4, ...props }, ref) => (
<TooltipPrimitive.Content
ref={ref}
sideOffset={sideOffset}
className={cn(
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className
)}
{...props}
/>
))
TooltipContent.displayName = TooltipPrimitive.Content.displayName
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }