Line data Source code
1 : <template>
2 47 : <div
3 : class="help-center-menu flex flex-col items-start gap-1"
4 : role="menu"
5 : :aria-label="$t('help.helpCenterMenu')"
6 : >
7 : <!-- Main Menu Items -->
8 : <div class="w-full">
9 : <nav class="flex w-full flex-col gap-2" role="menubar">
10 329 : <button
11 : v-for="menuItem in menuItems"
12 : v-show="menuItem.visible !== false"
13 : :key="menuItem.key"
14 : type="button"
15 : class="help-menu-item"
16 : :class="{ 'more-item': menuItem.key === 'more' }"
17 : :data-testid="`help-menu-item-${menuItem.key}`"
18 : role="menuitem"
19 : @click="menuItem.action"
20 : @mouseenter="onMenuItemHover(menuItem.key, $event)"
21 : @mouseleave="onMenuItemLeave(menuItem.key)"
22 : >
23 : <div class="help-menu-icon-container">
24 : <div class="help-menu-icon">
25 : <component
26 : :is="menuItem.icon"
27 : v-if="typeof menuItem.icon === 'object'"
28 : :size="16"
29 : />
30 : <i v-else :class="menuItem.icon" />
31 : </div>
32 : <div v-if="menuItem.showRedDot" class="menu-red-dot" />
33 : </div>
34 : <span class="menu-label">{{ menuItem.label }}</span>
35 : <i
36 : v-if="menuItem.showExternalIcon"
37 : class="ml-auto icon-[lucide--external-link] text-primary"
38 : />
39 : <i
40 : v-if="menuItem.key === 'more'"
41 : class="ml-auto icon-[lucide--chevron-right]"
42 : />
43 : </button>
44 : </nav>
45 : <div
46 : class="flex h-4 flex-col items-center justify-between self-stretch p-2"
47 : >
48 : <div class="w-full border-b" />
49 : </div>
50 : </div>
51 :
52 : <Teleport :to="config.teleportTo ?? 'body'">
53 : <div
54 : v-if="isSubmenuVisible"
55 : ref="submenuRef"
56 : class="more-submenu"
57 : :style="submenuStyle"
58 : @mouseenter="onSubmenuHover"
59 : @mouseleave="onSubmenuLeave"
60 : >
61 : <template
62 : v-for="submenuItem in moreMenuItem?.items"
63 0 : :key="submenuItem.key"
64 : >
65 : <div
66 : v-if="submenuItem.type === 'divider'"
67 : v-show="submenuItem.visible !== false"
68 : class="submenu-divider"
69 : />
70 : <button
71 : v-else
72 : v-show="submenuItem.visible !== false"
73 : type="button"
74 : class="help-menu-item submenu-item"
75 : role="menuitem"
76 : @click="submenuItem.action"
77 : >
78 : <span class="menu-label">{{ submenuItem.label }}</span>
79 : </button>
80 : </template>
81 : </div>
82 : </Teleport>
83 :
84 : <!-- What's New Section -->
85 : <section
86 : v-if="showVersionUpdates"
87 : class="w-full"
88 : data-testid="whats-new-section"
89 : >
90 : <h3
91 : class="section-description flex items-center gap-2.5 self-stretch px-8 py-2"
92 : >
93 : {{ $t('helpCenter.whatsNew') }}
94 : </h3>
95 :
96 : <!-- Release Items -->
97 : <div
98 : v-if="hasReleases"
99 : role="group"
100 : :aria-label="$t('help.recentReleases')"
101 : >
102 7 : <article
103 : v-for="release in releaseStore.recentReleases"
104 : :key="release.id || release.version"
105 : class="release-menu-item flex h-12 min-h-6 cursor-pointer items-center gap-2 self-stretch rounded-sm p-2 transition-colors hover:bg-accent"
106 : :data-testid="`help-release-item-${release.version}`"
107 : role="button"
108 : tabindex="0"
109 : @click="onReleaseClick(release)"
110 : @keydown.enter="onReleaseClick(release)"
111 : @keydown.space.prevent="onReleaseClick(release)"
112 : >
113 : <i class="help-menu-icon icon-[lucide--package]" aria-hidden="true" />
114 : <div class="release-content">
115 : <span class="release-title">
116 : {{
117 : $t('g.releaseTitle', {
118 : package: 'Comfy',
119 : version: release.version
120 : })
121 : }}
122 : </span>
123 : <time class="release-date" :datetime="release.published_at">
124 : <span class="normal-state">
125 : {{ formatReleaseDate(release.published_at) }}
126 : </span>
127 : <span class="hover-state">
128 : {{ $t('helpCenter.clickToLearnMore') }}
129 : </span>
130 : </time>
131 : </div>
132 : </article>
133 : </div>
134 :
135 : <!-- Loading State -->
136 : <div
137 : v-else-if="releaseStore.isLoading"
138 : class="help-menu-item"
139 : role="status"
140 : aria-live="polite"
141 : >
142 : <i
143 : class="help-menu-icon icon-[lucide--loader-circle] animate-spin motion-reduce:animate-none"
144 : aria-hidden="true"
145 : />
146 : <span>{{ $t('helpCenter.loadingReleases') }}</span>
147 : </div>
148 :
149 : <!-- No Releases State -->
150 : <div v-else class="help-menu-item" role="status">
151 : <i class="help-menu-icon icon-[lucide--info]" aria-hidden="true" />
152 : <span>{{ $t('helpCenter.noRecentReleases') }}</span>
153 : </div>
154 : </section>
155 : </div>
156 : </template>
157 :
158 : <script setup lang="ts">
159 : import { useToast } from '@/components/ui/toast/toastStore'
160 : import { injectConfigProviderContext } from 'reka-ui'
161 : import {
162 : computed,
163 : nextTick,
164 : onBeforeUnmount,
165 : onMounted,
166 : reactive,
167 : ref
168 : } from 'vue'
169 : import type { CSSProperties, Component } from 'vue'
170 : import { useI18n } from 'vue-i18n'
171 :
172 : import PuzzleIcon from '@comfyorg/design-system/icon/PuzzleIcon'
173 : import { useExternalLink } from '@/composables/useExternalLink'
174 : import { isCloud, isDesktop, isNightly } from '@/platform/distribution/types'
175 : import { useSettingStore } from '@/platform/settings/settingStore'
176 : import { buildFeedbackTypeformUrl } from '@/platform/support/config'
177 : import { useTelemetry } from '@comfyorg/telemetry'
178 : import type { ReleaseNote } from '@/platform/updates/common/releaseService'
179 : import { useReleaseStore } from '@/platform/updates/common/releaseStore'
180 : import { useCommandStore } from '@/platform/keybindings/commandStore'
181 : import { getErrorMessage } from '@comfyorg/shared-frontend-utils/errorUtil'
182 : import { electronAPI } from '@/utils/envUtil'
183 : import { formatVersionAnchor } from '@/utils/formatUtil'
184 : import { useConflictAcknowledgment } from '@/platform/customNodes/manager/composables/useConflictAcknowledgment'
185 : import { useManagerDialog } from '@/platform/customNodes/manager/composables/dialogs/useManagerDialog'
186 : import { useManagerState } from '@/platform/customNodes/manager/composables/useManagerState'
187 : import { useComfyManagerService } from '@/platform/customNodes/manager/services/comfyManagerService'
188 : import { ManagerTab } from '@/platform/customNodes/manager/types/comfyManagerTypes'
189 :
190 : // Types
191 : interface MenuItem {
192 : key: string
193 : icon?: string | Component
194 : label?: string
195 : action?: () => void
196 : visible?: boolean
197 : type?: 'item' | 'divider'
198 : items?: MenuItem[]
199 : showRedDot?: boolean
200 : showExternalIcon?: boolean
201 : }
202 :
203 : // Constants
204 21 : const TIME_UNITS = {
205 : MINUTE: 60 * 1000,
206 : HOUR: 60 * 60 * 1000,
207 : DAY: 24 * 60 * 60 * 1000,
208 : WEEK: 7 * 24 * 60 * 60 * 1000,
209 : MONTH: 30 * 24 * 60 * 60 * 1000,
210 : YEAR: 365 * 24 * 60 * 60 * 1000
211 : } as const
212 :
213 21 : const SUBMENU_CONFIG = {
214 : DELAY_MS: 100,
215 : OFFSET_PX: 8
216 : } as const
217 :
218 : // Composables
219 21 : const config = reactive(injectConfigProviderContext(null) ?? {})
220 21 : const { t } = useI18n()
221 21 : const toast = useToast()
222 21 : const { staticUrls, buildDocsUrl } = useExternalLink()
223 21 : const releaseStore = useReleaseStore()
224 21 : const commandStore = useCommandStore()
225 21 : const settingStore = useSettingStore()
226 21 : const telemetry = useTelemetry()
227 :
228 : // Track when help center was opened
229 21 : const openedAt = ref(Date.now())
230 :
231 : // Emits
232 21 : const emit = defineEmits<{
233 : close: []
234 : }>()
235 :
236 : // State
237 21 : const isSubmenuVisible = ref(false)
238 21 : const submenuRef = ref<HTMLElement | null>(null)
239 21 : const submenuStyle = ref<CSSProperties>({})
240 21 : let hoverTimeout: number | null = null
241 :
242 : // Computed
243 21 : const hasReleases = computed(() => releaseStore.releases.length > 0)
244 21 : const showVersionUpdates = computed(() =>
245 : settingStore.get('Comfy.Notification.ShowVersionUpdates')
246 : )
247 21 : const isDevMode = computed(() => settingStore.get('Comfy.DevMode'))
248 :
249 : // Use conflict acknowledgment state from composable
250 21 : const { shouldShowRedDot: shouldShowManagerRedDot } =
251 : useConflictAcknowledgment()
252 21 : const { isNewManagerUI } = useManagerState()
253 :
254 21 : const moreItems = computed<MenuItem[]>(() => {
255 : const allMoreItems: MenuItem[] = [
256 : {
257 : key: 'desktop-guide',
258 : type: 'item',
259 : label: t('helpCenter.desktopUserGuide'),
260 : visible: isDesktop,
261 : action: () => {
262 0 : trackResourceClick('docs', true)
263 0 : openExternalLink(
264 : buildDocsUrl('/installation/desktop', {
265 : includeLocale: true,
266 : platform: true
267 : })
268 : )
269 0 : emit('close')
270 : }
271 : },
272 : {
273 : key: 'dev-tools',
274 : type: 'item',
275 : label: t('helpCenter.openDevTools'),
276 : visible: isDesktop,
277 : action: () => {
278 : openDevTools()
279 0 : emit('close')
280 : }
281 : },
282 : {
283 : key: 'divider-1',
284 : type: 'divider',
285 : visible: isDesktop
286 : },
287 : {
288 : key: 'reinstall',
289 : type: 'item',
290 : label: t('helpCenter.reinstall'),
291 : visible: isDesktop,
292 : action: () => {
293 : onReinstall()
294 0 : emit('close')
295 : }
296 : },
297 : {
298 : key: 'replay-onboarding',
299 : type: 'item',
300 : label: t('commands.Comfy_Onboarding_Replay.label'),
301 : visible: isDevMode.value,
302 : action: () => {
303 0 : void commandStore.execute('Comfy.Onboarding.Replay')
304 0 : emit('close')
305 : }
306 : }
307 : ]
308 :
309 : // Filter for visible items only
310 21 : return allMoreItems.filter((item) => item.visible !== false)
311 : })
312 :
313 21 : const hasVisibleMoreItems = computed(() => {
314 21 : return !!moreItems.value.length
315 : })
316 :
317 21 : const moreMenuItem = computed(() =>
318 : menuItems.value.find((item) => item.key === 'more')
319 : )
320 :
321 21 : const menuItems = computed<MenuItem[]>(() => {
322 21 : const items: MenuItem[] = [
323 : {
324 : key: 'feedback',
325 : type: 'item',
326 : icon: 'icon-[lucide--megaphone] size-4',
327 : label: t('helpCenter.feedback'),
328 : showExternalIcon: isCloud || isNightly,
329 : action: () => {
330 1 : trackResourceClick('help_feedback', isCloud || isNightly)
331 : if (isCloud || isNightly) {
332 : window.open(
333 : buildFeedbackTypeformUrl('help-center'),
334 : '_blank',
335 : 'noopener,noreferrer'
336 : )
337 : } else {
338 1 : void commandStore.execute('Comfy.ContactSupport')
339 : }
340 1 : emit('close')
341 : }
342 : },
343 : {
344 : key: 'help',
345 : type: 'item',
346 : icon: 'icon-[lucide--message-circle-question]',
347 : label: t('helpCenter.help'),
348 : action: () => {
349 1 : trackResourceClick('help_feedback', false)
350 1 : void commandStore.execute('Comfy.ContactSupport')
351 1 : emit('close')
352 : }
353 : },
354 : {
355 : key: 'docs',
356 : type: 'item',
357 : icon: 'icon-[lucide--book-open]',
358 : label: t('helpCenter.docs'),
359 : showExternalIcon: true,
360 : action: () => {
361 2 : trackResourceClick('docs', true)
362 : const path = isCloud ? '/get_started/cloud' : '/'
363 2 : openExternalLink(buildDocsUrl(path, { includeLocale: true }))
364 2 : emit('close')
365 : }
366 : },
367 : {
368 : key: 'discord',
369 : type: 'item',
370 : icon: 'pi pi-discord',
371 : label: 'Discord',
372 : showExternalIcon: true,
373 : action: () => {
374 1 : trackResourceClick('discord', true)
375 1 : openExternalLink(staticUrls.discord)
376 1 : emit('close')
377 : }
378 : },
379 : {
380 : key: 'github',
381 : type: 'item',
382 : icon: 'icon-[lucide--github]',
383 : label: t('helpCenter.github'),
384 : showExternalIcon: true,
385 : action: () => {
386 1 : trackResourceClick('github', true)
387 1 : openExternalLink(staticUrls.github)
388 1 : emit('close')
389 : }
390 : }
391 : ]
392 :
393 : // System status page - only in cloud distributions
394 : if (isCloud) {
395 : items.push({
396 : key: 'status',
397 : type: 'item',
398 : icon: 'icon-[lucide--activity]',
399 : label: t('helpCenter.systemStatus'),
400 : showExternalIcon: true,
401 : action: () => {
402 : trackResourceClick('status', true)
403 : openExternalLink(staticUrls.status)
404 : emit('close')
405 : }
406 : })
407 : }
408 :
409 : // Extension manager - only in non-cloud distributions
410 : if (!isCloud) {
411 21 : items.push({
412 : key: 'manager',
413 : type: 'item',
414 : icon: PuzzleIcon,
415 : label: t('helpCenter.managerExtension'),
416 : showRedDot: shouldShowManagerRedDot.value,
417 : action: async () => {
418 0 : trackResourceClick('manager', false)
419 0 : await useManagerDialog().openManager({
420 : initialTab: ManagerTab.All,
421 : showToastOnLegacyError: false
422 : })
423 0 : emit('close')
424 : }
425 : })
426 : }
427 : // Update ComfyUI - only for non-desktop, non-cloud with new manager UI
428 21 : if (!isDesktop && !isCloud && isNewManagerUI.value) {
429 0 : items.push({
430 : key: 'update-comfyui',
431 : type: 'item',
432 : icon: 'icon-[lucide--download]',
433 : label: t('helpCenter.updateComfyUI'),
434 : action: () => {
435 0 : onUpdateComfyUI()
436 0 : emit('close')
437 : }
438 : })
439 : }
440 :
441 21 : items.push({
442 : key: 'more',
443 : type: 'item',
444 : icon: '',
445 : label: t('helpCenter.more'),
446 : visible: hasVisibleMoreItems.value,
447 : action: () => {}, // No action for more item
448 : items: moreItems.value
449 : })
450 :
451 21 : return items
452 : })
453 :
454 : // Utility Functions
455 21 : const trackResourceClick = (
456 : resourceType:
457 : | 'docs'
458 : | 'discord'
459 : | 'github'
460 : | 'help_feedback'
461 : | 'manager'
462 : | 'release_notes'
463 : | 'status',
464 : isExternal: boolean
465 : ): void => {
466 7 : telemetry?.trackHelpResourceClicked({
467 : resource_type: resourceType,
468 : is_external: isExternal,
469 : source: 'help_center'
470 : })
471 : }
472 :
473 21 : const openExternalLink = (url: string): void => {
474 5 : window.open(url, '_blank', 'noopener,noreferrer')
475 : }
476 :
477 21 : const clearHoverTimeout = (): void => {
478 0 : if (hoverTimeout) {
479 0 : clearTimeout(hoverTimeout)
480 0 : hoverTimeout = null
481 : }
482 : }
483 :
484 21 : const calculateSubmenuPosition = (button: HTMLElement): CSSProperties => {
485 0 : const rect = button.getBoundingClientRect()
486 0 : const submenuWidth = 210
487 :
488 : const visibleItemCount =
489 : moreMenuItem.value?.items?.filter((item) => item.visible !== false)
490 : .length || 0
491 0 : const estimatedHeight = visibleItemCount * 48 + 16
492 0 : const submenuHeight = submenuRef.value?.offsetHeight || estimatedHeight
493 :
494 0 : const viewportWidth = window.innerWidth
495 0 : const viewportHeight = window.innerHeight
496 :
497 0 : let top = rect.top
498 0 : let left = rect.right + SUBMENU_CONFIG.OFFSET_PX
499 :
500 0 : if (left + submenuWidth > viewportWidth) {
501 0 : left = rect.left - submenuWidth - SUBMENU_CONFIG.OFFSET_PX
502 : }
503 :
504 0 : if (top + submenuHeight > viewportHeight) {
505 0 : top = Math.max(SUBMENU_CONFIG.OFFSET_PX, rect.bottom - submenuHeight)
506 : }
507 :
508 0 : if (top < SUBMENU_CONFIG.OFFSET_PX) {
509 0 : top = SUBMENU_CONFIG.OFFSET_PX
510 : }
511 :
512 0 : top -= 8
513 :
514 0 : return {
515 : position: 'fixed',
516 : top: `${top}px`,
517 : left: `${left}px`
518 : }
519 : }
520 :
521 21 : const formatReleaseDate = (dateString?: string): string => {
522 7 : if (!dateString) return 'date'
523 :
524 7 : const date = new Date(dateString)
525 : const now = new Date()
526 7 : const diffTime = Math.abs(now.getTime() - date.getTime())
527 :
528 7 : const timeUnits = [
529 : { unit: TIME_UNITS.YEAR, key: 'yearsAgo' },
530 : { unit: TIME_UNITS.MONTH, key: 'monthsAgo' },
531 : { unit: TIME_UNITS.WEEK, key: 'weeksAgo' },
532 : { unit: TIME_UNITS.DAY, key: 'daysAgo' },
533 : { unit: TIME_UNITS.HOUR, key: 'hoursAgo' },
534 : { unit: TIME_UNITS.MINUTE, key: 'minutesAgo' }
535 : ]
536 :
537 7 : for (const { unit, key } of timeUnits) {
538 30 : const value = Math.floor(diffTime / unit)
539 30 : if (value > 0) {
540 5 : return t(`g.relativeTime.${key}`, { count: value })
541 : }
542 : }
543 :
544 2 : return t('g.relativeTime.now')
545 : }
546 :
547 : // Event Handlers
548 21 : const onMenuItemHover = async (
549 : key: string,
550 : event: MouseEvent
551 : ): Promise<void> => {
552 31 : if (key !== 'more' || !moreMenuItem.value?.items) return
553 :
554 : // Don't show submenu if all items are hidden
555 : const hasVisibleItems = moreMenuItem.value.items.some(
556 : (item) => item.visible !== false
557 : )
558 0 : if (!hasVisibleItems) return
559 :
560 0 : clearHoverTimeout()
561 :
562 0 : const moreButton = event.currentTarget as HTMLElement
563 :
564 : // Calculate initial position before showing submenu
565 0 : submenuStyle.value = calculateSubmenuPosition(moreButton)
566 :
567 : // Show submenu with correct position
568 0 : isSubmenuVisible.value = true
569 :
570 : // After submenu is rendered, refine position if needed
571 0 : await nextTick()
572 0 : if (submenuRef.value) {
573 0 : submenuStyle.value = calculateSubmenuPosition(moreButton)
574 : }
575 : }
576 :
577 21 : const onMenuItemLeave = (key: string): void => {
578 18 : if (key !== 'more') return
579 :
580 0 : hoverTimeout = window.setTimeout(() => {
581 0 : isSubmenuVisible.value = false
582 : }, SUBMENU_CONFIG.DELAY_MS)
583 : }
584 :
585 21 : const onSubmenuHover = (): void => {
586 0 : clearHoverTimeout()
587 : }
588 :
589 21 : const onSubmenuLeave = (): void => {
590 0 : isSubmenuVisible.value = false
591 : }
592 :
593 : const openDevTools = (): void => {
594 : if (isDesktop) {
595 : electronAPI().openDevTools()
596 : }
597 : }
598 :
599 : const onReinstall = (): void => {
600 : if (isDesktop) {
601 : void electronAPI().reinstall()
602 : }
603 : }
604 :
605 21 : const onUpdateComfyUI = async (): Promise<void> => {
606 0 : const { updateComfyUI, startQueue, rebootComfyUI, error } =
607 : useComfyManagerService()
608 :
609 0 : toast.info(t('helpCenter.updateComfyUIStarted'), {
610 : description: t('helpCenter.updateComfyUIStartedDetail'),
611 : duration: 3000
612 : })
613 :
614 0 : try {
615 0 : const result = await updateComfyUI({ is_stable: true })
616 0 : if (result !== null) await startQueue()
617 :
618 0 : if (result === null || error.value) {
619 0 : toast.error(t('g.error'), {
620 : description: error.value || t('helpCenter.updateComfyUIFailed')
621 : })
622 0 : return
623 : }
624 :
625 0 : toast.success(t('helpCenter.updateComfyUISuccess'), {
626 : description: t('helpCenter.updateComfyUISuccessDetail'),
627 : duration: 3000
628 : })
629 :
630 0 : await rebootComfyUI()
631 : } catch (err) {
632 0 : toast.error(t('g.error'), {
633 : description: getErrorMessage(err) ?? t('g.unknownError')
634 : })
635 : }
636 : }
637 :
638 21 : const onReleaseClick = (release: ReleaseNote): void => {
639 1 : trackResourceClick('release_notes', true)
640 1 : void releaseStore.handleShowChangelog(release.version)
641 1 : const versionAnchor = formatVersionAnchor(release.version)
642 1 : const changelogUrl = `${buildDocsUrl('/changelog', { includeLocale: true })}#${versionAnchor}`
643 1 : openExternalLink(changelogUrl)
644 1 : emit('close')
645 : }
646 :
647 : // Lifecycle
648 21 : onMounted(async () => {
649 21 : telemetry?.trackHelpCenterOpened({ source: 'sidebar' })
650 21 : if (!hasReleases.value) {
651 15 : await releaseStore.fetchReleases()
652 : }
653 : })
654 :
655 21 : onBeforeUnmount(() => {
656 10 : const timeSpentSeconds = Math.round((Date.now() - openedAt.value) / 1000)
657 10 : telemetry?.trackHelpCenterClosed({ time_spent_seconds: timeSpentSeconds })
658 : })
659 : </script>
660 :
661 : <style scoped>
662 : .help-center-menu {
663 : width: 256px;
664 : max-height: 500px;
665 : overflow-y: auto;
666 : background: var(--popover);
667 : border-radius: 8px;
668 : box-shadow: var(--shadow-sm);
669 : border: 1px solid var(--border);
670 : padding: 12px 8px;
671 : position: relative;
672 : }
673 :
674 : .help-menu-item {
675 : display: flex;
676 : align-items: center;
677 : width: 100%;
678 : height: 32px;
679 : min-height: 24px;
680 : padding: 8px;
681 : gap: 8px;
682 : background: transparent;
683 : border: none;
684 : border-radius: 4px;
685 : cursor: pointer;
686 : transition: background-color 0.2s;
687 : font-size: 0.9rem;
688 : color: var(--foreground);
689 : text-align: left;
690 : }
691 :
692 : .help-menu-item:hover {
693 : background-color: var(--accent);
694 : }
695 :
696 : .help-menu-item:focus,
697 : .help-menu-item:focus-visible {
698 : outline: none;
699 : box-shadow: none;
700 : }
701 :
702 : .help-menu-icon-container {
703 : position: relative;
704 : width: 16px;
705 : height: 16px;
706 : flex-shrink: 0;
707 : }
708 :
709 : .help-menu-icon {
710 : width: 16px;
711 : height: 16px;
712 : font-size: 16px;
713 : color: var(--foreground);
714 : display: flex;
715 : justify-content: center;
716 : align-items: center;
717 : flex-shrink: 0;
718 : }
719 :
720 : .help-menu-icon svg {
721 : width: 16px;
722 : height: 16px;
723 : color: var(--foreground);
724 : }
725 :
726 : .menu-red-dot {
727 : position: absolute;
728 : top: -2px;
729 : right: -2px;
730 : width: 8px;
731 : height: 8px;
732 : background: var(--destructive);
733 : border-radius: 50%;
734 : border: 1.5px solid var(--background);
735 : z-index: 1;
736 : }
737 :
738 : .menu-label {
739 : flex: 1;
740 : }
741 :
742 : .more-item {
743 : justify-content: space-between;
744 : }
745 :
746 : .section-description {
747 : color: var(--muted-foreground);
748 : font-family: var(--font-inter);
749 : font-size: 12px;
750 : font-style: normal;
751 : font-weight: 700;
752 : line-height: normal;
753 : margin: 0;
754 : text-transform: uppercase;
755 : letter-spacing: 0.5px;
756 : }
757 :
758 : .release-menu-item {
759 : position: relative;
760 : }
761 :
762 : .release-content {
763 : flex: 1;
764 : display: flex;
765 : flex-direction: column;
766 : gap: 4px;
767 : min-width: 0;
768 : }
769 :
770 : .release-title {
771 : font-size: 0.9rem;
772 : line-height: 1.2;
773 : font-weight: 500;
774 : color: var(--foreground);
775 : }
776 :
777 : .release-date {
778 : height: 16px;
779 : color: var(--muted-foreground);
780 : font-family: var(--font-inter);
781 : font-size: 12px;
782 : font-style: normal;
783 : font-weight: 400;
784 : line-height: normal;
785 : overflow: hidden;
786 : text-overflow: ellipsis;
787 : display: -webkit-box;
788 : -webkit-line-clamp: 1;
789 : -webkit-box-orient: vertical;
790 : }
791 :
792 : .release-date .hover-state {
793 : display: none;
794 : }
795 :
796 : .release-menu-item:hover .release-date .normal-state,
797 : .release-menu-item:focus-within .release-date .normal-state {
798 : display: none;
799 : }
800 :
801 : .release-menu-item:hover .release-date .hover-state,
802 : .release-menu-item:focus-within .release-date .hover-state {
803 : display: inline;
804 : }
805 :
806 : /* Submenu Styles */
807 : .more-submenu {
808 : width: 210px;
809 : padding: 12px 8px;
810 : background: var(--popover);
811 : border-radius: 8px;
812 : border: 1px solid var(--border);
813 : box-shadow: var(--shadow-sm);
814 : overflow: hidden;
815 : transition: opacity 0.15s ease-out;
816 : }
817 :
818 : .submenu-item {
819 : padding: 8px;
820 : height: 32px;
821 : min-height: 24px;
822 : border-radius: 4px;
823 : color: var(--foreground);
824 : font-size: 0.9rem;
825 : font-weight: inherit;
826 : line-height: inherit;
827 : }
828 :
829 : .submenu-item:hover {
830 : background-color: var(--accent);
831 : }
832 :
833 : .submenu-item:focus,
834 : .submenu-item:focus-visible {
835 : outline: none;
836 : box-shadow: none;
837 : }
838 :
839 : .submenu-divider {
840 : height: 1px;
841 : background: var(--border);
842 : margin: 4px 0;
843 : }
844 :
845 : /* Scrollbar Styling */
846 : .help-center-menu::-webkit-scrollbar {
847 : width: 6px;
848 : }
849 :
850 : .help-center-menu::-webkit-scrollbar-track {
851 : background: transparent;
852 : }
853 :
854 : .help-center-menu::-webkit-scrollbar-thumb {
855 : background: var(--border);
856 : border-radius: 3px;
857 : }
858 :
859 : .help-center-menu::-webkit-scrollbar-thumb:hover {
860 : background: var(--muted-foreground);
861 : }
862 :
863 : /* Reduced Motion */
864 : @media (prefers-reduced-motion: reduce) {
865 : .help-menu-item {
866 : transition: none;
867 : }
868 : }
869 : </style>
|