-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
/
Copy pathWelcomeSlideshow.vue
267 lines (225 loc) · 6.77 KB
/
WelcomeSlideshow.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<script lang="ts">
import { defineComponent, ref, watch } from 'vue'
export default defineComponent({
emits: [
'hide',
],
setup() {
const step = ref(0)
const content = ref<HTMLDivElement>()
watch(step, () => {
content.value.scrollTop = 0
})
return {
step,
stepMax: 10,
content,
}
},
})
</script>
<template>
<div class="bg-white/50 dark:bg-black/50 p-4 flex items-center justify-center">
<div class="bg-white dark:bg-black rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 h-full w-[620px] max-w-full flex flex-col">
<div
ref="content"
class="flex-1 overflow-auto p-4"
>
<template v-if="step === 0">
<img
src="~@front/assets/devtools-logo.svg"
alt="Devtools logo"
class="logo max-h-[100px]"
>
<h1 class="text-green-500 text-2xl text-center mt-8">
Welcome to the Vue devtools!
</h1>
</template>
<template v-if="step === 1">
<h2>Let's take a little tour</h2>
<p>
The devtools were entirely rewritten with the release of Vue 3.
</p>
<p>
Its new architecture allows better support of different versions of Vue, as well as integration of third-party libraries (more on that later!).
</p>
<p>
It's packed with changes big and small, so here is an overview of what's new!
</p>
</template>
<template v-if="step === 2">
<img
src="~@front/assets/welcome/main-tabs.png"
alt="Main tabs"
class="max-h-[120px]"
>
<p>
You might notice that the navigation is different. The devtools now has two main tabs:
</p>
<ul>
<li>the <b>Inspector</b> to display debugging information in a structured way (for example inspecting a component),</li>
<li>the <b>Timeline</b> to track different kinds of data over time such as events.</li>
</ul>
</template>
<template v-if="step === 3">
<h2>The Inspector</h2>
<p>
Here you can select components and inspect their state.
</p>
<img
src="~@front/assets/welcome/components.png"
alt="Components inspector"
>
</template>
<template v-if="step === 4">
<p>
To access settings, use the new "3 dots" menu in the top right corner.
</p>
<img
src="~@front/assets/welcome/components-menu.png"
alt="Components menu"
class="max-h-[270px]"
>
</template>
<template v-if="step === 5">
<p>
Any Vue plugin and library can now integrate with the devtools via its <a
href="https://devtools-v6.vuejs.org/plugin/plugins-guide.html"
target="_blank"
>Plugin API</a>.
</p>
<p>
For example, they can add their own custom inspectors:
</p>
<img
src="~@front/assets/welcome/inspector-pinia2.png"
alt="Pinia inspector"
>
</template>
<template v-if="step === 6">
<h2>The Timeline</h2>
<p>
Here you can see the events coming from your application in real-time. It includes mouse and keyboard events, component events, performance flamecharts...
</p>
<img
src="~@front/assets/welcome/timeline.png"
alt="Timeline"
>
</template>
<template v-if="step === 7">
<p>
You can zoom and pan the timeline, or click on events to see more information.
</p>
<img
src="~@front/assets/welcome/timeline-perf2.png"
alt="Timeline"
>
</template>
<template v-if="step === 8">
<p>
Using the <a
href="https://devtools-v6.vuejs.org/plugin/plugins-guide.html"
target="_blank"
>Devtools Plugin API</a>, third-party libraries can also add layers and events to the Timeline.
</p>
<img
src="~@front/assets/welcome/timeline-pinia.png"
alt="Timeline pinia"
>
</template>
<template v-if="step === 9">
<p>
On the left side of the top bar, you can find a new App Selector. The devtools are now scoped to a specific selected app and can even inspect apps inside iframes!
</p>
<img
src="~@front/assets/welcome/app-selector.png"
alt="App selector"
class="max-h-[280px]"
>
</template>
<template v-if="step === 10">
<img
src="~@front/assets/devtools-logo.svg"
alt="Devtools logo"
class="logo max-h-[100px]"
>
<h2 class="text-center mb-8">
That's it!
</h2>
<p>
We hope that you will enjoy the new Vue devtools.
</p>
<p>
In case something doesn't work with your project, you can use the <a
href="https://devtools-v6.vuejs.org/guide/installation.html#legacy"
target="_blank"
>Legacy version</a> and <a
href="https://github.com/vuejs/devtools/issues/new/choose"
target="_blank"
>report an issue</a>.
</p>
</template>
</div>
<div class="flex-none flex items-center space-x-4 p-4 relative">
<div class="absolute top-0 left-0 w-full">
<div
class="h-[2px] bg-green-500 transition-all duration-500 ease-out"
:style="{
width: `${step / stepMax * 100}%`,
}"
/>
</div>
<VueButton
class="flat"
@click="$emit('hide')"
>
Skip
</VueButton>
<div class="flex-1" />
<VueButton
:disabled="step === 0"
@click="step--"
>
Previous
</VueButton>
<VueButton
v-if="step < stepMax"
class="primary w-20"
@click="step++"
>
Next
</VueButton>
<VueButton
v-else
class="primary w-20"
@click="$emit('hide')"
>
Continue
</VueButton>
</div>
</div>
</div>
</template>
<style lang="postcss" scoped>
p {
@apply my-2;
}
img {
@apply mx-auto my-4 max-w-full;
&:first-child {
@apply mt-0;
}
&:not(.logo) {
@apply border border-gray-200 dark:border-gray-700 rounded-md;
}
}
li {
@apply list-disc ml-6;
}
h2 {
@apply text-green-500 text-lg;
}
a {
@apply text-green-500;
}
</style>