-
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a12c816
commit 0d95534
Showing
10 changed files
with
129 additions
and
69 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<script setup lang="ts"> | ||
import { CustomTab } from '@vue/devtools-kit' | ||
const p = defineProps<{ | ||
tab: CustomTab | ||
iframeInline?: boolean | ||
}>() | ||
const props = toRefs(p) | ||
const tabName = computed(() => props.tab.value.name) | ||
const iframeViewVisible = ref(true) | ||
watch(() => tabName.value, () => { | ||
iframeViewVisible.value = false | ||
setTimeout(() => { | ||
iframeViewVisible.value = true | ||
}, 100) | ||
}) | ||
</script> | ||
|
||
<template> | ||
<template v-if="!tab"> | ||
<div flex="~ col" h-full items-center justify-center> | ||
<div flex="~ col gap2" mxa items-center> | ||
<div i-carbon-queued mb2 text-5xl op50 /> | ||
<p text-xl> | ||
Tab <code text-rose>{{ tabName }}</code> not found | ||
</p> | ||
<p mt8 animate-pulse> | ||
Redirecting to overview page... | ||
</p> | ||
</div> | ||
</div> | ||
</template> | ||
<template v-else-if="tab?.view?.type === 'iframe'"> | ||
<IframeView v-if="iframeViewVisible" :src="tab.view.src" :inline="iframeInline" /> | ||
</template> | ||
<template v-else-if="tab?.view?.type === 'vnode'"> | ||
<Component :is="tab.view.vnode" /> | ||
</template> | ||
<template v-else> | ||
<div> | ||
<NCard flex="~ col" h-full items-center justify-center> | ||
Unknown tab type {{ tab?.view }} | ||
</NCard> | ||
</div> | ||
</template> | ||
</template> |
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
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
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