From bc4d20b0c67f20b396261c600f9378239af30a34 Mon Sep 17 00:00:00 2001 From: Davydov Artyom Date: Thu, 14 Nov 2024 07:42:12 +0400 Subject: [PATCH] release: 0.2.0 (#4) * feat: tray-based design (#3) --- bun.lockb | Bin 105309 -> 103408 bytes components.json | 21 - index.html | 4 +- package.json | 11 +- src-tauri/Cargo.lock | 502 ++++++++++++++++++++- src-tauri/Cargo.toml | 9 +- src-tauri/capabilities/default.json | 2 +- src-tauri/src/lib.rs | 77 +++- src-tauri/tauri.conf.json | 9 +- src/app.css | 58 +-- src/app.tsx | 127 +++--- src/components/emulator-list-item.tsx | 86 ++-- src/components/modals/android-home.tsx | 142 ++++-- src/components/modals/emulator-options.tsx | 66 +++ src/components/ui/alert-dialog.tsx | 139 ------ src/components/ui/button.tsx | 56 --- src/main.tsx | 3 +- src/queries/emulator.ts | 12 +- src/stores/app.ts | 11 + src/stores/modals.ts | 4 + tailwind.config.js | 90 +--- 21 files changed, 924 insertions(+), 505 deletions(-) delete mode 100644 components.json create mode 100644 src/components/modals/emulator-options.tsx delete mode 100644 src/components/ui/alert-dialog.tsx delete mode 100644 src/components/ui/button.tsx create mode 100644 src/stores/app.ts diff --git a/bun.lockb b/bun.lockb index 9a9be59ae80bd7e7f43cb98490187afcb4e04ee7..1e6678c13671b0eef77e019980668c86314b4516 100755 GIT binary patch delta 20167 zcmeHvd3a4%+x}i#4mlwtk&sb>gowB+kofv~hu?L5zxS{1>$=yyo@YI4e%9Li>~q%n zW=HKit832-ZFQn-*+G}K(dFwtz2KX5VEX=BpRVgPGxrC-el7347+E=G^ia+uy6om# ze9KCiDkvJsL6XWRj4mm)=4VM`tfO;D>jeWN^u^iM%u>j$WJ#(Ac^8=Uej0CrT_ebQ z?Ifuoc!oie>Viv4a&5zq?-u0xkjH|Zz{9|9Wr#%7Q40#x*o=h6&~HIORKRR-3-AVe zN%8}ah3pFEwIsgsKq5?i_v~b%7ILJ1|>BtGq+?M>1#nx6(2>s0r)!D6Z|>Y4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6V>~_;r?BaH zIYsJVgXC}7X&gR36lBfK%CQzn_s26YX=yC$Dm@v>YIjhJGg=3={;P0C5P|^Dd5cC& zG_{kTLV8c0?46Zc2r~-kLu0M+n-_`AVU0`^ zrN>E(OT*eTowTMMt0#?a$NZ#s+M#Sg7ZxL3Y0sji8(o-*L~NyQ?O0RExe!AfYGQ5W zvL?@+gfaffZ9&*SrT8S~<4Cv7s3(F!he?-E7+llgsI18bg#^n_xXCv|LZk3xI#jye zp4FF(?O997Cz*v9|85%PZeBdY&}#gvJ-F?bD*Iqy>ynwnfx*elnMolD%u!mC04M$2 zkvU1XO?c30Xop)U>VH|1R`g>6OZKQ4X3u>F2!#9HVH4(JqMSS663^zpYqusST%+9ssFzK{8kak diff --git a/components.json b/components.json deleted file mode 100644 index d294819..0000000 --- a/components.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://ui.shadcn.com/schema.json", - "style": "default", - "rsc": false, - "tsx": true, - "tailwind": { - "config": "tailwind.config.js", - "css": "src/app.css", - "baseColor": "neutral", - "cssVariables": true, - "prefix": "" - }, - "aliases": { - "components": "@/components", - "utils": "@/lib/utils", - "ui": "@/components/ui", - "lib": "@/lib", - "hooks": "@/hooks" - }, - "iconLibrary": "lucide" -} \ No newline at end of file diff --git a/index.html b/index.html index 144961e..8e670b8 100644 --- a/index.html +++ b/index.html @@ -7,10 +7,10 @@ Tauri + React + Typescript - +
diff --git a/package.json b/package.json index 5c207b6..17b6955 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "emu", "private": true, - "version": "0.1.1", + "version": "0.2.0", "type": "module", "scripts": { "dev": "vite", @@ -10,22 +10,19 @@ "tauri": "tauri" }, "dependencies": { + "@fontsource-variable/inter": "^5.1.0", + "@fontsource-variable/martian-mono": "^5.1.0", "@phosphor-icons/react": "^2.1.7", - "@radix-ui/react-alert-dialog": "^1.1.2", - "@radix-ui/react-slot": "^1.1.0", "@tauri-apps/api": "^2", "@tauri-apps/plugin-os": "~2", "@tauri-apps/plugin-process": "~2", "@tauri-apps/plugin-shell": "~2", - "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", - "lucide-react": "^0.456.0", "react": "^18.2.0", - "react-contexify": "^6.0.0", "react-dom": "^18.2.0", "swr": "^2.2.5", "tailwind-merge": "^2.5.4", - "tailwindcss-animate": "^1.0.7", + "vaul": "^1.1.1", "zustand": "^5.0.1" }, "devDependencies": { diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 9000708..3aeff01 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -62,6 +62,149 @@ version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" +[[package]] +name = "async-broadcast" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cd0e2e25ea8e5f7e9df04578dc6cf5c83577fd09b1a46aaf5c85e1c33f2a7e" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-channel" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "slab", +] + +[[package]] +name = "async-fs" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcd09b382f40fcd159c2d695175b2ae620ffa5f3bd6f664131efff4e8b9e04a" +dependencies = [ + "async-lock", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-io" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059" +dependencies = [ + "async-lock", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix", + "slab", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] +name = "async-lock" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-process" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63255f1dc2381611000436537bbedfe83183faa303a5a0edaf191edef06526bb" +dependencies = [ + "async-channel", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix", + "tracing", +] + +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "async-signal" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "637e00349800c0bdf8bfc21ebbc0b6524abea702b0da4168ac00d070d0c0b9f3" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix", + "signal-hook-registry", + "slab", + "windows-sys 0.59.0", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-trait" +version = "0.1.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "atk" version = "0.18.0" @@ -85,6 +228,12 @@ dependencies = [ "system-deps", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.4.0" @@ -157,6 +306,19 @@ dependencies = [ "objc2", ] +[[package]] +name = "blocking" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + [[package]] name = "brotli" version = "7.0.0" @@ -373,6 +535,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "convert_case" version = "0.4.0" @@ -554,6 +725,17 @@ dependencies = [ "serde", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "derive_more" version = "0.99.18" @@ -696,7 +878,7 @@ checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" [[package]] name = "emu" -version = "0.1.1" +version = "0.2.0" dependencies = [ "serde", "serde_json", @@ -706,6 +888,7 @@ dependencies = [ "tauri-plugin-positioner", "tauri-plugin-process", "tauri-plugin-shell", + "tauri-plugin-single-instance", ] [[package]] @@ -717,6 +900,33 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "endi" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" + +[[package]] +name = "enumflags2" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d232db7f5956f3f14313dc2f87985c58bd2c695ce124c8cdd984e08e15ac133d" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -743,6 +953,33 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "event-listener" +version = "5.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "fastrand" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" + [[package]] name = "fdeflate" version = "0.3.6" @@ -856,6 +1093,19 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +[[package]] +name = "futures-lite" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cef40d21ae2c515b51041df9ed313ed21e572df340ea58a922a0aefe7e8891a1" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + [[package]] name = "futures-macro" version = "0.3.31" @@ -1230,6 +1480,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -1839,7 +2095,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", @@ -1901,6 +2157,18 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.6.0", + "cfg-if", + "libc", + "memoffset", +] + [[package]] name = "nodrop" version = "0.1.14" @@ -2202,6 +2470,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + [[package]] name = "os_info" version = "3.8.2" @@ -2248,6 +2526,12 @@ dependencies = [ "system-deps", ] +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + [[package]] name = "parking_lot" version = "0.12.3" @@ -2429,6 +2713,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + [[package]] name = "pkg-config" version = "0.3.31" @@ -2461,6 +2756,21 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "polling" +version = "3.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi 0.4.0", + "pin-project-lite", + "rustix", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -2985,6 +3295,17 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "sha2" version = "0.10.8" @@ -3012,6 +3333,15 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + [[package]] name = "simd-adler32" version = "0.3.7" @@ -3103,6 +3433,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "string_cache" version = "0.8.7" @@ -3460,6 +3796,21 @@ dependencies = [ "tokio", ] +[[package]] +name = "tauri-plugin-single-instance" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a25ac834491d089699a2bc9266a662faf373c9f779f05a2235bc6e4d9e61769a" +dependencies = [ + "log", + "serde", + "serde_json", + "tauri", + "thiserror 1.0.69", + "windows-sys 0.59.0", + "zbus", +] + [[package]] name = "tauri-runtime" version = "2.2.0" @@ -3552,6 +3903,19 @@ dependencies = [ "toml 0.7.8", ] +[[package]] +name = "tempfile" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +dependencies = [ + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + [[package]] name = "tendril" version = "0.4.3" @@ -3750,9 +4114,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "tracing-core" version = "0.1.32" @@ -3801,6 +4177,17 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "uds_windows" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" +dependencies = [ + "memoffset", + "tempfile", + "winapi", +] + [[package]] name = "unic-char-property" version = "0.9.0" @@ -4586,6 +4973,16 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "xdg-home" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "yoke" version = "0.7.4" @@ -4610,6 +5007,70 @@ dependencies = [ "synstructure", ] +[[package]] +name = "zbus" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b8e3d6ae3342792a6cc2340e4394334c7402f3d793b390d2c5494a4032b3030" +dependencies = [ + "async-broadcast", + "async-executor", + "async-fs", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "derivative", + "enumflags2", + "event-listener", + "futures-core", + "futures-sink", + "futures-util", + "hex", + "nix", + "ordered-stream", + "rand 0.8.5", + "serde", + "serde_repr", + "sha1", + "static_assertions", + "tracing", + "uds_windows", + "windows-sys 0.52.0", + "xdg-home", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7a3e850ff1e7217a3b7a07eba90d37fe9bb9e89a310f718afcde5885ca9b6d7" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" +dependencies = [ + "serde", + "static_assertions", + "zvariant", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -4673,3 +5134,40 @@ dependencies = [ "quote", "syn 2.0.87", ] + +[[package]] +name = "zvariant" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e09e8be97d44eeab994d752f341e67b3b0d80512a8b315a0671d47232ef1b65" +dependencies = [ + "endi", + "enumflags2", + "serde", + "static_assertions", + "zvariant_derive", +] + +[[package]] +name = "zvariant_derive" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72a5857e2856435331636a9fbb415b09243df4521a267c5bedcd5289b4d5799e" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00bedb16a193cc12451873fee2a1bc6550225acece0e36f333e68326c73c8172" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index d02f0e8..e46ffdf 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "emu" -version = "0.1.1" +version = "0.2.0" description = "Manage emulators with ease" authors = ["fax1ty"] edition = "2021" @@ -18,10 +18,13 @@ crate-type = ["staticlib", "cdylib", "rlib"] tauri-build = { version = "2", features = [] } [dependencies] -tauri = { version = "2", features = ["macos-private-api"] } +tauri = { version = "2", features = ["macos-private-api", "tray-icon"] } tauri-plugin-shell = "2" serde = { version = "1", features = ["derive"] } serde_json = "1" tauri-plugin-process = "2" -tauri-plugin-positioner = "2" +tauri-plugin-positioner = { version = "2", features = ["tray-icon"] } tauri-plugin-os = "2" + +[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies] +tauri-plugin-single-instance = "2" diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index 0acb282..e0fcf29 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -6,7 +6,7 @@ "permissions": [ "core:default", "core:window:allow-start-dragging", - "core:window:allow-minimize", + "core:window:allow-hide", "core:window:allow-close", "shell:default", { diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 2f80615..319ccf7 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -1,9 +1,14 @@ -use std::env; +use std::{ + env, + sync::{Arc, Mutex}, +}; -use tauri::Manager; +use tauri::{ + tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent}, + Manager, +}; use tauri_plugin_positioner::{Position, WindowExt}; -// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/ #[tauri::command] fn get_android_home() -> Result { let v = env::var("ANDROID_HOME").map_err(|err| err.to_string())?; @@ -13,13 +18,75 @@ fn get_android_home() -> Result { #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { tauri::Builder::default() + .plugin(tauri_plugin_single_instance::init(|app, _, __| { + app.get_webview_window("main") + .expect("no main window") + .set_focus() + .unwrap(); + })) .plugin(tauri_plugin_os::init()) .plugin(tauri_plugin_process::init()) .plugin(tauri_plugin_shell::init()) .invoke_handler(tauri::generate_handler![get_android_home]) .setup(|app| { - let window = app.get_webview_window("main").unwrap(); - let _ = window.as_ref().window().move_window(Position::Center); + let aligned = Arc::new(Mutex::new(false)); + + #[cfg(target_os = "windows")] + app.get_webview_window("main") + .unwrap() + .set_always_on_top(true) + .unwrap(); + + app.handle() + .plugin(tauri_plugin_positioner::init()) + .unwrap(); + + TrayIconBuilder::new() + .on_tray_icon_event(move |tray, event| { + tauri_plugin_positioner::on_tray_event(tray.app_handle(), &event); + + match event { + TrayIconEvent::Click { + button: MouseButton::Left, + button_state: MouseButtonState::Up, + .. + } => { + let app = tray.app_handle(); + + if let Some(window) = app.get_webview_window("main") { + #[cfg(target_os = "windows")] + { + let mut aligned_lock = aligned.lock().unwrap(); + + if *aligned_lock == false { + window.move_window(Position::TrayLeft).unwrap(); + let scale = window.scale_factor().unwrap(); + let pos = window + .inner_position() + .unwrap() + .to_logical::(scale); + let target = + tauri::LogicalPosition::new(pos.x - 30 as u32, pos.y); + window.set_position(target).unwrap(); + + *aligned_lock = true + } + } + + #[cfg(target_os = "macos")] + { + window.move_window(Position::TrayBottomCenter).unwrap(); + } + + window.show().unwrap(); + window.set_focus().unwrap(); + } + } + _ => {} + } + }) + .icon(app.default_window_icon().unwrap().clone()) + .build(app)?; Ok(()) }) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 21d7c14..ca5083e 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "emu", - "version": "0.1.1", + "version": "0.2.0", "identifier": "emu.app", "build": { "beforeDevCommand": "bun run dev", @@ -18,8 +18,11 @@ "resizable": false, "decorations": false, "shadow": false, - "width": 800, - "height": 600 + "width": 305, + "height": 500, + "visible": false, + "focus": false, + "skipTaskbar": true } ], "security": { diff --git a/src/app.css b/src/app.css index 802e5b1..9d0e140 100644 --- a/src/app.css +++ b/src/app.css @@ -1,34 +1,9 @@ @tailwind base; @tailwind components; @tailwind utilities; + @layer base { :root { - --background: 0 0% 100%; - --foreground: 0 0% 3.9%; - --card: 0 0% 100%; - --card-foreground: 0 0% 3.9%; - --popover: 0 0% 100%; - --popover-foreground: 0 0% 3.9%; - --primary: 0 0% 9%; - --primary-foreground: 0 0% 98%; - --secondary: 0 0% 96.1%; - --secondary-foreground: 0 0% 9%; - --muted: 0 0% 96.1%; - --muted-foreground: 0 0% 45.1%; - --accent: 0 0% 96.1%; - --accent-foreground: 0 0% 9%; - --destructive: 0 84.2% 60.2%; - --destructive-foreground: 0 0% 98%; - --border: 0 0% 89.8%; - --input: 0 0% 89.8%; - --ring: 0 0% 3.9%; - --chart-1: 12 76% 61%; - --chart-2: 173 58% 39%; - --chart-3: 197 37% 24%; - --chart-4: 43 74% 66%; - --chart-5: 27 87% 67%; - --radius: 0.5rem; - --contexify-menu-bgColor: #3a3b3f !important; --contexify-separator-color: #4c4c4c !important; --contexify-item-color: #fff !important; @@ -39,35 +14,4 @@ --contexify-arrow-color: #6f6e77 !important; --contexify-activeArrow-color: #fff !important; } - .dark { - --background: 0 0% 3.9%; - --foreground: 0 0% 98%; - --card: 0 0% 3.9%; - --card-foreground: 0 0% 98%; - --popover: 0 0% 3.9%; - --popover-foreground: 0 0% 98%; - --primary: 0 0% 98%; - --primary-foreground: 0 0% 9%; - --secondary: 0 0% 14.9%; - --secondary-foreground: 0 0% 98%; - --muted: 0 0% 14.9%; - --muted-foreground: 0 0% 63.9%; - --accent: 0 0% 14.9%; - --accent-foreground: 0 0% 98%; - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 0 0% 98%; - --border: 0 0% 14.9%; - --input: 0 0% 14.9%; - --ring: 0 0% 83.1%; - --chart-1: 220 70% 50%; - --chart-2: 160 60% 45%; - --chart-3: 30 80% 55%; - --chart-4: 280 65% 60%; - --chart-5: 340 75% 55%; - } -} -@layer base { - * { - @apply border-border; - } } diff --git a/src/app.tsx b/src/app.tsx index f5906ce..a037e67 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -1,12 +1,13 @@ import { useEmulators } from "@/queries/emulator"; -import { Minus, X } from "@phosphor-icons/react"; -import { startEmulator } from "@/services/api/emulator"; -import { Item, Menu, useContextMenu } from "react-contexify"; -import { useState } from "react"; +import { Minus, Plus, X } from "@phosphor-icons/react"; +import { useMemo, useState } from "react"; import { EmulatorListItem } from "@/components/emulator-list-item"; -import { AndroidHomeModal } from "@/components/modals/android-home"; import { getCurrentWindow } from "@tauri-apps/api/window"; import { useNoContext } from "@/hooks/no-context"; +import { AndroidHomeModal } from "@/components/modals/android-home"; +import { EmulatorOptionsModal } from "@/components/modals/emulator-options"; +import { cn } from "@/lib/utils"; +import { platform } from "@tauri-apps/plugin-os"; import "./app.css"; @@ -15,15 +16,13 @@ function App() { const { data: emulators } = useEmulators(); - const { show } = useContextMenu({ - id: "emulator-more", - }); - const [selectedEmulator, setSelectedEmulator] = useState(null); - const minimize = async () => { + const currentPlatfrom = useMemo(() => platform(), []); + + const hide = async () => { const window = getCurrentWindow(); - await window.minimize(); + await window.hide(); }; const close = async () => { @@ -31,75 +30,69 @@ function App() { await window.close(); }; + const onEmulatorOptionsClose = () => { + setSelectedEmulator(null); + }; + return ( - <> -