-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add internal main page (#1157)
## References ### Jira-link: https://virtocommerce.atlassian.net/browse/VCST-1418 <!-- Put link to your task in Jira here --> ### Artifact URL: https://vc3prerelease.blob.core.windows.net/packages/vc-theme-b2b-vue-1.62.0-pr-1157-c0aa-c0aa91c0.zip
- Loading branch information
Showing
19 changed files
with
279 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<template> | ||
<Category /> | ||
<Category allow-set-meta /> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<template> | ||
<Category /> | ||
<Category allow-set-meta /> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<template> | ||
<component :is="page" /> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { computed, defineAsyncComponent, onBeforeUnmount } from "vue"; | ||
import { useRoute } from "vue-router"; | ||
import type { StateType } from "@/pages/matcher/priorityManager"; | ||
interface IEmits { | ||
(event: "setState", value: StateType): void; | ||
} | ||
const emit = defineEmits<IEmits>(); | ||
const pages = { | ||
"/": defineAsyncComponent(() => import("@/pages/home.vue")), | ||
"/demo-landing": defineAsyncComponent(() => import("@/pages/demo-landing.vue")), | ||
} as const; | ||
const route = useRoute(); | ||
const page = computed(() => { | ||
if (Object.keys(pages).includes(route.path)) { | ||
emit("setState", "ready"); | ||
return pages[route.path as keyof typeof pages]; | ||
} | ||
emit("setState", "empty"); | ||
return null; | ||
}); | ||
onBeforeUnmount(() => { | ||
emit("setState", "initial"); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.