Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,920 --> 00:00:03,199
okay i'm going to give this a second
2
00:00:03,199 --> 00:00:06,240
just to check that everything is working
3
00:00:06,240 --> 00:00:09,520
maybe start up my terminal
4
00:00:09,840 --> 00:00:11,679
and get my list of things ready to go i
5
00:00:11,679 --> 00:00:13,280
like to just wait until youtube gives me
6
00:00:13,280 --> 00:00:15,040
feedback and says
7
00:00:15,040 --> 00:00:16,400
um that it is actually receiving my
8
00:00:16,400 --> 00:00:17,840
stream which can usually take a couple
9
00:00:17,840 --> 00:00:19,279
of seconds
10
00:00:19,279 --> 00:00:20,800
and there we go it looks like
11
00:00:20,800 --> 00:00:22,240
everything's running okay let me know if
12
00:00:22,240 --> 00:00:25,119
it's not and um we can dive right in
13
00:00:25,119 --> 00:00:27,279
so basically i wanted to do a video
14
00:00:27,279 --> 00:00:29,439
series that helps you get up and running
15
00:00:29,439 --> 00:00:31,599
with the latest in the quasar world and
16
00:00:31,599 --> 00:00:33,040
since um i don't really have the
17
00:00:33,040 --> 00:00:34,800
resources and time right now to create a
18
00:00:34,800 --> 00:00:36,640
dedicated series to this i thought i'd
19
00:00:36,640 --> 00:00:38,239
try and cover basically as much as i
20
00:00:38,239 --> 00:00:40,320
could in a live stream
21
00:00:40,320 --> 00:00:41,760
and then later on we can turn it into
22
00:00:41,760 --> 00:00:43,440
something more robust because right now
23
00:00:43,440 --> 00:00:45,200
my focus is covering all of quasar's
24
00:00:45,200 --> 00:00:48,079
components so um which by the way if you
25
00:00:48,079 --> 00:00:49,280
want to check that out then definitely
26
00:00:49,280 --> 00:00:51,280
head on over to github
27
00:00:51,280 --> 00:00:53,760
and you want to look at quasar car
28
00:00:53,760 --> 00:00:56,160
take off this is basically a really nice
29
00:00:56,160 --> 00:00:58,399
environment for learning um and you can
30
00:00:58,399 --> 00:00:59,600
watch this video as well which gives you
31
00:00:59,600 --> 00:01:01,120
more of an idea of what it is but if you
32
00:01:01,120 --> 00:01:02,960
want to learn quasars components
33
00:01:02,960 --> 00:01:04,400
basically you want to check out this
34
00:01:04,400 --> 00:01:05,360
repo
35
00:01:05,360 --> 00:01:06,640
all right but anyway that's not what
36
00:01:06,640 --> 00:01:08,159
this video is about
37
00:01:08,159 --> 00:01:09,040
so
38
00:01:09,040 --> 00:01:10,560
first of all when i talk about what i'm
39
00:01:10,560 --> 00:01:12,080
not going to be covering i'm not going
40
00:01:12,080 --> 00:01:13,439
to be covering back-ends there are so
41
00:01:13,439 --> 00:01:15,119
many different back-ends
42
00:01:15,119 --> 00:01:17,119
later on i'm going to be talking about
43
00:01:17,119 --> 00:01:18,479
some of the different ones which is what
44
00:01:18,479 --> 00:01:20,000
i'm going to do here
45
00:01:20,000 --> 00:01:21,360
and i'm also not going to be talking
46
00:01:21,360 --> 00:01:24,320
about architecture because architecture
47
00:01:24,320 --> 00:01:25,840
it just goes way beyond the scope of
48
00:01:25,840 --> 00:01:27,520
what i want to cover today
49
00:01:27,520 --> 00:01:28,880
so basically we're going to build out
50
00:01:28,880 --> 00:01:31,040
like a bit of a i guess like a bit of an
51
00:01:31,040 --> 00:01:32,479
admin panel i don't really know how this
52
00:01:32,479 --> 00:01:33,520
is going to pan out we're just going to
53
00:01:33,520 --> 00:01:36,159
do some coding but the main goal of this
54
00:01:36,159 --> 00:01:38,960
uh video stream is to basically give you
55
00:01:38,960 --> 00:01:41,520
a good idea of how to get up and running
56
00:01:41,520 --> 00:01:43,920
with quasar today with a lot of the more
57
00:01:43,920 --> 00:01:46,640
modern technologies all right so
58
00:01:46,640 --> 00:01:48,159
without further ado
59
00:01:48,159 --> 00:01:49,600
let's get started let me just zoom in a
60
00:01:49,600 --> 00:01:50,799
little bit here
61
00:01:50,799 --> 00:01:53,280
and now instead of saying quasar create
62
00:01:53,280 --> 00:01:55,040
and then the name of the app so for
63
00:01:55,040 --> 00:01:57,600
example my dash app
64
00:01:57,600 --> 00:01:59,040
um you'll notice and by the way this is
65
00:01:59,040 --> 00:02:00,880
if you have the latest quasar cli so if
66
00:02:00,880 --> 00:02:02,000
you don't have the latest version of the
67
00:02:02,000 --> 00:02:04,479
quasar cli make sure you pull that in
68
00:02:04,479 --> 00:02:05,840
you'll notice that this doesn't work
69
00:02:05,840 --> 00:02:07,200
anymore it actually gives you a message
70
00:02:07,200 --> 00:02:09,280
telling you what to do now so now we can
71
00:02:09,280 --> 00:02:11,440
just say yarn create quasar and that
72
00:02:11,440 --> 00:02:12,640
actually means that you don't even need
73
00:02:12,640 --> 00:02:15,040
the quasar cli any at all to the best of
74
00:02:15,040 --> 00:02:16,560
my knowledge so we're going to go ahead
75
00:02:16,560 --> 00:02:19,520
and run that yarn create quasa yarn
76
00:02:19,520 --> 00:02:20,840
create
77
00:02:20,840 --> 00:02:23,360
quasar and it's going to ask us a bunch
78
00:02:23,360 --> 00:02:24,879
of questions and i'm going to show you
79
00:02:24,879 --> 00:02:26,239
the questions that you're likely to
80
00:02:26,239 --> 00:02:28,959
going to want to answer to now quasar ui
81
00:02:28,959 --> 00:02:30,560
kit if you want to create your own app
82
00:02:30,560 --> 00:02:32,080
extension so if you're a more advanced
83
00:02:32,080 --> 00:02:33,360
user and you want to create an app
84
00:02:33,360 --> 00:02:36,480
extension um that basically creates
85
00:02:36,480 --> 00:02:39,120
reusable functionality in quasar that's
86
00:02:39,120 --> 00:02:41,280
what that's about um
87
00:02:41,280 --> 00:02:42,959
and that's for us specifically for uis
88
00:02:42,959 --> 00:02:44,239
if you want to create your own quasar
89
00:02:44,239 --> 00:02:47,760
component uh ie here app extension is
90
00:02:47,760 --> 00:02:49,840
for other stuff like tapping into veet
91
00:02:49,840 --> 00:02:52,000
or webpack and being able to do fancy
92
00:02:52,000 --> 00:02:53,680
stuff like that tapping into boot files
93
00:02:53,680 --> 00:02:55,840
so basically installing view plugins all
94
00:02:55,840 --> 00:02:57,280
of that kind of thing you can extend
95
00:02:57,280 --> 00:02:59,440
quasar with an app extension and then
96
00:02:59,440 --> 00:03:00,879
this first option here is likely the one
97
00:03:00,879 --> 00:03:01,920
you want to choose where you're actually
98
00:03:01,920 --> 00:03:03,840
going to create a quasar app so i'll
99
00:03:03,840 --> 00:03:06,720
select that and let's call this um
100
00:03:06,720 --> 00:03:08,640
quasar
101
00:03:08,640 --> 00:03:09,760
admin
102
00:03:09,760 --> 00:03:11,200
panel i don't know i don't even know
103
00:03:11,200 --> 00:03:12,400
that's what it'll pan out to be to be
104
00:03:12,400 --> 00:03:14,959
honest now quasar version 2 using view 3
105
00:03:14,959 --> 00:03:16,400
that's most likely what you want to
106
00:03:16,400 --> 00:03:18,239
choose if there's a very small chance
107
00:03:18,239 --> 00:03:19,360
that you want to choose this option and
108
00:03:19,360 --> 00:03:20,879
use v2 so i only do that if you
109
00:03:20,879 --> 00:03:22,959
absolutely need to we definitely want to
110
00:03:22,959 --> 00:03:25,200
use quasar version 2 with view 3 under
111
00:03:25,200 --> 00:03:27,040
the hood you can choose typescript if
112
00:03:27,040 --> 00:03:29,040
you like um so i hit just so i can hit a
113
00:03:29,040 --> 00:03:30,239
wider audience i'm going to choose
114
00:03:30,239 --> 00:03:32,239
javascript though typescript is working
115
00:03:32,239 --> 00:03:34,560
really nicely with quasar these days
116
00:03:34,560 --> 00:03:35,680
now you've got the choice between
117
00:03:35,680 --> 00:03:37,840
webpack and veet veet is currently in
118
00:03:37,840 --> 00:03:38,799
beta
119
00:03:38,799 --> 00:03:39,840
in my experience with it it's
120
00:03:39,840 --> 00:03:41,519
surprisingly stable though so i'm going
121
00:03:41,519 --> 00:03:43,280
to choose veet and chances are you're
122
00:03:43,280 --> 00:03:44,720
watching this in the future vt is going
123
00:03:44,720 --> 00:03:46,640
to be stable and you almost certainly
124
00:03:46,640 --> 00:03:48,080
want to use vita unless there are some
125
00:03:48,080 --> 00:03:49,599
specific webpack plugins that you want
126
00:03:49,599 --> 00:03:51,519
to use so let's go to veet
127
00:03:51,519 --> 00:03:53,680
um package name quasar admin panel is
128
00:03:53,680 --> 00:03:55,120
what i'm going to choose
129
00:03:55,120 --> 00:03:56,959
um project product name i'm just going
130
00:03:56,959 --> 00:03:58,720
to leave that as the default description
131
00:03:58,720 --> 00:04:01,599
this is all just like package.json stuff
132
00:04:01,599 --> 00:04:03,920
author i'll leave that as the default
133
00:04:03,920 --> 00:04:05,920
and we'll use sas with scss of course
134
00:04:05,920 --> 00:04:07,439
you've got um the other option of using
135
00:04:07,439 --> 00:04:08,879
sas um
136
00:04:08,879 --> 00:04:12,000
the indented syntax or no sassador so if
137
00:04:12,000 --> 00:04:13,040
you don't want to use sas you just want
138
00:04:13,040 --> 00:04:14,879
to use plain css you can go ahead and do
139
00:04:14,879 --> 00:04:17,680
that but i'm going to use sas with scss
140
00:04:17,680 --> 00:04:19,040
and now i can choose some of the options
141
00:04:19,040 --> 00:04:21,358
here eslint you definitely want to use a
142
00:04:21,358 --> 00:04:22,960
lint up there's a very small change that
143
00:04:22,960 --> 00:04:24,560
you don't so make sure that you've got
144
00:04:24,560 --> 00:04:26,160
eslint selected
145
00:04:26,160 --> 00:04:27,919
state management you can use pina and
146
00:04:27,919 --> 00:04:29,919
vuex i probably should cover it at some
147
00:04:29,919 --> 00:04:31,040
point but i don't think i'll have time
148
00:04:31,040 --> 00:04:32,720
in this video if you want to learn how
149
00:04:32,720 --> 00:04:34,560
to use pina or vuex and there are other
150
00:04:34,560 --> 00:04:36,720
videos out there for that there really
151
00:04:36,720 --> 00:04:38,479
is no difference between using pina in
152
00:04:38,479 --> 00:04:40,720
another project and using it in quasar
153
00:04:40,720 --> 00:04:42,479
um so if you want you can choose pina
154
00:04:42,479 --> 00:04:43,919
then quasar is basically just going to
155
00:04:43,919 --> 00:04:45,360
do some scaffolding to get that up and
156
00:04:45,360 --> 00:04:48,320
running for you um same with ux um i use
157
00:04:48,320 --> 00:04:50,400
vue x a lot only because i use a plugin
158
00:04:50,400 --> 00:04:52,639
called ux orm which gives me an orm on
159
00:04:52,639 --> 00:04:55,040
top of ux however you're probably best
160
00:04:55,040 --> 00:04:57,280
off leaning more towards pina
161
00:04:57,280 --> 00:04:58,800
for managing your data and if you don't
162
00:04:58,800 --> 00:05:00,000
know what any of these two are that's
163
00:05:00,000 --> 00:05:01,840
totally fine you don't actually need to
164
00:05:01,840 --> 00:05:03,680
the other thing we have it axios that's
165
00:05:03,680 --> 00:05:05,919
just for making back-end requests um we
166
00:05:05,919 --> 00:05:07,520
probably won't need that and even if i
167
00:05:07,520 --> 00:05:09,120
do use axial so i usually just install
168
00:05:09,120 --> 00:05:11,440
that on my own manually um and then for
169
00:05:11,440 --> 00:05:13,120
internationalization you've got view
170
00:05:13,120 --> 00:05:15,199
i18n so there we go we're just going to
171
00:05:15,199 --> 00:05:17,120
choose eslint in this example
172
00:05:17,120 --> 00:05:18,560
and you've got the choice between pretty
173
00:05:18,560 --> 00:05:20,639
r standard and airbnb now these are
174
00:05:20,639 --> 00:05:22,880
eslint presets prettier means that
175
00:05:22,880 --> 00:05:24,240
you're going to use prettier which does
176
00:05:24,240 --> 00:05:26,720
a bit of extra formatting on top um i
177
00:05:26,720 --> 00:05:28,240
don't like using prettier i find that it
178
00:05:28,240 --> 00:05:30,320
gets in the way um and i don't like a
179
00:05:30,320 --> 00:05:31,680
lot of the formatting that it does
180
00:05:31,680 --> 00:05:33,440
however a lot of people swear by it and
181
00:05:33,440 --> 00:05:34,960
love it if you like pretty other then go
182
00:05:34,960 --> 00:05:36,400
ahead and use it i'm just going to use
183
00:05:36,400 --> 00:05:38,320
standard which is plenty for what i like
184
00:05:38,320 --> 00:05:40,400
to use in terms of a linter
185
00:05:40,400 --> 00:05:41,759
if you don't know what linting is it's
186
00:05:41,759 --> 00:05:42,960
okay you'll find out later on in this
187
00:05:42,960 --> 00:05:44,560
video now let's go ahead and set
188
00:05:44,560 --> 00:05:45,919
everything up we're going to use yarn
189
00:05:45,919 --> 00:05:47,199
now to go ahead and install those
190
00:05:47,199 --> 00:05:48,800
dependencies
191
00:05:48,800 --> 00:05:50,160
and when they're done while that's
192
00:05:50,160 --> 00:05:51,199
installing i'll just run through what
193
00:05:51,199 --> 00:05:53,440
we're going to cover next oh so what do
194
00:05:53,440 --> 00:05:54,880
all the getting started options mean i
195
00:05:54,880 --> 00:05:56,560
did want to cover that
196
00:05:56,560 --> 00:05:59,680
so if we go to quasar.dev
197
00:05:59,680 --> 00:06:01,759
and we go to the getting started section
198
00:06:01,759 --> 00:06:02,880
you'll notice that there's a lot of
199
00:06:02,880 --> 00:06:04,639
quasar flavors is what they're calling
200
00:06:04,639 --> 00:06:07,440
it now if this overwhelms you just
201
00:06:07,440 --> 00:06:10,880
choose the quasar cli option okay it's
202
00:06:10,880 --> 00:06:13,280
honestly um in most ways it's better
203
00:06:13,280 --> 00:06:15,360
than any other options these other
204
00:06:15,360 --> 00:06:17,520
options are only available really so
205
00:06:17,520 --> 00:06:19,600
that other people have a way into the
206
00:06:19,600 --> 00:06:21,280
quasar world if they don't have the
207
00:06:21,280 --> 00:06:23,919
luxury of using quasar cli so for
208
00:06:23,919 --> 00:06:26,000
example if you want to gradually add
209
00:06:26,000 --> 00:06:27,520
quasar into a project you're going to
210
00:06:27,520 --> 00:06:30,479
use umd standalone now that basically
211
00:06:30,479 --> 00:06:32,560
means that you can add it to the top of
212
00:06:32,560 --> 00:06:34,080
your project like it's showing here so
213
00:06:34,080 --> 00:06:35,600
you're just adding in link and script
214
00:06:35,600 --> 00:06:37,680
tags and then you can go ahead and just
215
00:06:37,680 --> 00:06:39,680
basically start using quasar in your app
216
00:06:39,680 --> 00:06:42,000
so if you don't have a build set up and
217
00:06:42,000 --> 00:06:43,919
you want to start using quasar that's
218
00:06:43,919 --> 00:06:46,160
why you would use umd standalone there's
219
00:06:46,160 --> 00:06:47,759
no other reason really you would use
220
00:06:47,759 --> 00:06:49,680
that it's more like to make quasar more
221
00:06:49,680 --> 00:06:51,199
progressive so if somebody wants to
222
00:06:51,199 --> 00:06:53,280
gradually add quasi into their project
223
00:06:53,280 --> 00:06:55,199
they can or if someone's stuck in a
224
00:06:55,199 --> 00:06:56,400
world where they can't use a build
225
00:06:56,400 --> 00:06:59,440
process then you've got umd standalone
226
00:06:59,440 --> 00:07:00,880
then you've got the veep plug-in now
227
00:07:00,880 --> 00:07:02,080
this has caused a little bit of
228
00:07:02,080 --> 00:07:05,039
confusion you've got the quasar cli
229
00:07:05,039 --> 00:07:07,280
plug-in for veet and then you've got the
230
00:07:07,280 --> 00:07:08,880
veep plug-in so
231
00:07:08,880 --> 00:07:10,479
quasar cli
232
00:07:10,479 --> 00:07:12,160
basically means that you're going to be
233
00:07:12,160 --> 00:07:13,680
able to export to all the different
234
00:07:13,680 --> 00:07:15,599
platforms and quasar can do a whole
235
00:07:15,599 --> 00:07:17,759
bunch of work for you in terms of like
236
00:07:17,759 --> 00:07:19,919
building your app and um
237
00:07:19,919 --> 00:07:21,199
you know all sorts of cool stuff like
238
00:07:21,199 --> 00:07:22,080
that
239
00:07:22,080 --> 00:07:23,440
whereas with the vip and they've got
240
00:07:23,440 --> 00:07:24,960
like a little table on the page that
241
00:07:24,960 --> 00:07:26,479
shows you uh i don't know where it is
242
00:07:26,479 --> 00:07:27,759
it's probably somewhere else here we go
243
00:07:27,759 --> 00:07:29,120
that that shows you the differences
244
00:07:29,120 --> 00:07:31,599
between the more but basically
245
00:07:31,599 --> 00:07:34,319
um the v plug-in means if you already
246
00:07:34,319 --> 00:07:37,039
have a veep project up and running or if
247
00:07:37,039 --> 00:07:39,520
for some reason you need to use it as a
248
00:07:39,520 --> 00:07:40,880
veep plug-in
249
00:07:40,880 --> 00:07:44,160
then you can basically add quasar to an
250
00:07:44,160 --> 00:07:47,360
existing veep project okay so if you
251
00:07:47,360 --> 00:07:49,840
have a veep project you can now inject
252
00:07:49,840 --> 00:07:51,759
quasar into that project that's what the
253
00:07:51,759 --> 00:07:53,360
veep plug-in is
254
00:07:53,360 --> 00:07:55,599
now for quasar cli
255
00:07:55,599 --> 00:07:57,599
it's got a veet option okay you've got
256
00:07:57,599 --> 00:08:01,120
the choice between webpack and vt
257
00:08:01,120 --> 00:08:02,720
and that is slightly different like i
258
00:08:02,720 --> 00:08:04,720
said before that means that quasar as a
259
00:08:04,720 --> 00:08:06,800
cli tool can give you a whole lot of
260
00:08:06,800 --> 00:08:09,599
extra features on top of quasar and
261
00:08:09,599 --> 00:08:11,280
basically help you get started a lot
262
00:08:11,280 --> 00:08:13,199
faster it is kind of hard to explain the
263
00:08:13,199 --> 00:08:15,120
differences between these um without
264
00:08:15,120 --> 00:08:16,720
going further into it i recommend that
265
00:08:16,720 --> 00:08:19,520
you just use the quasar cli um
266
00:08:19,520 --> 00:08:22,160
with vt it is better at the moment but
267
00:08:22,160 --> 00:08:24,560
i'd start with that and then go into um
268
00:08:24,560 --> 00:08:27,360
yeah stable and then um you know it'll
269
00:08:27,360 --> 00:08:29,199
be it'll be stable
270
00:08:29,199 --> 00:08:31,280
uh soon enough
271
00:08:31,280 --> 00:08:33,120
uh so what else have we got then we've
272
00:08:33,120 --> 00:08:35,200
got the vue cli plug-in so i know that
273
00:08:35,200 --> 00:08:36,958
there's there's a lot of options here
274
00:08:36,958 --> 00:08:39,440
basically the vue cli plug-in
275
00:08:39,440 --> 00:08:40,559
um
276
00:08:40,559 --> 00:08:42,958
view first had view cli
277
00:08:42,958 --> 00:08:46,240
and then view uh evan created veet
278
00:08:46,240 --> 00:08:47,360
okay so
279
00:08:47,360 --> 00:08:51,440
view cli is um basically a webpack tool
280
00:08:51,440 --> 00:08:52,640
that makes it
281
00:08:52,640 --> 00:08:55,200
easy to work with view and like add um
282
00:08:55,200 --> 00:08:57,200
plugins into view
283
00:08:57,200 --> 00:08:58,480
um
284
00:08:58,480 --> 00:09:00,480
using webpack under the hood so you can
285
00:09:00,480 --> 00:09:02,240
almost think of it as like view class
286
00:09:02,240 --> 00:09:05,920
webpack veed is um yeah well feet so
287
00:09:05,920 --> 00:09:07,600
this is just another way of doing it if
288
00:09:07,600 --> 00:09:09,519
you already have a view cli project and
289
00:09:09,519 --> 00:09:12,240
you need to use um quasar then that's
290
00:09:12,240 --> 00:09:14,640
why we have a vcli option available as
291
00:09:14,640 --> 00:09:16,240
well so i know this was a little bit
292
00:09:16,240 --> 00:09:17,680
long-winded basically at the end of the
293
00:09:17,680 --> 00:09:19,920
day try and go for the quasar cli if you
294
00:09:19,920 --> 00:09:23,519
can if you must use either the plugin or
295
00:09:23,519 --> 00:09:25,680
vcli plug-in if you really have no
296
00:09:25,680 --> 00:09:26,560
choice and you don't have a build
297
00:09:26,560 --> 00:09:29,920
process then go to umd standalone okay
298
00:09:29,920 --> 00:09:30,800
so
299
00:09:30,800 --> 00:09:33,200
this should all be um done by now
300
00:09:33,200 --> 00:09:35,600
hang on let me just get organized here
301
00:09:35,600 --> 00:09:36,720
and it looks like it is so now we're
302
00:09:36,720 --> 00:09:40,480
going to cd into our application
303
00:09:40,480 --> 00:09:43,519
and we're going to open that in code
304
00:09:43,519 --> 00:09:46,160
so give that a second to run
305
00:09:46,160 --> 00:09:48,000
and i'll zoom in a little bit here
306
00:09:48,000 --> 00:09:49,120
somebody said to me the other day it's
307
00:09:49,120 --> 00:09:50,480
not zoomed in enough i don't want to
308
00:09:50,480 --> 00:09:52,320
zoom in too far because i actually think
309
00:09:52,320 --> 00:09:54,080
it makes a worse experience at least in
310
00:09:54,080 --> 00:09:55,120
my
311
00:09:55,120 --> 00:09:57,200
experience as a learner so i think this
312
00:09:57,200 --> 00:09:58,399
should be enough but let me know if
313
00:09:58,399 --> 00:10:00,640
that's not zoomed in enough for you
314
00:10:00,640 --> 00:10:01,839
um
315
00:10:01,839 --> 00:10:03,600
now the next thing i've got on the list
316
00:10:03,600 --> 00:10:05,600
is changing the layout so a lot of the
317
00:10:05,600 --> 00:10:07,040
thing that a lot of people want to do
318
00:10:07,040 --> 00:10:08,640
actually let's just start by going
319
00:10:08,640 --> 00:10:10,720
quasar dev so it's going to start our
320
00:10:10,720 --> 00:10:14,399
dev server now when we run quasar dev
321
00:10:15,519 --> 00:10:17,200
and we'll just jump out of full screen
322
00:10:17,200 --> 00:10:18,720
here
323
00:10:18,720 --> 00:10:20,399
all right so that's um our dev server up
324
00:10:20,399 --> 00:10:21,440
and running and we're ready to start
325
00:10:21,440 --> 00:10:23,360
developing
326
00:10:23,360 --> 00:10:24,880
and
327
00:10:24,880 --> 00:10:26,560
oh i was about to talk about yeah so a
328
00:10:26,560 --> 00:10:27,680
lot of people want to know how to change
329
00:10:27,680 --> 00:10:29,200
the layout here by default you get this
330
00:10:29,200 --> 00:10:30,480
little um
331
00:10:30,480 --> 00:10:34,079
button that then opens up that left menu
332
00:10:34,079 --> 00:10:35,360
and you might want to have like another
333
00:10:35,360 --> 00:10:37,680
button here or like a footer down here
334
00:10:37,680 --> 00:10:39,360
and in order to do that quasar has a
335
00:10:39,360 --> 00:10:41,680
really cool tool so we go to tools here
336
00:10:41,680 --> 00:10:43,920
and then you jump into the layout
337
00:10:43,920 --> 00:10:46,480
builder
338
00:10:46,480 --> 00:10:48,320
then basically you can change the layout
339
00:10:48,320 --> 00:10:50,399
using the options here so we can say
340
00:10:50,399 --> 00:10:52,959
like i want a header yes i want a footer
341
00:10:52,959 --> 00:10:54,640
let's get rid of the footer option so
342
00:10:54,640 --> 00:10:56,079
that removes that footer at the bottom
343
00:10:56,079 --> 00:10:57,200
there
344
00:10:57,200 --> 00:10:58,720
i want a left side drawer let's keep
345
00:10:58,720 --> 00:11:00,160
that in and let's get rid of the right
346
00:11:00,160 --> 00:11:01,760
side draw
347
00:11:01,760 --> 00:11:03,680
navigation tabs here if you want to have
348
00:11:03,680 --> 00:11:06,160
them maybe we'll actually keep those in
349
00:11:06,160 --> 00:11:08,000
and what else have we got
350
00:11:08,000 --> 00:11:09,519
configuring layout parts so that's
351
00:11:09,519 --> 00:11:11,600
basically the details of how all of this
352
00:11:11,600 --> 00:11:13,760
sort of interacts i'll give you an
353
00:11:13,760 --> 00:11:15,519
example if we choose basically you can
354
00:11:15,519 --> 00:11:16,800
just play around with these options to
355
00:11:16,800 --> 00:11:18,720
get them how you like them so you know
356
00:11:18,720 --> 00:11:20,160
if you choose this option here then it
357
00:11:20,160 --> 00:11:22,000
means that the left drawer takes up a
358
00:11:22,000 --> 00:11:25,040
little bit of extra space
359
00:11:25,040 --> 00:11:26,959
another thing you can do is choose
360
00:11:26,959 --> 00:11:29,440
the capital letter l there versus the
361
00:11:29,440 --> 00:11:30,880
lowercase i can't remember what these
362
00:11:30,880 --> 00:11:32,720
all do i did a whole video on them but
363
00:11:32,720 --> 00:11:34,560
honestly i forget what they all do but
364
00:11:34,560 --> 00:11:36,079
this is a really powerful way to build
365
00:11:36,079 --> 00:11:37,200
out a layout and you can check out my
366
00:11:37,200 --> 00:11:38,079
layout video if you want more
367
00:11:38,079 --> 00:11:41,040
information on that um but i think i'm
368
00:11:41,040 --> 00:11:42,399
waffling a little bit here so let's
369
00:11:42,399 --> 00:11:44,240
click on export layout now
370
00:11:44,240 --> 00:11:47,760
and basically we can just copy this file
371
00:11:47,760 --> 00:11:50,639
jump back into quasar and if we go to
372
00:11:50,639 --> 00:11:51,600
source
373
00:11:51,600 --> 00:11:53,519
layouts we can grab that default layout
374
00:11:53,519 --> 00:11:54,880
that we have
375
00:11:54,880 --> 00:11:58,160
and just replace it with this one
376
00:11:58,160 --> 00:11:59,600
so there we go i've gone ahead and saved
377
00:11:59,600 --> 00:12:02,000
that and now we've got that new layout
378
00:12:02,000 --> 00:12:04,000
up and ready to go now obviously these
379
00:12:04,000 --> 00:12:05,360
tabs don't do anything yet which is why
380
00:12:05,360 --> 00:12:07,200
i'm getting a blank page there but um
381
00:12:07,200 --> 00:12:08,880
let's check we don't have any console
382
00:12:08,880 --> 00:12:12,160
problems and looks like we don't and so
383
00:12:12,160 --> 00:12:13,519
yeah you get the idea that's how you can
384
00:12:13,519 --> 00:12:15,440
basically build out the layout that you
385
00:12:15,440 --> 00:12:17,360
want just jump onto this page play
386
00:12:17,360 --> 00:12:19,040
around with it and get it to look
387
00:12:19,040 --> 00:12:21,440
exactly how you want it to look okay so
388
00:12:21,440 --> 00:12:23,120
let's close out of that now move on to
389
00:12:23,120 --> 00:12:25,360
the next thing which is routing all
390
00:12:25,360 --> 00:12:26,639
right so maybe we can make it so that
391
00:12:26,639 --> 00:12:28,800
page one page two page three for example
392
00:12:28,800 --> 00:12:30,720
is going to show a different page on
393
00:12:30,720 --> 00:12:32,000
here that's probably a good thing to
394
00:12:32,000 --> 00:12:33,600
tackle next
395
00:12:33,600 --> 00:12:34,959
all right so the first thing to do is
396
00:12:34,959 --> 00:12:37,120
probably to
397
00:12:37,120 --> 00:12:38,880
set up the routing for those pages so
398
00:12:38,880 --> 00:12:40,800
we'll jump into router and we'll jump
399
00:12:40,800 --> 00:12:43,200
into routes.js
400
00:12:43,200 --> 00:12:44,880
and basically we want to say we want to
401
00:12:44,880 --> 00:12:47,600
create a page for page one
402
00:12:47,600 --> 00:12:50,800
so how about we come in here
403
00:12:50,800 --> 00:12:52,399
and we create another option here i
404
00:12:52,399 --> 00:12:54,639
might just close out that menu
405
00:12:54,639 --> 00:12:56,959
and i like to organize this a little bit
406
00:12:56,959 --> 00:12:58,880
differently i like to have it spaced out
407
00:12:58,880 --> 00:13:00,320
a little bit more i think it's easy to
408
00:13:00,320 --> 00:13:02,079
look at
409
00:13:02,079 --> 00:13:04,320
there we go and
410
00:13:04,320 --> 00:13:06,160
let's basically just copy paste that
411
00:13:06,160 --> 00:13:08,560
down and say if you go to the path
412
00:13:08,560 --> 00:13:09,519
of
413
00:13:09,519 --> 00:13:10,880
one
414
00:13:10,880 --> 00:13:12,880
then i want you to take me to pages
415
00:13:12,880 --> 00:13:14,160
slash
416
00:13:14,160 --> 00:13:15,600
and we'll call this
417
00:13:15,600 --> 00:13:17,440
one page all right we'll build that
418
00:13:17,440 --> 00:13:19,120
component in a second
419
00:13:19,120 --> 00:13:20,639
and we'll do the same for the other ones
420
00:13:20,639 --> 00:13:22,160
two and three
421
00:13:22,160 --> 00:13:25,040
so then we've got two page and we've got
422
00:13:25,040 --> 00:13:27,920
three page and we'll change that to two
423
00:13:27,920 --> 00:13:30,160
and we'll change that to three
424
00:13:30,160 --> 00:13:31,760
all right so basically what we're saying
425
00:13:31,760 --> 00:13:34,399
here if you go to the path of slash
426
00:13:34,399 --> 00:13:35,920
right which basically means nothing
427
00:13:35,920 --> 00:13:38,399
slash then we're going to be using the
428
00:13:38,399 --> 00:13:40,959
main layout all right that's the layout
429
00:13:40,959 --> 00:13:43,360
we're going to use this main layout
430
00:13:43,360 --> 00:13:44,320
then
431
00:13:44,320 --> 00:13:47,519
if you go to um slash nothing all right
432
00:13:47,519 --> 00:13:49,519
which is this page here we're going to
433
00:13:49,519 --> 00:13:52,480
inject this page the index page
434
00:13:52,480 --> 00:13:54,959
into that layout so this part that
435
00:13:54,959 --> 00:13:57,199
you're seeing in here that's the index
436
00:13:57,199 --> 00:13:58,959
page so this is the layout the thing
437
00:13:58,959 --> 00:14:00,399
that we pasted in before that's kind of
438
00:14:00,399 --> 00:14:02,000
the skeleton all of this around the
439
00:14:02,000 --> 00:14:04,399
outside and now this index page here is
440
00:14:04,399 --> 00:14:06,000
the part in the center
441
00:14:06,000 --> 00:14:08,079
all right so now if we go to one we're
442
00:14:08,079 --> 00:14:09,839
basically saying i want you to take this
443
00:14:09,839 --> 00:14:12,560
one page here and inject it into the
444
00:14:12,560 --> 00:14:15,040
center all right now that shouldn't work
445
00:14:15,040 --> 00:14:16,399
because i haven't actually created those
446
00:14:16,399 --> 00:14:17,920
pages yet
447
00:14:17,920 --> 00:14:19,839
so let's go ahead and create those pages
448
00:14:19,839 --> 00:14:21,680
and you can do that if i open up another
449
00:14:21,680 --> 00:14:24,240
terminal here by saying
450
00:14:24,240 --> 00:14:25,839
quasar
451
00:14:25,839 --> 00:14:28,240
i believe it's new page and we'll call
452
00:14:28,240 --> 00:14:30,639
this one page
453
00:14:30,639 --> 00:14:31,920
and then we'll do another one for two
454
00:14:31,920 --> 00:14:33,199
page
455
00:14:33,199 --> 00:14:35,440
two page
456
00:14:35,440 --> 00:14:37,519
and i'll do another one for three page
457
00:14:37,519 --> 00:14:39,199
three page
458
00:14:39,199 --> 00:14:40,399
all right now one more thing that i want
459
00:14:40,399 --> 00:14:42,240
to point out here is
460
00:14:42,240 --> 00:14:43,839
i said that this is the layout the
461
00:14:43,839 --> 00:14:45,920
skeleton of the outside and then
462
00:14:45,920 --> 00:14:48,000
um since this is sitting within its
463
00:14:48,000 --> 00:14:49,839
children that means it gets injected
464
00:14:49,839 --> 00:14:51,519
into that component how does it get
465
00:14:51,519 --> 00:14:53,199
injected into there
466
00:14:53,199 --> 00:14:55,600
well if we jump into main layout so i'm
467
00:14:55,600 --> 00:14:57,040
going to control click that to jump into
468
00:14:57,040 --> 00:14:59,279
there and scroll up see how it says
469
00:14:59,279 --> 00:15:00,880
router view here
470
00:15:00,880 --> 00:15:02,639
that's the part that gets injected into
471
00:15:02,639 --> 00:15:04,959
the center so if i comment this out
472
00:15:04,959 --> 00:15:07,600
notice that nothing shows up
473
00:15:07,600 --> 00:15:09,519
router view is basically saying hey this
474
00:15:09,519 --> 00:15:12,160
is where i want you to spit out if i
475
00:15:12,160 --> 00:15:13,600
come back here that's where i want you
476
00:15:13,600 --> 00:15:15,440
to spit out this component
477
00:15:15,440 --> 00:15:18,079
all right so now let's jump into
478
00:15:18,079 --> 00:15:19,519
one page
479
00:15:19,519 --> 00:15:20,720
actually we'll go back to the main
480
00:15:20,720 --> 00:15:22,800
layout here and now we need to link this
481
00:15:22,800 --> 00:15:24,480
up to go to
482
00:15:24,480 --> 00:15:26,639
those locations so
483
00:15:26,639 --> 00:15:28,800
here we go this is this here cue route
484
00:15:28,800 --> 00:15:31,360
tab is basically that page one
485
00:15:31,360 --> 00:15:33,040
and then same with the other one here is
486
00:15:33,040 --> 00:15:35,120
page two and i believe we made it if i
487
00:15:35,120 --> 00:15:36,560
go control p
488
00:15:36,560 --> 00:15:38,320
back to my routes yeah we just made it
489
00:15:38,320 --> 00:15:40,720
the words one two and three ctrl p back
490
00:15:40,720 --> 00:15:41,759
again
491
00:15:41,759 --> 00:15:44,079
so let's change that to one
492
00:15:44,079 --> 00:15:45,920
and two
493
00:15:45,920 --> 00:15:48,560
and three
494
00:15:48,560 --> 00:15:51,360
let's see if that works
495
00:15:51,360 --> 00:15:52,560
all right so we're getting some sort of
496
00:15:52,560 --> 00:15:55,199
an arrow just do a quick refresh here
497
00:15:55,199 --> 00:15:57,040
cannot read properties of undefined
498
00:15:57,040 --> 00:15:58,399
reading file all right so it looks like
499
00:15:58,399 --> 00:16:01,440
i've done something wrong
500
00:16:01,440 --> 00:16:03,279
i might just close the beat server out
501
00:16:03,279 --> 00:16:04,800
and start it up again just in case it's
502
00:16:04,800 --> 00:16:06,480
a problem
503
00:16:06,480 --> 00:16:09,680
with the dev server
504
00:16:09,680 --> 00:16:10,959
okay yeah there we go looks like i just
505
00:16:10,959 --> 00:16:13,199
needed to restart the server
506
00:16:13,199 --> 00:16:14,880
and looks like that's working but now we
507
00:16:14,880 --> 00:16:16,320
need to actually put some content in
508
00:16:16,320 --> 00:16:19,199
there so how about we go to page
509
00:16:19,199 --> 00:16:20,639
one page in fact i'll show you that in
510
00:16:20,639 --> 00:16:22,800
the file menu so to get there i went to
511
00:16:22,800 --> 00:16:25,279
source pages and when we created that
512
00:16:25,279 --> 00:16:27,120
page before it showed up here in one
513
00:16:27,120 --> 00:16:28,000
page
514
00:16:28,000 --> 00:16:29,360
and now let's just spit something out
515
00:16:29,360 --> 00:16:32,399
here one page save it and there we go
516
00:16:32,399 --> 00:16:33,920
now it shows up in there so that's how
517
00:16:33,920 --> 00:16:36,959
we're basically easily able to hook up
518
00:16:36,959 --> 00:16:40,000
these links here to an actual page
519
00:16:40,000 --> 00:16:42,399
and by doing it in this way by using
520
00:16:42,399 --> 00:16:44,720
this cue route tab component so if i go
521
00:16:44,720 --> 00:16:46,880
back to the layout
522
00:16:46,880 --> 00:16:49,199
this cue route tab component that means
523
00:16:49,199 --> 00:16:51,519
that we can essentially refresh the page
524
00:16:51,519 --> 00:16:53,920
and it takes us back to one page if i go
525
00:16:53,920 --> 00:16:56,079
to page two and refresh the page
526
00:16:56,079 --> 00:16:58,240
it takes us back to two page so this is
527
00:16:58,240 --> 00:17:00,399
going to link up the current page that
528
00:17:00,399 --> 00:17:02,480
is selected in that route tab
529
00:17:02,480 --> 00:17:04,959
with the route itself
530
00:17:04,959 --> 00:17:06,640
okay so hopefully that makes sense
531
00:17:06,640 --> 00:17:08,959
anyway let's move on to the next thing
532
00:17:08,959 --> 00:17:09,839
so
533
00:17:09,839 --> 00:17:12,240
that's routing covered let's uh do an
534
00:17:12,240 --> 00:17:14,400
introduction to the composition api with
535
00:17:14,400 --> 00:17:16,000
script set up right let me show you what
536
00:17:16,000 --> 00:17:17,439
i actually mean by that
537
00:17:17,439 --> 00:17:19,599
so if we go to one page now notice that
538
00:17:19,599 --> 00:17:21,599
we've got this export default section
539
00:17:21,599 --> 00:17:22,880
here
540
00:17:22,880 --> 00:17:26,000
um what we can do here is say
541
00:17:26,000 --> 00:17:27,359
setup for those of you that aren't
542
00:17:27,359 --> 00:17:28,640
familiar with script setup i'm going to
543
00:17:28,640 --> 00:17:30,880
get sorry um the composition api i'll
544
00:17:30,880 --> 00:17:33,919
give you a really really quick rundown
545
00:17:33,919 --> 00:17:35,280
so
546
00:17:35,280 --> 00:17:36,400
let's set
547
00:17:36,400 --> 00:17:37,360
this to
548
00:17:37,360 --> 00:17:41,440
a variable so we'll say pre tag there
549
00:17:41,440 --> 00:17:44,000
and we'll say my
550
00:17:44,000 --> 00:17:45,760
var
551
00:17:45,760 --> 00:17:49,600
and then we're going to say const
552
00:17:49,600 --> 00:17:53,039
my vi is equal to ref
553
00:17:53,039 --> 00:17:54,400
and the reason we're saying ref is
554
00:17:54,400 --> 00:17:56,000
that's views way of basically saying i
555
00:17:56,000 --> 00:17:58,960
want this to be a reactive variable and
556
00:17:58,960 --> 00:18:01,200
then we'll say um some
557
00:18:01,200 --> 00:18:04,000
message here
558
00:18:05,520 --> 00:18:07,440
and then what we have to do
559
00:18:07,440 --> 00:18:09,760
is return my message
560
00:18:09,760 --> 00:18:11,520
so what's happening here is i'm saying
561
00:18:11,520 --> 00:18:15,120
hey i want to create a myvar variable
562
00:18:15,120 --> 00:18:17,600
which is a reactive reference to this
563
00:18:17,600 --> 00:18:20,480
string here some message okay so this is
564
00:18:20,480 --> 00:18:24,080
how you create a reactive variable
565
00:18:24,080 --> 00:18:26,480
using the composition api okay so if
566
00:18:26,480 --> 00:18:29,440
you're using the options api in the past
567
00:18:29,440 --> 00:18:31,840
this is just like using um the data
568
00:18:31,840 --> 00:18:33,360
properties so it's just like doing this
569
00:18:33,360 --> 00:18:34,880
saying data
570
00:18:34,880 --> 00:18:36,640
return
571
00:18:36,640 --> 00:18:38,880
and then saying
572
00:18:38,880 --> 00:18:40,960
my var
573
00:18:40,960 --> 00:18:43,280
is equal to some message right
574
00:18:43,280 --> 00:18:46,480
these are essentially the same thing
575
00:18:46,480 --> 00:18:48,320
okay but there's a few benefits here
576
00:18:48,320 --> 00:18:49,360
which are going to start revealing
577
00:18:49,360 --> 00:18:51,679
themselves and what we have to do with
578
00:18:51,679 --> 00:18:53,440
the composition api is we have to do
579
00:18:53,440 --> 00:18:55,679
this return statement here and this is
580
00:18:55,679 --> 00:18:58,480
basically saying hey i want this
581
00:18:58,480 --> 00:19:01,919
variable to be available on the template
582
00:19:01,919 --> 00:19:03,919
okay so anything returned here is now
583
00:19:03,919 --> 00:19:05,120
available
584
00:19:05,120 --> 00:19:07,280
on the template up there
585
00:19:07,280 --> 00:19:08,720
all right and that's why it now shows up
586
00:19:08,720 --> 00:19:11,280
here as some message
587
00:19:11,280 --> 00:19:13,039
and now what we can do is we can say q
588
00:19:13,039 --> 00:19:14,960
dash input so this is quasi's input
589
00:19:14,960 --> 00:19:16,080
component
590
00:19:16,080 --> 00:19:18,799
v dash model so we're going to model
591
00:19:18,799 --> 00:19:21,440
my var here and now if i type something
592
00:19:21,440 --> 00:19:22,799
in there
593
00:19:22,799 --> 00:19:25,200
it changes um that message up there so
594
00:19:25,200 --> 00:19:27,120
it's reactive okay so that's what we
595
00:19:27,120 --> 00:19:29,520
mean by ref if we didn't make it a ref
596
00:19:29,520 --> 00:19:32,160
then it would not be reactive
597
00:19:32,160 --> 00:19:34,720
so let's do that
598
00:19:34,720 --> 00:19:37,200
and we need to comment that out
599
00:19:37,200 --> 00:19:39,200
and now if i change this it's no longer
600
00:19:39,200 --> 00:19:41,280
reactive all right so that's why we use
601
00:19:41,280 --> 00:19:42,960
the word ref there that's that's what's
602
00:19:42,960 --> 00:19:45,360
making it reactive now another thing we
603
00:19:45,360 --> 00:19:48,799
have is computed properties
604
00:19:48,799 --> 00:19:50,240
and i'm going to use like a really silly
605
00:19:50,240 --> 00:19:51,760
contrived example just to get this out
606
00:19:51,760 --> 00:19:53,440
of the way and show you quickly
607
00:19:53,440 --> 00:19:56,080
computed
608
00:19:56,160 --> 00:19:57,760
example
609
00:19:57,760 --> 00:20:00,080
is equal to
610
00:20:00,080 --> 00:20:02,080
and i will do a proper composition api
611
00:20:02,080 --> 00:20:05,039
video at some point now we can say myvar
612
00:20:05,039 --> 00:20:06,799
dot value so that's the next thing when
613
00:20:06,799 --> 00:20:09,280
you're using the composition api inside
614
00:20:09,280 --> 00:20:11,919
of setup you can't just refer to my var
615
00:20:11,919 --> 00:20:14,240
you have to refer to it as my var
616
00:20:14,240 --> 00:20:16,400
dot value if you want to look at that
617
00:20:16,400 --> 00:20:18,480
value or change it all right in the
618
00:20:18,480 --> 00:20:20,400
template we don't have to we can just
619
00:20:20,400 --> 00:20:23,240
say my var and behind the scenes it says
620
00:20:23,240 --> 00:20:24,960
myvar.value
621
00:20:24,960 --> 00:20:27,440
however inside of the template we have
622
00:20:27,440 --> 00:20:30,400
to say myvar.value
623
00:20:30,400 --> 00:20:31,760
is equal to
624
00:20:31,760 --> 00:20:34,799
something else um but sorry this is a
625
00:20:34,799 --> 00:20:36,960
computer property so now we can say
626
00:20:36,960 --> 00:20:40,400
return my var.value plus
627
00:20:40,400 --> 00:20:42,320
more text
628
00:20:42,320 --> 00:20:44,080
and now let's take that computed example
629
00:20:44,080 --> 00:20:46,559
and we need to pull computed
630
00:20:46,559 --> 00:20:49,120
out of view so i've just imported that
631
00:20:49,120 --> 00:20:52,880
and we'll import that directly from view
632
00:20:53,200 --> 00:20:54,720
now we've exposed it on the template
633
00:20:54,720 --> 00:20:56,400
that's what we've done here
634
00:20:56,400 --> 00:20:58,080
and now let's go ahead and just spit it
635
00:20:58,080 --> 00:21:01,880
out in a pre-tag there
636
00:21:02,159 --> 00:21:04,400
all right so some text and then more
637
00:21:04,400 --> 00:21:05,919
text so basically it's just added on
638
00:21:05,919 --> 00:21:08,880
this more text part here and that's also
639
00:21:08,880 --> 00:21:10,960
going to be reactive
640
00:21:10,960 --> 00:21:12,320
all right so that's how you do computer
641
00:21:12,320 --> 00:21:14,480
props using the composition api
642
00:21:14,480 --> 00:21:16,080
um the other thing is if you want if you
643
00:21:16,080 --> 00:21:17,840
want to use methods you can just do them
644
00:21:17,840 --> 00:21:20,159
directly in here so we can say for
645
00:21:20,159 --> 00:21:21,360
example
646
00:21:21,360 --> 00:21:22,159
um
647
00:21:22,159 --> 00:21:23,520
change
648
00:21:23,520 --> 00:21:25,039
to
649
00:21:25,039 --> 00:21:27,280
um
650
00:21:27,280 --> 00:21:29,840
change to luke to change it to my name
651
00:21:29,840 --> 00:21:31,840
and let's make that a function
652
00:21:31,840 --> 00:21:34,240
so function change to luke and now what
653
00:21:34,240 --> 00:21:36,960
we can do is say myvar.value
654
00:21:36,960 --> 00:21:39,280
is equal to luke
655
00:21:39,280 --> 00:21:40,960
and now we'll expose that here notice
656
00:21:40,960 --> 00:21:42,720
how linter is yelling at us it's helping
657
00:21:42,720 --> 00:21:44,559
us it's saying hey you're not even using
658
00:21:44,559 --> 00:21:46,559
this function that's a problem make sure
659
00:21:46,559 --> 00:21:48,000
you actually use the functions that you
660
00:21:48,000 --> 00:21:49,200
defined there
661
00:21:49,200 --> 00:21:51,120
okay so now we've got this function
662
00:21:51,120 --> 00:21:52,640
change luke and we'll just have a button
663
00:21:52,640 --> 00:21:53,760
here
664
00:21:53,760 --> 00:21:55,280
q dash button
665
00:21:55,280 --> 00:21:57,039
and then we'll say at click
666
00:21:57,039 --> 00:21:59,120
and we're going to call that change to
667
00:21:59,120 --> 00:22:02,000
luke function and quasar's buttons can
668
00:22:02,000 --> 00:22:04,000
have a label so we can say here change
669
00:22:04,000 --> 00:22:06,480
to luke
670
00:22:06,480 --> 00:22:08,080
and i'm going to click on that
671
00:22:08,080 --> 00:22:10,400
and it changes the text to luke alright
672
00:22:10,400 --> 00:22:12,080
so that's how you do methods with the
673
00:22:12,080 --> 00:22:14,400
composition api it's it's actually when
674
00:22:14,400 --> 00:22:15,919
you get used to the composition api
675
00:22:15,919 --> 00:22:17,360
you'll love it because it's very much
676
00:22:17,360 --> 00:22:19,679
just javascript it takes you out of this
677
00:22:19,679 --> 00:22:21,600
fancy world of the options api where
678
00:22:21,600 --> 00:22:23,200
some stuff is happening that feels a
679
00:22:23,200 --> 00:22:26,880
little bit um uh i guess
680
00:22:26,880 --> 00:22:28,880
like unflexible whereas you get this
681
00:22:28,880 --> 00:22:30,960
extra flexibility with the composition
682
00:22:30,960 --> 00:22:32,799
api where you can start like moving
683
00:22:32,799 --> 00:22:34,400
things into different files really
684
00:22:34,400 --> 00:22:35,440
easily
685
00:22:35,440 --> 00:22:37,360
but anyway i digress
686
00:22:37,360 --> 00:22:39,360
so i think that's about it there are a
687
00:22:39,360 --> 00:22:40,640
couple of things other things like
688
00:22:40,640 --> 00:22:41,919
dealing with props but i'm going to say
689
00:22:41,919 --> 00:22:43,840
that for later on that is the crux of
690
00:22:43,840 --> 00:22:45,760
using the composition api you just have
691
00:22:45,760 --> 00:22:46,720
refs
692
00:22:46,720 --> 00:22:48,960
um where you define um your variables
693
00:22:48,960 --> 00:22:51,520
like this you have computed properties
694
00:22:51,520 --> 00:22:53,840
very similar to using the options api
695
00:22:53,840 --> 00:22:55,280
but now i want to show you how to make
696
00:22:55,280 --> 00:22:56,080
this
697
00:22:56,080 --> 00:22:59,360
this syntax even nicer so what we can do
698
00:22:59,360 --> 00:23:01,039
is instead of using
699
00:23:01,039 --> 00:23:02,400
setup here
700
00:23:02,400 --> 00:23:04,559
we can come up here and say script and
701
00:23:04,559 --> 00:23:05,840
then the word
702
00:23:05,840 --> 00:23:07,919
setup and that means that we can
703
00:23:07,919 --> 00:23:09,679
actually get rid of all of this code
704
00:23:09,679 --> 00:23:13,520
here so this export default setup
705
00:23:13,520 --> 00:23:15,280
we can get rid of that
706
00:23:15,280 --> 00:23:17,520
i'll save it
707
00:23:17,520 --> 00:23:19,760
we can get rid of return because when
708
00:23:19,760 --> 00:23:21,600
you use script setup
709
00:23:21,600 --> 00:23:23,280
basically it does some stuff behind the
710
00:23:23,280 --> 00:23:25,840
scenes to notice what you have defined
711
00:23:25,840 --> 00:23:27,440
here so for example this function
712
00:23:27,440 --> 00:23:29,440
changed to luke
713
00:23:29,440 --> 00:23:31,679
without returning it now it's going to
714
00:23:31,679 --> 00:23:33,200
notice that we have this function and
715
00:23:33,200 --> 00:23:35,440
automatically make it available on the
716
00:23:35,440 --> 00:23:37,200
template for us
717
00:23:37,200 --> 00:23:38,720
okay so it does that for us behind the
718
00:23:38,720 --> 00:23:41,200
scenes and now our code looks a whole
719
00:23:41,200 --> 00:23:43,600
lot nicer and
720
00:23:43,600 --> 00:23:46,000
it still works alright so this is what
721
00:23:46,000 --> 00:23:48,720
we mean by script setup script setup
722
00:23:48,720 --> 00:23:50,799
basically allows us to get rid of that
723
00:23:50,799 --> 00:23:52,400
export default
724
00:23:52,400 --> 00:23:55,200
so instead of going export default
725
00:23:55,200 --> 00:23:56,720
setup
726
00:23:56,720 --> 00:23:58,080
and then doing everything inside of
727
00:23:58,080 --> 00:23:59,039
there
728
00:23:59,039 --> 00:24:00,799
um and instead of then returning
729
00:24:00,799 --> 00:24:02,880
everything inside of here we can get rid
730
00:24:02,880 --> 00:24:04,880
of all of that code
731
00:24:04,880 --> 00:24:07,039
and just do it flat inside of script
732
00:24:07,039 --> 00:24:10,159
it's really really nice way to code um
733
00:24:10,159 --> 00:24:12,480
using using quasar using view three so
734
00:24:12,480 --> 00:24:14,159
this is a view three
735
00:24:14,159 --> 00:24:15,919
feature this is an a quasar thing this
736
00:24:15,919 --> 00:24:18,559
is a view three thing any v3 app with a
737
00:24:18,559 --> 00:24:20,159
compiler is going to allow you to do
738
00:24:20,159 --> 00:24:21,360
this
739
00:24:21,360 --> 00:24:22,799
uh all right so
740
00:24:22,799 --> 00:24:25,039
that's about it for
741
00:24:25,039 --> 00:24:26,640
um
742
00:24:26,640 --> 00:24:28,240
for that that's an introduction to the
743
00:24:28,240 --> 00:24:30,159
composition api now the next thing i
744
00:24:30,159 --> 00:24:32,400
have on my list is building a basic
745
00:24:32,400 --> 00:24:34,400
login page so how about we make this
746
00:24:34,400 --> 00:24:35,679
page one
747
00:24:35,679 --> 00:24:37,600
a login page so i'm going to jump into
748
00:24:37,600 --> 00:24:39,200
my layouts
749
00:24:39,200 --> 00:24:40,640
main layout
750
00:24:40,640 --> 00:24:42,080
and then we're going to change this from
751
00:24:42,080 --> 00:24:43,919
1 to
752
00:24:43,919 --> 00:24:45,679
log in
753
00:24:45,679 --> 00:24:47,600
and then let's call this
754
00:24:47,600 --> 00:24:48,720
login
755
00:24:48,720 --> 00:24:50,080
there we go so now we've got login
756
00:24:50,080 --> 00:24:51,360
showing up there
757
00:24:51,360 --> 00:24:53,520
but that link will no longer work
758
00:24:53,520 --> 00:24:55,120
because we now need to change the route
759
00:24:55,120 --> 00:24:56,480
that it's going to
760
00:24:56,480 --> 00:24:58,559
so we go to router
761
00:24:58,559 --> 00:24:59,600
routes
762
00:24:59,600 --> 00:25:02,559
and we say hey router if you go to slash
763
00:25:02,559 --> 00:25:03,840
and then
764
00:25:03,840 --> 00:25:06,240
login i want you to take me to one page
765
00:25:06,240 --> 00:25:08,320
but let's actually change that to
766
00:25:08,320 --> 00:25:10,080
login page
767
00:25:10,080 --> 00:25:12,640
and then i'm going to jump into pages
768
00:25:12,640 --> 00:25:16,320
one page or right click and i say rename
769
00:25:16,320 --> 00:25:19,440
and call that login page now
770
00:25:19,440 --> 00:25:21,520
and i might need to
771
00:25:21,520 --> 00:25:23,279
shut my server down a lot of this stuff
772
00:25:23,279 --> 00:25:24,880
is probably going to be fixed soon with
773
00:25:24,880 --> 00:25:26,880
the vcli plugin so
774
00:25:26,880 --> 00:25:28,240
it's just a couple of tiny things like
775
00:25:28,240 --> 00:25:29,679
that that might not
776
00:25:29,679 --> 00:25:30,640
um
777
00:25:30,640 --> 00:25:31,919
work straight out until some of those
778
00:25:31,919 --> 00:25:33,279
bugs are ironed out
779
00:25:33,279 --> 00:25:34,960
so now we can go to the login page and
780
00:25:34,960 --> 00:25:36,799
there we go it shows up
781
00:25:36,799 --> 00:25:38,880
so let's get rid of all of this and
782
00:25:38,880 --> 00:25:40,080
start from scratch this is going to be
783
00:25:40,080 --> 00:25:41,520
good practice
784
00:25:41,520 --> 00:25:43,840
and inside of this cue page
785
00:25:43,840 --> 00:25:46,880
i'm going to have a cue dash card
786
00:25:46,880 --> 00:25:48,159
and i'll just show you what that looks
787
00:25:48,159 --> 00:25:50,080
like oh we've got nothing in it so you
788
00:25:50,080 --> 00:25:51,760
need to have some stuff in it a cute
789
00:25:51,760 --> 00:25:54,159
card is just a very very basic component
790
00:25:54,159 --> 00:25:57,840
that gives you a shadow on the bottom
791
00:25:58,159 --> 00:25:59,919
and gives you kind of like that cardi
792
00:25:59,919 --> 00:26:02,080
sort of feel and now i can say inside of
793
00:26:02,080 --> 00:26:04,880
here q card dash section so a section
794
00:26:04,880 --> 00:26:06,720
inside of the card which is going to add
795
00:26:06,720 --> 00:26:08,400
a little bit of padding in there so you
796
00:26:08,400 --> 00:26:10,080
can say here for example content and
797
00:26:10,080 --> 00:26:12,400
notice we get that extra padding now and
798
00:26:12,400 --> 00:26:13,919
what i want to do is give this a maximum
799
00:26:13,919 --> 00:26:16,159
wix so width so i'll say style is equal
800
00:26:16,159 --> 00:26:18,000
to max dash width
801
00:26:18,000 --> 00:26:20,400
and i reckon about 600 pixels is
802
00:26:20,400 --> 00:26:21,760
probably good for
803
00:26:21,760 --> 00:26:23,360
a login form let's see what that looks
804
00:26:23,360 --> 00:26:24,559
like that's probably too much to be
805
00:26:24,559 --> 00:26:27,520
honest how about we go like 450.
806
00:26:27,520 --> 00:26:29,200
there we go so it's put a bit of a width
807
00:26:29,200 --> 00:26:30,960
on that i want this to be in the center
808
00:26:30,960 --> 00:26:32,960
of the page so what we can actually do
809
00:26:32,960 --> 00:26:35,279
is say the class is equal to and used we
810
00:26:35,279 --> 00:26:37,760
can now use some of quasars utility
811
00:26:37,760 --> 00:26:39,760
classes which it gives us out of the box
812
00:26:39,760 --> 00:26:41,120
and we can say hey i want this to be
813
00:26:41,120 --> 00:26:44,320
flex and then flex dash center this is a
814
00:26:44,320 --> 00:26:46,640
really really nice way to just center
815
00:26:46,640 --> 00:26:48,320
something on the page
816
00:26:48,320 --> 00:26:49,679
now notice that it's lost the width
817
00:26:49,679 --> 00:26:51,200
there if you wanted to still take up
818
00:26:51,200 --> 00:26:53,600
that full width so that maximum width
819
00:26:53,600 --> 00:26:55,360
that we've got we can add a class on
820
00:26:55,360 --> 00:26:58,799
this card called full width
821
00:26:58,799 --> 00:27:00,320
all right so these these patterns that
822
00:27:00,320 --> 00:27:02,400
i'm showing you right now flex flex
823
00:27:02,400 --> 00:27:03,520
center
824
00:27:03,520 --> 00:27:05,200
full width and then having a max width
825
00:27:05,200 --> 00:27:07,600
on a card this is really common i do
826
00:27:07,600 --> 00:27:09,760
this kind of thing all the time this is
827
00:27:09,760 --> 00:27:11,840
a really good pattern to know all right
828
00:27:11,840 --> 00:27:14,559
so let's turn this into a login card how
829
00:27:14,559 --> 00:27:15,760
about we say
830
00:27:15,760 --> 00:27:17,600
log in there you might want that to be
831
00:27:17,600 --> 00:27:18,960
centered so we've got some utility
832
00:27:18,960 --> 00:27:21,440
classes for that class is equal to text
833
00:27:21,440 --> 00:27:24,320
dash center and now that login text is
834
00:27:24,320 --> 00:27:26,320
centered i'm also going to say style is
835
00:27:26,320 --> 00:27:28,679
equal to font dash size
836
00:27:28,679 --> 00:27:31,039
1.3 em
837
00:27:31,039 --> 00:27:32,559
yeah for basic stuff like this i
838
00:27:32,559 --> 00:27:34,880
actually use the style tag quite a bit i
839
00:27:34,880 --> 00:27:36,000
know a lot of people don't like the
840
00:27:36,000 --> 00:27:37,279
style tag
841
00:27:37,279 --> 00:27:38,720
um
842
00:27:38,720 --> 00:27:40,240
do what you like if you'd rather just do
843
00:27:40,240 --> 00:27:42,480
this in pure css that's totally fine for
844
00:27:42,480 --> 00:27:44,240
simple things like this that are
845
00:27:44,240 --> 00:27:46,240
one-liners i'm totally fine with using a
846
00:27:46,240 --> 00:27:48,880
style tag i actually find it easier now
847
00:27:48,880 --> 00:27:50,399
one thing that's annoying me right now
848
00:27:50,399 --> 00:27:53,200
is i don't like this layout i want all
849
00:27:53,200 --> 00:27:55,120
of this to be on new lines
850
00:27:55,120 --> 00:27:56,799
and this is the quote-unquote view way
851
00:27:56,799 --> 00:27:58,640
of doing things you usually have when
852
00:27:58,640 --> 00:28:00,720
there's more than one property on you'll
853
00:28:00,720 --> 00:28:02,640
usually have those on new lines so what
854
00:28:02,640 --> 00:28:04,960
we can do is make our eslint a little
855
00:28:04,960 --> 00:28:06,799
bit stricter so our linter is going to
856
00:28:06,799 --> 00:28:08,480
be a bit stricter and automatically put
857
00:28:08,480 --> 00:28:10,640
those onto new lines for us so let's go
858
00:28:10,640 --> 00:28:13,279
to eslintrc.js
859
00:28:13,279 --> 00:28:14,799
and what i'm going to do is comment out
860
00:28:14,799 --> 00:28:17,039
view three essential so that gives us
861
00:28:17,039 --> 00:28:18,799
basic linting
862
00:28:18,799 --> 00:28:19,919
and we're going to change that to view
863
00:28:19,919 --> 00:28:21,200
three recommended and if you don't know
864
00:28:21,200 --> 00:28:23,039
what linting is what it basically does
865
00:28:23,039 --> 00:28:25,679
is checks for errors in your code
866
00:28:25,679 --> 00:28:28,000
and catches them for you alright so see
867
00:28:28,000 --> 00:28:29,919
these little yellow underlines that's
868
00:28:29,919 --> 00:28:32,480
saying hey this should be on a new line
869
00:28:32,480 --> 00:28:33,679
that's why it's giving us that little
870
00:28:33,679 --> 00:28:35,440
squiggly but one of the cool things
871
00:28:35,440 --> 00:28:38,480
about eslint if i save this file now
872
00:28:38,480 --> 00:28:40,320
it can automatically fix those problems
873
00:28:40,320 --> 00:28:42,559
for us it's a really nice way to develop
874
00:28:42,559 --> 00:28:44,640
so now what i can do is basically
875
00:28:44,640 --> 00:28:46,640
cross this out cross that out and put
876
00:28:46,640 --> 00:28:48,399
all of this on one line
877
00:28:48,399 --> 00:28:49,919
so you can just write your code in one
878
00:28:49,919 --> 00:28:51,120
line like that you don't have to worry
879
00:28:51,120 --> 00:28:53,120
about formatting or spacing and then
880
00:28:53,120 --> 00:28:54,720
when you save it it automatically
881
00:28:54,720 --> 00:28:57,120
formats it for you now you do need to go
882
00:28:57,120 --> 00:28:59,200
into the quasar docks so we go to the
883
00:28:59,200 --> 00:29:00,880
quasar docks here
884
00:29:00,880 --> 00:29:02,640
getting started guide
885
00:29:02,640 --> 00:29:04,480
uh you'll notice there's a section on vs
886
00:29:04,480 --> 00:29:06,720
code configuration if you haven't done
887
00:29:06,720 --> 00:29:09,120
it yet you definitely definitely want to
888
00:29:09,120 --> 00:29:11,039
run through this vs code configuration
889
00:29:11,039 --> 00:29:12,480
option
890
00:29:12,480 --> 00:29:13,919
menu in the docs all right so make sure
891
00:29:13,919 --> 00:29:15,760
you go ahead and do that
892
00:29:15,760 --> 00:29:18,080
if this you know automatically if saving
893
00:29:18,080 --> 00:29:20,080
the file doesn't automatically um lint
894
00:29:20,080 --> 00:29:21,360
it for you it's probably because you
895
00:29:21,360 --> 00:29:24,480
need to do follow this guide in here
896
00:29:24,480 --> 00:29:26,640
okay so anyway let's move on to the next
897
00:29:26,640 --> 00:29:27,440
thing
898
00:29:27,440 --> 00:29:29,679
uh login page we're going to need uh an
899
00:29:29,679 --> 00:29:31,600
input let's add another section here q
900
00:29:31,600 --> 00:29:33,200
card dash section
901
00:29:33,200 --> 00:29:35,919
and inside of there we'll have a q input
902
00:29:35,919 --> 00:29:37,360
and then let's set a label of that
903
00:29:37,360 --> 00:29:39,440
import equal to
904
00:29:39,440 --> 00:29:40,720
name
905
00:29:40,720 --> 00:29:42,320
all right or it's probably more likely
906
00:29:42,320 --> 00:29:43,679
to be something like
907
00:29:43,679 --> 00:29:44,640
email
908
00:29:44,640 --> 00:29:46,480
so there we go we've got an email input
909
00:29:46,480 --> 00:29:48,399
ready to go i don't like the styling for
910
00:29:48,399 --> 00:29:50,320
that but we'll fix it in a moment and
911
00:29:50,320 --> 00:29:52,640
then another one we've got here is we'll
912
00:29:52,640 --> 00:29:54,640
probably have password so that's a
913
00:29:54,640 --> 00:29:55,919
really classic login form where you've
914
00:29:55,919 --> 00:29:58,080
got an email and password and then
915
00:29:58,080 --> 00:29:59,360
you'll usually have a button at the
916
00:29:59,360 --> 00:30:01,120
bottom and what i like to do is i like
917
00:30:01,120 --> 00:30:02,799
to put the button at the bottom outside
918
00:30:02,799 --> 00:30:04,399
of the card section because remember the
919
00:30:04,399 --> 00:30:06,720
card section adds padding and add a cue
920
00:30:06,720 --> 00:30:09,039
button here and say the label is equal
921
00:30:09,039 --> 00:30:10,080
to
922
00:30:10,080 --> 00:30:12,159
log in something like that and then i'll
923
00:30:12,159 --> 00:30:14,559
give that a class equal to full dash
924
00:30:14,559 --> 00:30:15,520
width
925
00:30:15,520 --> 00:30:16,960
notice that it takes up the full width
926
00:30:16,960 --> 00:30:19,360
now and then i'll give the a color equal
927
00:30:19,360 --> 00:30:20,080
to
928
00:30:20,080 --> 00:30:21,120
primary
929
00:30:21,120 --> 00:30:22,399
all right i think that looks really nice
930
00:30:22,399 --> 00:30:23,679
for the button how it sort of takes up
931
00:30:23,679 --> 00:30:25,520
the full width at the bottom now another
932
00:30:25,520 --> 00:30:27,360
thing i'll point out that if you want to
933
00:30:27,360 --> 00:30:28,960
change what this primary color is so
934
00:30:28,960 --> 00:30:30,080
basically the styling of your
935
00:30:30,080 --> 00:30:32,240
application then you can jump into the
936
00:30:32,240 --> 00:30:35,279
css directory in here and then go to
937
00:30:35,279 --> 00:30:37,679
um quasar variables
938
00:30:37,679 --> 00:30:40,320
dot scss and you can change basically
939
00:30:40,320 --> 00:30:42,320
the default styling of your app this is
940
00:30:42,320 --> 00:30:43,760
a really good way to get up and running
941
00:30:43,760 --> 00:30:45,600
just for um basic styling of your
942
00:30:45,600 --> 00:30:47,520
application giving it a primary and
943
00:30:47,520 --> 00:30:49,760
secondary color and usually my apps i
944
00:30:49,760 --> 00:30:51,840
like to keep styling very very simple
945
00:30:51,840 --> 00:30:53,520
unless you have a designer i highly
946
00:30:53,520 --> 00:30:55,760
recommend just having a primary
947
00:30:55,760 --> 00:30:58,240
secondary and accented color i wouldn't
948
00:30:58,240 --> 00:31:00,240
actually change anything else i wouldn't
949
00:31:00,240 --> 00:31:01,760
go too fancy with styling unless you
950
00:31:01,760 --> 00:31:02,960
really know what you're doing in terms
951
00:31:02,960 --> 00:31:05,360
of creating a styled ui
952
00:31:05,360 --> 00:31:06,720
all right so you might like come in here
953
00:31:06,720 --> 00:31:09,039
for example and change that to
954
00:31:09,039 --> 00:31:10,880
i don't know let's go to a nice bluey
955
00:31:10,880 --> 00:31:12,559
color like that or aqua whatever you
956
00:31:12,559 --> 00:31:13,679
call that
957
00:31:13,679 --> 00:31:15,600
and let's set the accent i'm probably
958
00:31:15,600 --> 00:31:17,200
breaking some material design rules here
959
00:31:17,200 --> 00:31:18,399
at the moment but
960
00:31:18,399 --> 00:31:20,960
that's okay
961
00:31:20,960 --> 00:31:23,200
and then a secondary color
962
00:31:23,200 --> 00:31:25,279
and let's save that and notice it in a
963
00:31:25,279 --> 00:31:26,480
second that's going to change sort of
964
00:31:26,480 --> 00:31:27,760
the whole look and feel of our site
965
00:31:27,760 --> 00:31:29,120
which is really nice
966
00:31:29,120 --> 00:31:31,279
all right so there we go so the color of
967
00:31:31,279 --> 00:31:33,360
that equal to primary i don't like this
968
00:31:33,360 --> 00:31:35,600
little sort of underline type form i
969
00:31:35,600 --> 00:31:37,039
like it sometimes but i don't think it
970
00:31:37,039 --> 00:31:38,880
looks good in a login form
971
00:31:38,880 --> 00:31:41,679
so another one we can use is filled here
972
00:31:41,679 --> 00:31:43,360
so let's set field for both of those
973
00:31:43,360 --> 00:31:45,519
inputs whoops
974
00:31:45,519 --> 00:31:46,799
filled
975
00:31:46,799 --> 00:31:48,320
there we go notice they're not spaced
976
00:31:48,320 --> 00:31:50,320
out very nicely so quasar gives us this
977
00:31:50,320 --> 00:31:52,240
really nice class chord
978
00:31:52,240 --> 00:31:54,960
q so in other words quasar put a margin
979
00:31:54,960 --> 00:31:56,880
on the bottom and i want you to make it
980
00:31:56,880 --> 00:31:59,919
a medium-sized margin and there we go we
981
00:31:59,919 --> 00:32:01,440
get a medium-sized margin on the bottom
982
00:32:01,440 --> 00:32:02,720
my phone just went off so i'm quickly
983
00:32:02,720 --> 00:32:04,799
going to check what that is
984
00:32:04,799 --> 00:32:07,039
it's a message from my mother she tried
985
00:32:07,039 --> 00:32:08,720
to call me
986
00:32:08,720 --> 00:32:10,159
all right we'll leave that for now now
987
00:32:10,159 --> 00:32:11,679
that i've done this um it looks like it
988
00:32:11,679 --> 00:32:13,200
is actually a little bit too wide still
989
00:32:13,200 --> 00:32:16,080
so let's change that from 450 to 400
990
00:32:16,080 --> 00:32:17,360
there we go i'd probably even go a
991
00:32:17,360 --> 00:32:19,039
little bit um
992
00:32:19,039 --> 00:32:21,279
less in terms of the width maybe 370.
993
00:32:21,279 --> 00:32:23,039
and i think that looks good if i put the
994
00:32:23,039 --> 00:32:24,320
password in you can actually see
995
00:32:24,320 --> 00:32:25,600
everything there
996
00:32:25,600 --> 00:32:27,360
so let's change this to
997
00:32:27,360 --> 00:32:28,880
type is equal to
998
00:32:28,880 --> 00:32:30,799
password and that means that as we type
999
00:32:30,799 --> 00:32:32,880
in the password nobody will be able to
1000
00:32:32,880 --> 00:32:33,840
see it if they're looking over
1001
00:32:33,840 --> 00:32:36,399
somebody's shoulder now just to be give
1002
00:32:36,399 --> 00:32:37,840
you a little bit more info here we can
1003
00:32:37,840 --> 00:32:40,000
change it from field to outlined that's
1004
00:32:40,000 --> 00:32:42,000
another option that we have so it's kind
1005
00:32:42,000 --> 00:32:44,000
of a nice effect as well and another one
1006
00:32:44,000 --> 00:32:46,640
that we have is borderless this is
1007
00:32:46,640 --> 00:32:48,159
really good inside of tables so if you
1008
00:32:48,159 --> 00:32:50,000
want to basically take out
1009
00:32:50,000 --> 00:32:51,679
most of the styling you can change that
1010
00:32:51,679 --> 00:32:53,919
to borderless all right so let's bring
1011
00:32:53,919 --> 00:32:55,919
that back to field i think field is
1012
00:32:55,919 --> 00:32:57,760
really nice in this example
1013
00:32:57,760 --> 00:32:59,120
and the next thing we might want to do
1014
00:32:59,120 --> 00:33:00,960
is model that so you imagine you want to
1015
00:33:00,960 --> 00:33:02,240
actually model some data here and then
1016
00:33:02,240 --> 00:33:03,919
when you press log in it's going to
1017
00:33:03,919 --> 00:33:05,600
actually use the email and password to
1018
00:33:05,600 --> 00:33:07,600
hit your back end and log the user in so
1019
00:33:07,600 --> 00:33:08,799
let's have a look at what that might
1020
00:33:08,799 --> 00:33:10,799
look like we'll come in here and we'll
1021
00:33:10,799 --> 00:33:11,600
say
1022
00:33:11,600 --> 00:33:12,640
const
1023
00:33:12,640 --> 00:33:14,880
form is equal to a ref and we're going
1024
00:33:14,880 --> 00:33:18,799
to press tab to import ref there
1025
00:33:19,039 --> 00:33:23,600
and let's make the form have an email
1026
00:33:23,679 --> 00:33:25,440
it'll be an empty string by default and
1027
00:33:25,440 --> 00:33:27,039
a password which will also be an empty
1028
00:33:27,039 --> 00:33:29,039
string by default now we can come up
1029
00:33:29,039 --> 00:33:30,159
here
1030
00:33:30,159 --> 00:33:33,360
and for the email we can say v model is
1031
00:33:33,360 --> 00:33:34,360
equal to
1032
00:33:34,360 --> 00:33:36,960
form.email and then we'll do the exact
1033
00:33:36,960 --> 00:33:39,120
same thing for the password which is
1034
00:33:39,120 --> 00:33:41,519
equal to form dot password so now i can
1035
00:33:41,519 --> 00:33:43,519
type my email in
1036
00:33:43,519 --> 00:33:46,000
and my password but it does look like
1037
00:33:46,000 --> 00:33:48,640
that's not working
1038
00:33:48,640 --> 00:33:50,399
so let's just try restarting the server
1039
00:33:50,399 --> 00:33:51,519
again yeah it looks like something went
1040
00:33:51,519 --> 00:33:54,559
wrong at some point there
1041
00:33:56,399 --> 00:33:58,880
and close that out
1042
00:33:58,880 --> 00:34:01,440
and now it's working so there you go and
1043
00:34:01,440 --> 00:34:03,279
then of course what you probably do is
1044
00:34:03,279 --> 00:34:04,960
you'd say function
1045
00:34:04,960 --> 00:34:07,039
uh login you might make this an async
1046
00:34:07,039 --> 00:34:08,320
function
1047
00:34:08,320 --> 00:34:09,679
and then
1048
00:34:09,679 --> 00:34:11,520
when the user tries to log in you will
1049
00:34:11,520 --> 00:34:13,918
then use the form dot value because
1050
00:34:13,918 --> 00:34:16,480
remember you have to say form dot value
1051
00:34:16,480 --> 00:34:19,520
well when you're inside of um
1052
00:34:19,520 --> 00:34:20,960
inside of a script setup or when you're
1053
00:34:20,960 --> 00:34:23,199
using the composition api and basically
1054
00:34:23,199 --> 00:34:26,239
you'd say like um axios dot post and
1055
00:34:26,239 --> 00:34:28,480
then you go to your login endpoint and
1056
00:34:28,480 --> 00:34:30,320
then you'd post the data which might be
1057
00:34:30,320 --> 00:34:32,159
just the form dot value all right you
1058
00:34:32,159 --> 00:34:33,839
get the idea this is um something that
1059
00:34:33,839 --> 00:34:36,000
goes beyond the scope of this video so
1060
00:34:36,000 --> 00:34:38,000
for now we'll simply say
1061
00:34:38,000 --> 00:34:39,239
uh
1062
00:34:39,239 --> 00:34:42,960
console.log form dot value
1063
00:34:42,960 --> 00:34:45,760
and i'll grab log in there and we'll say
1064
00:34:45,760 --> 00:34:47,359
at click for the button so when you
1065
00:34:47,359 --> 00:34:48,560
click on that button
1066
00:34:48,560 --> 00:34:50,560
i want you to call that login function
1067
00:34:50,560 --> 00:34:53,280
let's open up the console here
1068
00:34:53,280 --> 00:34:54,879
and then
1069
00:34:54,879 --> 00:34:57,280
put in some information there
1070
00:34:57,280 --> 00:35:00,160
and we can see that it is working now
1071
00:35:00,160 --> 00:35:01,520
you've got the email and you've got the
1072
00:35:01,520 --> 00:35:02,960
password
1073
00:35:02,960 --> 00:35:03,839
cool
1074
00:35:03,839 --> 00:35:05,040
all right so
1075
00:35:05,040 --> 00:35:06,960
that is a pretty good start what else
1076
00:35:06,960 --> 00:35:08,320
can we do
1077
00:35:08,320 --> 00:35:10,720
uh so i think that's the login page done
1078
00:35:10,720 --> 00:35:12,320
and i've shown you some basic components
1079
00:35:12,320 --> 00:35:13,920
so you've seen the q button component
1080
00:35:13,920 --> 00:35:14,800
now
1081
00:35:14,800 --> 00:35:17,359
by the way quasar is not pulling in all
1082
00:35:17,359 --> 00:35:19,200
of these components by default by
1083
00:35:19,200 --> 00:35:21,040
default it actually pulls in no
1084
00:35:21,040 --> 00:35:23,200
components and it's automatically going
1085
00:35:23,200 --> 00:35:25,359
to notice that you're using q button and
1086
00:35:25,359 --> 00:35:27,200
then pull it in to make sure that you
1087
00:35:27,200 --> 00:35:29,359
maintain a very small bundle size so i
1088
00:35:29,359 --> 00:35:30,880
think that does confuse some people they
1089
00:35:30,880 --> 00:35:31,839
think they're going to end up with a
1090
00:35:31,839 --> 00:35:33,200
massive file size because they're using
1091
00:35:33,200 --> 00:35:35,920
quasar not true at all it only pulls in
1092
00:35:35,920 --> 00:35:36,960
the com
1093
00:35:36,960 --> 00:35:38,480
the components that are actually used
1094
00:35:38,480 --> 00:35:39,359
there
1095
00:35:39,359 --> 00:35:42,079
okay so that's the login page now i
1096
00:35:42,079 --> 00:35:44,640
quickly want to cover choosing a
1097
00:35:44,640 --> 00:35:45,440
um
1098
00:35:45,440 --> 00:35:46,960
choosing a back end
1099
00:35:46,960 --> 00:35:48,400
and i've talked about a couple of the
1100
00:35:48,400 --> 00:35:49,760
options here
1101
00:35:49,760 --> 00:35:50,800
uh
1102
00:35:50,800 --> 00:35:52,160
and look it's i'm just one i'm just
1103
00:35:52,160 --> 00:35:53,760
going to breeze over these and just give
1104
00:35:53,760 --> 00:35:55,280
you a quick idea of what some of these
1105
00:35:55,280 --> 00:35:57,599
back ends do and then make some
1106
00:35:57,599 --> 00:35:59,839
recommendations basically based on um
1107
00:35:59,839 --> 00:36:01,119
you know what you might be trying to
1108
00:36:01,119 --> 00:36:03,920
accomplish with a back end now for back
1109
00:36:03,920 --> 00:36:06,400
ends where you need a lot of control um
1110
00:36:06,400 --> 00:36:08,560
running things on your own servers
1111
00:36:08,560 --> 00:36:09,920
and you need something that's like a lot
1112
00:36:09,920 --> 00:36:12,079
more robust then i'd recommend something
1113
00:36:12,079 --> 00:36:13,599
like laravel
1114
00:36:13,599 --> 00:36:15,040
uh laravel's something that i've used in
1115
00:36:15,040 --> 00:36:16,079
the past
1116
00:36:16,079 --> 00:36:18,160
um i love this framework and it's a php
1117
00:36:18,160 --> 00:36:20,960
back end so if you're familiar with php
1118
00:36:20,960 --> 00:36:23,359
uh then that might be a good place to um
1119
00:36:23,359 --> 00:36:24,880
a good one to check out
1120
00:36:24,880 --> 00:36:26,240
uh the one that i'm actually currently
1121
00:36:26,240 --> 00:36:28,960
using at work at the moment is strappy
1122
00:36:28,960 --> 00:36:30,240
and it allows you to get it up and
1123
00:36:30,240 --> 00:36:32,240
running a lot faster than laravel does
1124
00:36:32,240 --> 00:36:33,599
because it gives you a nice interface
1125
00:36:33,599 --> 00:36:37,119
for adding fields and but it still keeps
1126
00:36:37,119 --> 00:36:39,599
you in control of the back end so it's
1127
00:36:39,599 --> 00:36:41,280
still a back-end that you run on your
1128
00:36:41,280 --> 00:36:43,359
own servers okay and strap is actually
1129
00:36:43,359 --> 00:36:45,680
built on top of something called koa and
1130
00:36:45,680 --> 00:36:48,079
you might know about express.js koa is
1131
00:36:48,079 --> 00:36:50,000
basically the predecessor pre-assessor
1132
00:36:50,000 --> 00:36:52,160
what's the word um anyway there was
1133
00:36:52,160 --> 00:36:54,720
express.js and then um
1134
00:36:54,720 --> 00:36:56,320
and then koa so that's definitely
1135
00:36:56,320 --> 00:36:57,920
something worth checking out and it's
1136
00:36:57,920 --> 00:37:00,000
kind of like a lower level
1137
00:37:00,000 --> 00:37:02,000
uh back end that mostly does things like
1138
00:37:02,000 --> 00:37:03,760
handling middleware
1139
00:37:03,760 --> 00:37:05,280
and um giving you
1140
00:37:05,280 --> 00:37:07,200
some basic functionality for building
1141
00:37:07,200 --> 00:37:08,960
out a back end it's less opinionated
1142
00:37:08,960 --> 00:37:11,520
than something like strappy
1143
00:37:11,520 --> 00:37:13,359
the other
1144
00:37:13,359 --> 00:37:14,880
frameworks in this category if you want
1145
00:37:14,880 --> 00:37:17,119
to jump into the node world
1146
00:37:17,119 --> 00:37:18,240
would be
1147
00:37:18,240 --> 00:37:20,160
i should throw these over here
1148
00:37:20,160 --> 00:37:22,720
uh something like uh ness js so this has
1149
00:37:22,720 --> 00:37:24,240
a very modular system i haven't done a
1150
00:37:24,240 --> 00:37:25,440
lot of experience i've got a lot of
1151
00:37:25,440 --> 00:37:27,760
experience with an sjs but definitely um
1152
00:37:27,760 --> 00:37:29,200
check that out if you're considering a
1153
00:37:29,200 --> 00:37:32,640
more robust node type back end um then
1154
00:37:32,640 --> 00:37:34,320
you've got something like adonis js so
1155
00:37:34,320 --> 00:37:35,920
if you have experience with laravel but
1156
00:37:35,920 --> 00:37:38,079
you need to use a node based backend you
1157
00:37:38,079 --> 00:37:39,839
might want to check out adonisjs it's
1158
00:37:39,839 --> 00:37:43,040
basically a laravel clone in javascript
1159
00:37:43,040 --> 00:37:45,359
really interesting project so nest js
1160
00:37:45,359 --> 00:37:46,800
and adonisjs you might want to check
1161
00:37:46,800 --> 00:37:49,520
both of those out if you want a robust
1162
00:37:49,520 --> 00:37:51,200
back end
1163
00:37:51,200 --> 00:37:54,000
building experience now as for back ends
1164
00:37:54,000 --> 00:37:54,800
that
1165
00:37:54,800 --> 00:37:56,480
you don't actually build out yourself so
1166
00:37:56,480 --> 00:37:58,320
ones that are kind of self-managed you
1167
00:37:58,320 --> 00:38:00,400
just say what the data is and then the
1168
00:38:00,400 --> 00:38:01,920
back end is kind of built out for you
1169
00:38:01,920 --> 00:38:03,680
and you don't need to manage servers or
1170
00:38:03,680 --> 00:38:05,119
anything like that
1171
00:38:05,119 --> 00:38:07,920
we've got firebase and superbase so
1172
00:38:07,920 --> 00:38:09,040
firebase a lot of you have probably
1173
00:38:09,040 --> 00:38:11,040
heard of this is a google product and it
1174
00:38:11,040 --> 00:38:13,280
makes it really easy to basically get a
1175
00:38:13,280 --> 00:38:15,040
back end up and running
1176
00:38:15,040 --> 00:38:17,280
fast
1177
00:38:17,280 --> 00:38:19,040
and it makes it really easy to kind of
1178
00:38:19,040 --> 00:38:21,440
interact with nested data with a back
1179
00:38:21,440 --> 00:38:24,000
end super bass is something that was
1180
00:38:24,000 --> 00:38:25,839
built um
1181
00:38:25,839 --> 00:38:28,320
to kind of uh what would you call it i
1182
00:38:28,320 --> 00:38:30,240
guess it's a competitor of firebase but
1183
00:38:30,240 --> 00:38:32,000
it's using postgres under the hood it's
1184
00:38:32,000 --> 00:38:33,839
a very interesting project and i would
1185
00:38:33,839 --> 00:38:35,599
actually steer people more towards super
1186
00:38:35,599 --> 00:38:36,960
bass if you're already using the google
1187
00:38:36,960 --> 00:38:38,400
suite you might want to check out
1188
00:38:38,400 --> 00:38:40,640
firebase um but i think super bass is a
1189
00:38:40,640 --> 00:38:43,680
much more interesting um project it
1190
00:38:43,680 --> 00:38:45,280
feels more modern to me it's using
1191
00:38:45,280 --> 00:38:46,640
postgres
1192
00:38:46,640 --> 00:38:49,040
on the back end it actually deals to the
1193
00:38:49,040 --> 00:38:50,240
best of my knowledge it actually deals
1194
00:38:50,240 --> 00:38:52,000
directly with postgres which gives you
1195
00:38:52,000 --> 00:38:53,839
some pretty insane speeds
1196
00:38:53,839 --> 00:38:54,880
and it does some really interesting
1197
00:38:54,880 --> 00:38:56,640
things with like live data and it makes
1198
00:38:56,640 --> 00:38:59,520
it really easy to set up your data
1199
00:38:59,520 --> 00:39:02,400
um manually sorry
1200
00:39:02,400 --> 00:39:03,839
set up your data and then have like
1201
00:39:03,839 --> 00:39:06,160
relationships and that kind of stuff uh
1202
00:39:06,160 --> 00:39:07,599
set up for you so you can easily then
1203
00:39:07,599 --> 00:39:09,599
retrieve that data from the front end so
1204
00:39:09,599 --> 00:39:11,680
if you want to get up and running fast
1205
00:39:11,680 --> 00:39:13,119
these two guys
1206
00:39:13,119 --> 00:39:15,200
if you want to get up and running
1207
00:39:15,200 --> 00:39:16,400
um
1208
00:39:16,400 --> 00:39:18,000
fast but you need more control over the
1209
00:39:18,000 --> 00:39:19,680
back end then you might want to check
1210
00:39:19,680 --> 00:39:22,240
out these two or laravel especially if
1211
00:39:22,240 --> 00:39:24,320
you're like experiencing the php world
1212
00:39:24,320 --> 00:39:27,040
or even strappy which is kind of a more
1213
00:39:27,040 --> 00:39:29,520
um takes to look takes on a lot of the
1214
00:39:29,520 --> 00:39:31,440
responsibility for working for
1215
00:39:31,440 --> 00:39:33,440
with models for you if you want to go a
1216
00:39:33,440 --> 00:39:34,960
little bit more low level then check out
1217
00:39:34,960 --> 00:39:37,200
something like koa or maybe even express
1218
00:39:37,200 --> 00:39:38,640
or if you want to go super low level
1219
00:39:38,640 --> 00:39:40,560
then you might want to check out node um
1220
00:39:40,560 --> 00:39:43,760
itself like um but chances are you
1221
00:39:43,760 --> 00:39:45,599
already know if you are watching this
1222
00:39:45,599 --> 00:39:48,560
video and you already know what
1223
00:39:48,560 --> 00:39:50,800
uh and you want to use something like no
1224
00:39:50,800 --> 00:39:51,839
then you already know what you're doing
1225
00:39:51,839 --> 00:39:53,040
anyway all right i'm talking about this
1226
00:39:53,040 --> 00:39:55,280
too much so that's a quick overview of
1227
00:39:55,280 --> 00:39:57,920
choosing a backing back end loaded topic
1228
00:39:57,920 --> 00:39:59,599
uh what have we got here about backhand
1229
00:39:59,599 --> 00:40:00,880
i'm a big fan of lara around thought
1230
00:40:00,880 --> 00:40:02,480
about switching to a donor so being able
1231
00:40:02,480 --> 00:40:04,000
to share some parts between front and
1232
00:40:04,000 --> 00:40:05,920
back yeah i think the adonis is a very
1233
00:40:05,920 --> 00:40:08,640
very interesting project um and i would
1234
00:40:08,640 --> 00:40:10,480
be tempted to use it if i would you know
1235
00:40:10,480 --> 00:40:12,400
go into the back end world again
1236
00:40:12,400 --> 00:40:14,640
um for node.js
1237
00:40:14,640 --> 00:40:15,920
but i have to use strappy because that's
1238
00:40:15,920 --> 00:40:17,280
what the work is using but to be honest
1239
00:40:17,280 --> 00:40:18,880
i'm really liking strapping more and
1240
00:40:18,880 --> 00:40:21,520
more um especially since i can jump into
1241
00:40:21,520 --> 00:40:23,680
the lower level stuff with color okay
1242
00:40:23,680 --> 00:40:24,800
moving on
1243
00:40:24,800 --> 00:40:26,240
so i want to show you some other cool
1244
00:40:26,240 --> 00:40:28,720
components oh no hang on let's just jump
1245
00:40:28,720 --> 00:40:30,240
to this part here i've kind of like
1246
00:40:30,240 --> 00:40:33,280
screwed up the order now
1247
00:40:33,760 --> 00:40:35,520
i wanted to show you basically building
1248
00:40:35,520 --> 00:40:36,480
a
1249
00:40:36,480 --> 00:40:38,400
users table what that might look like
1250
00:40:38,400 --> 00:40:40,000
because this is a kind of a common
1251
00:40:40,000 --> 00:40:41,839
problem but first let's just build up a
1252
00:40:41,839 --> 00:40:43,359
little bit of a menu on the left side
1253
00:40:43,359 --> 00:40:45,520
here so that we can actually click on
1254
00:40:45,520 --> 00:40:47,520
for example a user's option something
1255
00:40:47,520 --> 00:40:49,680
that you'd often see in a cms
1256
00:40:49,680 --> 00:40:53,760
so we'll jump into our main layout
1257
00:40:53,760 --> 00:40:55,119
all right now notice we've got a lot of
1258
00:40:55,119 --> 00:40:56,319
these yellow squigglies that's because
1259
00:40:56,319 --> 00:40:58,319
we updated our linter if i just save the
1260
00:40:58,319 --> 00:41:00,319
file now my linter is automatically
1261
00:41:00,319 --> 00:41:02,400
going to lay that out in a really nice
1262
00:41:02,400 --> 00:41:03,359
way
1263
00:41:03,359 --> 00:41:05,280
for me by the way notice we're not using
1264
00:41:05,280 --> 00:41:06,960
script setup here
1265
00:41:06,960 --> 00:41:09,119
so i'm going to say setup i can get rid
1266
00:41:09,119 --> 00:41:11,200
of all of that i can get rid of all of
1267
00:41:11,200 --> 00:41:12,160
that
1268
00:41:12,160 --> 00:41:13,760
um i can get rid of the
1269
00:41:13,760 --> 00:41:16,800
return statement here
1270
00:41:16,800 --> 00:41:18,560
and
1271
00:41:18,560 --> 00:41:19,760
whoops i got rid of one too many
1272
00:41:19,760 --> 00:41:21,680
brackets and i'm going to turn this into
1273
00:41:21,680 --> 00:41:24,480
a const toggle draw function
1274
00:41:24,480 --> 00:41:27,520
is equal to
1275
00:41:27,520 --> 00:41:29,520
that function
1276
00:41:29,520 --> 00:41:31,200
there we go so notice that script setup
1277
00:41:31,200 --> 00:41:32,800
really does make things a whole lot
1278
00:41:32,800 --> 00:41:35,839
cleaner uh all right so
1279
00:41:35,839 --> 00:41:37,359
let's go ahead and create a menu and i
1280
00:41:37,359 --> 00:41:38,560
want to try and do this the right way so
1281
00:41:38,560 --> 00:41:39,760
let's go full screen here because we're
1282
00:41:39,760 --> 00:41:40,960
going to go a little bit more code heavy
1283
00:41:40,960 --> 00:41:42,079
now
1284
00:41:42,079 --> 00:41:44,319
um
1285
00:41:44,319 --> 00:41:46,160
all right so
1286
00:41:46,160 --> 00:41:47,680
where's our menu
1287
00:41:47,680 --> 00:41:49,680
we'll come down here so this is our draw
1288
00:41:49,680 --> 00:41:51,599
the draw is that left menu that you see
1289
00:41:51,599 --> 00:41:53,520
within our application
1290
00:41:53,520 --> 00:41:55,200
and so what i'm going to have here is a
1291
00:41:55,200 --> 00:41:56,640
q
1292
00:41:56,640 --> 00:41:58,560
list but what you might want to do is
1293
00:41:58,560 --> 00:42:00,160
actually create a new component for this
1294
00:42:00,160 --> 00:42:02,400
so i'm going to say control shift p
1295
00:42:02,400 --> 00:42:04,480
reveal this is a really quick way to
1296
00:42:04,480 --> 00:42:06,560
basically reveal in your left panel the
1297
00:42:06,560 --> 00:42:08,400
current component that you're on
1298
00:42:08,400 --> 00:42:09,359
and
1299
00:42:09,359 --> 00:42:11,200
i'm going to create a new file here and
1300
00:42:11,200 --> 00:42:13,920
i'm just going to call it
1301
00:42:13,920 --> 00:42:15,119
main
1302
00:42:15,119 --> 00:42:18,319
layout menu dot view
1303
00:42:18,319 --> 00:42:21,200
and i've got a really nice snippet here
1304
00:42:21,200 --> 00:42:22,720
for a template that i like to have by
1305
00:42:22,720 --> 00:42:24,160
default
1306
00:42:24,160 --> 00:42:27,200
let's go back into the main layout
1307
00:42:27,200 --> 00:42:29,280
here it is here and we're going to use
1308
00:42:29,280 --> 00:42:30,640
this um
1309
00:42:30,640 --> 00:42:32,079
main layout
1310
00:42:32,079 --> 00:42:34,720
what did i call it yeah main layout menu
1311
00:42:34,720 --> 00:42:35,839
actually i'm going to change that name
1312
00:42:35,839 --> 00:42:37,839
to
1313
00:42:37,839 --> 00:42:39,839
main layout
1314
00:42:39,839 --> 00:42:41,119
uh
1315
00:42:41,119 --> 00:42:44,000
menu list because i always like the last
1316
00:42:44,000 --> 00:42:45,680
word in my components to match up with
1317
00:42:45,680 --> 00:42:47,280
the quasar component and we're going to
1318
00:42:47,280 --> 00:42:49,680
be using the q list component so that's
1319
00:42:49,680 --> 00:42:51,680
why instead of saying main layout menu i
1320
00:42:51,680 --> 00:42:53,920
say main layout menu list because it
1321
00:42:53,920 --> 00:42:55,119
makes it clear to me and other
1322
00:42:55,119 --> 00:42:56,800
developers that this is going to be a
1323
00:42:56,800 --> 00:42:58,560
list component
1324
00:42:58,560 --> 00:43:00,400
all right so that's why i've done that
1325
00:43:00,400 --> 00:43:02,560
and now let's just make this a q
1326
00:43:02,560 --> 00:43:03,359
list
1327
00:43:03,359 --> 00:43:04,640
and i'm just going to put some random
1328
00:43:04,640 --> 00:43:05,920
text in there just to see if this is
1329
00:43:05,920 --> 00:43:08,240
working and instead of a cue list there
1330
00:43:08,240 --> 00:43:10,960
we're going to make that our main
1331
00:43:10,960 --> 00:43:12,480
layout menu
1332
00:43:12,480 --> 00:43:14,319
list all right so
1333
00:43:14,319 --> 00:43:15,680
that should have been auto imported
1334
00:43:15,680 --> 00:43:17,200
let's double click that and scroll up i
1335
00:43:17,200 --> 00:43:19,200
like to just test if it was and there we
1336
00:43:19,200 --> 00:43:21,440
go that was auto imported for me if
1337
00:43:21,440 --> 00:43:22,880
that's not auto importing you might want
1338
00:43:22,880 --> 00:43:25,359
to check out volar which is a extension
1339
00:43:25,359 --> 00:43:27,760
for visual studio code that just makes
1340
00:43:27,760 --> 00:43:30,800
it really nice um dealing with view code
1341
00:43:30,800 --> 00:43:31,920
all right there we go so we've got our
1342
00:43:31,920 --> 00:43:34,800
main layout menu list
1343
00:43:34,800 --> 00:43:36,720
let's see if that's working and there we
1344
00:43:36,720 --> 00:43:38,240
go we can see it showing up at the top
1345
00:43:38,240 --> 00:43:40,560
there looks like nothing uh
1346
00:43:40,560 --> 00:43:41,920
to begin with
1347
00:43:41,920 --> 00:43:44,400
so let's come back here we'll jump into
1348
00:43:44,400 --> 00:43:46,640
this component and start building out
1349
00:43:46,640 --> 00:43:48,400
our main layout menu list by the way
1350
00:43:48,400 --> 00:43:49,839
this is something you want to do a lot
1351
00:43:49,839 --> 00:43:51,280
you don't want to put everything into
1352
00:43:51,280 --> 00:43:52,640
one big component you want to try and
1353
00:43:52,640 --> 00:43:55,119
break your components apart into smaller
1354
00:43:55,119 --> 00:43:57,119
chunks like we've done here
1355
00:43:57,119 --> 00:43:59,440
so let's call this a q dash item so
1356
00:43:59,440 --> 00:44:00,800
inside of a cue list you can have a
1357
00:44:00,800 --> 00:44:03,200
queue item and instead of a queue item
1358
00:44:03,200 --> 00:44:05,760
you can have a q item dash
1359
00:44:05,760 --> 00:44:06,880
section
1360
00:44:06,880 --> 00:44:08,319
all right and there's a reason that this
1361
00:44:08,319 --> 00:44:10,079
is deeply nested right there's a reason
1362
00:44:10,079 --> 00:44:12,800
it has to go list item item section it
1363
00:44:12,800 --> 00:44:14,720
gives us some really nice flexibility
1364
00:44:14,720 --> 00:44:16,079
because it means we can have a section
1365
00:44:16,079 --> 00:44:17,599
on the left of the item that's for
1366
00:44:17,599 --> 00:44:20,000
example one and then if we add another
1367
00:44:20,000 --> 00:44:23,440
section in here that says two
1368
00:44:23,440 --> 00:44:25,119
and i'll save that
1369
00:44:25,119 --> 00:44:27,040
um jump out of full screen let's have a
1370
00:44:27,040 --> 00:44:28,079
look at that
1371
00:44:28,079 --> 00:44:30,480
it just makes it space out really nicely
1372
00:44:30,480 --> 00:44:31,760
and then you can do some really nice
1373
00:44:31,760 --> 00:44:34,079
stuff by saying hey i want this section
1374
00:44:34,079 --> 00:44:36,480
to be on the side and then it throws
1375
00:44:36,480 --> 00:44:38,319
that section onto the side
1376
00:44:38,319 --> 00:44:40,160
and just it's a really nice way to help
1377
00:44:40,160 --> 00:44:42,880
you lay out your items
1378
00:44:42,880 --> 00:44:44,240
which is why we've got this cue item
1379
00:44:44,240 --> 00:44:45,839
section rather than throwing it directly
1380
00:44:45,839 --> 00:44:47,760
inside of queue item so hopefully that
1381
00:44:47,760 --> 00:44:49,040
made sense i just wanted to give you a
1382
00:44:49,040 --> 00:44:50,800
little bit of context as to why we have
1383
00:44:50,800 --> 00:44:52,000
to do that deep nesting of the
1384
00:44:52,000 --> 00:44:53,520
components here
1385
00:44:53,520 --> 00:44:55,200
all right so
1386
00:44:55,200 --> 00:44:56,720
we can also come up here and make the
1387
00:44:56,720 --> 00:44:58,960
item clickable
1388
00:44:58,960 --> 00:45:00,400
and that basically means when i hover
1389
00:45:00,400 --> 00:45:01,760
over this we're going to get that little
1390
00:45:01,760 --> 00:45:02,880
link
1391
00:45:02,880 --> 00:45:06,400
showing up or we can even say two to say
1392
00:45:06,400 --> 00:45:07,520
hey
1393
00:45:07,520 --> 00:45:09,920
this is going to take you to
1394
00:45:09,920 --> 00:45:12,319
the users page all right so if i hover
1395
00:45:12,319 --> 00:45:13,839
that it's still going to be clickable
1396
00:45:13,839 --> 00:45:15,920
because 2
1397
00:45:15,920 --> 00:45:18,240
basically automatically adds that sort
1398
00:45:18,240 --> 00:45:20,560
of clickability styling to it and now if
1399
00:45:20,560 --> 00:45:22,000
i click on here
1400
00:45:22,000 --> 00:45:23,599
it takes us to the user's route which of
1401
00:45:23,599 --> 00:45:26,160
course doesn't exist yet all right so
1402
00:45:26,160 --> 00:45:27,520
that's it that's pretty much how we can
1403
00:45:27,520 --> 00:45:29,200
very easily make a menu and then you
1404
00:45:29,200 --> 00:45:33,040
might have up here another item so q
1405
00:45:33,040 --> 00:45:36,560
item and then a q item dash label
1406
00:45:36,560 --> 00:45:38,160
and then you can say here this is our
1407
00:45:38,160 --> 00:45:40,319
menu right just add a little label there
1408
00:45:40,319 --> 00:45:41,440
in fact i want to think i want to wrap
1409
00:45:41,440 --> 00:45:43,200
that in the cue item section
1410
00:45:43,200 --> 00:45:44,640
so
1411
00:45:44,640 --> 00:45:46,720
let's cut that and say q item dash
1412
00:45:46,720 --> 00:45:48,240
section
1413
00:45:48,240 --> 00:45:49,920
throw that in there
1414
00:45:49,920 --> 00:45:51,040
and there we go that's just made the
1415
00:45:51,040 --> 00:45:52,960
styling a little bit nicer
1416
00:45:52,960 --> 00:45:54,800
all right so let's change this from one
1417
00:45:54,800 --> 00:45:55,760
to
1418
00:45:55,760 --> 00:45:58,160
users
1419
00:45:58,160 --> 00:45:59,760
um and i just know that people are going
1420
00:45:59,760 --> 00:46:00,800
to want to know how to style this a
1421
00:46:00,800 --> 00:46:02,319
little bit more so let me just quickly
1422
00:46:02,319 --> 00:46:05,119
show you here you could say class
1423
00:46:05,119 --> 00:46:06,480
is equal to
1424
00:46:06,480 --> 00:46:08,640
i don't know background primary
1425
00:46:08,640 --> 00:46:11,119
and then you could say text dash white
1426
00:46:11,119 --> 00:46:12,960
to make the text white and that's the
1427
00:46:12,960 --> 00:46:14,400
way that you might like want to style
1428
00:46:14,400 --> 00:46:16,000
that differently you know there's a
1429
00:46:16,000 --> 00:46:16,880
there's a whole bunch of different
1430
00:46:16,880 --> 00:46:18,240
things you can do in terms of styling
1431
00:46:18,240 --> 00:46:19,599
here
1432
00:46:19,599 --> 00:46:20,960
but i might just bring that back to our
1433
00:46:20,960 --> 00:46:23,839
original example
1434
00:46:24,240 --> 00:46:25,760
there we go
1435
00:46:25,760 --> 00:46:27,200
all right so
1436
00:46:27,200 --> 00:46:29,119
we've now got a user's menu takes us to
1437
00:46:29,119 --> 00:46:31,040
a page that doesn't exist so we now now
1438
00:46:31,040 --> 00:46:32,960
need to make that page first of all
1439
00:46:32,960 --> 00:46:34,880
let's come in here and say
1440
00:46:34,880 --> 00:46:37,440
i know this is hard to view but um
1441
00:46:37,440 --> 00:46:39,200
i'll speak it as i write it oh this
1442
00:46:39,200 --> 00:46:41,200
isn't letting me grab the
1443
00:46:41,200 --> 00:46:43,760
menu bar there my vs code is messing up
1444
00:46:43,760 --> 00:46:46,160
anyway i'm writing here quasar
1445
00:46:46,160 --> 00:46:47,040
new
1446
00:46:47,040 --> 00:46:48,800
page
1447
00:46:48,800 --> 00:46:50,800
and let's call it
1448
00:46:50,800 --> 00:46:53,280
users page
1449
00:46:53,280 --> 00:46:54,960
all right so now that's created a new
1450
00:46:54,960 --> 00:46:56,720
blank page for us
1451
00:46:56,720 --> 00:46:59,359
so we'll jump into users page and we'll
1452
00:46:59,359 --> 00:47:01,760
come in here and say script setup
1453
00:47:01,760 --> 00:47:04,000
we'll get rid of export default
1454
00:47:04,000 --> 00:47:05,920
and i actually like my script setup to
1455
00:47:05,920 --> 00:47:07,520
be at the top
1456
00:47:07,520 --> 00:47:09,280
so let's do that
1457
00:47:09,280 --> 00:47:13,760
and then we'll say users page here
1458
00:47:13,760 --> 00:47:15,520
and
1459
00:47:15,520 --> 00:47:16,880
what else do i want to do now i need to
1460
00:47:16,880 --> 00:47:18,160
do the routing for that so we'll go
1461
00:47:18,160 --> 00:47:20,079
router
1462
00:47:20,079 --> 00:47:21,440
routes
1463
00:47:21,440 --> 00:47:22,880
and then we'll create another page and
1464
00:47:22,880 --> 00:47:25,359
i'm just going to copy that one
1465
00:47:25,359 --> 00:47:26,800
and we'll call this users because
1466
00:47:26,800 --> 00:47:29,520
remember the link took us to users and
1467
00:47:29,520 --> 00:47:32,160
that's going to take us to pages slash
1468
00:47:32,160 --> 00:47:33,680
users
1469
00:47:33,680 --> 00:47:35,280
page
1470
00:47:35,280 --> 00:47:36,880
save that
1471
00:47:36,880 --> 00:47:38,400
and there we go now we've got our users
1472
00:47:38,400 --> 00:47:40,000
page so now i can click on these
1473
00:47:40,000 --> 00:47:42,160
different menu items they all work or i
1474
00:47:42,160 --> 00:47:43,920
can go to the menu and click on users
1475
00:47:43,920 --> 00:47:46,000
and that takes us to the users page so
1476
00:47:46,000 --> 00:47:47,119
hopefully you're seeing there's a lot of
1477
00:47:47,119 --> 00:47:48,400
different ways that we can basically
1478
00:47:48,400 --> 00:47:49,440
manage
1479
00:47:49,440 --> 00:47:52,480
menus when we're using quasar and notice
1480
00:47:52,480 --> 00:47:54,319
by the way that quasar automatically
1481
00:47:54,319 --> 00:47:55,839
makes that highlighted for us when it's
1482
00:47:55,839 --> 00:47:58,240
selected so if i select log in notice
1483
00:47:58,240 --> 00:48:00,079
that the color of it is black but when i
1484
00:48:00,079 --> 00:48:01,280
click on that
1485
00:48:01,280 --> 00:48:02,720
notice the color of it is now that kind
1486
00:48:02,720 --> 00:48:04,240
of
1487
00:48:04,240 --> 00:48:06,880
bluey aqua color that we chose
1488
00:48:06,880 --> 00:48:08,319
all right so
1489
00:48:08,319 --> 00:48:10,640
the users page is going to be a table
1490
00:48:10,640 --> 00:48:12,000
i'm just going to do an example table
1491
00:48:12,000 --> 00:48:14,240
for you to show you what that looks like
1492
00:48:14,240 --> 00:48:16,160
control by the way to do that i said
1493
00:48:16,160 --> 00:48:17,520
control p
1494
00:48:17,520 --> 00:48:19,119
and then i search for users page that's
1495
00:48:19,119 --> 00:48:20,480
just a quicker way to
1496
00:48:20,480 --> 00:48:22,559
to sort of jump around your editor and
1497
00:48:22,559 --> 00:48:24,319
now i can come in here
1498
00:48:24,319 --> 00:48:26,240
and say q
1499
00:48:26,240 --> 00:48:28,480
table
1500
00:48:28,480 --> 00:48:30,240
and let's go ahead and start building
1501
00:48:30,240 --> 00:48:32,559
out a table now so we're going to need
1502
00:48:32,559 --> 00:48:34,319
some dummy data for this table so let's
1503
00:48:34,319 --> 00:48:36,720
say const data is equal to
1504
00:48:36,720 --> 00:48:38,000
and since this is not going to be
1505
00:48:38,000 --> 00:48:39,520
reactive i'm not using a backend or
1506
00:48:39,520 --> 00:48:41,599
anything i don't need to say ref here i
1507
00:48:41,599 --> 00:48:43,760
can just give it an array straight up
1508
00:48:43,760 --> 00:48:45,119
so now
1509
00:48:45,119 --> 00:48:47,359
let's give it some objects and i'll say
1510
00:48:47,359 --> 00:48:49,440
name is equal to luke
1511
00:48:49,440 --> 00:48:52,240
dibol that's my name email
1512
00:48:52,240 --> 00:48:54,640
is equal to luke at
1513
00:48:54,640 --> 00:48:56,000
let's use my quasar cast one
1514
00:48:56,000 --> 00:48:58,000
quasarcast.com
1515
00:48:58,000 --> 00:48:59,440
and
1516
00:48:59,440 --> 00:49:00,960
you can imagine this would probably have
1517
00:49:00,960 --> 00:49:02,800
an id as well so let's say the id is
1518
00:49:02,800 --> 00:49:04,079
equal to
1519
00:49:04,079 --> 00:49:06,720
one and i'll do a couple of others one
1520
00:49:06,720 --> 00:49:09,520
for my dog one for my other dog and one
1521
00:49:09,520 --> 00:49:11,200
for my other dog
1522
00:49:11,200 --> 00:49:13,040
we have two two hours sorry three two
1523
00:49:13,040 --> 00:49:14,880
hours at the moment
1524
00:49:14,880 --> 00:49:16,319
all right so this first one i'll just
1525
00:49:16,319 --> 00:49:18,079
sort of zoom through these we've got
1526
00:49:18,079 --> 00:49:19,280
panda
1527
00:49:19,280 --> 00:49:20,640
we've got
1528
00:49:20,640 --> 00:49:21,760
lily
1529
00:49:21,760 --> 00:49:24,000
and then we've got
1530
00:49:24,000 --> 00:49:26,240
min min
1531
00:49:26,240 --> 00:49:27,920
might do min dash min yeah that looks
1532
00:49:27,920 --> 00:49:31,359
better and now i can say me and mean
1533
00:49:31,359 --> 00:49:35,040
and we can do lily and we can do panda
1534
00:49:35,040 --> 00:49:36,640
so there we go we've got all of the data
1535
00:49:36,640 --> 00:49:38,640
for the users page now eslinter is being
1536
00:49:38,640 --> 00:49:41,119
helpful and saying hey you have a data
1537
00:49:41,119 --> 00:49:42,640
object but you're not actually using it
1538
00:49:42,640 --> 00:49:44,480
so go ahead and do something with that
1539
00:49:44,480 --> 00:49:46,880
data data array
1540
00:49:46,880 --> 00:49:49,200
so now we can come down here and say hey
1541
00:49:49,200 --> 00:49:51,359
table i want you to have some rows and
1542
00:49:51,359 --> 00:49:53,440
those rows are going to be equal to that
1543
00:49:53,440 --> 00:49:55,440
data that i have so let's refresh the
1544
00:49:55,440 --> 00:49:57,280
page to see if that works and there we
1545
00:49:57,280 --> 00:49:59,280
go by default it actually automatically
1546
00:49:59,280 --> 00:50:01,280
figures out a lot of stuff for us but we
1547
00:50:01,280 --> 00:50:02,640
want to have a little bit more control
1548
00:50:02,640 --> 00:50:04,000
over these rows so let's go ahead and
1549
00:50:04,000 --> 00:50:05,599
see how we can do that
1550
00:50:05,599 --> 00:50:08,079
we can say const columns
1551
00:50:08,079 --> 00:50:12,079
is equal to and we'll make that an array
1552
00:50:12,079 --> 00:50:13,599
of objects
1553
00:50:13,599 --> 00:50:15,760
and let's say field so the field for one
1554
00:50:15,760 --> 00:50:19,440
of these columns is going to be equal to
1555
00:50:20,400 --> 00:50:21,760
name
1556
00:50:21,760 --> 00:50:23,440
and the name of that is going to be
1557
00:50:23,440 --> 00:50:25,359
equal to
1558
00:50:25,359 --> 00:50:26,800
name
1559
00:50:26,800 --> 00:50:29,599
and i think that's all we need to begin
1560
00:50:29,599 --> 00:50:31,599
with
1561
00:50:31,599 --> 00:50:32,960
i don't have the docs up so i'm doing
1562
00:50:32,960 --> 00:50:34,640
all this from memory let's see if that
1563
00:50:34,640 --> 00:50:37,440
works out for me
1564
00:50:37,440 --> 00:50:40,319
save it
1565
00:50:40,319 --> 00:50:42,319
all right so there we go notice now that
1566
00:50:42,319 --> 00:50:44,480
we just get the columns for the name and
1567
00:50:44,480 --> 00:50:46,079
now we can do some other stuff like a
1568
00:50:46,079 --> 00:50:48,160
line and we can align that to the left
1569
00:50:48,160 --> 00:50:49,440
there we go
1570
00:50:49,440 --> 00:50:51,119
and i think we can give it a title i
1571
00:50:51,119 --> 00:50:52,480
can't remember how to do the title to be
1572
00:50:52,480 --> 00:50:54,480
honest so let's come over here
1573
00:50:54,480 --> 00:50:56,960
um this is useful though uh if you want
1574
00:50:56,960 --> 00:50:58,880
to find out more about how quasar works
1575
00:50:58,880 --> 00:51:00,160
under the hood this is really really
1576
00:51:00,160 --> 00:51:01,680
valuable to know so if you're kind of
1577
00:51:01,680 --> 00:51:03,200
like haven't been listening very closely
1578
00:51:03,200 --> 00:51:05,359
so far listen right now if you go to the
1579
00:51:05,359 --> 00:51:07,359
quasar docs and have a look at the api
1580
00:51:07,359 --> 00:51:09,599
explorer
1581
00:51:09,599 --> 00:51:10,960
that link isn't working i might need to
1582
00:51:10,960 --> 00:51:12,800
refresh the page here i think the docs
1583
00:51:12,800 --> 00:51:14,960
just updated yeah here we go
1584
00:51:14,960 --> 00:51:17,040
the api explorer gives you access to all
1585
00:51:17,040 --> 00:51:19,680
of quasar's api cards which is insanely
1586
00:51:19,680 --> 00:51:21,839
insanely helpful so i can come in here
1587
00:51:21,839 --> 00:51:24,640
and say cue table
1588
00:51:24,640 --> 00:51:25,920
and there we go i've got all the
1589
00:51:25,920 --> 00:51:28,240
information i need to know about the q
1590
00:51:28,240 --> 00:51:30,240
table component and you'll notice if we
1591
00:51:30,240 --> 00:51:32,880
click on this docs menu here
1592
00:51:32,880 --> 00:51:35,119
and we go to the q table component every
1593
00:51:35,119 --> 00:51:36,720
component gets this little card at the
1594
00:51:36,720 --> 00:51:38,880
top that gives you full access to the
1595
00:51:38,880 --> 00:51:40,800
api if you can understand how to use
1596
00:51:40,800 --> 00:51:42,800
this card it is insanely insanely
1597
00:51:42,800 --> 00:51:44,160
helpful so definitely go ahead and check
1598
00:51:44,160 --> 00:51:45,119
that out
1599
00:51:45,119 --> 00:51:47,760
all right so coming back here
1600
00:51:47,760 --> 00:51:50,160
we're using a prop and it was the column
1601
00:51:50,160 --> 00:51:53,359
prop so i can even come in here and say
1602
00:51:53,359 --> 00:51:54,720
columns because that's the name of the
1603
00:51:54,720 --> 00:51:56,559
prop that i'm trying to use
1604
00:51:56,559 --> 00:51:58,559
so here it is here columns
1605
00:51:58,559 --> 00:52:00,160
name we can give it a label that's the
1606
00:52:00,160 --> 00:52:01,920
one that i was looking for so let's come
1607
00:52:01,920 --> 00:52:04,480
back to vs code and now i can say the
1608
00:52:04,480 --> 00:52:06,720
label of this comma column
1609
00:52:06,720 --> 00:52:08,319
is equal to and i'll just throw that
1610
00:52:08,319 --> 00:52:09,839
over there
1611
00:52:09,839 --> 00:52:11,680
name
1612
00:52:11,680 --> 00:52:13,040
and there we go we've got the name of
1613
00:52:13,040 --> 00:52:14,800
that column so this is now giving us a
1614
00:52:14,800 --> 00:52:16,319
little bit of extra control over that
1615
00:52:16,319 --> 00:52:18,880
column we might want to display the id
1616
00:52:18,880 --> 00:52:20,319
so if we want to do that we can just say
1617
00:52:20,319 --> 00:52:22,800
that the field is equal to id the name
1618
00:52:22,800 --> 00:52:24,800
is equal to id i think technically you
1619
00:52:24,800 --> 00:52:26,079
don't actually need the name that's for
1620
00:52:26,079 --> 00:52:27,359
other things like when you want to start
1621
00:52:27,359 --> 00:52:29,760
using slots that's how you identify it
1622
00:52:29,760 --> 00:52:31,359
inside of a slot that's why we have that
1623
00:52:31,359 --> 00:52:33,200
name field
1624
00:52:33,200 --> 00:52:35,200
um all right now let's just change this
1625
00:52:35,200 --> 00:52:36,800
to id
1626
00:52:36,800 --> 00:52:38,160
there we go
1627
00:52:38,160 --> 00:52:40,640
and we have total flexibility now so you
1628
00:52:40,640 --> 00:52:42,319
might want to say instead of email you
1629
00:52:42,319 --> 00:52:44,640
can say like primary email is the label
1630
00:52:44,640 --> 00:52:47,359
here the field of that is equal to
1631
00:52:47,359 --> 00:52:48,480
email
1632
00:52:48,480 --> 00:52:50,880
and maybe we want to align that to the
1633
00:52:50,880 --> 00:52:52,800
right gosh
1634
00:52:52,800 --> 00:52:54,400
i can't get my sentences out right now
1635
00:52:54,400 --> 00:52:55,920
can i
1636
00:52:55,920 --> 00:52:57,280
and this one you might want to align
1637
00:52:57,280 --> 00:52:58,800
center usually with numbers you want to
1638
00:52:58,800 --> 00:53:00,480
align things centered
1639
00:53:00,480 --> 00:53:01,520
actually i think it looks better with
1640
00:53:01,520 --> 00:53:03,280
left in this scenario
1641
00:53:03,280 --> 00:53:06,160
there we go so you got the primary email
1642
00:53:06,160 --> 00:53:07,920
um and honestly i'd probably align all
1643
00:53:07,920 --> 00:53:10,800
of these to the left
1644
00:53:11,200 --> 00:53:12,880
that's looking good now just to show you
1645
00:53:12,880 --> 00:53:14,079
a little bit more of what you might want
1646
00:53:14,079 --> 00:53:17,040
to do here to get some more control
1647
00:53:17,040 --> 00:53:19,440
a field can actually be a function so
1648
00:53:19,440 --> 00:53:21,760
instead of returning a string field
1649
00:53:21,760 --> 00:53:24,240
which basically says hey i want you to
1650
00:53:24,240 --> 00:53:27,440
grab the field out of the object data we
1651
00:53:27,440 --> 00:53:29,839
can change this to a function
1652
00:53:29,839 --> 00:53:31,920
all right so you can pull out the row in
1653
00:53:31,920 --> 00:53:34,880
that function and then say row dot
1654
00:53:34,880 --> 00:53:36,880
email
1655
00:53:36,880 --> 00:53:38,400
and notice that gives us the same thing
1656
00:53:38,400 --> 00:53:40,160
but now you can have more control over
1657
00:53:40,160 --> 00:53:41,680
it all right so if you wanted to just
1658
00:53:41,680 --> 00:53:43,680
append something to that
1659
00:53:43,680 --> 00:53:45,839
in fact maybe you do something like this
1660
00:53:45,839 --> 00:53:48,240
email this is a terrible example i don't
1661
00:53:48,240 --> 00:53:49,119
know why you'd do it because it's
1662
00:53:49,119 --> 00:53:51,280
redundant but the point i'm trying to
1663
00:53:51,280 --> 00:53:52,880
make is that you have total control over
1664
00:53:52,880 --> 00:53:54,960
the display of this value
1665
00:53:54,960 --> 00:53:56,559
and you can actually come in here and
1666
00:53:56,559 --> 00:53:59,119
change the uh what sits inside of that
1667
00:53:59,119 --> 00:54:01,200
cell as well and i don't want to go too
1668
00:54:01,200 --> 00:54:02,640
much into this otherwise this video will
1669
00:54:02,640 --> 00:54:04,880
be too long but i can for example if i
1670
00:54:04,880 --> 00:54:07,040
undo all of that
1671
00:54:07,040 --> 00:54:10,240
i can come in here and use a slot
1672
00:54:10,240 --> 00:54:11,359
and i can't remember the name of the
1673
00:54:11,359 --> 00:54:12,640
slot so i'm going to come over here to
1674
00:54:12,640 --> 00:54:14,720
the api explorer
1675
00:54:14,720 --> 00:54:17,280
and we're going to look for the slot
1676
00:54:17,280 --> 00:54:18,559
section
1677
00:54:18,559 --> 00:54:21,280
and it's called sell something so let's
1678
00:54:21,280 --> 00:54:22,960
scroll down here
1679
00:54:22,960 --> 00:54:24,720
you got body cell which allows you to
1680
00:54:24,720 --> 00:54:28,000
access every single individual cell
1681
00:54:28,000 --> 00:54:30,079
or if i scroll down
1682
00:54:30,079 --> 00:54:32,319
what else have we got body cell and then
1683
00:54:32,319 --> 00:54:34,480
the name of that cell remember how i
1684
00:54:34,480 --> 00:54:36,240
said the name property is important for
1685
00:54:36,240 --> 00:54:38,319
identifying the name when you're using
1686
00:54:38,319 --> 00:54:40,640
slots so let's come in here and also add
1687
00:54:40,640 --> 00:54:41,520
in
1688
00:54:41,520 --> 00:54:44,880
name for all of these
1689
00:54:46,880 --> 00:54:48,079
now i probably should tell you what i'm
1690
00:54:48,079 --> 00:54:49,359
actually doing here what i'm actually
1691
00:54:49,359 --> 00:54:52,559
doing is i'm showing you how to access
1692
00:54:52,559 --> 00:54:54,640
each individual cell so you can put
1693
00:54:54,640 --> 00:54:57,200
components in the cell itself
1694
00:54:57,200 --> 00:54:58,319
all right this is really cool i think
1695
00:54:58,319 --> 00:54:59,760
you're going to love it
1696
00:54:59,760 --> 00:55:02,960
so now i can come in here
1697
00:55:03,760 --> 00:55:07,799
and then say template
1698
00:55:08,400 --> 00:55:10,400
ah there's something crawling on me
1699
00:55:10,400 --> 00:55:12,319
we've got ants in this house
1700
00:55:12,319 --> 00:55:14,000
and then we want to use the slot that is
1701
00:55:14,000 --> 00:55:14,799
called
1702
00:55:14,799 --> 00:55:15,839
body
1703
00:55:15,839 --> 00:55:16,799
cell
1704
00:55:16,799 --> 00:55:19,440
and then the name of this cell which is
1705
00:55:19,440 --> 00:55:21,359
let's do that email one to begin with
1706
00:55:21,359 --> 00:55:22,319
email
1707
00:55:22,319 --> 00:55:24,079
all right so just to show you what this
1708
00:55:24,079 --> 00:55:26,079
looks like i can now create a div called
1709
00:55:26,079 --> 00:55:27,920
email cell
1710
00:55:27,920 --> 00:55:29,359
and notice that it's taken over this
1711
00:55:29,359 --> 00:55:30,559
cell here
1712
00:55:30,559 --> 00:55:33,839
so what we can do now is we can say q td
1713
00:55:33,839 --> 00:55:36,160
right because quasar's got its own table
1714
00:55:36,160 --> 00:55:38,079
data so that we get all the table data
1715
00:55:38,079 --> 00:55:40,079
styling and there you go
1716
00:55:40,079 --> 00:55:41,920
next you can pull in you can pull the
1717
00:55:41,920 --> 00:55:44,559
props out of there
1718
00:55:44,559 --> 00:55:46,720
and then proxy those props down like
1719
00:55:46,720 --> 00:55:47,760
this
1720
00:55:47,760 --> 00:55:49,839
and that basically means that um all the
1721
00:55:49,839 --> 00:55:51,440
styling and all the extra details
1722
00:55:51,440 --> 00:55:53,920
related to a cell is going to be proxy
1723
00:55:53,920 --> 00:55:56,000
to the cell itself so if you do other
1724
00:55:56,000 --> 00:55:57,760
things like hiding the cell so let's
1725
00:55:57,760 --> 00:55:58,960
just say
1726
00:55:58,960 --> 00:56:00,960
um i think it's called is it called
1727
00:56:00,960 --> 00:56:03,200
hidden yeah
1728
00:56:03,200 --> 00:56:05,440
and let's say hidden is equal to um
1729
00:56:05,440 --> 00:56:08,000
email here
1730
00:56:08,000 --> 00:56:10,720
is that gonna work
1731
00:56:10,799 --> 00:56:11,599
ah
1732
00:56:11,599 --> 00:56:12,720
hang on
1733
00:56:12,720 --> 00:56:14,079
i wanna show you this because i think
1734
00:56:14,079 --> 00:56:16,400
it's important
1735
00:56:16,400 --> 00:56:19,040
um
1736
00:56:20,400 --> 00:56:22,559
no visible that's what the word is yeah
1737
00:56:22,559 --> 00:56:23,520
here we go
1738
00:56:23,520 --> 00:56:25,839
you can say visible columns here so
1739
00:56:25,839 --> 00:56:27,200
visible dash
1740
00:56:27,200 --> 00:56:29,760
columns and i want to say hey only show
1741
00:56:29,760 --> 00:56:31,920
me the name column
1742
00:56:31,920 --> 00:56:34,000
all right now if i get rid of this part
1743
00:56:34,000 --> 00:56:36,880
here that is proxying the props
1744
00:56:36,880 --> 00:56:40,400
ah let's just get rid of this as well
1745
00:56:42,640 --> 00:56:44,480
ah that's still working all right to be
1746
00:56:44,480 --> 00:56:46,000
honest um i thought that wouldn't work
1747
00:56:46,000 --> 00:56:48,000
let's just shut down the server
1748
00:56:48,000 --> 00:56:49,119
so that's something that i need to do
1749
00:56:49,119 --> 00:56:51,920
some research on
1750
00:56:52,319 --> 00:56:53,760
that's right i like having new things to
1751
00:56:53,760 --> 00:56:56,000
learn
1752
00:56:56,240 --> 00:56:57,359
yeah i thought that that would actually
1753
00:56:57,359 --> 00:56:58,880
not make it invisible because you need
1754
00:56:58,880 --> 00:57:01,200
to proxy the props anyway yeah you need
1755
00:57:01,200 --> 00:57:02,880
to know this anyway because sometimes
1756
00:57:02,880 --> 00:57:04,960
those props need to be proxied otherwise
1757
00:57:04,960 --> 00:57:06,160
um
1758
00:57:06,160 --> 00:57:08,400
something uh some functionality is going
1759
00:57:08,400 --> 00:57:11,040
to be lost uh inside of that cell all
1760
00:57:11,040 --> 00:57:13,040
right moving on now what we can do is
1761
00:57:13,040 --> 00:57:15,040
actually spit out the row here so i'm
1762
00:57:15,040 --> 00:57:16,720
going to throw that in a pre-tag and
1763
00:57:16,720 --> 00:57:18,640
just say
1764
00:57:18,640 --> 00:57:20,799
props dot row
1765
00:57:20,799 --> 00:57:22,319
all right so notice now we have the
1766
00:57:22,319 --> 00:57:24,480
access to the entire row
1767
00:57:24,480 --> 00:57:26,799
and now let's get rid of that
1768
00:57:26,799 --> 00:57:30,960
and just change it to props dot row
1769
00:57:30,960 --> 00:57:32,240
dot
1770
00:57:32,240 --> 00:57:34,000
uh email
1771
00:57:34,000 --> 00:57:36,000
all right so basically we've now
1772
00:57:36,000 --> 00:57:38,240
replicated the functionality of the
1773
00:57:38,240 --> 00:57:40,960
table cell but now we have total control
1774
00:57:40,960 --> 00:57:43,119
over it so check it out we can use the q
1775
00:57:43,119 --> 00:57:45,200
chip component give it a color equal to
1776
00:57:45,200 --> 00:57:47,520
primary and then we can just pluck this
1777
00:57:47,520 --> 00:57:49,599
out and throw it directly inside of that
1778
00:57:49,599 --> 00:57:50,400
chip
1779
00:57:50,400 --> 00:57:52,160
and now we've got it inside of a chip
1780
00:57:52,160 --> 00:57:54,319
and i believe we've got here text color
1781
00:57:54,319 --> 00:57:56,880
we can set that equal to white
1782
00:57:56,880 --> 00:57:57,920
um
1783
00:57:57,920 --> 00:57:59,040
or maybe
1784
00:57:59,040 --> 00:58:02,720
just class is equal to text dash what
1785
00:58:02,720 --> 00:58:04,480
is that it do i need to refresh the page
1786
00:58:04,480 --> 00:58:06,640
what's going on here yup there we go
1787
00:58:06,640 --> 00:58:09,359
so now you can just take total control
1788
00:58:09,359 --> 00:58:11,119
over what all these different cells look
1789
00:58:11,119 --> 00:58:13,040
like and a pattern that people want to
1790
00:58:13,040 --> 00:58:14,559
know all the time so i'll quickly show
1791
00:58:14,559 --> 00:58:16,640
you it in this video is if you want to
1792
00:58:16,640 --> 00:58:18,240
update one of these cells you can just
1793
00:58:18,240 --> 00:58:20,319
put an input directly in there so i'm
1794
00:58:20,319 --> 00:58:22,799
going to copy that
1795
00:58:22,799 --> 00:58:24,400
and i'm going to paste it directly in
1796
00:58:24,400 --> 00:58:26,000
here
1797
00:58:26,000 --> 00:58:27,920
i'll just hide that out display this a
1798
00:58:27,920 --> 00:58:30,000
little bit nicer
1799
00:58:30,000 --> 00:58:32,000
and now i can come in here and say body
1800
00:58:32,000 --> 00:58:33,760
cell email
1801
00:58:33,760 --> 00:58:36,480
and change this to an input ah not email
1802
00:58:36,480 --> 00:58:39,359
sorry this is body cell name
1803
00:58:39,359 --> 00:58:41,760
so instead of a chip let's say
1804
00:58:41,760 --> 00:58:43,760
q dash input
1805
00:58:43,760 --> 00:58:45,040
ah
1806
00:58:45,040 --> 00:58:45,760
q
1807
00:58:45,760 --> 00:58:46,799
input
1808
00:58:46,799 --> 00:58:48,720
and then v dash model is equal to props
1809
00:58:48,720 --> 00:58:50,559
dot row dot
1810
00:58:50,559 --> 00:58:51,680
um
1811
00:58:51,680 --> 00:58:53,200
name
1812
00:58:53,200 --> 00:58:54,720
all right so now we actually have an
1813
00:58:54,720 --> 00:58:57,599
input for that individual cell
1814
00:58:57,599 --> 00:58:59,119
and then we could say
1815
00:58:59,119 --> 00:59:00,960
borderless all right that's going to get
1816
00:59:00,960 --> 00:59:04,400
rid of all of the borders border styling
1817
00:59:04,400 --> 00:59:05,520
all right so we don't have that
1818
00:59:05,520 --> 00:59:06,720
underline anymore i might have to
1819
00:59:06,720 --> 00:59:09,200
refresh the page yeah sometimes hmr
1820
00:59:09,200 --> 00:59:10,880
doesn't work i'm currently with v i'm
1821
00:59:10,880 --> 00:59:12,400
sure that's going to be fixed soon all
1822
00:59:12,400 --> 00:59:13,680
you do is refresh the page and
1823
00:59:13,680 --> 00:59:15,119
everything works fine so it's not a big
1824
00:59:15,119 --> 00:59:16,880
deal and the other thing is notice
1825
00:59:16,880 --> 00:59:18,319
that's taking up a little bit more space
1826
00:59:18,319 --> 00:59:21,040
now so you can say dense
1827
00:59:21,040 --> 00:59:22,400
so that it takes up a little bit less
1828
00:59:22,400 --> 00:59:24,480
space there we go kind of like um makes
1829
00:59:24,480 --> 00:59:26,079
it a bit smaller
1830
00:59:26,079 --> 00:59:28,319
and now this is an editable field
1831
00:59:28,319 --> 00:59:29,839
now the reason that's not working is
1832
00:59:29,839 --> 00:59:30,880
because
1833
00:59:30,880 --> 00:59:33,680
uh this is not a reactive ref
1834
00:59:33,680 --> 00:59:36,640
so i believe all i have to do
1835
00:59:36,640 --> 00:59:38,319
i could be wrong here i'm pretty sure i
1836
00:59:38,319 --> 00:59:41,040
just need to turn that into a ref
1837
00:59:41,040 --> 00:59:42,480
save it
1838
00:59:42,480 --> 00:59:44,079
refresh the page let's see that works
1839
00:59:44,079 --> 00:59:45,760
now yeah there we go now you can
1840
00:59:45,760 --> 00:59:47,359
actually change that value but as you
1841
00:59:47,359 --> 00:59:48,880
can imagine you'd probably be dealing
1842
00:59:48,880 --> 00:59:50,960
with a back end and you'd say hey when
1843
00:59:50,960 --> 00:59:52,559
this field changes then go ahead and hit
1844
00:59:52,559 --> 00:59:53,760
the back end
1845
00:59:53,760 --> 00:59:55,280
give me a spinner as well i'll quickly
1846
00:59:55,280 --> 00:59:56,880
show you how to do that
1847
00:59:56,880 --> 00:59:59,280
you'd have to say for example
1848
00:59:59,280 --> 01:00:00,480
loading
1849
01:00:00,480 --> 01:00:02,799
loading on here is equal to true and
1850
01:00:02,799 --> 01:00:04,160
then that would obviously be modeling
1851
01:00:04,160 --> 01:00:05,520
something to let us know whether or not
1852
01:00:05,520 --> 01:00:07,200
it's hitting the back end
1853
01:00:07,200 --> 01:00:09,440
so notice we now get that spinner
1854
01:00:09,440 --> 01:00:11,359
on to let us know that it's loading and
1855
01:00:11,359 --> 01:00:12,400
then you might want to add some more
1856
01:00:12,400 --> 01:00:13,920
styling on that so you'd say like color
1857
01:00:13,920 --> 01:00:14,960
is equal to
1858
01:00:14,960 --> 01:00:16,160
primary
1859
01:00:16,160 --> 01:00:17,680
i mean i could sit here all day showing
1860
01:00:17,680 --> 01:00:19,040
you the all the really cool stuff that
1861
01:00:19,040 --> 01:00:20,880
we can do with this input
1862
01:00:20,880 --> 01:00:23,119
but we'll leave it at that for now um
1863
01:00:23,119 --> 01:00:24,640
and by the way i wanted to just wanted
1864
01:00:24,640 --> 01:00:25,760
to point out a really interesting
1865
01:00:25,760 --> 01:00:27,680
pattern with quasar is that it always
1866
01:00:27,680 --> 01:00:28,799
makes things
1867
01:00:28,799 --> 01:00:30,880
really easy to do by default so if you
1868
01:00:30,880 --> 01:00:32,000
remember at the start of when we added
1869
01:00:32,000 --> 01:00:33,920
this table in all we had to do is
1870
01:00:33,920 --> 01:00:35,680
literally add the rows and it just
1871
01:00:35,680 --> 01:00:38,720
worked that is all we did however you
1872
01:00:38,720 --> 01:00:40,720
can extend things however you like it is
1873
01:00:40,720 --> 01:00:42,480
incredibly extendable
1874
01:00:42,480 --> 01:00:45,280
now another thing you might want to do
1875
01:00:45,280 --> 01:00:46,960
is have a form so you can imagine you
1876
01:00:46,960 --> 01:00:48,720
might have like a button at the top here
1877
01:00:48,720 --> 01:00:50,319
that shows a dialogue where you can then
1878
01:00:50,319 --> 01:00:52,160
add a new user so let me just quickly
1879
01:00:52,160 --> 01:00:53,200
show you
1880
01:00:53,200 --> 01:00:54,960
what adding that functionality might
1881
01:00:54,960 --> 01:00:56,319
look like first let's get rid of this
1882
01:00:56,319 --> 01:00:57,599
spinner because it's going to drive you
1883
01:00:57,599 --> 01:00:59,359
all insane
1884
01:00:59,359 --> 01:01:02,640
there we go let's get rid of that
1885
01:01:02,640 --> 01:01:04,720
so a common pattern would be
1886
01:01:04,720 --> 01:01:07,520
jumping into the top here
1887
01:01:07,520 --> 01:01:09,280
whoops in fact what i might do is get
1888
01:01:09,280 --> 01:01:10,480
rid of um
1889
01:01:10,480 --> 01:01:11,839
all of this template just to bring us
1890
01:01:11,839 --> 01:01:15,040
back to a simpler example
1891
01:01:15,040 --> 01:01:16,559
and there we go
1892
01:01:16,559 --> 01:01:21,119
so what we can do is we can say template
1893
01:01:21,119 --> 01:01:24,119
um
1894
01:01:25,359 --> 01:01:27,280
and we can say top and that's going to
1895
01:01:27,280 --> 01:01:29,839
allow us to access the top of the table
1896
01:01:29,839 --> 01:01:32,160
so there we are there so now i can say q
1897
01:01:32,160 --> 01:01:34,079
dash button and i'm going to make this
1898
01:01:34,079 --> 01:01:35,359
button round
1899
01:01:35,359 --> 01:01:37,040
and i'm going to make it
1900
01:01:37,040 --> 01:01:39,040
unelevated
1901
01:01:39,040 --> 01:01:41,280
and let's give it a color equal to
1902
01:01:41,280 --> 01:01:42,559
primary
1903
01:01:42,559 --> 01:01:44,880
all right so i can actually probably
1904
01:01:44,880 --> 01:01:46,960
quickly show you what that does without
1905
01:01:46,960 --> 01:01:48,079
rounds
1906
01:01:48,079 --> 01:01:49,200
it's square
1907
01:01:49,200 --> 01:01:51,599
without unelevated
1908
01:01:51,599 --> 01:01:53,200
it gives us this shadow in fact maybe
1909
01:01:53,200 --> 01:01:54,319
we'll keep that shadow that doesn't look
1910
01:01:54,319 --> 01:01:56,079
too bad and then the color sets at the
1911
01:01:56,079 --> 01:01:57,359
primary of course and then you can say
1912
01:01:57,359 --> 01:01:59,680
the icon is equal to i think it's add or
1913
01:01:59,680 --> 01:02:01,680
plus yeah there we go so now we've got
1914
01:02:01,680 --> 01:02:03,280
like this cool plus button which you can
1915
01:02:03,280 --> 01:02:06,319
imagine is going to be for adding a new
1916
01:02:06,319 --> 01:02:07,359
user
1917
01:02:07,359 --> 01:02:08,480
and then what we want to do is make it
1918
01:02:08,480 --> 01:02:09,920
so that when you click on this we get a
1919
01:02:09,920 --> 01:02:12,000
new dialog and that dialog is going to
1920
01:02:12,000 --> 01:02:14,960
have a form for creating a new user
1921
01:02:14,960 --> 01:02:17,039
so now we can come in and add a dialog
1922
01:02:17,039 --> 01:02:20,640
underneath this table q dialog and one
1923
01:02:20,640 --> 01:02:22,000
thing i like to do
1924
01:02:22,000 --> 01:02:24,720
is say that it's v dash model is equal
1925
01:02:24,720 --> 01:02:27,039
to show dialog
1926
01:02:27,039 --> 01:02:30,480
and then set this equal to
1927
01:02:30,480 --> 01:02:33,119
we say const show dialog is equal to a
1928
01:02:33,119 --> 01:02:36,400
ref that's equal to true by default and
1929
01:02:36,400 --> 01:02:37,760
i set it to true by default because it
1930
01:02:37,760 --> 01:02:39,839
makes it easier to edit so that whenever
1931
01:02:39,839 --> 01:02:41,359
i refresh the page i don't lose that
1932
01:02:41,359 --> 01:02:43,440
dialogue i'll show you what i mean so
1933
01:02:43,440 --> 01:02:45,119
when i save it we now have that dialog
1934
01:02:45,119 --> 01:02:46,480
and of course it looks like nothing by
1935
01:02:46,480 --> 01:02:47,599
default
1936
01:02:47,599 --> 01:02:49,359
right quasar purposely makes the
1937
01:02:49,359 --> 01:02:52,000
dialogue extremely extremely minimal and
1938
01:02:52,000 --> 01:02:53,920
then we can basically start doing stuff
1939
01:02:53,920 --> 01:02:57,200
like throwing in a card q card dash
1940
01:02:57,200 --> 01:02:58,319
section
1941
01:02:58,319 --> 01:02:59,760
and then at the top of the card we might
1942
01:02:59,760 --> 01:03:00,839
have a q
1943
01:03:00,839 --> 01:03:02,960
toolbar this is going to be a great
1944
01:03:02,960 --> 01:03:04,319
opportunity to show you some components
1945
01:03:04,319 --> 01:03:05,680
by the way
1946
01:03:05,680 --> 01:03:06,799
q
1947
01:03:06,799 --> 01:03:09,599
toolbar dash title
1948
01:03:09,599 --> 01:03:11,280
and let's set the title of this toolbar
1949
01:03:11,280 --> 01:03:11,780
equal to
1950
01:03:11,780 --> 01:03:13,280
[Music]
1951
01:03:13,280 --> 01:03:16,480
create user
1952
01:03:16,480 --> 01:03:18,240
all right so let's lay that out a little
1953
01:03:18,240 --> 01:03:20,559
bit nicer
1954
01:03:20,559 --> 01:03:22,480
so basically we've got a cool a toolbar
1955
01:03:22,480 --> 01:03:25,280
um component which adds this um sort of
1956
01:03:25,280 --> 01:03:27,440
space nicely spaced out um top of the
1957
01:03:27,440 --> 01:03:28,720
toolbar
1958
01:03:28,720 --> 01:03:31,359
and then we've got a cue toolbar title
1959
01:03:31,359 --> 01:03:32,480
which basically adds a little bit of
1960
01:03:32,480 --> 01:03:34,000
styling in here
1961
01:03:34,000 --> 01:03:35,680
and then we can say
1962
01:03:35,680 --> 01:03:37,599
q dash button
1963
01:03:37,599 --> 01:03:39,599
and i want to make this flat i want to
1964
01:03:39,599 --> 01:03:42,079
give it an icon equal to close
1965
01:03:42,079 --> 01:03:46,160
and i want to say at rv dash close dash
1966
01:03:46,160 --> 01:03:48,319
popup so this is a really cool directive
1967
01:03:48,319 --> 01:03:50,079
that we get by default with quasar
1968
01:03:50,079 --> 01:03:51,520
that's going to automatically close the
1969
01:03:51,520 --> 01:03:54,240
pop-up that this button is inside of
1970
01:03:54,240 --> 01:03:55,680
all right let's see what that looks like
1971
01:03:55,680 --> 01:03:57,440
there we go when i click on this it
1972
01:03:57,440 --> 01:04:00,400
closes the pop-up how cool is that
1973
01:04:00,400 --> 01:04:01,680
another thing we'll do is we'll make
1974
01:04:01,680 --> 01:04:04,319
this round and we'll set the size equal
1975
01:04:04,319 --> 01:04:05,520
to small i think that might be a bit
1976
01:04:05,520 --> 01:04:06,799
nicer
1977
01:04:06,799 --> 01:04:10,079
let's try that and see how it works
1978
01:04:10,079 --> 01:04:13,359
oops what have i done here
1979
01:04:13,359 --> 01:04:14,640
yeah there we go that's probably a
1980
01:04:14,640 --> 01:04:16,720
really nice um close button
1981
01:04:16,720 --> 01:04:17,520
now
1982
01:04:17,520 --> 01:04:19,039
for the card inside of here i'm going to
1983
01:04:19,039 --> 01:04:22,079
say the style is equal to max
1984
01:04:22,079 --> 01:04:25,359
width and let's say 400 uh
1985
01:04:25,359 --> 01:04:27,599
i don't know
1986
01:04:27,599 --> 01:04:29,920
450 pixels
1987
01:04:29,920 --> 01:04:32,000
save that and then we'll say that the
1988
01:04:32,000 --> 01:04:33,680
class is equal to
1989
01:04:33,680 --> 01:04:34,559
full
1990
01:04:34,559 --> 01:04:35,839
width
1991
01:04:35,839 --> 01:04:37,359
there we go this is a pattern i like to
1992
01:04:37,359 --> 01:04:40,960
use because it means that if it's um
1993
01:04:40,960 --> 01:04:42,160
let's let's just set this to something
1994
01:04:42,160 --> 01:04:44,319
like 600 and what i like to do is say
1995
01:04:44,319 --> 01:04:46,079
the max width is the optimal viewing
1996
01:04:46,079 --> 01:04:48,000
width all right so if it gets a really
1997
01:04:48,000 --> 01:04:49,920
big it's not going to make the width of
1998
01:04:49,920 --> 01:04:51,520
this card too big
1999
01:04:51,520 --> 01:04:54,240
but if we go smaller it is going to get
2000
01:04:54,240 --> 01:04:56,240
smaller because this is set to max width
2001
01:04:56,240 --> 01:04:57,920
all right so this is a great great
2002
01:04:57,920 --> 01:05:00,000
pattern to know about for dialogues set
2003
01:05:00,000 --> 01:05:01,680
it to full width for the card inside of
2004
01:05:01,680 --> 01:05:03,599
it and then set the max width to the
2005
01:05:03,599 --> 01:05:06,000
quote unquote optimal viewing width
2006
01:05:06,000 --> 01:05:07,839
that's how i like to think of it all
2007
01:05:07,839 --> 01:05:09,520
right so this is starting to shape up
2008
01:05:09,520 --> 01:05:11,599
nicely now we've got this cue card
2009
01:05:11,599 --> 01:05:13,680
section in here
2010
01:05:13,680 --> 01:05:15,359
and then this is where you'd have your
2011
01:05:15,359 --> 01:05:16,960
form and usually i'd extract these to
2012
01:05:16,960 --> 01:05:18,319
their own components but you know how to
2013
01:05:18,319 --> 01:05:19,760
do that now because we did that with the
2014
01:05:19,760 --> 01:05:22,480
list for the left menu over here so now
2015
01:05:22,480 --> 01:05:25,760
i can say q dash import
2016
01:05:25,760 --> 01:05:27,280
and let's just breeze through this the
2017
01:05:27,280 --> 01:05:29,760
label is equal to
2018
01:05:29,760 --> 01:05:31,280
name they're going to have a name and
2019
01:05:31,280 --> 01:05:33,359
they're going to have an email you
2020
01:05:33,359 --> 01:05:34,880
wouldn't really do a password i guess
2021
01:05:34,880 --> 01:05:36,720
when you're adding them in this scenario
2022
01:05:36,720 --> 01:05:38,240
and then underneath that card section
2023
01:05:38,240 --> 01:05:40,480
we'll say q dash button and then we'll
2024
01:05:40,480 --> 01:05:43,839
say the label is equal to create
2025
01:05:43,839 --> 01:05:45,039
save it
2026
01:05:45,039 --> 01:05:46,880
and there we go
2027
01:05:46,880 --> 01:05:49,599
i also like to make this um
2028
01:05:49,599 --> 01:05:50,880
filled
2029
01:05:50,880 --> 01:05:54,400
and let's put a class equal to q dash
2030
01:05:54,400 --> 01:05:56,880
margin bottom dash medium there
2031
01:05:56,880 --> 01:05:58,240
there we go
2032
01:05:58,240 --> 01:05:59,359
and
2033
01:05:59,359 --> 01:06:01,359
this button let's say the class is equal
2034
01:06:01,359 --> 01:06:03,520
to full dash width
2035
01:06:03,520 --> 01:06:08,559
and let's set the color equal to primary
2036
01:06:09,119 --> 01:06:10,400
there we go so now we've got like a
2037
01:06:10,400 --> 01:06:12,160
create user form and then you can
2038
01:06:12,160 --> 01:06:13,520
imagine when you click on that create
2039
01:06:13,520 --> 01:06:15,599
button that it does something so let's
2040
01:06:15,599 --> 01:06:17,440
say i click is equal to
2041
01:06:17,440 --> 01:06:18,480
create
2042
01:06:18,480 --> 01:06:20,960
user i'm going to scroll up to the top
2043
01:06:20,960 --> 01:06:23,599
now and create that function
2044
01:06:23,599 --> 01:06:26,559
function create user and then you do
2045
01:06:26,559 --> 01:06:27,839
whatever you need to do to create the
2046
01:06:27,839 --> 01:06:29,760
user and then you'd say that the show
2047
01:06:29,760 --> 01:06:33,119
dialog is now equal to false once again
2048
01:06:33,119 --> 01:06:34,720
we're using the composition api so
2049
01:06:34,720 --> 01:06:36,480
whenever you're dealing with a ref you
2050
01:06:36,480 --> 01:06:38,799
have to say show dialog dot value to
2051
01:06:38,799 --> 01:06:40,880
basically jump into the ref
2052
01:06:40,880 --> 01:06:42,000
um
2053
01:06:42,000 --> 01:06:43,440
to
2054
01:06:43,440 --> 01:06:45,280
change the value inside of it
2055
01:06:45,280 --> 01:06:47,599
so let's save that create and imagine
2056
01:06:47,599 --> 01:06:49,359
that it then created the user and then
2057
01:06:49,359 --> 01:06:51,359
close that dialog one last thing we need
2058
01:06:51,359 --> 01:06:52,319
to do
2059
01:06:52,319 --> 01:06:53,839
this create button doesn't actually do
2060
01:06:53,839 --> 01:06:55,760
anything so let's come down here to that
2061
01:06:55,760 --> 01:06:58,079
button there it is there the add button
2062
01:06:58,079 --> 01:06:59,680
and we can say
2063
01:06:59,680 --> 01:07:02,160
this is really simple at click is equal
2064
01:07:02,160 --> 01:07:03,440
to
2065
01:07:03,440 --> 01:07:05,520
create what do we call it
2066
01:07:05,520 --> 01:07:07,200
show dialog
2067
01:07:07,200 --> 01:07:09,440
is equal to show
2068
01:07:09,440 --> 01:07:11,280
dialog is equal to true all right so
2069
01:07:11,280 --> 01:07:12,720
notice that we can actually put some
2070
01:07:12,720 --> 01:07:14,240
functionality directly inside of the
2071
01:07:14,240 --> 01:07:16,720
template here so
2072
01:07:16,720 --> 01:07:18,720
we don't have to create the function
2073
01:07:18,720 --> 01:07:20,079
inside of here either something as
2074
01:07:20,079 --> 01:07:21,440
simple as
2075
01:07:21,440 --> 01:07:24,559
changing a value to true or false
2076
01:07:24,559 --> 01:07:26,000
all right so when we click on here it
2077
01:07:26,000 --> 01:07:28,480
now shows that dialogue
2078
01:07:28,480 --> 01:07:30,319
all right cool stuff now the last thing
2079
01:07:30,319 --> 01:07:31,680
i want to do is actually show you how to
2080
01:07:31,680 --> 01:07:33,119
model this form because currently that's
2081
01:07:33,119 --> 01:07:34,960
not modeling any data so it doesn't work
2082
01:07:34,960 --> 01:07:36,880
so let's quickly run over that
2083
01:07:36,880 --> 01:07:38,480
uh we'll come in here and we'll say
2084
01:07:38,480 --> 01:07:39,760
const
2085
01:07:39,760 --> 01:07:41,599
create user
2086
01:07:41,599 --> 01:07:43,359
form once again this would usually sit
2087
01:07:43,359 --> 01:07:45,119
inside of its own component and that's
2088
01:07:45,119 --> 01:07:47,760
going to be equal to ref
2089
01:07:47,760 --> 01:07:50,799
and let's say the email
2090
01:07:50,799 --> 01:07:53,520
and then the name
2091
01:07:53,520 --> 01:07:57,200
create user form i'll come down here
2092
01:07:57,200 --> 01:07:58,799
and then we'll say
2093
01:07:58,799 --> 01:08:01,200
wait where are we here we go
2094
01:08:01,200 --> 01:08:02,880
v dash model is equal to create
2095
01:08:02,880 --> 01:08:05,839
userform.name
2096
01:08:05,839 --> 01:08:09,359
and then create userform.email
2097
01:08:09,359 --> 01:08:11,520
so let's save it and now we've got that
2098
01:08:11,520 --> 01:08:13,440
data i'm being modeled so that we can
2099
01:08:13,440 --> 01:08:15,039
actually deal with it when we're ready
2100
01:08:15,039 --> 01:08:17,359
to go ahead and create that user
2101
01:08:17,359 --> 01:08:18,560
in which case you would then hit your
2102
01:08:18,560 --> 01:08:20,640
backend the user would be created and
2103
01:08:20,640 --> 01:08:22,158
then you would go ahead and close that
2104
01:08:22,158 --> 01:08:24,238
dialog so just to give you a little bit
2105
01:08:24,238 --> 01:08:25,759
more of a fuller example here let's
2106
01:08:25,759 --> 01:08:28,719
scroll back up to that
2107
01:08:28,719 --> 01:08:30,479
so this would probably be an async
2108
01:08:30,479 --> 01:08:32,799
function you'd probably say async
2109
01:08:32,799 --> 01:08:34,479
and then you'd have a function that
2110
01:08:34,479 --> 01:08:35,839
creates the user which would be a
2111
01:08:35,839 --> 01:08:39,359
promise so you could say await create
2112
01:08:39,359 --> 01:08:41,279
user
2113
01:08:41,279 --> 01:08:42,640
and then i don't know maybe you're using
2114
01:08:42,640 --> 01:08:45,279
laravel so create user with laravel
2115
01:08:45,279 --> 01:08:47,679
and then you would go ahead and say show
2116
01:08:47,679 --> 01:08:50,319
dialogue that value is equal to false
2117
01:08:50,319 --> 01:08:53,040
and usually you see patterns like this
2118
01:08:53,040 --> 01:08:55,120
where you pull out something like um the
2119
01:08:55,120 --> 01:08:56,560
error
2120
01:08:56,560 --> 01:08:57,600
and then
2121
01:08:57,600 --> 01:08:59,520
the response
2122
01:08:59,520 --> 01:09:01,120
or in this case actually you'd probably
2123
01:09:01,120 --> 01:09:02,799
just pull out the error and then you
2124
01:09:02,799 --> 01:09:04,960
could say something like if we get an
2125
01:09:04,960 --> 01:09:07,198
error there then you know you deal with
2126
01:09:07,198 --> 01:09:09,120
the error
2127
01:09:09,120 --> 01:09:11,679
um else
2128
01:09:11,679 --> 01:09:13,679
set show dialog to false right so just
2129
01:09:13,679 --> 01:09:15,679
to kind of give you a basic idea of how
2130
01:09:15,679 --> 01:09:17,439
you might handle the back end there but
2131
01:09:17,439 --> 01:09:18,799
you know of course i can't do the back
2132
01:09:18,799 --> 01:09:20,560
end in this video because i want it to
2133
01:09:20,560 --> 01:09:22,158
be a little bit more general
2134
01:09:22,158 --> 01:09:23,120
all right
2135
01:09:23,120 --> 01:09:26,238
so there we go uh
2136
01:09:26,238 --> 01:09:28,479
that's about it for that the next thing
2137
01:09:28,479 --> 01:09:30,399
we've got on the list oh by the way
2138
01:09:30,399 --> 01:09:33,120
let's set this equal to false by default
2139
01:09:33,120 --> 01:09:35,359
so now when i refresh the page
2140
01:09:35,359 --> 01:09:37,040
yeah so that sort of gives you an idea
2141
01:09:37,040 --> 01:09:38,238
of how you might start approaching
2142
01:09:38,238 --> 01:09:39,920
building an admin panel
2143
01:09:39,920 --> 01:09:42,158
um let me show you a sort of quick
2144
01:09:42,158 --> 01:09:43,679
example of how you might do the same
2145
01:09:43,679 --> 01:09:45,520
concept using an inventory this is kind
2146
01:09:45,520 --> 01:09:47,040
of going to drill some of the concepts
2147
01:09:47,040 --> 01:09:48,799
that we've done home so i'm going to
2148
01:09:48,799 --> 01:09:50,719
move a little bit faster now let's jump
2149
01:09:50,719 --> 01:09:51,759
into
2150
01:09:51,759 --> 01:09:54,080
main layout and we'll jump into our main
2151
01:09:54,080 --> 01:09:55,760
layout menu list
2152
01:09:55,760 --> 01:09:57,520
and then inside of here we've got users
2153
01:09:57,520 --> 01:10:00,000
let's add another item in there and as
2154
01:10:00,000 --> 01:10:01,600
if you end up having a lot of items here
2155
01:10:01,600 --> 01:10:03,199
you'd probably model data instead and
2156
01:10:03,199 --> 01:10:06,880
say for example v-4 is equal to item in
2157
01:10:06,880 --> 01:10:08,880
items in fact let's actually go ahead
2158
01:10:08,880 --> 01:10:10,800
and implement that
2159
01:10:10,800 --> 01:10:13,280
all right and then you'd say the key is
2160
01:10:13,280 --> 01:10:15,520
equal to something like
2161
01:10:15,520 --> 01:10:17,920
item.label
2162
01:10:17,920 --> 01:10:20,800
and then the place that it's going to
2163
01:10:20,800 --> 01:10:23,199
will be item.2 and then i have to add
2164
01:10:23,199 --> 01:10:24,080
the
2165
01:10:24,080 --> 01:10:25,360
colon here to make sure that actually
2166
01:10:25,360 --> 01:10:26,719
gets um
2167
01:10:26,719 --> 01:10:28,320
interpreted to make sure it gets run so
2168
01:10:28,320 --> 01:10:31,040
it's not seen as a string some beginners
2169
01:10:31,040 --> 01:10:32,159
might not know that if you don't have
2170
01:10:32,159 --> 01:10:34,000
this colon here that's going to be seen
2171
01:10:34,000 --> 01:10:36,239
as item.2 the string but then you add
2172
01:10:36,239 --> 01:10:38,480
the colon and that's the way of saying
2173
01:10:38,480 --> 01:10:41,360
hey view i want you to bind this to
2174
01:10:41,360 --> 01:10:44,719
item.2 so i want that to be um the value
2175
01:10:44,719 --> 01:10:47,840
of that to be passed through to two
2176
01:10:47,840 --> 01:10:49,600
okay so then we'll spit out here the
2177
01:10:49,600 --> 01:10:50,640
label
2178
01:10:50,640 --> 01:10:52,719
item dot label
2179
01:10:52,719 --> 01:10:54,000
save it of course that's not going to
2180
01:10:54,000 --> 01:10:55,199
work because we haven't created any of
2181
01:10:55,199 --> 01:10:56,480
our items yet
2182
01:10:56,480 --> 01:10:59,040
so now i can come up here and say const
2183
01:10:59,040 --> 01:11:00,800
items is equal to
2184
01:11:00,800 --> 01:11:02,239
an array
2185
01:11:02,239 --> 01:11:03,520
and the first one is going to have a
2186
01:11:03,520 --> 01:11:06,480
label equal to
2187
01:11:06,880 --> 01:11:08,719
users
2188
01:11:08,719 --> 01:11:12,159
and then 2 is going to be equal to slash
2189
01:11:12,159 --> 01:11:14,320
users
2190
01:11:14,320 --> 01:11:16,159
and i think that's it
2191
01:11:16,159 --> 01:11:18,400
const sorry
2192
01:11:18,400 --> 01:11:21,520
let's refresh the page here
2193
01:11:21,520 --> 01:11:23,199
and there we go so we basically got the
2194
01:11:23,199 --> 01:11:24,960
same thing but now we're modeling some
2195
01:11:24,960 --> 01:11:26,400
data and you know what i want to show
2196
01:11:26,400 --> 01:11:28,000
you how i would actually do this to make
2197
01:11:28,000 --> 01:11:30,320
this a little bit more realistic so ctrl
2198
01:11:30,320 --> 01:11:32,480
shift p reveal to find that in the left
2199
01:11:32,480 --> 01:11:34,480
menu i'd actually create a new folder
2200
01:11:34,480 --> 01:11:36,880
here called main
2201
01:11:36,880 --> 01:11:39,040
layout and then i go ahead and throw
2202
01:11:39,040 --> 01:11:41,360
that main layout component in there
2203
01:11:41,360 --> 01:11:43,440
and i go ahead and throw the menu list
2204
01:11:43,440 --> 01:11:45,840
in there
2205
01:11:46,640 --> 01:11:48,000
and then
2206
01:11:48,000 --> 01:11:50,640
i go ahead and create another file here
2207
01:11:50,640 --> 01:11:51,520
called
2208
01:11:51,520 --> 01:11:52,719
menu
2209
01:11:52,719 --> 01:11:54,480
items.js
2210
01:11:54,480 --> 01:11:56,239
and i'd actually take all of these menu
2211
01:11:56,239 --> 01:11:57,440
items
2212
01:11:57,440 --> 01:11:59,840
and i'd throw them into this separate
2213
01:11:59,840 --> 01:12:03,120
file here export default
2214
01:12:03,120 --> 01:12:04,480
um yeah i'd probably just do that
2215
01:12:04,480 --> 01:12:06,640
directly like that
2216
01:12:06,640 --> 01:12:08,400
because i'm constantly constantly
2217
01:12:08,400 --> 01:12:10,719
constantly trying to pull my components
2218
01:12:10,719 --> 01:12:12,640
apart as much as i can i don't think
2219
01:12:12,640 --> 01:12:13,760
i've ever
2220
01:12:13,760 --> 01:12:15,679
done too many abstractions in terms of
2221
01:12:15,679 --> 01:12:17,600
pulling my components apart you really
2222
01:12:17,600 --> 01:12:19,280
do want to keep them as in
2223
01:12:19,280 --> 01:12:21,199
like the smallest fragments as you can
2224
01:12:21,199 --> 01:12:23,600
and makes it far easier to maintain so
2225
01:12:23,600 --> 01:12:26,560
now here all i have to do is say menu
2226
01:12:26,560 --> 01:12:28,560
items so we'll pull that in
2227
01:12:28,560 --> 01:12:32,000
oh that didn't import import menu items
2228
01:12:32,000 --> 01:12:34,159
from dot slash
2229
01:12:34,159 --> 01:12:36,159
menu items and then i'll copy that and
2230
01:12:36,159 --> 01:12:38,000
come down here instead of item in items
2231
01:12:38,000 --> 01:12:40,320
we'll say item in menu items
2232
01:12:40,320 --> 01:12:41,840
all right so let's refresh the page see
2233
01:12:41,840 --> 01:12:43,440
if we get any errors there
2234
01:12:43,440 --> 01:12:45,600
looks like i have gotten some
2235
01:12:45,600 --> 01:12:47,199
oh i need to update my routes file
2236
01:12:47,199 --> 01:12:48,320
because i just changed the structure
2237
01:12:48,320 --> 01:12:51,360
here so go to routes.js
2238
01:12:51,360 --> 01:12:52,800
and
2239
01:12:52,800 --> 01:12:56,159
it's now layouts main layouts slash main
2240
01:12:56,159 --> 01:12:58,800
layout.view
2241
01:12:58,800 --> 01:13:00,640
some people will use an index.viewfile
2242
01:13:00,640 --> 01:13:02,000
that's another way to do it i actually
2243
01:13:02,000 --> 01:13:03,360
like to just use the word main
2244
01:13:03,360 --> 01:13:05,360
layout.view because it's easy to search
2245
01:13:05,360 --> 01:13:08,239
so i can now say control p main layout
2246
01:13:08,239 --> 01:13:09,760
and easily jump into it and i can't do
2247
01:13:09,760 --> 01:13:11,600
that as easily when it's index.view
2248
01:13:11,600 --> 01:13:12,960
that's why i like to name them very
2249
01:13:12,960 --> 01:13:14,719
specifically
2250
01:13:14,719 --> 01:13:16,239
that's only a source maps error so i'm
2251
01:13:16,239 --> 01:13:18,960
fine with that and there we go now in
2252
01:13:18,960 --> 01:13:21,040
order to add a new menu item i can jump
2253
01:13:21,040 --> 01:13:22,320
in here
2254
01:13:22,320 --> 01:13:23,760
and say hey
2255
01:13:23,760 --> 01:13:25,440
i now want to have a new menu item and
2256
01:13:25,440 --> 01:13:26,560
by the way this is easier for other
2257
01:13:26,560 --> 01:13:27,840
developers in the future when you do it
2258
01:13:27,840 --> 01:13:28,880
this way
2259
01:13:28,880 --> 01:13:32,080
and we'll call this inventory
2260
01:13:32,080 --> 01:13:34,080
and we'll say in
2261
01:13:34,080 --> 01:13:36,159
ventary
2262
01:13:36,159 --> 01:13:38,560
so come up here inventory now we've got
2263
01:13:38,560 --> 01:13:39,920
our inventory page which of course
2264
01:13:39,920 --> 01:13:42,239
doesn't exist yet control and we'll open
2265
01:13:42,239 --> 01:13:44,840
up this menu here quasar
2266
01:13:44,840 --> 01:13:47,199
new page
2267
01:13:47,199 --> 01:13:49,040
invent oh god i need to spell this right
2268
01:13:49,040 --> 01:13:50,480
in
2269
01:13:50,480 --> 01:13:51,760
inventory
2270
01:13:51,760 --> 01:13:53,440
page there we go
2271
01:13:53,440 --> 01:13:55,760
and now we go to routes.js
2272
01:13:55,760 --> 01:13:57,920
and we've got our users page and by the
2273
01:13:57,920 --> 01:14:00,320
way i'd probably start extracting um
2274
01:14:00,320 --> 01:14:02,159
routes into their own files now because
2275
01:14:02,159 --> 01:14:03,440
this is also starting to get a bit
2276
01:14:03,440 --> 01:14:05,040
bloated for me
2277
01:14:05,040 --> 01:14:06,880
but i won't do that right now
2278
01:14:06,880 --> 01:14:09,440
and we'll call this inventory
2279
01:14:09,440 --> 01:14:12,840
and we want to point that to inventory
2280
01:14:12,840 --> 01:14:16,400
page save it
2281
01:14:16,400 --> 01:14:19,360
and now we should have an inventory page
2282
01:14:19,360 --> 01:14:21,280
inventory page
2283
01:14:21,280 --> 01:14:23,360
once again like i like to name things
2284
01:14:23,360 --> 01:14:25,520
very specifically so
2285
01:14:25,520 --> 01:14:27,679
inventory i can just type in control p
2286
01:14:27,679 --> 01:14:29,280
inventory and easily jump over to that
2287
01:14:29,280 --> 01:14:30,480
file
2288
01:14:30,480 --> 01:14:31,440
um
2289
01:14:31,440 --> 01:14:32,960
i'm just going to replace this with my
2290
01:14:32,960 --> 01:14:34,400
own template
2291
01:14:34,400 --> 01:14:36,080
and then change that back to a q dash
2292
01:14:36,080 --> 01:14:38,000
page by the way cool thing to know about
2293
01:14:38,000 --> 01:14:39,920
q page this is a really handy thing to
2294
01:14:39,920 --> 01:14:42,560
know about q page um notice that
2295
01:14:42,560 --> 01:14:45,840
q page is actually taking up the entire
2296
01:14:45,840 --> 01:14:49,199
size of the frame here um so if i go if
2297
01:14:49,199 --> 01:14:51,040
i bring the scroll bar to the top
2298
01:14:51,040 --> 01:14:53,600
it's still only taking up this section
2299
01:14:53,600 --> 01:14:56,400
here and if i go right to the bottom
2300
01:14:56,400 --> 01:14:58,320
see how the minimum height of the page
2301
01:14:58,320 --> 01:14:59,520
is changing
2302
01:14:59,520 --> 01:15:01,040
this is actually insanely helpful
2303
01:15:01,040 --> 01:15:02,159
because if you need things to be
2304
01:15:02,159 --> 01:15:03,920
contained within this page so for
2305
01:15:03,920 --> 01:15:05,360
example if you want your own scroll bar
2306
01:15:05,360 --> 01:15:07,199
on the right side there rather than
2307
01:15:07,199 --> 01:15:09,120
scrolling down the page and then having
2308
01:15:09,120 --> 01:15:10,640
the menu disappear and then you know
2309
01:15:10,640 --> 01:15:13,520
menu on the left here disappear um since
2310
01:15:13,520 --> 01:15:14,719
this is um
2311
01:15:14,719 --> 01:15:17,440
manually sized like the page on its own
2312
01:15:17,440 --> 01:15:18,719
it means that you can do some really
2313
01:15:18,719 --> 01:15:20,080
interesting
2314
01:15:20,080 --> 01:15:21,280
layouts
2315
01:15:21,280 --> 01:15:22,800
um those of you that are a bit more
2316
01:15:22,800 --> 01:15:24,080
advanced know what i mean by that i
2317
01:15:24,080 --> 01:15:25,840
won't um expand on that anymore because
2318
01:15:25,840 --> 01:15:28,640
it's probably jumping into a
2319
01:15:28,640 --> 01:15:30,719
a too advanced zone
2320
01:15:30,719 --> 01:15:32,000
all right so what am i doing now i'm
2321
01:15:32,000 --> 01:15:34,080
doing an inventory page with some cards
2322
01:15:34,080 --> 01:15:36,400
so we've got this inventory page uh what
2323
01:15:36,400 --> 01:15:38,320
is a car going to have we're probably
2324
01:15:38,320 --> 01:15:40,080
going to want to have an image so let's
2325
01:15:40,080 --> 01:15:40,880
say
2326
01:15:40,880 --> 01:15:42,640
inventory here and of course you can
2327
01:15:42,640 --> 01:15:44,719
imagine this is coming from a back end
2328
01:15:44,719 --> 01:15:47,440
let's say the label of this card
2329
01:15:47,440 --> 01:15:50,159
is equal to
2330
01:15:50,159 --> 01:15:53,440
um i don't know pants
2331
01:15:53,440 --> 01:15:55,440
uh maybe we'll call them like spicy
2332
01:15:55,440 --> 01:15:57,840
pants
2333
01:15:58,080 --> 01:15:59,920
um
2334
01:15:59,920 --> 01:16:01,679
what else i guess you give it an id as
2335
01:16:01,679 --> 01:16:02,880
well because it's probably coming from a
2336
01:16:02,880 --> 01:16:04,320
back end
2337
01:16:04,320 --> 01:16:07,520
uh we'll give it a description
2338
01:16:07,520 --> 01:16:09,920
and they say look
2339
01:16:09,920 --> 01:16:12,000
great in any
2340
01:16:12,000 --> 01:16:13,840
era
2341
01:16:13,840 --> 01:16:15,199
and then i want to have an image for
2342
01:16:15,199 --> 01:16:16,719
this as well so i get to use quasar's
2343
01:16:16,719 --> 01:16:18,480
image component
2344
01:16:18,480 --> 01:16:21,280
image source by the way some people like
2345
01:16:21,280 --> 01:16:24,159
to use sword shorthand like img i hate
2346
01:16:24,159 --> 01:16:25,840
doing that there are some exceptions
2347
01:16:25,840 --> 01:16:27,360
like id for identification because
2348
01:16:27,360 --> 01:16:28,960
they're so obvious but i usually like to
2349
01:16:28,960 --> 01:16:30,320
just write out the whole word for some
2350
01:16:30,320 --> 01:16:32,560
reason that's a pet hate of mine but you
2351
01:16:32,560 --> 01:16:34,320
know everybody knows what img is i guess
2352
01:16:34,320 --> 01:16:36,640
that's a bad example but i try not to um
2353
01:16:36,640 --> 01:16:38,400
shorten words too much because it makes
2354
01:16:38,400 --> 01:16:39,920
it harder for other people to understand
2355
01:16:39,920 --> 01:16:41,040
my code
2356
01:16:41,040 --> 01:16:42,960
um especially when i'm doing loops i
2357
01:16:42,960 --> 01:16:45,440
never use things like i or e or x in a
2358
01:16:45,440 --> 01:16:47,679
loop unless it's some
2359
01:16:47,679 --> 01:16:50,880
a very like um technical type of loop
2360
01:16:50,880 --> 01:16:52,480
all right so moving on here i'm going to
2361
01:16:52,480 --> 01:16:55,520
say https dot slash slash
2362
01:16:55,520 --> 01:16:58,400
i need that to be a string
2363
01:16:58,400 --> 01:17:00,159
pick some dot photos this is a great way
2364
01:17:00,159 --> 01:17:02,159
to just get a random photo let's set the
2365
01:17:02,159 --> 01:17:06,320
width to maybe 600 by 200
2366
01:17:06,320 --> 01:17:07,679
that'll do for now and let's just get
2367
01:17:07,679 --> 01:17:10,719
that first inventory item spat out
2368
01:17:10,719 --> 01:17:12,480
all right so now we can say
2369
01:17:12,480 --> 01:17:13,280
g
2370
01:17:13,280 --> 01:17:15,120
card
2371
01:17:15,120 --> 01:17:17,440
q dash card
2372
01:17:17,440 --> 01:17:18,960
man my um
2373
01:17:18,960 --> 01:17:20,719
ide isn't playing nice for me today q
2374
01:17:20,719 --> 01:17:22,640
dash card
2375
01:17:22,640 --> 01:17:24,880
and then we'll have the image at the top
2376
01:17:24,880 --> 01:17:26,080
so we can say
2377
01:17:26,080 --> 01:17:29,440
v dash 4 is equal to card in
2378
01:17:29,440 --> 01:17:30,640
uh
2379
01:17:30,640 --> 01:17:32,880
inventory
2380
01:17:32,880 --> 01:17:34,560
and then we can say the key because you
2381
01:17:34,560 --> 01:17:35,679
always need to have a key when you're
2382
01:17:35,679 --> 01:17:37,280
going doing a v4
2383
01:17:37,280 --> 01:17:38,480
is equal to
2384
01:17:38,480 --> 01:17:41,480
card.id
2385
01:17:41,600 --> 01:17:43,199
all right there we go
2386
01:17:43,199 --> 01:17:44,560
and then inside of there we're going to
2387
01:17:44,560 --> 01:17:46,719
have the image
2388
01:17:46,719 --> 01:17:50,159
of the thing so for that we can do a q
2389
01:17:50,159 --> 01:17:52,159
image component and we can say the
2390
01:17:52,159 --> 01:17:53,760
source of that image is going to be
2391
01:17:53,760 --> 01:17:54,800
equal to
2392
01:17:54,800 --> 01:17:57,199
the image source so now i can say car
2393
01:17:57,199 --> 01:17:59,440
dot image source
2394
01:17:59,440 --> 01:18:01,520
by the way i named this very badly card
2395
01:18:01,520 --> 01:18:02,880
is a bad name
2396
01:18:02,880 --> 01:18:06,640
um i would say something like um
2397
01:18:06,880 --> 01:18:09,120
item because it's an it's an item in an
2398
01:18:09,120 --> 01:18:11,600
inventory
2399
01:18:11,600 --> 01:18:14,000
so let's refresh that what's going wrong
2400
01:18:14,000 --> 01:18:16,000
here and there we go it's loading up
2401
01:18:16,000 --> 01:18:17,520
that image and that seems to be working
2402
01:18:17,520 --> 01:18:18,719
nicely
2403
01:18:18,719 --> 01:18:19,920
so the next thing i want to do is add
2404
01:18:19,920 --> 01:18:21,760
some padding to this page
2405
01:18:21,760 --> 01:18:23,600
padding so that adds just a little bit
2406
01:18:23,600 --> 01:18:24,960
of padding that's kind of like quasar's
2407
01:18:24,960 --> 01:18:26,560
default padding
2408
01:18:26,560 --> 01:18:29,440
um and now let's go ahead and just add a
2409
01:18:29,440 --> 01:18:31,040
few more of these cards now before we do
2410
01:18:31,040 --> 01:18:32,480
that actually let's set a max width on
2411
01:18:32,480 --> 01:18:35,600
this so style is equal to max dash
2412
01:18:35,600 --> 01:18:36,640
width
2413
01:18:36,640 --> 01:18:37,760
and
2414
01:18:37,760 --> 01:18:41,440
i think a oh what's going on w-i-d-t-h
2415
01:18:41,440 --> 01:18:43,280
i think my t-key is messed up a little
2416
01:18:43,280 --> 01:18:45,280
bit we'll set that to maybe like 300
2417
01:18:45,280 --> 01:18:47,040
pixels
2418
01:18:47,040 --> 01:18:49,520
how's that let's see how that looks
2419
01:18:49,520 --> 01:18:50,719
yeah i think that's a pretty good width
2420
01:18:50,719 --> 01:18:53,040
for the card but i think it's probably
2421
01:18:53,040 --> 01:18:54,480
needs to be a little bit higher maybe
2422
01:18:54,480 --> 01:18:57,920
like 380.
2423
01:18:58,880 --> 01:19:00,719
yeah that's a bit better and let's can
2424
01:19:00,719 --> 01:19:02,640
we say width and height for that image
2425
01:19:02,640 --> 01:19:04,719
can we say like um
2426
01:19:04,719 --> 01:19:06,800
the width is known
2427
01:19:06,800 --> 01:19:08,640
let's say 600
2428
01:19:08,640 --> 01:19:10,640
and the height is equal to
2429
01:19:10,640 --> 01:19:13,600
380.
2430
01:19:14,640 --> 01:19:15,440
yeah
2431
01:19:15,440 --> 01:19:16,719
that means when it's loading it's going
2432
01:19:16,719 --> 01:19:18,159
to be a little bit more specific i think
2433
01:19:18,159 --> 01:19:20,719
that works
2434
01:19:20,719 --> 01:19:22,000
oh it just doesn't need to be
2435
01:19:22,000 --> 01:19:23,360
interpreted it doesn't really matter i
2436
01:19:23,360 --> 01:19:25,120
guess yeah let's leave it like that
2437
01:19:25,120 --> 01:19:26,560
what's going on here invalid prop type
2438
01:19:26,560 --> 01:19:27,520
check for
2439
01:19:27,520 --> 01:19:31,280
okay it exp expects a string there
2440
01:19:31,280 --> 01:19:33,120
um so maybe we'll change that to pixels
2441
01:19:33,120 --> 01:19:36,080
as well
2442
01:19:36,080 --> 01:19:37,520
oh gosh i've been going for a while now
2443
01:19:37,520 --> 01:19:40,719
so i do want to finish up soon
2444
01:19:41,600 --> 01:19:43,600
is it really that much
2445
01:19:43,600 --> 01:19:45,360
oh because we set this to 300 okay we'll
2446
01:19:45,360 --> 01:19:47,840
set that to 300 width and let's set the
2447
01:19:47,840 --> 01:19:50,080
height to maybe 180 and then we'll come
2448
01:19:50,080 --> 01:19:51,280
in here we might as well get one that's
2449
01:19:51,280 --> 01:19:54,080
300 by 180.
2450
01:19:54,080 --> 01:19:55,760
sorry this is finicky start yeah there
2451
01:19:55,760 --> 01:19:57,040
we go just means when it's loading it's
2452
01:19:57,040 --> 01:19:59,440
already the correct height
2453
01:19:59,440 --> 01:20:00,560
and
2454
01:20:00,560 --> 01:20:02,320
that's our first card now the next thing
2455
01:20:02,320 --> 01:20:04,320
you'll probably want to do oh by the way
2456
01:20:04,320 --> 01:20:05,600
you probably want some categories as
2457
01:20:05,600 --> 01:20:07,199
well
2458
01:20:07,199 --> 01:20:08,460
categories equal to
2459
01:20:08,460 --> 01:20:09,679
[Music]
2460
01:20:09,679 --> 01:20:10,480
um
2461
01:20:10,480 --> 01:20:11,840
pants
2462
01:20:11,840 --> 01:20:12,639
and
2463
01:20:12,639 --> 01:20:15,040
clothes
2464
01:20:15,480 --> 01:20:17,360
categories
2465
01:20:17,360 --> 01:20:20,800
all oh category's
2466
01:20:20,800 --> 01:20:22,080
there we go so the first thing i want to
2467
01:20:22,080 --> 01:20:23,280
do is add some chips here for the
2468
01:20:23,280 --> 01:20:25,199
categories so
2469
01:20:25,199 --> 01:20:27,840
i want to add underneath this image a q
2470
01:20:27,840 --> 01:20:30,080
car dash section
2471
01:20:30,080 --> 01:20:32,639
and man for some reason let me just
2472
01:20:32,639 --> 01:20:35,440
restart vola
2473
01:20:35,440 --> 01:20:37,600
because for some reason when i do
2474
01:20:37,600 --> 01:20:41,360
my components it's not automatically
2475
01:20:42,239 --> 01:20:43,440
there we go it's working now i had to
2476
01:20:43,440 --> 01:20:45,840
just restart vola
2477
01:20:45,840 --> 01:20:49,199
and then we'll say q dash
2478
01:20:49,360 --> 01:20:50,800
we'll add some chips in there so we'll
2479
01:20:50,800 --> 01:20:52,320
say
2480
01:20:52,320 --> 01:20:53,760
um
2481
01:20:53,760 --> 01:20:55,600
g dash chip
2482
01:20:55,600 --> 01:20:58,840
and we'll say v 4 is equal to chip in
2483
01:20:58,840 --> 01:21:03,040
chips and then the key is equal to
2484
01:21:03,040 --> 01:21:05,040
let's say chip dot id and we'll actually
2485
01:21:05,040 --> 01:21:07,760
add some more information to these chips
2486
01:21:07,760 --> 01:21:09,760
so how about we give
2487
01:21:09,760 --> 01:21:12,840
the category our
2488
01:21:12,840 --> 01:21:15,840
name and then we'll also give it a
2489
01:21:15,840 --> 01:21:17,199
color
2490
01:21:17,199 --> 01:21:20,480
so primary oh how about we say like um i
2491
01:21:20,480 --> 01:21:22,239
don't know green
2492
01:21:22,239 --> 01:21:24,159
and then we'll make this other one which
2493
01:21:24,159 --> 01:21:27,120
is called clothes
2494
01:21:27,520 --> 01:21:30,320
and make it blue
2495
01:21:30,560 --> 01:21:32,639
all right
2496
01:21:32,639 --> 01:21:34,880
make sure we've got the comma in there
2497
01:21:34,880 --> 01:21:37,600
and we can say feeders for
2498
01:21:37,600 --> 01:21:38,560
uh
2499
01:21:38,560 --> 01:21:41,679
category in
2500
01:21:41,679 --> 01:21:43,760
item
2501
01:21:43,760 --> 01:21:45,040
dot
2502
01:21:45,040 --> 01:21:47,120
categories
2503
01:21:47,120 --> 01:21:48,320
all right there we go so now we've got
2504
01:21:48,320 --> 01:21:49,840
the category id
2505
01:21:49,840 --> 01:21:51,679
and then we can say the color is equal
2506
01:21:51,679 --> 01:21:55,280
to the category dot color
2507
01:21:55,280 --> 01:21:57,440
cool we got those chips showing up now
2508
01:21:57,440 --> 01:21:59,199
um what do we call this we call this the
2509
01:21:59,199 --> 01:22:00,719
name of the chip
2510
01:22:00,719 --> 01:22:03,440
so now we can come in here and say
2511
01:22:03,440 --> 01:22:08,199
the label is equal to category.label
2512
01:22:10,400 --> 01:22:11,440
now
2513
01:22:11,440 --> 01:22:13,120
is it label once again back to the
2514
01:22:13,120 --> 01:22:15,040
trusty api explorer
2515
01:22:15,040 --> 01:22:16,960
q chip
2516
01:22:16,960 --> 01:22:20,080
open it up content we got icons
2517
01:22:20,080 --> 01:22:23,120
um we got label label
2518
01:22:23,120 --> 01:22:24,719
category oh that's right i called it
2519
01:22:24,719 --> 01:22:26,239
name
2520
01:22:26,239 --> 01:22:29,840
my bad and now we can say text dash
2521
01:22:29,840 --> 01:22:32,560
color i think and then say white there
2522
01:22:32,560 --> 01:22:35,040
so let's refresh the page there we go so
2523
01:22:35,040 --> 01:22:36,400
now we've got some chips showing what
2524
01:22:36,400 --> 01:22:37,440
category
2525
01:22:37,440 --> 01:22:39,040
they're in now this card section is
2526
01:22:39,040 --> 01:22:41,360
adding too much padding for my tasting
2527
01:22:41,360 --> 01:22:43,760
but my taste so let's say
2528
01:22:43,760 --> 01:22:46,320
class is equal to q dash
2529
01:22:46,320 --> 01:22:47,920
padding or we'll just make it a smaller
2530
01:22:47,920 --> 01:22:49,199
amount of padding there we go i think
2531
01:22:49,199 --> 01:22:52,080
that looks a bit nicer and then you want
2532
01:22:52,080 --> 01:22:53,840
the name of the thing i probably want
2533
01:22:53,840 --> 01:22:56,239
that before the chips
2534
01:22:56,239 --> 01:22:57,360
yeah i reckon you want it before the
2535
01:22:57,360 --> 01:22:59,199
chips so let's come up
2536
01:22:59,199 --> 01:23:01,199
um before them
2537
01:23:01,199 --> 01:23:03,040
and we'll give it its own div
2538
01:23:03,040 --> 01:23:04,639
and we'll say
2539
01:23:04,639 --> 01:23:06,960
item
2540
01:23:07,280 --> 01:23:08,159
label
2541
01:23:08,159 --> 01:23:10,560
save it spicy pants of course that needs
2542
01:23:10,560 --> 01:23:12,159
to be a little bit bigger we might even
2543
01:23:12,159 --> 01:23:14,000
turn this into a h
2544
01:23:14,000 --> 01:23:15,840
i don't know five maybe
2545
01:23:15,840 --> 01:23:17,520
spicy pants i think that's a good um
2546
01:23:17,520 --> 01:23:20,080
text size and now we can say class is
2547
01:23:20,080 --> 01:23:21,280
equal to
2548
01:23:21,280 --> 01:23:24,960
q dash margin y so margins on the y axis
2549
01:23:24,960 --> 01:23:26,880
is going to equal none so it gets rid of
2550
01:23:26,880 --> 01:23:29,280
that y axis margin
2551
01:23:29,280 --> 01:23:30,719
and i might just change that to margin
2552
01:23:30,719 --> 01:23:33,360
bottom none and then i can say q dash
2553
01:23:33,360 --> 01:23:35,600
margin top small
2554
01:23:35,600 --> 01:23:38,639
yeah that looks good q margin left uh or
2555
01:23:38,639 --> 01:23:40,320
maybe small as well
2556
01:23:40,320 --> 01:23:42,800
small or medium medium maybe
2557
01:23:42,800 --> 01:23:45,199
yeah i think small looks better
2558
01:23:45,199 --> 01:23:47,120
there we go and now one thing that i
2559
01:23:47,120 --> 01:23:48,719
like to do i get a bit obsessed over
2560
01:23:48,719 --> 01:23:51,520
this to say text color no sorry text
2561
01:23:51,520 --> 01:23:52,320
dash
2562
01:23:52,320 --> 01:23:54,639
gray dash nine and it just softens the
2563
01:23:54,639 --> 01:23:55,920
text a little bit which i think is a
2564
01:23:55,920 --> 01:23:57,760
little bit nicer to read and then we
2565
01:23:57,760 --> 01:23:59,199
want the description sitting underneath
2566
01:23:59,199 --> 01:24:01,280
it so we'll come down here and we'll say
2567
01:24:01,280 --> 01:24:02,480
div
2568
01:24:02,480 --> 01:24:04,000
and this is going to be the description
2569
01:24:04,000 --> 01:24:05,040
i like to give them all their own
2570
01:24:05,040 --> 01:24:06,480
separate divs it just makes me feel like
2571
01:24:06,480 --> 01:24:08,320
i've got a little bit more control
2572
01:24:08,320 --> 01:24:10,880
category dot oh sorry not category this
2573
01:24:10,880 --> 01:24:13,760
is going to be the item
2574
01:24:13,760 --> 01:24:14,840
item
2575
01:24:14,840 --> 01:24:19,639
dot whoops description
2576
01:24:20,320 --> 01:24:21,840
there we go that doesn't look quite
2577
01:24:21,840 --> 01:24:23,440
right does it it needs to have its own
2578
01:24:23,440 --> 01:24:25,760
padding class is equal to q dash padding
2579
01:24:25,760 --> 01:24:27,199
or medium
2580
01:24:27,199 --> 01:24:29,120
there we go that's the description of
2581
01:24:29,120 --> 01:24:31,120
the thing i don't know if i like padding
2582
01:24:31,120 --> 01:24:33,360
or medium maybe
2583
01:24:33,360 --> 01:24:34,320
padding
2584
01:24:34,320 --> 01:24:35,280
x
2585
01:24:35,280 --> 01:24:37,360
medium
2586
01:24:37,360 --> 01:24:39,120
yeah and then we could say q dash
2587
01:24:39,120 --> 01:24:40,080
padding
2588
01:24:40,080 --> 01:24:41,760
bottom small you can kind of like style
2589
01:24:41,760 --> 01:24:45,320
this however you like
2590
01:24:47,120 --> 01:24:50,000
yeah so really we want just
2591
01:24:50,000 --> 01:24:51,760
yeah i think that looks good i think i
2592
01:24:51,760 --> 01:24:53,040
want these though to be next to the
2593
01:24:53,040 --> 01:24:54,080
title
2594
01:24:54,080 --> 01:24:55,360
yeah let's try that i think that might
2595
01:24:55,360 --> 01:24:57,120
look a little bit nicer so let's throw
2596
01:24:57,120 --> 01:24:59,679
them in there
2597
01:24:59,679 --> 01:25:00,639
and
2598
01:25:00,639 --> 01:25:02,719
how does that look
2599
01:25:02,719 --> 01:25:04,080
yeah i think that looks a little bit
2600
01:25:04,080 --> 01:25:05,520
better and now maybe we can justify
2601
01:25:05,520 --> 01:25:08,000
using a cue card section here
2602
01:25:08,000 --> 01:25:10,960
now that it spaced it out a little bit
2603
01:25:10,960 --> 01:25:13,280
yeah okay this looks good to me and now
2604
01:25:13,280 --> 01:25:14,639
we'll add a little bit of more margining
2605
01:25:14,639 --> 01:25:16,639
on the left there margin left small will
2606
01:25:16,639 --> 01:25:19,440
become large and left medium
2607
01:25:19,440 --> 01:25:21,440
and i think this looks really nice okay
2608
01:25:21,440 --> 01:25:22,719
just because i'm being super pedantic
2609
01:25:22,719 --> 01:25:26,679
let's come in here and make that dense
2610
01:25:27,679 --> 01:25:29,440
no dance is too dense
2611
01:25:29,440 --> 01:25:31,440
change my mind
2612
01:25:31,440 --> 01:25:33,280
ah what about small size is equal to
2613
01:25:33,280 --> 01:25:34,560
small
2614
01:25:34,560 --> 01:25:36,560
instead of dense
2615
01:25:36,560 --> 01:25:39,199
yeah okay i think that looks pretty good
2616
01:25:39,199 --> 01:25:40,880
so there you go that's the idea of how
2617
01:25:40,880 --> 01:25:42,000
you might do a card for like an
2618
01:25:42,000 --> 01:25:43,440
inventory list
2619
01:25:43,440 --> 01:25:44,880
and if you want to make this clickable
2620
01:25:44,880 --> 01:25:47,360
you could say for example
2621
01:25:47,360 --> 01:25:49,440
class is equal to
2622
01:25:49,440 --> 01:25:52,560
i think it's cursor
2623
01:25:53,440 --> 01:25:55,840
pointer
2624
01:25:57,120 --> 01:26:00,239
or mouse pointer
2625
01:26:02,159 --> 01:26:04,080
ah i can't remember
2626
01:26:04,080 --> 01:26:06,400
let's come in here and say
2627
01:26:06,400 --> 01:26:08,480
pointer the docs have really good
2628
01:26:08,480 --> 01:26:11,360
searching functionality by the way
2629
01:26:11,360 --> 01:26:13,040
they do a really good job hitting all
2630
01:26:13,040 --> 01:26:15,280
different parts of the docs here we go
2631
01:26:15,280 --> 01:26:17,040
style and identity i think that's it
2632
01:26:17,040 --> 01:26:19,600
it's under like um
2633
01:26:19,600 --> 01:26:21,520
helper classes it's a helper class so
2634
01:26:21,520 --> 01:26:24,320
let's say helper
2635
01:26:26,880 --> 01:26:29,760
cursor pointer that's what it is
2636
01:26:29,760 --> 01:26:32,639
so what i can do is say hey
2637
01:26:32,639 --> 01:26:34,239
this card is clickable because you might
2638
01:26:34,239 --> 01:26:35,360
want to make it so that when you click
2639
01:26:35,360 --> 01:26:37,520
on that card something happens
2640
01:26:37,520 --> 01:26:38,880
and there we go now i just get like a
2641
01:26:38,880 --> 01:26:40,400
nice sort of i'm clicking button and it
2642
01:26:40,400 --> 01:26:41,760
might open up a dialogue where you can
2643
01:26:41,760 --> 01:26:44,560
then edit the card for that inventory
2644
01:26:44,560 --> 01:26:46,320
item and then of course you can imagine
2645
01:26:46,320 --> 01:26:48,239
that you would have a bunch of these and
2646
01:26:48,239 --> 01:26:49,760
the next thing you might be interested
2647
01:26:49,760 --> 01:26:50,719
in is
2648
01:26:50,719 --> 01:26:52,000
layout for that and i don't think
2649
01:26:52,000 --> 01:26:53,199
there's actually anything we need to do
2650
01:26:53,199 --> 01:26:54,400
for the layout
2651
01:26:54,400 --> 01:26:57,280
let's just paste a bunch of these down
2652
01:26:57,280 --> 01:26:58,800
and we'll have to change the ids for all
2653
01:26:58,800 --> 01:26:59,920
of them
2654
01:26:59,920 --> 01:27:01,040
one
2655
01:27:01,040 --> 01:27:02,400
two
2656
01:27:02,400 --> 01:27:03,760
three
2657
01:27:03,760 --> 01:27:04,800
four
2658
01:27:04,800 --> 01:27:06,560
let's try that
2659
01:27:06,560 --> 01:27:07,840
all right so that
2660
01:27:07,840 --> 01:27:10,239
layout doesn't look great does it so
2661
01:27:10,239 --> 01:27:11,440
let's have a look at how we might
2662
01:27:11,440 --> 01:27:13,840
improve the layout for this
2663
01:27:13,840 --> 01:27:16,639
uh first thing i'm thinking i want this
2664
01:27:16,639 --> 01:27:19,679
page to be a row
2665
01:27:19,679 --> 01:27:21,600
all right so next thing i'm thinking is
2666
01:27:21,600 --> 01:27:23,040
i want everything to be centered so we
2667
01:27:23,040 --> 01:27:27,040
can say justify center there
2668
01:27:27,760 --> 01:27:29,360
and now next i'm thinking i want to have
2669
01:27:29,360 --> 01:27:31,600
some gaps between
2670
01:27:31,600 --> 01:27:33,840
all of these items and i think i can
2671
01:27:33,840 --> 01:27:35,760
easily do that with um
2672
01:27:35,760 --> 01:27:37,760
well first let's wrap the card
2673
01:27:37,760 --> 01:27:40,320
inside of a div ctrl shift enter
2674
01:27:40,320 --> 01:27:41,440
there's a hotkey for that i can't
2675
01:27:41,440 --> 01:27:42,560
remember what it is sorry but it's a
2676
01:27:42,560 --> 01:27:43,760
really quick way to sort of wrap
2677
01:27:43,760 --> 01:27:45,360
everything
2678
01:27:45,360 --> 01:27:47,840
um
2679
01:27:48,719 --> 01:27:52,000
all right so now we can say
2680
01:27:54,000 --> 01:27:56,159
that this has got a class equal to q
2681
01:27:56,159 --> 01:27:57,760
this is a quick and easy way to do it
2682
01:27:57,760 --> 01:28:00,400
actually q dash padding or medium i
2683
01:28:00,400 --> 01:28:02,400
could just do that couldn't i
2684
01:28:02,400 --> 01:28:05,679
no sorry q dash margin or medium
2685
01:28:05,679 --> 01:28:07,840
and then i you want the margin to be on
2686
01:28:07,840 --> 01:28:09,760
the card this stuff often confuses me q
2687
01:28:09,760 --> 01:28:11,520
margin or
2688
01:28:11,520 --> 01:28:14,520
medium
2689
01:28:16,560 --> 01:28:18,000
and then that's a row maybe these have
2690
01:28:18,000 --> 01:28:20,400
to be set up as a cold class it's equal
2691
01:28:20,400 --> 01:28:22,480
to
2692
01:28:22,480 --> 01:28:24,480
what am i doing wrong here
2693
01:28:24,480 --> 01:28:27,360
this is a row
2694
01:28:27,679 --> 01:28:29,600
ah okay i reckon these divs are taking
2695
01:28:29,600 --> 01:28:32,159
up the entire space so let's take that
2696
01:28:32,159 --> 01:28:34,719
style tag out of there
2697
01:28:34,719 --> 01:28:35,760
because i don't think i actually need
2698
01:28:35,760 --> 01:28:39,400
this class in here
2699
01:28:43,280 --> 01:28:47,040
hmm i don't know what i'm doing wrong
2700
01:28:50,080 --> 01:28:55,400
so this should be a row it is a row
2701
01:28:56,400 --> 01:28:58,880
and
2702
01:28:58,880 --> 01:29:00,719
my voice is low by that do you mean you
2703
01:29:00,719 --> 01:29:03,280
can't hear me very well
2704
01:29:03,280 --> 01:29:05,120
you can use cue gutter instead of q
2705
01:29:05,120 --> 01:29:06,239
marginal
2706
01:29:06,239 --> 01:29:09,440
yes q gutter is nice um
2707
01:29:09,440 --> 01:29:10,800
both of those options are available in
2708
01:29:10,800 --> 01:29:13,360
fact q gutter is probably a better
2709
01:29:13,360 --> 01:29:14,960
option if you have a more thorough
2710
01:29:14,960 --> 01:29:18,080
understanding of quasar
2711
01:29:18,800 --> 01:29:21,040
the reason i don't use it all the time
2712
01:29:21,040 --> 01:29:22,400
is because
2713
01:29:22,400 --> 01:29:24,159
sometimes it runs into problems when
2714
01:29:24,159 --> 01:29:25,600
you're using like
2715
01:29:25,600 --> 01:29:27,360
your own margining and padding and you
2716
01:29:27,360 --> 01:29:28,800
have to do like some
2717
01:29:28,800 --> 01:29:30,960
some nesting and stuff like that however
2718
01:29:30,960 --> 01:29:32,639
i will admit that cue guide is a much
2719
01:29:32,639 --> 01:29:35,440
nicer way to do it um if you do handle
2720
01:29:35,440 --> 01:29:37,440
those kind of edge cases in fact i think
2721
01:29:37,440 --> 01:29:38,480
you're right we probably should use
2722
01:29:38,480 --> 01:29:41,120
qgata here
2723
01:29:41,120 --> 01:29:44,480
but first i want to figure out
2724
01:29:46,560 --> 01:29:50,760
why i can't get these rows working
2725
01:29:52,880 --> 01:29:54,320
i don't want to sit on this for too long
2726
01:29:54,320 --> 01:29:56,560
though
2727
01:30:02,400 --> 01:30:03,600
what am i missing here you know what
2728
01:30:03,600 --> 01:30:04,800
let's go to the quasar docks and just
2729
01:30:04,800 --> 01:30:07,840
look at the part around layout
2730
01:30:10,880 --> 01:30:12,480
see i still get this stuff wrong all the
2731
01:30:12,480 --> 01:30:14,000
time sorry not layout this is around
2732
01:30:14,000 --> 01:30:17,000
grid
2733
01:30:20,719 --> 01:30:22,239
yeah so you make a row and then you just
2734
01:30:22,239 --> 01:30:25,440
throw your divs in there
2735
01:30:29,360 --> 01:30:30,639
so maybe there's something weird that
2736
01:30:30,639 --> 01:30:33,800
i'm doing
2737
01:30:37,360 --> 01:30:38,719
i don't know if anybody can catch what
2738
01:30:38,719 --> 01:30:40,400
i've done wrong here then please let me
2739
01:30:40,400 --> 01:30:41,760
know i'm getting a little bit tired so i
2740
01:30:41,760 --> 01:30:45,120
don't think i can go on for much longer
2741
01:30:45,120 --> 01:30:48,120
um
2742
01:30:53,840 --> 01:30:55,360
what happens if i get rid of justify
2743
01:30:55,360 --> 01:30:58,679
center there
2744
01:31:08,880 --> 01:31:11,199
hmm
2745
01:31:12,719 --> 01:31:17,120
that margining is now messing with um
2746
01:31:17,120 --> 01:31:19,760
the width
2747
01:31:28,159 --> 01:31:29,600
i'm going to change this to a column
2748
01:31:29,600 --> 01:31:33,600
class is equal to col for column
2749
01:31:35,760 --> 01:31:36,880
yeah i think i'm going to have to take a
2750
01:31:36,880 --> 01:31:38,480
break now i mean my brain is just
2751
01:31:38,480 --> 01:31:41,040
shutting down
2752
01:31:43,040 --> 01:31:45,840
um
2753
01:31:53,199 --> 01:31:56,480
i don't get it it's a row
2754
01:31:56,480 --> 01:32:00,080
there's no way columns should work there
2755
01:32:01,760 --> 01:32:04,159
so what else could i
2756
01:32:04,159 --> 01:32:05,840
possibly be doing wrong what else is
2757
01:32:05,840 --> 01:32:09,560
sitting underneath here
2758
01:32:15,760 --> 01:32:16,800
ah
2759
01:32:16,800 --> 01:32:19,120
of course so i'm iterating over all the
2760
01:32:19,120 --> 01:32:21,520
cards inside of this div
2761
01:32:21,520 --> 01:32:25,120
oh gosh that's so silly of me
2762
01:32:25,440 --> 01:32:27,679
and there we go so
2763
01:32:27,679 --> 01:32:29,440
that is now working
2764
01:32:29,440 --> 01:32:31,199
and now it looks like it does make sense
2765
01:32:31,199 --> 01:32:31,460
to
2766
01:32:31,460 --> 01:32:34,159
[Music]
2767
01:32:34,159 --> 01:32:38,679
maybe not set a width and height on that
2768
01:32:40,239 --> 01:32:43,520
so it's not enforced
2769
01:32:45,760 --> 01:32:47,840
and now we want to set a min width on
2770
01:32:47,840 --> 01:32:50,400
these so
2771
01:32:50,400 --> 01:32:54,360
what did i say max width
2772
01:32:55,679 --> 01:32:58,159
um
2773
01:32:59,280 --> 01:33:01,840
so another thing i like to do is set a
2774
01:33:01,840 --> 01:33:03,760
min dash width
2775
01:33:03,760 --> 01:33:04,960
yeah all right i'm going to stop after
2776
01:33:04,960 --> 01:33:08,400
this let's set it to maybe um
2777
01:33:08,400 --> 01:33:11,280
300 pixels as well
2778
01:33:11,280 --> 01:33:12,880
and then maybe we could bump that up to
2779
01:33:12,880 --> 01:33:13,679
like
2780
01:33:13,679 --> 01:33:16,080
450 pixels
2781
01:33:16,080 --> 01:33:18,320
yeah all right that looks pretty good
2782
01:33:18,320 --> 01:33:20,080
and that's going to spawn respond really
2783
01:33:20,080 --> 01:33:21,760
nicely as well it's going to be very
2784
01:33:21,760 --> 01:33:23,760
responsive on just about any
2785
01:33:23,760 --> 01:33:26,480
screen size
2786
01:33:27,120 --> 01:33:28,639
yeah you actually honestly for something
2787
01:33:28,639 --> 01:33:31,040
like this i'd probably just set a width
2788
01:33:31,040 --> 01:33:33,440
so like width is equal to i don't know
2789
01:33:33,440 --> 01:33:36,840
450 pixels
2790
01:33:38,000 --> 01:33:40,880
ah alright so that didn't work
2791
01:33:40,880 --> 01:33:44,320
looks like you need to set both of these
2792
01:33:45,280 --> 01:33:48,159
all right that'll do me for now
2793
01:33:48,159 --> 01:33:50,159
so anyway we covered quite a bit of cool
2794
01:33:50,159 --> 01:33:52,639
stuff we've got a user's table now
2795
01:33:52,639 --> 01:33:55,600
we can go ahead and create a user
2796
01:33:55,600 --> 01:33:57,280
um you know this is all obviously just
2797
01:33:57,280 --> 01:33:59,760
um ui stuff inventory
2798
01:33:59,760 --> 01:34:01,920
we've got our login page and i just
2799
01:34:01,920 --> 01:34:03,360
wanted to give people an idea of how you
2800
01:34:03,360 --> 01:34:05,199
might get up and running
2801
01:34:05,199 --> 01:34:08,639
um with uh the you know modern quasar v
2802
01:34:08,639 --> 01:34:10,480
cli
2803
01:34:10,480 --> 01:34:12,880
and what else so another cool another
2804
01:34:12,880 --> 01:34:13,920
sort of set of things that i want to
2805
01:34:13,920 --> 01:34:15,520
cover is the splitter component i won't
2806
01:34:15,520 --> 01:34:18,159
do this right now proxying data using
2807
01:34:18,159 --> 01:34:20,639
usb model this is a really nice pattern
2808
01:34:20,639 --> 01:34:22,800
um for basically allowing you to wrap
2809
01:34:22,800 --> 01:34:24,719
components and then we're going to talk
2810
01:34:24,719 --> 01:34:26,239
about sort of advanced wrapping of
2811
01:34:26,239 --> 01:34:27,679
components to make it really easy for
2812
01:34:27,679 --> 01:34:29,600
you to extract data and then i wanted to
2813
01:34:29,600 --> 01:34:30,800
talk about some of the stuff i'm working
2814
01:34:30,800 --> 01:34:32,480
on right now but we'll save that for
2815
01:34:32,480 --> 01:34:34,080
another time thanks everyone for
2816
01:34:34,080 --> 01:34:35,360
watching and i'll see you in the next
2817
01:34:35,360 --> 01:34:39,560
stream bye for now
187586
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.