aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/EditorLists.vue67
-rw-r--r--src/components/List.vue23
-rw-r--r--src/models/EventInfo.ts2
3 files changed, 62 insertions, 30 deletions
diff --git a/src/components/EditorLists.vue b/src/components/EditorLists.vue
index 26e0ecc..e70445d 100644
--- a/src/components/EditorLists.vue
+++ b/src/components/EditorLists.vue
@@ -1,19 +1,28 @@
<template>
<div id="editor-lists">
<div class="column">
- <list :items="peerTeachers" @selection-changed="handlePtClick" #default="pt">
- {{ pt.item.name }} <button @click.stop="deletePeerTeacher(pt.item.id)">X</button>
- </list>
+ <h3>Peer Teachers</h3>
+ <List :items="peerTeachers" @selection-changed="handlePtClick" #default="pt">
+ <span class="list-item">
+ {{ pt.item.name }} <button @click.stop="deletePeerTeacher(pt.item.id)">x</button>
+ </span>
+ </List>
</div>
<div class="column">
- <list :items="compatibleLabs" #default="lab">
- {{ lab.item.fullInfo }} <button @click.stop="assignLab(lab.item.id)">+</button>
- </list>
+ <h3>Labs</h3>
+ <List :items="compatibleLabs" #default="lab">
+ <span class="list-item">
+ {{ lab.item.fullInfo }} <button @click.stop="assignLab(lab.item.id)">+</button>
+ </span>
+ </List>
</div>
<div class="column">
- <list :items="selectedPeerTeacherAssignments" #default="lab">
- {{ lab.item.fullInfo }} <button @click.stop="unassignLab(lab.item.id)">X</button>
- </list>
+ <h3>Assignments</h3>
+ <List :items="selectedPeerTeacherAssignments" #default="lab">
+ <span class="list-item">
+ {{ lab.item.fullInfo }} <button @click.stop="unassignLab(lab.item.id)">x</button>
+ </span>
+ </List>
</div>
</div>
</template>
@@ -90,8 +99,48 @@ export default defineComponent({
min-height: 0;
}
+h3 {
+ color: white;
+ margin: 0;
+}
+
.column {
flex: 1;
overflow: auto;
}
+
+.list-item {
+ align-items: center;
+ display: flex;
+ justify-content: space-between;
+ margin: 0.5em;
+ padding: 0.5em;
+}
+
+.list-item:hover {
+ background-color: #c0c0c0;
+}
+
+.list-item > button {
+ background-color: #500000;
+ border: none;
+ color: white;
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
+ font-size: 1em;
+}
+
+@media (prefers-color-scheme: dark) {
+ .list-item {
+ background-color: #303030;
+ color: white;
+ }
+
+ .list-item:hover {
+ background-color: #707070;
+ }
+
+ .list-item > button {
+ background-color: #81302b;
+ }
+}
</style>
diff --git a/src/components/List.vue b/src/components/List.vue
index 843370e..f1ef690 100644
--- a/src/components/List.vue
+++ b/src/components/List.vue
@@ -3,8 +3,7 @@
<li
v-for="item in items"
:key="item.id"
- @click="$emit('selectionChanged', item)"
- class="list-item">
+ @click="$emit('selectionChanged', item)">
<slot :item="item">{{ item }}</slot>
</li>
</ul>
@@ -25,23 +24,7 @@ export default {
<style scoped>
.list {
list-style-type: none;
-}
-
-.list-item {
- border-radius: 5px;
- margin: 5px 0;
- padding: 0.15em;
- text-align: center;
-}
-
-.list-item:hover {
- background-color: rgb(182, 182, 182);
-}
-
-@media (prefers-color-scheme: dark) {
- .list-item {
- background-color: #303030;
- color: white;
- }
+ margin: 0;
+ padding: 0;
}
</style>
diff --git a/src/models/EventInfo.ts b/src/models/EventInfo.ts
index 4493162..962ec70 100644
--- a/src/models/EventInfo.ts
+++ b/src/models/EventInfo.ts
@@ -39,7 +39,7 @@ export default class EventInfo {
get info() {
if (this.days === '') {
- return 'ONLINE';
+ return 'WEB';
}
return `${this.days} ${EventInfo.timeToStr(this.start)}-${EventInfo.timeToStr(this.end)}`;
}