Skip to content

Commit 3bc20cb

Browse files
committed
side-by-side, up/down->left/right
1 parent 35a73ce commit 3bc20cb

File tree

1 file changed

+110
-66
lines changed

1 file changed

+110
-66
lines changed

packages/platform-ui/src/components/Study/SessionConfiguration.vue

Lines changed: 110 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,88 @@
11
<template>
22
<div v-if="hasRegistrations">
3-
<div data-cy="select-quilts-header" class="text-h4">Select your quilts</div>
4-
<table width="100%">
5-
<thead>
6-
<tr>
7-
<th>
8-
<v-checkbox
9-
id="SelectAll"
10-
ref="selectAll"
11-
v-model="allSelected"
12-
autofocus
13-
label="Select All"
14-
@update:model-value="toggleAll"
15-
></v-checkbox>
16-
</th>
17-
18-
<th>
19-
Reviews
20-
<!-- <v-icon>info</v-icon> -->
21-
</th>
22-
</tr>
23-
</thead>
24-
<tbody>
25-
<tr v-for="classroom in activeClasses" :key="classroom.classID">
26-
<td>
27-
<v-checkbox v-model="classroom.selected" :label="`Class: ${classroom.name}`" @click.capture="update" />
28-
</td>
29-
<td>-</td>
30-
</tr>
31-
<tr v-for="course in activeCourses" :key="course.courseID">
32-
<td>
33-
<v-checkbox
34-
v-model="course.selected"
35-
data-cy="course-checkbox"
36-
:label="`q/${course.name}`"
37-
@click.capture="update"
38-
/>
39-
</td>
40-
<td>{{ course.reviews }}</td>
41-
</tr>
42-
</tbody>
43-
</table>
44-
<!-- <v-text-field
45-
label="Card Limit for this Session"
46-
hint="Study as much or as little as you like by adjusting this"
47-
type="number"
48-
ref="numberField"
49-
v-model="cardCount"
50-
/> -->
51-
<v-text-field
52-
ref="numberField"
53-
v-model="timeLimit"
54-
class="col-12 col-sm-6 col-md-4 col-lg-3 text-h5"
55-
variant="solo"
56-
prepend-inner-icon="mdi-clock-outline"
57-
prepend-icon="mdi-minus"
58-
append-icon="mdi-plus"
59-
:suffix="timeLimit > 1 ? '(minutes)' : '(minute)'"
60-
hint="Time Limit for this Session"
61-
mask="##"
62-
type="number"
63-
@click:prepend="dec"
64-
@click:append="inc"
65-
/>
66-
<v-btn data-cy="start-studying-button" color="success" @click="startSession">Start Studying!</v-btn>
3+
<div data-cy="select-quilts-header" class="text-h4 mb-12">Study Session Setup</div>
4+
5+
<v-row>
6+
<!-- Left Column: Time Configuration and Start Button -->
7+
<v-col cols="12" md="4" lg="3" class="time-config-column">
8+
<div class="text-h6 mb-3">Session Settings</div>
9+
10+
<div class="mb-5">
11+
<v-text-field
12+
ref="numberField"
13+
v-model="timeLimit"
14+
class="time-limit-field"
15+
variant="outlined"
16+
label="Study Session Timelimit"
17+
prepend-inner-icon="mdi-clock-outline"
18+
prepend-icon="mdi-minus"
19+
append-icon="mdi-plus"
20+
:suffix="timeLimit > 1 ? 'minutes' : 'minute'"
21+
mask="##"
22+
type="number"
23+
@click:prepend="dec"
24+
@click:append="inc"
25+
/>
26+
</div>
27+
28+
<v-btn
29+
data-cy="start-studying-button"
30+
color="success"
31+
size="large"
32+
block
33+
class="start-btn"
34+
@click="startSession"
35+
>
36+
<v-icon start>mdi-play</v-icon>
37+
Start!
38+
</v-btn>
39+
</v-col>
40+
41+
<!-- Right Column: Course Selection -->
42+
<v-col cols="12" md="8" lg="9" class="course-selection-column">
43+
<div class="text-h6 mb-3">Select Quilts to Study</div>
44+
<table width="100%">
45+
<thead>
46+
<tr>
47+
<th>
48+
<v-checkbox
49+
id="SelectAll"
50+
ref="selectAll"
51+
v-model="allSelected"
52+
autofocus
53+
label="Select All"
54+
@update:model-value="toggleAll"
55+
></v-checkbox>
56+
</th>
57+
58+
<th>
59+
Reviews
60+
<!-- <v-icon>info</v-icon> -->
61+
</th>
62+
</tr>
63+
</thead>
64+
<tbody>
65+
<tr v-for="classroom in activeClasses" :key="classroom.classID">
66+
<td>
67+
<v-checkbox v-model="classroom.selected" :label="`Class: ${classroom.name}`" @click.capture="update" />
68+
</td>
69+
<td>-</td>
70+
</tr>
71+
<tr v-for="course in activeCourses" :key="course.courseID">
72+
<td>
73+
<v-checkbox
74+
v-model="course.selected"
75+
data-cy="course-checkbox"
76+
:label="`q/${course.name}`"
77+
@click.capture="update"
78+
/>
79+
</td>
80+
<td>{{ course.reviews }}</td>
81+
</tr>
82+
</tbody>
83+
</table>
84+
</v-col>
85+
</v-row>
6786
</div>
6887
<div v-else class="text-h4">
6988
<p>You don't have anything to study!</p>
@@ -229,14 +248,14 @@ export default defineComponent({
229248
SkldrMouseTrap.reset();
230249
SkldrMouseTrap.bind([
231250
{
232-
hotkey: 'up',
251+
hotkey: 'right',
233252
callback: () => {
234253
this.timeLimit++;
235254
},
236255
command: '',
237256
},
238257
{
239-
hotkey: 'down',
258+
hotkey: 'left',
240259
callback: () => {
241260
this.timeLimit--;
242261
},
@@ -263,4 +282,29 @@ td {
263282
align-content: center !important;
264283
text-align: center !important;
265284
}
285+
286+
.time-config-column {
287+
display: flex;
288+
flex-direction: column;
289+
}
290+
291+
.time-limit-field {
292+
width: 100%;
293+
margin-bottom: 16px;
294+
}
295+
296+
.start-btn {
297+
margin-top: 8px;
298+
max-height: 150px;
299+
}
300+
301+
.course-selection-column {
302+
/* Only add border on medium screens and larger */
303+
}
304+
305+
@media (min-width: 960px) {
306+
.course-selection-column {
307+
border-left: 1px solid rgba(0, 0, 0, 0.12);
308+
}
309+
}
266310
</style>

0 commit comments

Comments
 (0)