mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-26 23:51:14 +02:00
feat(models-selection-panel): enhance refresh button with spinner for loading state
This commit is contained in:
parent
b8d0346371
commit
fe1bee14ed
1 changed files with 4 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ import { RefreshCw } from "lucide-react";
|
|||
import { useState } from "react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Checkbox } from "@/components/ui/checkbox";
|
||||
import { Spinner } from "@/components/ui/spinner";
|
||||
import {
|
||||
capability,
|
||||
capabilityLabels,
|
||||
|
|
@ -124,8 +125,10 @@ export function ModelsSelectionPanel({
|
|||
type="button"
|
||||
onClick={onRefresh}
|
||||
disabled={isRefreshing || isRefreshDisabled}
|
||||
className="relative"
|
||||
>
|
||||
{isRefreshing ? "Refreshing..." : "Refresh"}
|
||||
<span className={isRefreshing ? "opacity-0" : ""}>Reload models</span>
|
||||
{isRefreshing ? <Spinner size="sm" className="absolute" /> : null}
|
||||
</Button>
|
||||
) : null}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue