diff --git a/apps/dashboard/components/logs/live-switch-button/index.tsx b/apps/dashboard/components/logs/live-switch-button/index.tsx index c834c9a2df..e39d27b4f5 100644 --- a/apps/dashboard/components/logs/live-switch-button/index.tsx +++ b/apps/dashboard/components/logs/live-switch-button/index.tsx @@ -1,6 +1,6 @@ import { useKeyboardShortcut } from "@/hooks/use-keyboard-shortcut"; import { CircleCaretRight } from "@unkey/icons"; -import { Button, KeyboardButton } from "@unkey/ui"; +import { Button, InfoTooltip, KeyboardButton } from "@unkey/ui"; import { cn } from "@unkey/ui/src/lib/utils"; type LiveSwitchProps = { @@ -11,28 +11,36 @@ type LiveSwitchProps = { export const LiveSwitchButton = ({ isLive, onToggle }: LiveSwitchProps) => { useKeyboardShortcut("option+shift+q", onToggle); return ( - + } + position={{ side: "bottom", align: "center" }} + delayDuration={300} + asChild + > + + ); }; diff --git a/internal/ui/src/components/buttons/refresh-button.tsx b/internal/ui/src/components/buttons/refresh-button.tsx index 57a1b00cc6..fc1a5c4245 100644 --- a/internal/ui/src/components/buttons/refresh-button.tsx +++ b/internal/ui/src/components/buttons/refresh-button.tsx @@ -49,12 +49,23 @@ const RefreshButton = ({ onRefresh, isEnabled, isLive, toggleLive }: RefreshButt disabled: !isEnabled, }); + // Determine tooltip content based on state + const tooltipContent = isEnabled ? ( +
+ Refresh data + +
+ ) : ( + "Refresh unavailable - please select a relative time filter in the 'Since' dropdown" + ); + return (
@@ -62,16 +73,12 @@ const RefreshButton = ({ onRefresh, isEnabled, isLive, toggleLive }: RefreshButt onClick={handleRefresh} variant="ghost" size="md" - title={isEnabled ? "Refresh data (Shortcut: ⌥+⇧+W)" : ""} disabled={!isEnabled || isLoading} loading={isLoading} - className="flex w-full items-center justify-center rounded-lg border border-gray-4 group overflow-hidden" + className="flex w-full items-center justify-center rounded-lg border border-gray-4 overflow-hidden" > Refresh -
- -