style(panel): refine button styles with shadow, active scale, toned-down colors
This commit is contained in:
4 files changed
+17
-15
No files matched your search
@@ -98,7 +98,7 @@ export function ServerCard({ server, cfg, onChanged }: Props) {
|
|||||||
(running || transitioning ? (
|
(running || transitioning ? (
|
||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="outline"
|
variant="destructive"
|
||||||
disabled={busy !== null}
|
disabled={busy !== null}
|
||||||
onClick={() => act("stop", () => api.stop(server.name))}
|
onClick={() => act("stop", () => api.stop(server.name))}
|
||||||
>
|
>
|
||||||
@@ -107,6 +107,7 @@ export function ServerCard({ server, cfg, onChanged }: Props) {
|
|||||||
) : (
|
) : (
|
||||||
<Button
|
<Button
|
||||||
size="sm"
|
size="sm"
|
||||||
|
variant="default"
|
||||||
disabled={busy !== null}
|
disabled={busy !== null}
|
||||||
onClick={() => act("wake", () => api.wake(server.name))}
|
onClick={() => act("wake", () => api.wake(server.name))}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -4,15 +4,16 @@ import { cva, type VariantProps } from "class-variance-authority";
|
|||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
const buttonVariants = cva(
|
const buttonVariants = cva(
|
||||||
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0",
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 active:scale-[0.97]",
|
||||||
{
|
{
|
||||||
variants: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
default:
|
||||||
|
"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 hover:shadow",
|
||||||
destructive:
|
destructive:
|
||||||
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 hover:shadow",
|
||||||
outline:
|
outline:
|
||||||
"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground",
|
"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground",
|
||||||
ghost: "hover:bg-accent hover:text-accent-foreground",
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
|
|||||||
+8
-8
@@ -10,17 +10,17 @@
|
|||||||
--card-foreground: 222 47% 11%;
|
--card-foreground: 222 47% 11%;
|
||||||
--popover: 0 0% 100%;
|
--popover: 0 0% 100%;
|
||||||
--popover-foreground: 222 47% 11%;
|
--popover-foreground: 222 47% 11%;
|
||||||
--primary: 142 71% 45%;
|
--primary: 142 60% 43%;
|
||||||
--primary-foreground: 144 80% 10%;
|
--primary-foreground: 0 0% 100%;
|
||||||
--muted: 210 40% 96%;
|
--muted: 210 40% 96%;
|
||||||
--muted-foreground: 215 16% 47%;
|
--muted-foreground: 215 16% 47%;
|
||||||
--accent: 210 40% 96%;
|
--accent: 210 40% 96%;
|
||||||
--accent-foreground: 222 47% 11%;
|
--accent-foreground: 222 47% 11%;
|
||||||
--destructive: 0 72% 51%;
|
--destructive: 0 68% 49%;
|
||||||
--destructive-foreground: 0 0% 100%;
|
--destructive-foreground: 0 0% 100%;
|
||||||
--border: 214 32% 91%;
|
--border: 214 32% 91%;
|
||||||
--input: 214 32% 91%;
|
--input: 214 32% 91%;
|
||||||
--ring: 142 71% 45%;
|
--ring: 142 60% 43%;
|
||||||
--radius: 0.6rem;
|
--radius: 0.6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,17 +31,17 @@
|
|||||||
--card-foreground: 210 40% 96%;
|
--card-foreground: 210 40% 96%;
|
||||||
--popover: 222 44% 9%;
|
--popover: 222 44% 9%;
|
||||||
--popover-foreground: 210 40% 96%;
|
--popover-foreground: 210 40% 96%;
|
||||||
--primary: 142 70% 45%;
|
--primary: 142 58% 46%;
|
||||||
--primary-foreground: 144 80% 8%;
|
--primary-foreground: 210 40% 98%;
|
||||||
--muted: 217 33% 16%;
|
--muted: 217 33% 16%;
|
||||||
--muted-foreground: 215 20% 65%;
|
--muted-foreground: 215 20% 65%;
|
||||||
--accent: 217 33% 18%;
|
--accent: 217 33% 18%;
|
||||||
--accent-foreground: 210 40% 96%;
|
--accent-foreground: 210 40% 96%;
|
||||||
--destructive: 0 63% 45%;
|
--destructive: 0 60% 44%;
|
||||||
--destructive-foreground: 210 40% 98%;
|
--destructive-foreground: 210 40% 98%;
|
||||||
--border: 217 33% 18%;
|
--border: 217 33% 18%;
|
||||||
--input: 217 33% 20%;
|
--input: 217 33% 20%;
|
||||||
--ring: 142 70% 45%;
|
--ring: 142 58% 46%;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
|
|||||||
@@ -218,14 +218,14 @@ export function ServerConsole() {
|
|||||||
<PhaseBadge phase={data.phase} />
|
<PhaseBadge phase={data.phase} />
|
||||||
{streamable ? (
|
{streamable ? (
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="destructive"
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={() => api.stop(name).then(reload)}
|
onClick={() => api.stop(name).then(reload)}
|
||||||
>
|
>
|
||||||
{t("stop")}
|
{t("stop")}
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
<Button size="sm" onClick={() => api.wake(name).then(reload)}>
|
<Button variant="default" size="sm" onClick={() => api.wake(name).then(reload)}>
|
||||||
{t("wake")}
|
{t("wake")}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in new issue
Block a user