Skip to main content
Glama
DelayedLoader.vue699 B
<template> <div class="h-[50%] w-full"> <Icon v-if="show" :size="props.size" name="loader" /> </div> </template> <script setup lang="ts"> import { onMounted, ref } from "vue"; import { Icon, IconSizes } from "@si/vue-lib/design-system"; const props = defineProps<{ size: IconSizes; }>(); /** * The idea of this component is that, we only want to show a big loader * when folks are actually waiting a significant amount of time * * We don't want to "flash" a loader at them for a few frames bc the tanstack * query took ~90ms to return... */ const DELAY_MS = 800; const show = ref(false); onMounted(() => { setTimeout(() => { show.value = true; }, DELAY_MS); }); </script>

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/systeminit/si'

If you have feedback or need assistance with the MCP directory API, please join our Discord server