mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-09 01:20:09 +00:00
Remove cloud notification badge from topbar
- Remove persistent 'NEW' badge that appeared after modal dismissal - Keep one-time modal notification for macOS desktop users - Clean up unused badge translations
This commit is contained in:
@@ -1,22 +1,5 @@
|
||||
<template>
|
||||
<div class="flex h-full shrink-0 items-center">
|
||||
<!-- Cloud Notification Badge for Desktop -->
|
||||
<div
|
||||
v-if="cloudBadge"
|
||||
class="relative inline-flex h-full shrink-0 cursor-pointer items-center justify-center gap-2 px-3 transition-opacity hover:opacity-70"
|
||||
@click="handleCloudBadgeClick"
|
||||
>
|
||||
<div
|
||||
class="rounded-full bg-white px-1.5 py-0.5 text-xxxs font-semibold text-black"
|
||||
>
|
||||
{{ t('cloudNotification.badgeLabel') }}
|
||||
</div>
|
||||
<div v-if="displayMode !== 'icon-only'" class="text-sm font-inter">
|
||||
{{ t('cloudNotification.badgeText') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Extension Badges -->
|
||||
<TopbarBadge
|
||||
v-for="badge in topbarBadgeStore.badges"
|
||||
:key="badge.text"
|
||||
@@ -31,14 +14,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { breakpointsTailwind, useBreakpoints } from '@vueuse/core'
|
||||
import { computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import { useSettingStore } from '@/platform/settings/settingStore'
|
||||
import { useTelemetry } from '@/platform/telemetry'
|
||||
import { useDialogService } from '@/services/dialogService'
|
||||
import { useTopbarBadgeStore } from '@/stores/topbarBadgeStore'
|
||||
import type { TopbarBadge as TopbarBadgeType } from '@/types/comfy'
|
||||
import { isElectron } from '@/utils/envUtil'
|
||||
|
||||
import TopbarBadge from './TopbarBadge.vue'
|
||||
|
||||
@@ -64,40 +41,4 @@ const displayMode = computed<'full' | 'compact' | 'icon-only'>(() => {
|
||||
})
|
||||
|
||||
const topbarBadgeStore = useTopbarBadgeStore()
|
||||
|
||||
// Cloud notification badge
|
||||
const { t } = useI18n()
|
||||
const settingStore = useSettingStore()
|
||||
const dialogService = useDialogService()
|
||||
|
||||
const isMacOS = computed(() => navigator.platform.toLowerCase().includes('mac'))
|
||||
|
||||
// Access the reactive store state directly for proper reactivity
|
||||
const hasShownNotification = computed(
|
||||
() =>
|
||||
settingStore.settingValues['Comfy.Desktop.CloudNotificationShown'] ?? false
|
||||
)
|
||||
|
||||
const shouldShowCloudBadge = computed(
|
||||
() => isElectron() && isMacOS.value && hasShownNotification.value
|
||||
)
|
||||
|
||||
const cloudBadge = computed<TopbarBadgeType | null>(() => {
|
||||
if (!shouldShowCloudBadge.value) return null
|
||||
|
||||
return {
|
||||
text: 'Discover Comfy Cloud',
|
||||
label: 'NEW',
|
||||
icon: 'pi pi-cloud',
|
||||
variant: 'info',
|
||||
tooltip: 'Learn about Comfy Cloud'
|
||||
}
|
||||
})
|
||||
|
||||
const handleCloudBadgeClick = () => {
|
||||
useTelemetry()?.trackUiButtonClicked({
|
||||
button_id: 'cloud_notification_badge_clicked'
|
||||
})
|
||||
dialogService.showCloudNotification()
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -2224,9 +2224,6 @@
|
||||
"feature3": "Simple subscription with unlimited workflow runs",
|
||||
"feature4": "ComfyUI stays free and open source.\nCloud is optional—for instant access to high-end GPUs.",
|
||||
"continueLocally": "Continue Locally",
|
||||
"exploreCloud": "Explore Cloud",
|
||||
"badgeTooltip": "Learn about Comfy Cloud",
|
||||
"badgeLabel": "NEW",
|
||||
"badgeText": "Discover Comfy Cloud"
|
||||
"exploreCloud": "Explore Cloud"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user