diff --git a/GEMINI.md b/GEMINI.md index f17d6b86..6f6e1dd7 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -6,6 +6,7 @@ - Only run automated check commands when: 1. The user explicitly instructs to `"push"` or `"commit"`. 2. The user explicitly asks to check or fix formatting/linting issues. +- **Fast-Path Lint/Format Fixes**: When asked to fix linting or formatting, immediately run the automated fix commands (`npm run format && composer lint && npm run lint`) first. Do NOT spend time manually inspecting files or CI logs beforehand; only manually edit files if the automated fix commands fail and report non-autofixable errors. - **Quick Push Bypass**: When instructed with `"quick push"` or `"push direct"`, bypass all formatting and linting commands and proceed directly to commit/push. ```bash diff --git a/resources/js/pages/User/Show.vue b/resources/js/pages/User/Show.vue index c0ee2e1c..9c84da6e 100644 --- a/resources/js/pages/User/Show.vue +++ b/resources/js/pages/User/Show.vue @@ -6,6 +6,7 @@ import { ArrowBigDown, ArrowRight, ArrowUpRight, + BadgeCheck, Calendar, CheckCircle2, ChevronRight, @@ -29,7 +30,7 @@ import { X, Zap, } from 'lucide-vue-next'; -import { computed, ref, watch } from 'vue'; +import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'; import BaseModal from '@/components/BaseModal.vue'; import EmptyState from '@/components/EmptyState.vue'; import ImageViewerModal from '@/components/ImageViewerModal.vue'; @@ -246,6 +247,38 @@ const isOwnProfile = computed( const showSyllabusModal = ref(false); const showShareModal = ref(false); +const showVerifiedPrompt = ref(false); +const verifiedBadgeContainerRef = ref(null); + +const handleVerifiedClickOutside = (e: MouseEvent) => { + if ( + showVerifiedPrompt.value && + verifiedBadgeContainerRef.value && + !verifiedBadgeContainerRef.value.contains(e.target as Node) + ) { + showVerifiedPrompt.value = false; + } +}; + +const handleVerifiedKeyDown = (e: KeyboardEvent) => { + if (e.key === 'Escape' && showVerifiedPrompt.value) { + showVerifiedPrompt.value = false; + } +}; + +onMounted(() => { + if (typeof window !== 'undefined') { + window.addEventListener('click', handleVerifiedClickOutside); + window.addEventListener('keydown', handleVerifiedKeyDown); + } +}); + +onBeforeUnmount(() => { + if (typeof window !== 'undefined') { + window.removeEventListener('click', handleVerifiedClickOutside); + window.removeEventListener('keydown', handleVerifiedKeyDown); + } +}); const activeTab = ref<'forum' | 'blogs' | 'activity'>('forum'); const forumSubTab = ref<'questions' | 'answers'>('questions'); @@ -588,7 +621,7 @@ const formatGroupName = (group?: string) => {
{ {{ profileUser.name }} - + ref="verifiedBadgeContainerRef" + class="relative inline-flex items-center" + > + + + + + + +