From eb7a54193d9f418334a366ae12c3dd803204a159 Mon Sep 17 00:00:00 2001 From: slaveeks Date: Sat, 24 Feb 2024 00:42:09 +0300 Subject: [PATCH] fix: fixed code style --- src/application/services/useMarketplace.ts | 9 ++++++--- src/application/services/useUserSettings.ts | 5 ++--- src/domain/marketplace.service.ts | 6 ++---- .../components/marketplace/EditorToolElement.vue | 12 ++++++------ src/presentation/pages/Marketplace.vue | 8 ++------ 5 files changed, 18 insertions(+), 22 deletions(-) diff --git a/src/application/services/useMarketplace.ts b/src/application/services/useMarketplace.ts index 19f06ec9..ee85b5d9 100644 --- a/src/application/services/useMarketplace.ts +++ b/src/application/services/useMarketplace.ts @@ -11,7 +11,7 @@ interface UseMarketplaceComposable { /** * Get list of all tools with user binding */ - tools: Ref + tools: Ref; } /** @@ -39,7 +39,10 @@ export default function (): UseMarketplaceComposable { onMounted(async () => { availableTools.value = await marketplaceService.getAllTools(); - toolsWithUserBindings.value = marketplaceService.getToolsWithUserBindings(userEditorTools.value, availableTools.value); + toolsWithUserBindings.value = marketplaceService.getToolsWithUserBindings( + userEditorTools.value, + availableTools.value + ); }); /** @@ -55,4 +58,4 @@ export default function (): UseMarketplaceComposable { return { tools: toolsWithUserBindings, }; -}; +} diff --git a/src/application/services/useUserSettings.ts b/src/application/services/useUserSettings.ts index bd587e37..302cbc54 100644 --- a/src/application/services/useUserSettings.ts +++ b/src/application/services/useUserSettings.ts @@ -1,6 +1,5 @@ import { userService } from '@/domain'; import { useAppState } from './useAppState'; -import EditorTool from '@/domain/entities/EditorTool'; /** * User settings hook state @@ -9,12 +8,12 @@ interface UseUserSettingsComposableState { /** * Add tool to the user settings */ - addTool(id: string): Promise + addTool(id: string): Promise; /** * Remove tool from the user settings */ - removeTool(id: string): Promise + removeTool(id: string): Promise; } /** diff --git a/src/domain/marketplace.service.ts b/src/domain/marketplace.service.ts index 95026545..9a45403d 100644 --- a/src/domain/marketplace.service.ts +++ b/src/domain/marketplace.service.ts @@ -1,6 +1,6 @@ import type MarketplaceRepository from '@/domain/marketplace.repository.interface'; -import type EditorTool from './entities/EditorTool'; -import { EditorToolWithUserBinding } from './entities/EditorTool'; +import type EditorTool from './entities/EditorTool'; +import type { EditorToolWithUserBinding } from './entities/EditorTool'; /** * Business logic working with Marketplace @@ -14,9 +14,7 @@ export default class MarketplaceService { /** * Service constructor * - * @param eventBus - Common domain event bus * @param marketplaceRepository - repository instance - * @param marketplaceRepositoryRepository */ constructor(marketplaceRepository: MarketplaceRepository) { this.repository = marketplaceRepository; diff --git a/src/presentation/components/marketplace/EditorToolElement.vue b/src/presentation/components/marketplace/EditorToolElement.vue index 57376ce1..e2a9538c 100644 --- a/src/presentation/components/marketplace/EditorToolElement.vue +++ b/src/presentation/components/marketplace/EditorToolElement.vue @@ -29,7 +29,7 @@ const { addTool, removeTool } = useUserSettings(); const { t } = useI18n(); const props = defineProps<{ - tool: EditorToolWithUserBinding + tool: EditorToolWithUserBinding; }>(); const canBeUninstalled = computed(() => !props.tool.isDefault && props.tool.isInstalled); @@ -37,9 +37,9 @@ const canBeInstalled = computed(() => !props.tool.isDefault && !props.tool.isIns diff --git a/src/presentation/pages/Marketplace.vue b/src/presentation/pages/Marketplace.vue index 1c0e1401..f5cbeb68 100644 --- a/src/presentation/pages/Marketplace.vue +++ b/src/presentation/pages/Marketplace.vue @@ -6,20 +6,16 @@ v-for="tool in tools" :key="tool.id" > - +