تماشای این درس نیاز به اشتراک حرفه‌ای دارد.

Adding Current Row Class4:03

word. And if it's not, yeah, maybe eventually we'll add a class of invalid. Okay, continuing on, we have our styling for correctTiles, presentTiles. And then notice I got rid of any special styling for absentTiles. If it's not yellow or green, then it's absent. Okay, and then finally, we have styling for the output. We fix the position, and then we place it in the bottom and middle of the page. And that's it. Very basic stuff. And that's why I wanted to paste it in. Okay, so let's finish up by working on declaring a currentRow. And this should be pretty easy. You'll see that, of course, we track the currentRowIndex. So why don't we reach for that in our view? I could say right here on our row, I want to add a class of current if this is the currentRow the user is working on. So I could say currentRowIndex equals the index of the row in our iteration. Okay, let's see if that works. I'll give it a refresh. And now this first row should

Animating First Empty Tile4:57

row the User is working on. So I could say currentRowIndex equals the index of the row in our iteration. Okay, let's see if that works. I'll give it a refresh. And now this first row should have a class of current, and it does. But notice the other rows do not. Okay, let's try something. Try submit. And now notice right here, the second row has a class of current. Okay, cool. So if I switch back now, let's uncomment this and have a quick look. I'm saying target the row that is the current one, and then find the very first tile that is empty. And we're going to apply a fade animation. That fade is going to transition the background color to sort of a gray. So we're going to do that over the course of two seconds, and it's going to animate in and out an infinite number of times. Okay, so now you'll see what this does. If I give it a refresh, yeah, notice right here, this is the first empty tile of the current row. And there's a highlight there as a small cue to

دوست دارید گاهی خبرهای Laracasts را ایمیل کنیم؟