Files
codex-proxy-rs/frontend/src/components/HelpPopover.vue
T
ZyyandCodex fa187c5031 fix(settings): keep help controls transparent and consistent
Use a shared 24px square help trigger for request settings and automatic
approval details. Align the UI dependency and submodule with the disabled
link background fix.

Co-authored-by: Codex <noreply@openai.com>
2026-11-30 23:17:02 +08:00

23 lines
869 B
Vue

<script setup lang="ts">
import { ZIconButton, ZPopover } from '@codex-proxy/ui'
import { CircleAlert } from '@lucide/vue'
import { useMediaQuery } from '@vueuse/core'
defineProps<{ label: string, content?: string }>()
const canHover = useMediaQuery('(hover: hover)')
</script>
<template>
<ZPopover class="h-4 items-center" :trigger="canHover ? 'hover-click' : 'click'" placement="top-start" :hover-delay="240">
<template #reference="{ open }">
<ZIconButton variant="link" size="small" class="size-6!" :aria-label="label" :aria-expanded="open" aria-haspopup="dialog">
<CircleAlert class="size-3" aria-hidden="true" />
</ZIconButton>
</template>
<section role="dialog" :aria-label="label" class="max-w-72 p-3 text-z-xs leading-relaxed text-z-text-secondary">
<slot>{{ content }}</slot>
</section>
</ZPopover>
</template>