mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat: add download badge to uninstalled AI tools in tool grid
Show a download icon on AI tools that are not yet installed, and fetch feature status on mount in both the sidebar tool panel and fullscreen grid page.
This commit is contained in:
@@ -7,6 +7,7 @@ import { GemLogo } from "@/components/common/gem-logo";
|
||||
import { apiGet } from "@/lib/api";
|
||||
import { ICON_MAP } from "@/lib/icon-map";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { useFeaturesStore } from "@/stores/features-store";
|
||||
|
||||
export function FullscreenGridPage() {
|
||||
const [search, setSearch] = useState("");
|
||||
@@ -14,6 +15,11 @@ export function FullscreenGridPage() {
|
||||
const navigate = useNavigate();
|
||||
const [disabledTools, setDisabledTools] = useState<string[]>([]);
|
||||
const [experimentalEnabled, setExperimentalEnabled] = useState(false);
|
||||
const fetchFeatures = useFeaturesStore((s) => s.fetch);
|
||||
|
||||
useEffect(() => {
|
||||
fetchFeatures();
|
||||
}, [fetchFeatures]);
|
||||
|
||||
useEffect(() => {
|
||||
apiGet<{ settings: Record<string, string> }>("/v1/settings")
|
||||
|
||||
Reference in New Issue
Block a user