Skip to content

Commit

Permalink
ui: add a plus button to simplify blocklist on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
kernoeb committed Sep 2, 2024
1 parent 003d2bc commit dffadfa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
12 changes: 6 additions & 6 deletions assets/plannings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7234,7 +7234,7 @@
{
"id": "g4",
"title": "G4",
"url": "https://planning.univ-rennes1.fr/jsp/custom/modules/plannings/anonymous_cal.jsp?resources=15882&projectId=1&calType=ical&firstDate={date-start}&lastDate={date-end}"
"url": "https://planning.univ-rennes1.fr/jsp/custom/modules/plannings/anonymous_cal.jsp?resources=15882&projectId=2&calType=ical&firstDate={date-start}&lastDate={date-end}"
},
{
"id": "g5",
Expand Down Expand Up @@ -7719,7 +7719,7 @@
{
"id": "g1",
"title": "G1",
"url": "https://planning.univ-rennes1.fr/jsp/custom/modules/plannings/anonymous_cal.jsp?resources=16580&projectId=1&calType=ical&firstDate={date-start}&lastDate={date-end}"
"url": "https://planning.univ-rennes1.fr/jsp/custom/modules/plannings/anonymous_cal.jsp?resources=16580&projectId=2&calType=ical&firstDate={date-start}&lastDate={date-end}"
},
{
"id": "g2",
Expand Down Expand Up @@ -7780,7 +7780,7 @@
{
"id": "g3",
"title": "G3",
"url": "https://planning.univ-rennes1.fr/jsp/custom/modules/plannings/anonymous_cal.jsp?resources=16528&projectId=1&calType=ical&firstDate={date-start}&lastDate={date-end}"
"url": "https://planning.univ-rennes1.fr/jsp/custom/modules/plannings/anonymous_cal.jsp?resources=16528&projectId=2&calType=ical&firstDate={date-start}&lastDate={date-end}"
},
{
"id": "g4",
Expand Down Expand Up @@ -8834,7 +8834,7 @@
{
"id": "infp-informatiquespecifiquepost-paces",
"title": "INFP-Informatique spécifique (post-paces)",
"url": "https://planning.univ-rennes1.fr/jsp/custom/modules/plannings/anonymous_cal.jsp?resources=13783&projectId=1&calType=ical&firstDate={date-start}&lastDate={date-end}"
"url": "https://planning.univ-rennes1.fr/jsp/custom/modules/plannings/anonymous_cal.jsp?resources=13783&projectId=2&calType=ical&firstDate={date-start}&lastDate={date-end}"
},
{
"edts": [
Expand Down Expand Up @@ -9506,7 +9506,7 @@
{
"id": "isticm1opt-str-cobratpgra",
"title": "STR - COBRA TP GrA",
"url": "https://planning.univ-rennes1.fr/jsp/custom/modules/plannings/anonymous_cal.jsp?resources=12509&projectId=1&calType=ical&firstDate={date-start}&lastDate={date-end}"
"url": "https://planning.univ-rennes1.fr/jsp/custom/modules/plannings/anonymous_cal.jsp?resources=12509&projectId=2&calType=ical&firstDate={date-start}&lastDate={date-end}"
},
{
"id": "isticm1opt-str-cobratpgrb",
Expand Down Expand Up @@ -9616,7 +9616,7 @@
{
"id": "isticm1opt1-str",
"title": "STR",
"url": "https://planning.univ-rennes1.fr/jsp/custom/modules/plannings/anonymous_cal.jsp?resources=11291&projectId=1&calType=ical&firstDate={date-start}&lastDate={date-end}"
"url": "https://planning.univ-rennes1.fr/jsp/custom/modules/plannings/anonymous_cal.jsp?resources=11291&projectId=2&calType=ical&firstDate={date-start}&lastDate={date-end}"
},
{
"id": "isticm1opt1-str-tpgrb",
Expand Down
14 changes: 13 additions & 1 deletion components/DialogSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
<v-combobox
v-model="blocklistSelect"
:append-icon="mdiMenuDown"
:search-input.sync="blocklistSelectSearch"
:items="blocklist"
:label="$config.i18n.blocklistDesc"
chips
Expand Down Expand Up @@ -231,6 +232,15 @@
</v-list-item-content>
</v-list-item>
</template>
<template #append>
<v-btn
:disabled="!blocklistSelectSearch || blocklistSelect.includes(blocklistSelectSearch)"
icon
@click="blocklistSelect.push(blocklistSelectSearch); blocklistSelectSearch = ''; updateBlocklist(blocklistSelect)"
>
<v-icon>{{ mdiPlus }}</v-icon>
</v-btn>
</template>
</v-combobox>
</v-list-item>
<v-list-item
Expand Down Expand Up @@ -343,7 +353,7 @@
</template>

<script>
import { mdiClose, mdiCheckboxBlankOutline, mdiCheckboxMarked, mdiCogOutline, mdiMail, mdiMenuDown, mdiTwitter, mdiArrowRightCircleOutline } from '@mdi/js'
import { mdiPlus, mdiClose, mdiCheckboxBlankOutline, mdiCheckboxMarked, mdiCogOutline, mdiMail, mdiMenuDown, mdiTwitter, mdiArrowRightCircleOutline } from '@mdi/js'
export default {
name: 'DialogSettings',
Expand Down Expand Up @@ -372,9 +382,11 @@ export default {
mdiCheckboxMarked,
mdiClose,
mdiArrowRightCircleOutline,
mdiPlus,
blocklist: ['Maths', 'Communication', 'Férié'], // Oui, bon...
blocklistSelect: [],
blocklistSelectSearch: '',
localeUtils: {},
Expand Down

0 comments on commit dffadfa

Please sign in to comment.