diff --git a/assets/css/style.scss b/assets/css/style.scss index 55699531c9ed08cde34ab647e3824569b6044b2a..89754ed3a728b69fb076c53356e6dd562049e99d 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -11,6 +11,7 @@ $body-bg: var(--background-color-primary); $body-color: var(--text-primary-color); // Tables +$table-cell-padding: 0.5rem; $table-bg: var(--background-color-primary); $table-color: var(--text-primary-color); $table-head-bg: var(--background-color-secondary); @@ -53,15 +54,14 @@ $info: #0a8299; cursor: not-allowed; } -.table-hover tbody tr, -thead.sortable th { - cursor: pointer; -} - .table { tbody tr > * { vertical-align: middle; } + + &-hover tbody tr { + cursor: pointer; + } } .list-group-item { diff --git a/components/btn/Sort.vue b/components/btn/Sort.vue index 6f4c6426353f5f6b91861548559f401eff8167c0..e178f0443405b82e70eabe4480cf9a712bf43343 100644 --- a/components/btn/Sort.vue +++ b/components/btn/Sort.vue @@ -1,25 +1,26 @@ <template> - <div class="d-flex align-items-center justify-content-center"> - <div style="width: fit-content">{{ title }}</div> - <div class="ml-2"> - <div + <button + class="px-1 py-2 w-100 h-100 d-flex align-items-center justify-content-center"> + <span>{{ title }}</span> + <span class="ml-2 d-flex flex-column"> + <span class="up" :class="{ sorted: currentSortDir == 'desc' && currentSort == fieldName, invisible: currentSortDir == 'asc' && currentSort == fieldName }"> â–² - </div> - <div + </span> + <span class="down" :class="{ sorted: currentSortDir == 'asc' && currentSort == fieldName, invisible: currentSortDir == 'desc' && currentSort == fieldName }"> â–¼ - </div> - </div> - </div> + </span> + </span> + </button> </template> <script> diff --git a/components/certif/List.vue b/components/certif/List.vue index d4d7f62b714060a15ee195ea8346857f5ca073b3..8a23ec3cfa3292188d66113f9c7283eedce903a2 100644 --- a/components/certif/List.vue +++ b/components/certif/List.vue @@ -7,7 +7,7 @@ class="form-control w-75 mx-auto mb-2" :placeholder="$t('recherche.title')" /> <table class="table table-striped table-hover"> - <thead class="thead-light sortable"> + <thead class="thead-light"> <th class="position-relative" @click="sort('uid')"> <BtnSort :title="$t('membres')" diff --git a/components/member/List.vue b/components/member/List.vue index f2181291b8a5f3b104703bb17d74e808e6a00b2b..08264a6efe428d717336746b0ec266509a9c2671 100644 --- a/components/member/List.vue +++ b/components/member/List.vue @@ -1,9 +1,9 @@ <template> <div class="table-responsive pb-3"> <table class="table table-striped table-hover text-center"> - <thead class="thead-light sortable"> - <tr> - <th class="position-relative" scope="col" @click="sort('uid')"> + <thead class="thead-light"> + <tr class="h-100"> + <th class="p-0 h-100" scope="col" @click="sort('uid')"> <BtnSort fieldName="uid" title="UID" @@ -12,7 +12,7 @@ </th> <th scope="col" - class="d-none d-md-table-cell position-relative" + class="d-none d-md-table-cell p-0" @click="sort('pubkey')" v-if="['search', 'favoris'].includes(type)"> <BtnSort @@ -23,27 +23,39 @@ </th> <th scope="col" - class="d-none d-sm-table-cell position-relative" + class="d-none d-sm-table-cell p-0" @click="sort('date_membership')" - v-if="['adhesion', 'favoris'].includes(type)"> + v-if="['adhesion', 'favoris', 'search'].includes(type)"> <BtnSort fieldName="date_membership" - :title="$t('membre.datelimpertestatut')" + :title=" + ['certif', 'adhesion'].includes(this.type) + ? $t('date') + : $t('membre.datelimpertestatut') + " :currentSort="currentSort" :currentSortDir="currentSortDir" /> </th> <th scope="col" - class="d-none d-lg-table-cell position-relative" + class="d-none p-0" + :class="{ + 'd-sm-table-cell': type == 'certif', + 'd-md-table-cell': type != 'certif' + }" @click="sort('date_certs')" v-if="['certif', 'favoris'].includes(type)"> <BtnSort fieldName="date_certs" - :title="$t('membre.datemanquecertifs')" + :title=" + ['certif', 'adhesion'].includes(this.type) + ? $t('date') + : $t('membre.datemanquecertifs') + " :currentSort="currentSort" :currentSortDir="currentSortDir" /> </th> - <th class="position-relative"></th> + <th v-if="type == 'favoris'"></th> </tr> </thead> <tbody> @@ -82,19 +94,23 @@ </td> <td class="d-none d-sm-table-cell" - v-if="['adhesion', 'favoris'].includes(type)" + v-if="['adhesion', 'favoris', 'search'].includes(type)" @click="redirect(member.hash)"> <BadgeDate :date="member.limitDate" styleDate="long" /> </td> <td - class="d-none d-lg-table-cell" + class="d-none" + :class="{ + 'd-sm-table-cell': type == 'certif', + 'd-md-table-cell': type != 'certif' + }" v-if="['certif', 'favoris'].includes(type)" @click="redirect(member.hash)"> <BadgeDate :date="member.received_certifications.limit" styleDate="long" /> </td> - <td class="py-1"> + <td class="py-1" v-if="type == 'favoris'"> <button class="btn btn-danger" v-if="$favourites.list.includes(member.uid)" diff --git a/i18n/locales/de.json b/i18n/locales/de.json index 45b202158ee57c344aacfae0b0cf93cf8ab20beb..7c22e281b1bdac49d43f8a82206c39916ed3938b 100644 --- a/i18n/locales/de.json +++ b/i18n/locales/de.json @@ -97,7 +97,7 @@ "datelimadhesion": "Beitrittsfrist", "datelimpertestatut": "Verlust der Mitgliedschaft", "datelimrevoc": "Frist vor dem Widerruf", - "datemanquecertifs": "Frist vor fehlender Zertifizierung", + "datemanquecertifs": "Fehlende Zertifizierungen", "desc": "Einzelperson, die in das Vertrauensnetz beigetreten ist, die die fünf erforderlichen Zertifizierungen erhalten hat und die Distanzregel einhält. Ein Mitglied schöpft die Währung über seine Universaldividende mit.", "dispo": "Kann zertifizieren", "dispocertif": "Kann zertifizieren", @@ -184,7 +184,7 @@ "revoila": "Hier sind sie wieder", "slogan": "Der Zauberer des Vertrauensnetzes", "statut": { - "bientotmanquecertif": "Bald zu wenig Zertifizierungen", + "bientotmanquecertif": "Wenig Zertifizierungen", "manquecertif": "Zu wenig Zertifizierungen", "member": "Mitglied", "missing": "Verlorene Mitgliedschaft", diff --git a/i18n/locales/en.json b/i18n/locales/en.json index 4227863f88d9f46a6efd2957e8cc74c8e3e460fa..04027e95ee238646be2edd76f0a309ddd287e91e 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -98,7 +98,7 @@ "datelimadhesion": "Membership deadline", "datelimpertestatut": "Loss of Membership", "datelimrevoc": "Deadline before revocation ", - "datemanquecertifs": "Date before running out of certs", + "datemanquecertifs": "Lack of certifications", "desc": "Individual whose membership is in progress and who has received the 5 necessary certifications allowing him to respect the distance rule. Which allows him to be co-creator of the currency via his Universal Dividend", "dispo": "Available", "dispocertif": "Available to certify", @@ -185,7 +185,7 @@ "revoila": "Here they are again", "slogan": "The Web of Trust’s wizard", "statut": { - "bientotmanquecertif": "Needs certifications soon", + "bientotmanquecertif": "Needs certifications", "manquecertif": "Needs certifications", "member": "Member", "missing": "Membership lost", diff --git a/i18n/locales/es.json b/i18n/locales/es.json index 41f675f6bccef4d13ff69e3e8302e3fcf7c71d93..e90de079ea21aa43129c7454adc064b726768836 100644 --- a/i18n/locales/es.json +++ b/i18n/locales/es.json @@ -98,7 +98,7 @@ "datelimadhesion": "Fecha lÃmite de membresÃa", "datelimrevoc": "Fecha lÃmite de la autorevocación", "datelimpertestatut": "Pérdida de MembresÃa", - "datemanquecertifs": "Fecha antes de quedarse sin certificaciones", + "datemanquecertifs": "Falta de certificaciones", "desc": "Individuo cuya afiliación está en curso y que ha recibido las 5 certificaciones necesarias que le permitan respetar la regla de distanciamiento. Lo que le permite ser co-creador de la moneda a través de su Dividendo Universal", "dispo": "Disponible", "dispocertif": "Disponible para certificar", @@ -185,7 +185,7 @@ "revoila": "Regresan", "slogan": "El mago de la Red de Confianza", "statut": { - "bientotmanquecertif": "Pronto necesitará certificaciones", + "bientotmanquecertif": "Necesitará certificaciones", "manquecertif": "Faltan certificaciones", "member": "Miembro", "missing": "MembresÃa perdida", diff --git a/i18n/locales/fr.json b/i18n/locales/fr.json index 200a2e874b32c7fcad60ab95c068913298f5674f..50e45f5a8b7fe2f654bb9fd946a9dc4979be005a 100644 --- a/i18n/locales/fr.json +++ b/i18n/locales/fr.json @@ -98,7 +98,7 @@ "datelimadhesion": "Date limite d'adhésion", "datelimpertestatut": "Perte d'adhesion", "datelimrevoc": "Date limite avant révocation ", - "datemanquecertifs": "Date avant de manquer de certifs", + "datemanquecertifs": "Manque de certifications", "desc": "Individu dont l'adhésion est en cours et ayant reçu les 5 certifications nécessaires lui permettant de respecter la règle de distance. Ce qui lui permet d'être co-créateur de la monnaie via son Dividende Universel", "dispo": "Disponible", "dispocertif": "Disponible pour certifier", @@ -185,7 +185,7 @@ "revoila": "Les revoilà ", "slogan": "Le magicien de la Toile de Confiance", "statut": { - "bientotmanquecertif": "Bientôt en manque de certifications", + "bientotmanquecertif": "En manque de certifications", "manquecertif": "En manque de certifications", "member": "Membre", "missing": "Adhésion perdue", diff --git a/pages/index.vue b/pages/index.vue index 30983f4d69a549898c1a5ef94aa86f1846fa1f17..124b9c1769643a9a316b16c8a8a2ddaf402b7999 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -8,15 +8,15 @@ <transition name="fade"> <div class="result" v-if="newMembers"> <div class="row text-center"> - <div class="col-md-6 col-lg-4"> + <div class="col-md-6 col-lg-4 mb-5"> <h2 class="h4 text-success">{{ $t("bienvenue") }}</h2> <MemberList :members="newMembers['entrees']" /> </div> - <div class="col-md-6 col-lg-4"> + <div class="col-md-6 col-lg-4 mb-5"> <h2 class="h4 text-danger">{{ $t("aurevoir") }}</h2> <MemberList :members="newMembers['sorties']" /> </div> - <div class="col-lg-4"> + <div class="col-lg-4 mb-5"> <h2 class="h4 text-info">{{ $t("revoila") }}</h2> <MemberList :members="newMembers['renew']" /> </div> diff --git a/pages/membres/index.vue b/pages/membres/index.vue index a0374ce0df944187d595d3dc46edadbc399e2669..3a26a742a963ea8e2f6360c026419a35a9c85f4a 100644 --- a/pages/membres/index.vue +++ b/pages/membres/index.vue @@ -57,7 +57,7 @@ export default { }, methods: { save() { - localStorage.setItem("search", this.param) + localStorage.search = this.param } }, apollo: { @@ -83,10 +83,7 @@ export default { }, mounted() { $nuxt.$emit("changeRoute", this.breadcrumb) - // Rechargement du input - if (localStorage.search) { - this.param = localStorage.getItem("search") - } + this.param = localStorage.search ? localStorage.search : "" } } </script> diff --git a/pages/previsions/futures_sorties.vue b/pages/previsions/futures_sorties.vue index 1448a33094852e672b45337c3a27102408bf84d8..ecc4e74d057f5fa69a182d7b84182c74b31d79e1 100644 --- a/pages/previsions/futures_sorties.vue +++ b/pages/previsions/futures_sorties.vue @@ -3,7 +3,11 @@ <h2 class="text-center my-5 font-weight-light">{{ $t("futureexits") }}</h2> <div class="row flex-column align-items-center"> <div class="col mb-4 text-center"> - <input type="checkbox" id="favoris" v-model="favoris" /> + <input + type="checkbox" + id="favoris" + v-model="favoris" + @change="save()" /> <label for="favoris" class="form-label">{{ $t("favoris.use") }}</label> </div> </div> @@ -15,21 +19,21 @@ </transition> <transition name="fade"> <div class="row" v-if="!$apollo.loading"> - <div class="col-lg-6" v-if="memEnds"> + <div class="col-lg-6 mb-5" v-if="memEnds"> <h2 class="h4 text-danger text-center"> {{ $t("statut.renew") }} </h2> <MemberList - defaultSort="date_sortie" + defaultSort="date_membership" :members="memEnds" type="adhesion" /> </div> - <div class="col-lg-6" v-if="certEnds"> + <div class="col-lg-6 mb-5" v-if="certEnds"> <h2 class="h4 text-danger text-center"> {{ $t("statut.bientotmanquecertif") }} </h2> <MemberList - defaultSort="date_sortie" + defaultSort="date_certs" :members="certEnds" type="certif" /> </div> @@ -73,6 +77,11 @@ export default { return { period: 2635200 } } }, + methods: { + save() { + localStorage.exitsFiltered = this.favoris + } + }, apollo: { memEnds: { query: NEXT_EXITS, @@ -105,6 +114,7 @@ export default { }, mounted() { $nuxt.$emit("changeRoute", this.breadcrumb) + this.favoris = localStorage.exitsFiltered == "true" } } </script> diff --git a/pages/previsions/index.vue b/pages/previsions/index.vue index 69da8a041a1fb2a5dcedc3df25a35e1478b862a6..665282893e1eb11c814178a225a59e765230b702 100644 --- a/pages/previsions/index.vue +++ b/pages/previsions/index.vue @@ -169,7 +169,7 @@ export default { }, methods: { save() { - localStorage.setItem("previsions", this.display) + localStorage.previsions = this.display } }, apollo: { @@ -263,9 +263,7 @@ export default { }, mounted() { $nuxt.$emit("changeRoute", this.breadcrumb) - if (localStorage.previsions) { - this.display = localStorage.getItem("previsions") - } + this.display = localStorage.previsions ? localStorage.previsions : "" } } </script>