diff --git a/src/components/topbar/CurrentUserPopover.spec.ts b/src/components/topbar/CurrentUserPopover.test.ts
similarity index 93%
rename from src/components/topbar/CurrentUserPopover.spec.ts
rename to src/components/topbar/CurrentUserPopover.test.ts
index c4e34ae79..a7e965b21 100644
--- a/src/components/topbar/CurrentUserPopover.spec.ts
+++ b/src/components/topbar/CurrentUserPopover.test.ts
@@ -1,10 +1,11 @@
-import { VueWrapper, mount } from '@vue/test-utils'
+import type { VueWrapper } from '@vue/test-utils'
+import { mount } from '@vue/test-utils'
import Button from 'primevue/button'
import { afterAll, beforeEach, describe, expect, it, vi } from 'vitest'
import { h } from 'vue'
import { createI18n } from 'vue-i18n'
-import enMessages from '@/locales/en/main.json'
+import enMessages from '@/locales/en/main.json' with { type: 'json' }
import CurrentUserPopover from './CurrentUserPopover.vue'
@@ -41,11 +42,13 @@ afterAll(() => {
})
// Mock the useCurrentUser composable
+const mockHandleSignOut = vi.fn()
vi.mock('@/composables/auth/useCurrentUser', () => ({
useCurrentUser: vi.fn(() => ({
userPhotoUrl: 'https://example.com/avatar.jpg',
userDisplayName: 'Test User',
- userEmail: 'test@example.com'
+ userEmail: 'test@example.com',
+ handleSignOut: mockHandleSignOut
}))
}))
@@ -155,8 +158,8 @@ describe('CurrentUserPopover', () => {
// Click the logout button
await logoutButton.trigger('click')
- // Verify logout was called
- expect(mockLogout).toHaveBeenCalled()
+ // Verify handleSignOut was called
+ expect(mockHandleSignOut).toHaveBeenCalled()
// Verify close event was emitted
expect(wrapper.emitted('close')).toBeTruthy()
diff --git a/src/components/topbar/CurrentUserPopover.vue b/src/components/topbar/CurrentUserPopover.vue
index e74a927c8..de9fab40c 100644
--- a/src/components/topbar/CurrentUserPopover.vue
+++ b/src/components/topbar/CurrentUserPopover.vue
@@ -8,7 +8,7 @@
class="mb-3"
:photo-url="userPhotoUrl"
:pt:icon:class="{
- '!text-2xl': !userPhotoUrl
+ 'text-2xl!': !userPhotoUrl
}"
size="large"
/>
@@ -88,7 +88,8 @@ const emit = defineEmits<{
close: []
}>()
-const { userDisplayName, userEmail, userPhotoUrl } = useCurrentUser()
+const { userDisplayName, userEmail, userPhotoUrl, handleSignOut } =
+ useCurrentUser()
const authActions = useFirebaseAuthActions()
const dialogService = useDialogService()
@@ -103,7 +104,7 @@ const handleTopUp = () => {
}
const handleLogout = async () => {
- await authActions.logout()
+ await handleSignOut()
emit('close')
}
diff --git a/src/components/topbar/TopMenubar.vue b/src/components/topbar/TopMenubar.vue
index d898e2f2a..e7e049b35 100644
--- a/src/components/topbar/TopMenubar.vue
+++ b/src/components/topbar/TopMenubar.vue
@@ -2,7 +2,7 @@
@@ -14,19 +14,19 @@
:class="{ dropzone: isDropZone, 'dropzone-active': isDroppable }"
>
-
+
-
+
@@ -39,8 +39,8 @@ import Actionbar from '@/components/actionbar/ComfyActionbar.vue'
import CommandMenubar from '@/components/topbar/CommandMenubar.vue'
import CurrentUserButton from '@/components/topbar/CurrentUserButton.vue'
import WorkflowTabs from '@/components/topbar/WorkflowTabs.vue'
+import { useSettingStore } from '@/platform/settings/settingStore'
import { app } from '@/scripts/app'
-import { useSettingStore } from '@/stores/settingStore'
import { useWorkspaceStore } from '@/stores/workspaceStore'
import { electronAPI, isElectron, isNativeWindow } from '@/utils/envUtil'
diff --git a/src/components/topbar/WorkflowOverflowMenu.vue b/src/components/topbar/WorkflowOverflowMenu.vue
index 042aeed24..33b8475a3 100644
--- a/src/components/topbar/WorkflowOverflowMenu.vue
+++ b/src/components/topbar/WorkflowOverflowMenu.vue
@@ -23,8 +23,8 @@ import Button from 'primevue/button'
import Menu from 'primevue/menu'
import { computed, ref } from 'vue'
-import { useWorkflowService } from '@/services/workflowService'
-import type { ComfyWorkflow } from '@/stores/workflowStore'
+import { useWorkflowService } from '@/platform/workflow/core/services/workflowService'
+import type { ComfyWorkflow } from '@/platform/workflow/management/stores/workflowStore'
const props = defineProps<{
workflows: ComfyWorkflow[]
diff --git a/src/components/topbar/WorkflowTab.vue b/src/components/topbar/WorkflowTab.vue
index 1c39832d9..d427736b8 100644
--- a/src/components/topbar/WorkflowTab.vue
+++ b/src/components/topbar/WorkflowTab.vue
@@ -1,7 +1,7 @@
-
âĸ
+