update dep + card styles

This commit is contained in:
Purp1e
2024-10-28 15:05:56 +08:00
parent 3d027ec05f
commit 16bc1f55a2
3 changed files with 17 additions and 17 deletions

View File

@@ -12,24 +12,24 @@ rust-version = "1.66"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies] [build-dependencies]
tauri-build = { version = "2.0.0-rc", features = [] } tauri-build = { version = "2.0.2", features = [] }
[dependencies] [dependencies]
serde_json = "1.0" serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
tauri = { version = "2.0.0-rc", features = [ "macos-private-api", tauri = { version = "2.0.6", features = [ "macos-private-api",
"tray-icon" "tray-icon"
] } ] }
window-vibrancy = "0.5.2" window-vibrancy = "0.5.2"
tauri-plugin-process = "2.0.0-rc" tauri-plugin-process = "2.0.1"
tauri-plugin-fs = "2.0.0-rc" tauri-plugin-fs = "2.0.3"
tauri-plugin-dialog = "2.0.0-rc" tauri-plugin-dialog = "2.0.3"
tauri-plugin-os = "2.0.0-rc" tauri-plugin-os = "2.0.1"
tauri-plugin-clipboard-manager = "2.0.0-alpha.2" tauri-plugin-clipboard-manager = "2.0.1"
tauri-plugin-shell = "2.0.0-rc" tauri-plugin-shell = "2.0.2"
tauri-plugin-http = "2.0.0-rc" tauri-plugin-http = "2.0.3"
tauri-plugin-notification = "2.0.0-rc" tauri-plugin-notification = "2.0.1"
tauri-plugin-store = "2.0.0-rc" tauri-plugin-store = "2.1.0"
[target.'cfg(windows)'.dependencies] # Windows Only [target.'cfg(windows)'.dependencies] # Windows Only
winreg = "0.52.0" winreg = "0.52.0"
@@ -42,4 +42,4 @@ default = [ "custom-protocol" ]
custom-protocol = [ "tauri/custom-protocol" ] custom-protocol = [ "tauri/custom-protocol" ]
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies] [target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-global-shortcut = "2.0.0-rc" tauri-plugin-global-shortcut = "2.0.1"

View File

@@ -16,21 +16,21 @@ export default function PreferenceLayout({ children }: { children: React.ReactNo
<CardIcon <CardIcon
type="menu" type="menu"
onClick={() => router.push("/preference/general")} onClick={() => router.push("/preference/general")}
className={clsx(pathname === "/preference/general" && "bg-white/60")} className={clsx(pathname === "/preference/general" && "bg-black/5")}
> >
<SettingConfig /> <SettingConfig />
</CardIcon> </CardIcon>
<CardIcon <CardIcon
type="menu" type="menu"
onClick={() => router.push("/preference/path")} onClick={() => router.push("/preference/path")}
className={clsx(pathname === "/preference/path" && "bg-white/60")} className={clsx(pathname === "/preference/path" && "bg-black/5")}
> >
<AssemblyLine /> <AssemblyLine />
</CardIcon> </CardIcon>
<CardIcon <CardIcon
type="menu" type="menu"
onClick={() => router.push("/preference/replay")} onClick={() => router.push("/preference/replay")}
className={clsx(pathname === "/preference/replay" && "bg-white/60")} className={clsx(pathname === "/preference/replay" && "bg-black/5")}
> >
<Videocamera /> <Videocamera />
</CardIcon> </CardIcon>

View File

@@ -11,7 +11,7 @@ interface CardProps {
const Card = ({ children }: CardProps) => { const Card = ({ children }: CardProps) => {
return ( return (
<div <div
className="dark:from-black/10 dark:to-black/5 dark:border-white/[6%] px-4 pt-3 pb-4 flex flex-col gap-2 border w-full rounded-lg bg-white/40 border-black/[6%]" className="dark:from-black/10 dark:to-black/5 dark:border-white/[6%] px-3 pt-3 pb-4 flex flex-col gap-2.5 border w-full rounded-lg bg-white/40 border-black/[6%]"
data-tauri-drag-region data-tauri-drag-region
> >
{children} {children}
@@ -25,7 +25,7 @@ const CardHeader = ({ children }: CardProps) => {
const CardIcon = ({ children, type, className, ...rest }: CardProps) => { const CardIcon = ({ children, type, className, ...rest }: CardProps) => {
return ( return (
<div className={clsx("flex gap-1.5 items-center font-semibold", type === "menu" && "transition cursor-pointer hover:bg-white/60 px-2 py-1 rounded-md active:scale-95", className)} {...rest}> <div className={clsx("flex gap-1.5 items-center font-semibold", type === "menu" && "transition cursor-pointer hover:bg-black/5 px-2 py-1 rounded-md active:scale-95", className)} {...rest}>
{children} {children}
</div> </div>
) )