From e99a25869ae6651d2631bee6a7dd3f8ebeb86398 Mon Sep 17 00:00:00 2001 From: Boshen Date: Wed, 23 Sep 2026 15:14:27 +0800 Subject: [PATCH] fix(docs): refine copy prompt feedback --- .../theme/components/CopyPrompt.vue | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/docs/.vitepress/theme/components/CopyPrompt.vue b/docs/.vitepress/theme/components/CopyPrompt.vue index 442db39adb..330ca80f3e 100644 --- a/docs/.vitepress/theme/components/CopyPrompt.vue +++ b/docs/.vitepress/theme/components/CopyPrompt.vue @@ -21,7 +21,11 @@ const titleId = useId(); const dialogEl = ref(null); const state = ref<'idle' | 'copied' | 'error'>('idle'); const copyLabel = computed(() => - state.value === 'copied' ? 'Copied!' : state.value === 'error' ? 'Could not copy' : 'Copy Prompt', + state.value === 'copied' + ? 'Prompt copied!' + : state.value === 'error' + ? 'Could not copy' + : 'Copy prompt', ); const copyIcon = computed(() => state.value === 'copied' @@ -43,20 +47,12 @@ const flash = (next: 'copied' | 'error') => { }, 1600); }; -// The theme draws the `.button` border with an `outline`, but a global reset -// (`button:focus:not(:focus-visible) { outline: none !important }`) strips it -// after a mouse click. The theme only ever uses `.button` on tags, so this -// bites only real