Skip to content

Commit 09a4e71

Browse files
committed
👌 💄 FB JH: further design improvements
1 parent 7a40cf5 commit 09a4e71

File tree

3 files changed

+37
-24
lines changed

3 files changed

+37
-24
lines changed

personalization-webcomponents/src/ChecklistDetail.ce.vue

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,23 @@
2424
<checklist-list
2525
v-if="openCheckList.length !== 0"
2626
:checklist-items="openCheckList"
27+
:disabled="loadingSort || loadingCheck"
2728
@checked="onCheckedOpen"
2829
@sort="onSortOpen"
2930
></checklist-list>
3031
<muc-banner
3132
v-else
3233
class="banner"
3334
type="success"
34-
>Herzlichen Glückwunsch, Sie haben alle Aufgaben erledigt! Wir
35-
bewahren diese Checkliste noch bis zum {{ deletionDate }} für
36-
Sie auf. Danach wird sie automatisch gelöscht.
35+
>
36+
Herzlichen Glückwunsch, Sie haben alle Aufgaben erledigt! Wir bewahren diese Checkliste noch bis zum {{ deletionDate }} für Sie auf. Danach wird sie automatisch gelöscht.
3737
</muc-banner>
3838
<h2 class="headline">
3939
Erledigte Aufgaben ({{ closedCheckList.length }})
4040
</h2>
4141
<checklist-list
4242
v-if="closedCheckList.length !== 0"
43+
:disabled="loadingSort || loadingCheck"
4344
:checklist-items="closedCheckList"
4445
@checked="onCheckedClosed"
4546
:is-draggable="false"
@@ -48,7 +49,8 @@
4849
v-else
4950
class="banner"
5051
type="info"
51-
>Sie haben noch keine erledigten Aufgaben. Haken Sie Aufgaben in
52+
>
53+
Sie haben noch keine erledigten Aufgaben. Haken Sie Aufgaben in
5254
der Checkliste ab, um sie als erledigt zu markieren.
5355
</muc-banner>
5456
</div>
@@ -78,6 +80,8 @@ import { QUERY_PARAM_CHECKLIST_ID, setAccessToken } from "@/util/Constants.ts";
7880
7981
const checklist = ref<Checklist | null>(null);
8082
const loading = ref(true);
83+
const loadingSort = ref(false);
84+
const loadingCheck = ref(false);
8185
8286
const { loggedIn } = useDBSLoginWebcomponentPlugin(_authChangedCallback);
8387
@@ -152,7 +156,7 @@ const deletionDate = computed(() => {
152156
153157
function onCheckedOpen(serviceID: string) {
154158
if (checklist.value) {
155-
loading.value = true;
159+
loadingCheck.value = true;
156160
const service = new ChecklistService();
157161
service
158162
.checkChecklistentry(checklist.value.id, serviceID)
@@ -170,13 +174,13 @@ function onCheckedOpen(serviceID: string) {
170174
.catch((err) => {
171175
console.debug(err);
172176
})
173-
.finally(() => (loading.value = false));
177+
.finally(() => (loadingCheck.value = false));
174178
}
175179
}
176180
177181
function onCheckedClosed(serviceID: string) {
178182
if (checklist.value) {
179-
loading.value = true;
183+
loadingCheck.value = true;
180184
const service = new ChecklistService();
181185
service
182186
.uncheckChecklistentry(checklist.value.id, serviceID)
@@ -194,7 +198,7 @@ function onCheckedClosed(serviceID: string) {
194198
.catch((err) => {
195199
console.debug(err);
196200
})
197-
.finally(() => (loading.value = false));
201+
.finally(() => (loadingCheck.value = false));
198202
}
199203
}
200204
@@ -211,7 +215,7 @@ function onSortOpen(evt: { oldIndex: number; newIndex: number }) {
211215
return item.serviceID === elementToSort.serviceID;
212216
}) as number;
213217
if (oldIndex >= 0 && checklist.value) {
214-
loading.value = true;
218+
loadingSort.value = true;
215219
216220
const newIndex = oldIndex + (evt.newIndex - evt.oldIndex);
217221
const element = checklist.value.checklistItems[oldIndex] as ChecklistItem;
@@ -235,7 +239,7 @@ function onSortOpen(evt: { oldIndex: number; newIndex: number }) {
235239
.catch((err) => {
236240
console.debug(err);
237241
})
238-
.finally(() => (loading.value = false));
242+
.finally(() => (loadingSort.value = false));
239243
}
240244
}
241245
</script>

personalization-webcomponents/src/components/ChecklistList.vue

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@
2929
>
3030
<p13n-checkbox
3131
:id="'cb-' + element.serviceID"
32+
:aria-label="!!element.checked ? element.title + ' als nicht erledigt markieren.' : element.title + ' als erledigt markieren.'"
3233
:checked="!!element.checked"
3334
:disabled="disabled"
35+
style="margin-left: 8px;"
3436
@check="() => onSelectChange(element.serviceID)"
3537
/>
3638
<span
@@ -191,23 +193,24 @@ function handleArrowKeyDown(event: KeyboardEvent) {
191193
background-color: #d0e7ff;
192194
}
193195
194-
.container {
195-
max-width: 600px;
196-
margin: 1rem auto;
197-
padding-left: 0;
198-
}
199-
200196
.list {
201197
list-style: none;
202198
padding: 0;
203199
margin: 0;
204-
border-top: 1px solid #ddd;
200+
border-top: 1px solid var(--color-neutrals-beau-blue-light, #E5EEF5);
201+
border-bottom: 1px solid var(--color-neutrals-beau-blue-light, #E5EEF5);
202+
}
203+
204+
.container {
205+
padding-left: 0;
206+
padding-right: 0;
207+
padding-bottom: 56px;
205208
}
206209
207210
.list-item {
208211
display: flex;
209212
align-items: center;
210-
border-bottom: 1px solid #ddd;
213+
border-bottom: 1px solid var(--color-neutrals-beau-blue-light, #E5EEF5);
211214
user-select: none;
212215
cursor: grab;
213216
color: var(--color-brand-main-blue);
@@ -241,7 +244,7 @@ function handleArrowKeyDown(event: KeyboardEvent) {
241244
text-decoration: underline;
242245
}
243246
244-
@media (max-width: 450px) {
247+
@media (max-width: 576px) {
245248
.label-text {
246249
padding: 12px 8px;
247250
}

personalization-webcomponents/src/components/P13nCheckbox.vue

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
tabindex="0"
55
class="radio-look"
66
:disabled="disabled"
7+
:aria-disabled="disabled"
78
:checked="checked"
8-
@click="emit('check')"
9+
@click="!disabled ? emit('check') : null"
910
@keydown="(evt) => evt.keyCode == 32 ? emit('check') : null"
1011
>
1112
<muc-icon
@@ -64,19 +65,24 @@ const emit = defineEmits(["check"])
6465
transition: opacity 0.3s ease;
6566
}
6667
67-
.radio-look[checked]:hover, .radio-look[checked]:focus {
68+
.radio-look[disabled=true] {
69+
border-color: var(--color-neutrals-grey);
70+
background: var(--gray-x-light, #9CA8B3);
71+
}
72+
73+
.radio-look[checked][disabled=false]:hover, .radio-look[checked][disabled=false]:focus {
6874
border-color: var(--color-brand-main-blue);
6975
background-color: var(--color-neutrals-blue);
7076
}
7177
72-
.radio-look[checked=false]:hover .check-icon, .radio-look[checked=false]:focus .check-icon {
78+
.radio-look[checked=false][disabled=false]:hover .check-icon, .radio-look[checked=false][disabled=false]:focus .check-icon {
7379
opacity: 1;
7480
}
75-
.radio-look[checked=true]:hover .check-icon, .radio-look[checked=true]:focus .check-icon {
81+
.radio-look[checked=true][disabled=false]:hover .check-icon, .radio-look[checked=true][disabled=false]:focus .check-icon {
7682
opacity: 0;
7783
}
7884
79-
.radio-look[checked=true] {
85+
.radio-look[checked=true][disabled=false] {
8086
border-color: var(--color-brand-main-blue-dark, #004376);
8187
background-color: var(--color-brand-main-blue)
8288
}

0 commit comments

Comments
 (0)