mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 18:22:40 +00:00
Fix: Cloud notification badge reactivity and modal timing
- Fix badge not appearing by accessing settingStore.settingValues directly for proper reactivity - Increase modal delay to 2s to ensure it appears after missing models dialog - Move setting update inside setTimeout to only save when modal actually shows 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
24
src/App.vue
24
src/App.vue
@@ -80,15 +80,23 @@ onMounted(async () => {
|
|||||||
void conflictDetection.initializeConflictDetection()
|
void conflictDetection.initializeConflictDetection()
|
||||||
|
|
||||||
// Show cloud notification for macOS desktop users (one-time)
|
// Show cloud notification for macOS desktop users (one-time)
|
||||||
const isMacOS = navigator.platform.toLowerCase().includes('mac')
|
// Delayed to ensure it appears after workflow loading (missing models dialog, etc.)
|
||||||
const settingStore = useSettingStore()
|
if (isElectron()) {
|
||||||
const hasShownNotification = settingStore.get(
|
const isMacOS = navigator.platform.toLowerCase().includes('mac')
|
||||||
'Comfy.Desktop.CloudNotificationShown'
|
if (isMacOS) {
|
||||||
)
|
const settingStore = useSettingStore()
|
||||||
|
const hasShownNotification = settingStore.get(
|
||||||
|
'Comfy.Desktop.CloudNotificationShown'
|
||||||
|
)
|
||||||
|
|
||||||
if (isElectron() && isMacOS && !hasShownNotification) {
|
if (!hasShownNotification) {
|
||||||
dialogService.showCloudNotification()
|
// Delay to show after initial workflow loading completes
|
||||||
await settingStore.set('Comfy.Desktop.CloudNotificationShown', true)
|
setTimeout(async () => {
|
||||||
|
dialogService.showCloudNotification()
|
||||||
|
await settingStore.set('Comfy.Desktop.CloudNotificationShown', true)
|
||||||
|
}, 2000)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -72,8 +72,10 @@ const dialogService = useDialogService()
|
|||||||
|
|
||||||
const isMacOS = computed(() => navigator.platform.toLowerCase().includes('mac'))
|
const isMacOS = computed(() => navigator.platform.toLowerCase().includes('mac'))
|
||||||
|
|
||||||
const hasShownNotification = computed(() =>
|
// Access the reactive store state directly for proper reactivity
|
||||||
settingStore.get('Comfy.Desktop.CloudNotificationShown')
|
const hasShownNotification = computed(
|
||||||
|
() =>
|
||||||
|
settingStore.settingValues['Comfy.Desktop.CloudNotificationShown'] ?? false
|
||||||
)
|
)
|
||||||
|
|
||||||
const shouldShowCloudBadge = computed(
|
const shouldShowCloudBadge = computed(
|
||||||
|
|||||||
Reference in New Issue
Block a user