From 4f7ce707436ff8c4988525e327d9bd4a04764730 Mon Sep 17 00:00:00 2001 From: Sean Boult <996134+Hacksore@users.noreply.github.com> Date: Wed, 22 Nov 2023 23:58:53 -0600 Subject: [PATCH] Format --- README.md | 1 - .../desktop/src/components/headphones-off.tsx | 8 +-- apps/desktop/src/components/mic-off.tsx | 8 +-- apps/desktop/src/components/nav-bar.tsx | 12 +--- apps/desktop/src/components/ui/button.tsx | 60 +++++++------------ apps/desktop/src/components/user.tsx | 20 ++----- apps/desktop/src/main.tsx | 2 +- apps/desktop/src/rpc/command.ts | 1 - apps/desktop/src/rpc/manager.ts | 35 ++++------- apps/desktop/src/store.ts | 41 ++++++------- apps/desktop/src/types.ts | 35 ++++++----- apps/desktop/src/use-clickthrough.ts | 8 +-- apps/desktop/src/use-disable-context-menu.ts | 4 +- apps/desktop/src/use-paths.ts | 6 +- apps/desktop/src/use-set-size.ts | 10 +--- apps/desktop/src/use-window-resize.ts | 2 +- apps/desktop/src/views/error.tsx | 6 +- apps/desktop/src/views/main.tsx | 5 +- apps/desktop/src/views/settings.tsx | 17 ++---- scripts/test.ts | 1 - 20 files changed, 93 insertions(+), 189 deletions(-) diff --git a/README.md b/README.md index 23e3b94b..8a8ab9e8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ # overlayed A modern, open-source, and free voice chat overlay for Discord. - diff --git a/apps/desktop/src/components/headphones-off.tsx b/apps/desktop/src/components/headphones-off.tsx index e52711a5..b720c407 100644 --- a/apps/desktop/src/components/headphones-off.tsx +++ b/apps/desktop/src/components/headphones-off.tsx @@ -1,12 +1,6 @@ export const HeadphonesOff = () => { return ( - + { return ( - + { const location = useLocation(); const navigate = useNavigate(); const { currentChannel } = useAppStore(); - const opacity = - clickthrough && location.pathname === "/channel" - ? "opacity-0" - : "opacity-100"; + const opacity = clickthrough && location.pathname === "/channel" ? "opacity-0" : "opacity-100"; return (
{ >
- logo + logo {location.pathname === "/channel" ? (
{currentChannel?.name} diff --git a/apps/desktop/src/components/ui/button.tsx b/apps/desktop/src/components/ui/button.tsx index e3cd0f2c..061a88c8 100644 --- a/apps/desktop/src/components/ui/button.tsx +++ b/apps/desktop/src/components/ui/button.tsx @@ -1,47 +1,27 @@ import { cva, type VariantProps } from "class-variance-authority"; -const button = cva( - "rounded-md disabled:opacity-50 disabled:pointer-events-none", - { - variants: { - intent: { - primary: [ - "bg-blue-500", - "text-white", - "border-transparent", - "hover:bg-blue-600", - ], - danger: [ - "bg-red-500", - "text-white", - "border-transparent", - "hover:bg-red-600", - ], - secondary: ["text-white", "hover:text-blue-500"], - }, - size: { - small: ["text-sm", "py-1", "px-2"], - medium: ["text-base", "py-2", "px-4"], - large: ["text-lg", "py-4", "px-4"], - }, +const button = cva("rounded-md disabled:opacity-50 disabled:pointer-events-none", { + variants: { + intent: { + primary: ["bg-blue-500", "text-white", "border-transparent", "hover:bg-blue-600"], + danger: ["bg-red-500", "text-white", "border-transparent", "hover:bg-red-600"], + secondary: ["text-white", "hover:text-blue-500"], }, - compoundVariants: [ - { intent: "primary", size: "medium", class: "uppercase" }, - ], - defaultVariants: { - intent: "primary", - size: "medium", + size: { + small: ["text-sm", "py-1", "px-2"], + medium: ["text-base", "py-2", "px-4"], + large: ["text-lg", "py-4", "px-4"], }, }, -); + compoundVariants: [{ intent: "primary", size: "medium", class: "uppercase" }], + defaultVariants: { + intent: "primary", + size: "medium", + }, +}); -export interface ButtonProps - extends React.ButtonHTMLAttributes, - VariantProps { } +export interface ButtonProps extends React.ButtonHTMLAttributes, VariantProps {} -export const Button: React.FC = ({ - className, - intent, - size, - ...props -}) =>