Skip to content

Commit 51f7c1c

Browse files
committed
refactor(plugin): new home page with CTA to docs
1 parent f20e014 commit 51f7c1c

File tree

2 files changed

+37
-42
lines changed

2 files changed

+37
-42
lines changed
Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,42 @@
11
<script lang="ts">
2-
import EmptyPane from '@front/features/layout/EmptyPane.vue'
3-
42
import { defineComponent } from '@vue/composition-api'
53
64
export default defineComponent({
7-
components: {
8-
EmptyPane
5+
props: {
6+
noPlugins: {
7+
type: Boolean,
8+
default: false
9+
}
910
}
1011
})
1112
</script>
1213

1314
<template>
14-
<EmptyPane
15-
icon="extension"
16-
>
17-
Devtools plugins
18-
</EmptyPane>
15+
<div class="h-full flex flex-col items-center justify-center p-8 space-y-8">
16+
<div
17+
v-if="noPlugins"
18+
class="bg-gray-50 dark:bg-gray-900 text-gray-500 px-3 py-1 rounded text-sm"
19+
>
20+
No plugins found
21+
</div>
22+
23+
<div class="flex items-center space-x-8 max-w-lg">
24+
<img
25+
src="~@front/assets/undraw_Gift_box.svg"
26+
class="max-h-32 flex-none"
27+
>
28+
29+
<p class="flex-1">
30+
Devtools plugins are added by packages in your application. They can provide new features to the Vue devtools, such as custom inspectors, additional component data or timeline layers.
31+
</p>
32+
</div>
33+
34+
<VueButton
35+
href="https://devtools.vuejs.org/plugin/plugins-guide.html"
36+
target="_blank"
37+
class="primary"
38+
>
39+
Create your own Plugin
40+
</VueButton>
41+
</div>
1942
</template>

packages/app-frontend/src/features/plugin/Plugins.vue

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
import SplitPane from '@front/features/layout/SplitPane.vue'
3-
import EmptyPane from '@front/features/layout/EmptyPane.vue'
43
import PluginListItem from './PluginListItem.vue'
4+
import PluginHome from './PluginHome.vue'
55
66
import { defineComponent, ref, computed } from '@vue/composition-api'
77
import { usePlugins } from '.'
@@ -10,7 +10,7 @@ export default defineComponent({
1010
components: {
1111
SplitPane,
1212
PluginListItem,
13-
EmptyPane
13+
PluginHome
1414
},
1515
1616
setup () {
@@ -35,12 +35,10 @@ export default defineComponent({
3535
</script>
3636

3737
<template>
38-
<EmptyPane
38+
<PluginHome
3939
v-if="!plugins.length"
40-
icon="extension"
41-
>
42-
No devtools plugins found
43-
</EmptyPane>
40+
no-plugins
41+
/>
4442
<SplitPane
4543
v-else
4644
save-id="plugins"
@@ -65,32 +63,6 @@ export default defineComponent({
6563
/>
6664
</div>
6765
</div>
68-
69-
<portal to="header-end">
70-
<VueDropdown
71-
:offset="[0, 0]"
72-
>
73-
<template #trigger>
74-
<VueButton
75-
class="icon-button flat"
76-
icon-left="help"
77-
/>
78-
</template>
79-
80-
<div>
81-
<div class="px-10 py-8 flex items-center space-x-8 max-w-lg">
82-
<img
83-
src="~@front/assets/undraw_Gift_box.svg"
84-
class="max-h-32 flex-none"
85-
>
86-
87-
<p class="flex-1">
88-
Devtools plugins are added by packages in your application. They can provide new features to the Vue devtools, such as custom inspectors, additional component data or timeline layers.
89-
</p>
90-
</div>
91-
</div>
92-
</VueDropdown>
93-
</portal>
9466
</template>
9567

9668
<template #right>

0 commit comments

Comments
 (0)