-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from nih-sparc/add_dashboard_to_pages
Add dashboard to pages
- Loading branch information
Showing
4 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
Submodule TestDashboard
updated
4 files
+ − | src/assets/imgs/imgInfo.png | |
+3 −3 | src/components/ImageSelector.vue | |
+12 −10 | src/components/SparcDashboard.vue | |
+0 −3 | storybook-static/index.html |
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,13 @@ | ||
<template> | ||
<SparcDashboard></SparcDashboard> | ||
</template> | ||
<script setup lang="ts"> | ||
import SparcDashboard from "@/TestDashboard/src/components/SparcDashboard.vue" | ||
import '@/plugins/dashboard.js' | ||
</script> | ||
<style scoped lang="scss"> | ||
</style> |
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,24 @@ | ||
import mitt from 'mitt' | ||
import { defineAsyncComponent } from 'vue' | ||
import { useGlobalVarsStore } from '@/TestDashboard/src/stores/globalVars' | ||
import "@/TestDashboard/tailwind/output.css" | ||
|
||
const emitter = mitt(); | ||
|
||
const componentMap = [ | ||
'ImageSelector', | ||
'LocationNav', | ||
'FlatmapViewer', | ||
'BiolucidaViewer', | ||
'QDBChart' | ||
] | ||
|
||
export default defineNuxtPlugin((nuxtApp) => { | ||
nuxtApp.vueApp.provide('emitter', emitter); | ||
componentMap.forEach(comp=>{ | ||
const asyncComponent = defineAsyncComponent(() => import(`@/TestDashboard/src/components/${comp}.vue`)); | ||
nuxtApp.vueApp.component(comp, asyncComponent); | ||
}) | ||
const globalVars = useGlobalVarsStore(); | ||
globalVars.componentList = componentMap; | ||
}) |