Skip to content

Commit

Permalink
feat: allow show week-ends in week mode + refactor i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
kernoeb committed Nov 20, 2023
1 parent f018a38 commit cfebdcd
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 73 deletions.
2 changes: 0 additions & 2 deletions config/custom-environment-variables.json

This file was deleted.

49 changes: 0 additions & 49 deletions config/default.json

This file was deleted.

2 changes: 0 additions & 2 deletions config/development.json

This file was deleted.

2 changes: 0 additions & 2 deletions config/production.json

This file was deleted.

50 changes: 48 additions & 2 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ export default {
'@nuxtjs/component-cache',
// https://saintplay.github.io/vue-swatches/
'vue-swatches/nuxt',
// https://github.com/Djancyp/nuxt-config#readme
'nuxt-json-config',
[
'@dansmaculotte/nuxt-security',
{
Expand Down Expand Up @@ -174,6 +172,54 @@ export default {
apiHost: 'https://' + PLAUSIBLE_DOMAIN,
enableAutoPageviews: true,
enableAutoOutboundTracking: true
},
name: 'PlanningSup',
hideWeekends: process.env.HIDE_WEEKENDS !== 'false',
i18n: {
week: 'Semaine',
weeks: 'Semaines',
day: 'Jour',
month: 'Mois',
today: "Aujourd'hui",
error1: 'Bon y a eu un soucis.',
error2: 'Revient plus tard bg.',
chooseEdt: 'Plannings',
changeEdt: "Changer d'EDT",
changeTheme: 'Changer le thème',
offline: 'Hors connexion',
donate: 'Faire un don',
projectPage: 'Code source',
settings: 'Paramètres',
lightThemeMsg: 'Activer le thème clair',
lightThemeDesc: 'Idéal pour perdre la vue',
blocklist: 'Liste noire',
blocklistDesc: 'Cache les cours contenant le(s) mot(s)',
ui: 'Interface',
error_db: "Le serveur de l'université choisie est indisponible (ou en galère), voici une version sauvegardée datant du ",
error_db_only: 'Planning temporairement indisponible',
error_db_one: 'Au moins un planning temporairement indisponible',
error_saved: 'version sauvegardée du',
error_saved2: 'version sauvegardée',
error_db2: "Le serveur de l'université choisie est indisponible (ou en galère), voici une version sauvegardée.",
error_db_all: "Oups, aucun planning n'est disponible, désolé !",
close: 'Fermer',
distance: 'DISTANCIEL',
mode: 'Mode',
contact: 'Me contacter',
multiplePlannings: 'Multiples plannings',
reset: 'Tout désélectionner',
selection: 'Sélection',
searchPlanning: 'Rechercher un planning',
selectedPlannings: 'plannings sélectionnés',
colors: 'Couleurs des cours',
others: 'Autres',
amphi: 'Amphis',
types: {
td: 'Travaux dirigés',
tp: 'Travaux pratiques',
amphi: 'Amphithéâtre',
other: 'Les cours random'
}
}
},

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"ms": "2.1.3",
"node-libcurl": "3.0.0",
"nuxt": "2.15.8",
"nuxt-json-config": "0.0.2",
"nuxt-start": "2.15.8",
"route-cache": "0.6.1",
"sanitize-html": "2.11.0",
Expand Down
25 changes: 18 additions & 7 deletions pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div v-if="mounted">
<div v-if="mounted" :class="{hideWeekends}">
<!-- <client-only>
<lazy-snackbar />
</client-only>-->
Expand Down Expand Up @@ -371,6 +371,9 @@ export default {
},
titleCss () {
return this.$vuetify.breakpoint.lgAndDown ? 'ml-4 mr-4 mb-3' : 'ma-4'
},
hideWeekends () {
return this.$config.hideWeekends
}
},
watch: {
Expand Down Expand Up @@ -713,27 +716,35 @@ export default {
border-bottom: none !important;
}
.v-calendar-daily .v-calendar-daily__day:nth-child(6) {
.hideWeekends .v-calendar-daily .v-calendar-daily__day:nth-child(8) {
border-right: none !important;
}
.hideWeekends .v-calendar-daily__head .v-calendar-daily_head-day:nth-child(8) {
border-right: none !important;
}
.hideWeekends .v-calendar-daily .v-calendar-daily__day:nth-child(6) {
border-right: none !important;
}
.v-calendar-daily__head .v-calendar-daily_head-day:nth-child(6) {
.hideWeekends .v-calendar-daily__head .v-calendar-daily_head-day:nth-child(6) {
border-right: none !important;
}
.v-calendar-daily__day-container .v-calendar-daily__day:nth-child(8) {
.hideWeekends .v-calendar-daily__day-container .v-calendar-daily__day:nth-child(8) {
display: none !important;
}
.v-calendar-daily__day-container .v-calendar-daily__day:nth-child(7) {
.hideWeekends .v-calendar-daily__day-container .v-calendar-daily__day:nth-child(7) {
display: none !important;
}
.v-calendar-daily__head .v-calendar-daily_head-day:nth-child(7) {
.hideWeekends .v-calendar-daily__head .v-calendar-daily_head-day:nth-child(7) {
display: none !important;
}
.v-calendar-daily__head .v-calendar-daily_head-day:nth-child(8) {
.hideWeekends .v-calendar-daily__head .v-calendar-daily_head-day:nth-child(8) {
display: none !important;
}
Expand Down
8 changes: 0 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cfebdcd

Please sign in to comment.