From ac423b224cae520462e8e09c26f931f013abf1e6 Mon Sep 17 00:00:00 2001 From: mnenie <1alexpeshkov@gmail.com> Date: Fri, 30 Aug 2024 21:07:05 +0300 Subject: [PATCH] fix: fsd -> fixtures --- src/entities/template/model/fixtures/index.ts | 1 + src/entities/template/model/{ => fixtures}/templates.ts | 3 ++- src/entities/template/model/index.ts | 2 +- src/features/auth/model/fixtures/index.ts | 1 + src/features/auth/model/{ => fixtures}/reviews.ts | 8 ++++---- src/features/auth/model/index.ts | 2 +- src/widgets/layout/model/{ => fixtures}/header.ts | 0 src/widgets/layout/model/fixtures/index.ts | 1 + src/widgets/layout/model/index.ts | 3 ++- src/widgets/layout/model/links.ts | 2 +- src/widgets/layout/{ => model}/types.ts | 0 src/widgets/layout/ui/header/HeaderWelcome.vue | 2 +- src/widgets/layout/ui/sidebar/WorkSpace.vue | 2 +- src/widgets/welcome/model/{ => fixtures}/cards.ts | 0 src/widgets/welcome/model/fixtures/index.ts | 1 + src/widgets/welcome/model/index.ts | 3 ++- src/widgets/welcome/{ => model}/types.ts | 0 src/widgets/welcome/ui/MarketingCards.vue | 2 +- 18 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 src/entities/template/model/fixtures/index.ts rename src/entities/template/model/{ => fixtures}/templates.ts (92%) create mode 100644 src/features/auth/model/fixtures/index.ts rename src/features/auth/model/{ => fixtures}/reviews.ts (80%) rename src/widgets/layout/model/{ => fixtures}/header.ts (100%) create mode 100644 src/widgets/layout/model/fixtures/index.ts rename src/widgets/layout/{ => model}/types.ts (100%) rename src/widgets/welcome/model/{ => fixtures}/cards.ts (100%) create mode 100644 src/widgets/welcome/model/fixtures/index.ts rename src/widgets/welcome/{ => model}/types.ts (100%) diff --git a/src/entities/template/model/fixtures/index.ts b/src/entities/template/model/fixtures/index.ts new file mode 100644 index 00000000..7618312b --- /dev/null +++ b/src/entities/template/model/fixtures/index.ts @@ -0,0 +1 @@ +export * from './templates'; diff --git a/src/entities/template/model/templates.ts b/src/entities/template/model/fixtures/templates.ts similarity index 92% rename from src/entities/template/model/templates.ts rename to src/entities/template/model/fixtures/templates.ts index 37dbb380..24dfacdd 100644 --- a/src/entities/template/model/templates.ts +++ b/src/entities/template/model/fixtures/templates.ts @@ -1,5 +1,6 @@ -import type { Template } from '../model'; +import type { Template } from '../../model'; +// mocks -> after data from backend export const templatesInfo: Template[] = [ { id: '0', diff --git a/src/entities/template/model/index.ts b/src/entities/template/model/index.ts index 60394fe4..0a516dc4 100644 --- a/src/entities/template/model/index.ts +++ b/src/entities/template/model/index.ts @@ -1,2 +1,2 @@ export * from './types'; -export * from './templates'; +export * from './fixtures'; diff --git a/src/features/auth/model/fixtures/index.ts b/src/features/auth/model/fixtures/index.ts new file mode 100644 index 00000000..dfe692cd --- /dev/null +++ b/src/features/auth/model/fixtures/index.ts @@ -0,0 +1 @@ +export * from './reviews'; diff --git a/src/features/auth/model/reviews.ts b/src/features/auth/model/fixtures/reviews.ts similarity index 80% rename from src/features/auth/model/reviews.ts rename to src/features/auth/model/fixtures/reviews.ts index ff559d6c..f4a4dffa 100644 --- a/src/features/auth/model/reviews.ts +++ b/src/features/auth/model/fixtures/reviews.ts @@ -1,7 +1,7 @@ -import { markRaw } from 'vue'; -import type { Review } from '../lib/types'; +import type { Review } from '../../lib/types'; -export const reviews = markRaw([ +// mocks -> after data from backend +export const reviews: Review[] = [ { id: '0', author: '@alexpeshkov', @@ -17,4 +17,4 @@ export const reviews = markRaw([ author: '@alexpeshkov', text: `So, Jenda is just 🔥 Now I understand why many people like to use it.` } -]); +]; diff --git a/src/features/auth/model/index.ts b/src/features/auth/model/index.ts index 23d46a4a..db6f29fa 100644 --- a/src/features/auth/model/index.ts +++ b/src/features/auth/model/index.ts @@ -1,2 +1,2 @@ -export * from './reviews'; +export * from './fixtures'; export * from './validation'; diff --git a/src/widgets/layout/model/header.ts b/src/widgets/layout/model/fixtures/header.ts similarity index 100% rename from src/widgets/layout/model/header.ts rename to src/widgets/layout/model/fixtures/header.ts diff --git a/src/widgets/layout/model/fixtures/index.ts b/src/widgets/layout/model/fixtures/index.ts new file mode 100644 index 00000000..677ca79d --- /dev/null +++ b/src/widgets/layout/model/fixtures/index.ts @@ -0,0 +1 @@ +export * from './header'; diff --git a/src/widgets/layout/model/index.ts b/src/widgets/layout/model/index.ts index 312f7f67..6ce1c559 100644 --- a/src/widgets/layout/model/index.ts +++ b/src/widgets/layout/model/index.ts @@ -1,2 +1,3 @@ -export * from './header'; +export * from './fixtures'; export * from './links'; +export * from './types'; diff --git a/src/widgets/layout/model/links.ts b/src/widgets/layout/model/links.ts index 08d58b95..1159bc37 100644 --- a/src/widgets/layout/model/links.ts +++ b/src/widgets/layout/model/links.ts @@ -1,5 +1,5 @@ import { h, markRaw } from 'vue'; -import type { Link } from '../types'; +import type { Link } from './types'; import { RouteNames } from '@/shared/config/consts'; import { SquareDashedKanban, Settings, Users, BringToFront } from 'lucide-vue-next'; diff --git a/src/widgets/layout/types.ts b/src/widgets/layout/model/types.ts similarity index 100% rename from src/widgets/layout/types.ts rename to src/widgets/layout/model/types.ts diff --git a/src/widgets/layout/ui/header/HeaderWelcome.vue b/src/widgets/layout/ui/header/HeaderWelcome.vue index a119a8ae..39867dde 100644 --- a/src/widgets/layout/ui/header/HeaderWelcome.vue +++ b/src/widgets/layout/ui/header/HeaderWelcome.vue @@ -9,7 +9,7 @@ import { RouteNames } from '@/shared/config/consts'; import { Globe, Moon, Sun } from 'lucide-vue-next'; import type { Options } from '@/shared/ui/select/types'; import { headerLinks } from '../../model'; -import type { HeaderNavLink } from '../../types'; +import type { HeaderNavLink } from '../../model'; const isDark = useDark(); const toggleDark = useToggle(isDark); diff --git a/src/widgets/layout/ui/sidebar/WorkSpace.vue b/src/widgets/layout/ui/sidebar/WorkSpace.vue index 94919626..d52f15de 100644 --- a/src/widgets/layout/ui/sidebar/WorkSpace.vue +++ b/src/widgets/layout/ui/sidebar/WorkSpace.vue @@ -4,7 +4,7 @@ import { useRoute } from 'vue-router'; import { useDark } from '@vueuse/core'; import { RouteNames } from '@/shared/config/consts'; import { UiButton } from '@/shared/ui'; -import type { Link } from '../../types'; +import type { Link } from '../../model'; const props = defineProps<{ links: Link[]; diff --git a/src/widgets/welcome/model/cards.ts b/src/widgets/welcome/model/fixtures/cards.ts similarity index 100% rename from src/widgets/welcome/model/cards.ts rename to src/widgets/welcome/model/fixtures/cards.ts diff --git a/src/widgets/welcome/model/fixtures/index.ts b/src/widgets/welcome/model/fixtures/index.ts new file mode 100644 index 00000000..870e357f --- /dev/null +++ b/src/widgets/welcome/model/fixtures/index.ts @@ -0,0 +1 @@ +export * from './cards'; diff --git a/src/widgets/welcome/model/index.ts b/src/widgets/welcome/model/index.ts index 870e357f..e595fb1b 100644 --- a/src/widgets/welcome/model/index.ts +++ b/src/widgets/welcome/model/index.ts @@ -1 +1,2 @@ -export * from './cards'; +export * from './fixtures'; +export * from './types'; diff --git a/src/widgets/welcome/types.ts b/src/widgets/welcome/model/types.ts similarity index 100% rename from src/widgets/welcome/types.ts rename to src/widgets/welcome/model/types.ts diff --git a/src/widgets/welcome/ui/MarketingCards.vue b/src/widgets/welcome/ui/MarketingCards.vue index 010f5e46..4a40bfb5 100644 --- a/src/widgets/welcome/ui/MarketingCards.vue +++ b/src/widgets/welcome/ui/MarketingCards.vue @@ -3,7 +3,7 @@ import { computed } from 'vue'; import { useDark } from '@vueuse/core'; import { useI18n } from 'vue-i18n'; import { cardsInfo } from '../model'; -import type { MarketingCard } from '../types'; +import type { MarketingCard } from '../model'; import { UiCard } from '@/shared/ui'; const { tm } = useI18n();