1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-05-04 17:43:08 +00:00

Changed the random script button to be the same as all the other buttons (#4183)

This commit is contained in:
Bram Suurd 2025-05-02 17:40:37 +02:00 committed by GitHub
parent 15deb9c658
commit dc36ba409c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 13 deletions

View File

@ -16,7 +16,10 @@ import React from "react";
import { Badge } from "./ui/badge"; import { Badge } from "./ui/badge";
import { Button } from "./ui/button"; import { Button } from "./ui/button";
import { DialogTitle } from "./ui/dialog"; import { DialogTitle } from "./ui/dialog";
import { Sparkles } from "lucide-react"; // <- Hinzugefügt import { Sparkles } from "lucide-react";
import { TooltipContent, TooltipProvider } from "./ui/tooltip";
import { TooltipTrigger } from "./ui/tooltip";
import { Tooltip } from "./ui/tooltip";
export const formattedBadge = (type: string) => { export const formattedBadge = (type: string) => {
switch (type) { switch (type) {
@ -111,16 +114,19 @@ export default function CommandMenu() {
</kbd> </kbd>
</Button> </Button>
<Button <TooltipProvider>
variant="outline" <Tooltip delayDuration={100}>
size="icon" <TooltipTrigger asChild>
onClick={openRandomScript} <Button variant="outline" size="icon" onClick={openRandomScript} disabled={isLoading} className="hidden lg:flex">
title="Open random script" <Sparkles className="size-4" />
disabled={isLoading} <span className="sr-only">Open Random Script</span>
className="h-9 w-9" </Button>
> </TooltipTrigger>
<Sparkles className="h-5 w-5" /> <TooltipContent>
</Button> <p>Open Random Script</p>
</TooltipContent>
</Tooltip>
</TooltipProvider>
</div> </div>
<CommandDialog open={open} onOpenChange={setOpen}> <CommandDialog open={open} onOpenChange={setOpen}>

View File

@ -41,8 +41,8 @@ export default function CodeCopyButton({
return ( return (
<div className="mt-4 flex"> <div className="mt-4 flex">
<Card className="flex items-center overflow-x-auto bg-primary-foreground pl-4"> <Card className="flex items-center overflow-x-auto bg-primary-foreground pl-4 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20">
<div className="overflow-x-auto whitespace-pre-wrap text-nowrap break-all pr-4 text-sm"> <div className="overflow-x-auto whitespace-pre-wrap text-nowrap break-all pr-4 text-sm [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20">
{!isMobile && children ? children : "Copy install command"} {!isMobile && children ? children : "Copy install command"}
</div> </div>
<button <button