diff --git a/assets/css/style.scss b/assets/css/style.scss index 4d6868ae25d5a7db758ec72a2dbe8b2b25b68bd8..501d9573b6370678d2f72eb64eb5188b28025ffe 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -22,9 +22,10 @@ $breadcrumb-active-color: var(--text-primary-color); $breadcrumb-divider-color: var(--text-primary-color); // List-groups -$list-group-action-hover-color: var(--text-secondary-color); $list-group-bg: var(--background-color-secondary); -$list-group-action-active-bg: transparent; +$list-group-active-bg: rgba(0, 0, 255, 0.075); +$list-group-active-color: var(--text-primary-color); +$list-group-action-hover-color: var(--text-secondary-color); $list-group-action-color: var(--text-primary-color); // Cards diff --git a/components/badge/Quality.vue b/components/badge/Quality.vue new file mode 100644 index 0000000000000000000000000000000000000000..37e4b49a9a78844784df9fd5dfc1c47b80a1580d --- /dev/null +++ b/components/badge/Quality.vue @@ -0,0 +1,26 @@ +<template> + <small> + <span class="badge" + :class="{ + 'badge-success': quality>=80, + 'badge-warning': quality<80, + }"> + {{ Math.round(quality*100)/100 }} + </span> + </small> +</template> + +<script> +export default { + props: { + quality: { + type: Number, + required: true + } + } +} +</script> + +<style> + +</style> \ No newline at end of file diff --git a/components/badge/Status.vue b/components/badge/Status.vue index 4b5aa8050810beaa973affa7b53899f1ade85c24..c6fe45d6ce9a9d762dc1a9c6a4e529692d22d470 100644 --- a/components/badge/Status.vue +++ b/components/badge/Status.vue @@ -17,7 +17,6 @@ export default { }, methods: { displayStatus: function(member){ - console.log(member.limitDate) switch (member.status) { case 'NEWCOMER': return {str: 'Futur membre',class: 'badge-info'} diff --git a/components/certif/List.vue b/components/certif/List.vue index ac9c293ec7bc3cd97288ae780641306174fb544f..f68d26a8da35b0552d01fb1e68d8a2a154935823 100644 --- a/components/certif/List.vue +++ b/components/certif/List.vue @@ -1,7 +1,7 @@ <template> <div class="list-group"> <NuxtLink - :to="'/hash/'+getNeighbor(certif).hash" + :to="'/membres/'+getNeighbor(certif).hash" class="list-group-item list-group-item-action d-lg-flex justify-content-between align-items-center" :class="'list-group-item-'+ $options.filters.dateStatus(certif.expires_on)" v-for="certif in certifsTriees" @@ -9,8 +9,9 @@ <div> {{ getNeighbor(certif).uid }} <BadgeStatus :membre="getNeighbor(certif)" /> + <BadgeQuality :quality="getNeighbor(certif).quality.ratio" /> </div> - <small class="text-muted">Expire le {{ certif.expires_on | formatDate }}</small> + <small>Expire le {{ certif.expires_on | formatDate }}</small> </NuxtLink> </div> </template> diff --git a/components/member/Card.vue b/components/member/Card.vue index f38ffb375b1b104595a75437459e8ca5ea3586f7..7d3e60a92e715d2814fd8d15aa3ca1b270618703 100644 --- a/components/member/Card.vue +++ b/components/member/Card.vue @@ -2,8 +2,8 @@ <div class="card member"> <div class="card-body"> <h2 class="card-title"> - {{ hash.uid }} - <BadgeStatus :membre="hash" /> + {{ hash.uid }} + <BadgeStatus :membre="hash" /> </h2> <div class="card-subtitle mb-2 text-muted">{{ hash.pubkey }}</div> <table class="table table-sm table-borderless" v-if="hash.status != 'REVOKED'"> diff --git a/components/navigation/Bar.vue b/components/navigation/Bar.vue index 8acd6b145d095181c06bce24576e0b19aa0733e2..7016db3424765da5c9be46bf0a4c1fcf095ad610 100644 --- a/components/navigation/Bar.vue +++ b/components/navigation/Bar.vue @@ -104,7 +104,14 @@ nav.breadcrumb { h1 {color: var(--text-primary-color);} .list-group-item { - &-action:not(.active) {background: transparent;} + &-action:not(.active) { + background: transparent; + + &:hover { + background: rgba(0, 0, 255, 0.075); + color: var(--text-primary-color); + } + } div { transition: left .3s ease-in-out; diff --git a/components/navigation/menu/Group.vue b/components/navigation/menu/Group.vue index 9718576f4ce1d2c44fac4e78f31437f978e19b14..01943d3a08cf2735226649c8e33152f8f9a7c1fe 100644 --- a/components/navigation/menu/Group.vue +++ b/components/navigation/menu/Group.vue @@ -1,8 +1,8 @@ <template> <div class="mb-4"> - <h2 class="small text-muted text-uppercase ml-4 mb-3">{{ menu.title }}</h2> + <h2 class="small text-muted text-uppercase ml-4 mb-3 pb-3 border-bottom">{{ menu.title }}</h2> <div class="nav navbar-nav list-group list-group-flush"> - <NuxtLink class="list-group-item list-group-item-action" :to="item.path" v-for="item in menu.items" :key="item.path"><div class="position-relative">{{ item.title }}</div></NuxtLink> + <NuxtLink class="list-group-item list-group-item-action p-0 pl-3" :to="item.path" v-for="item in menu.items" :key="item.path"><div class="position-relative py-3">{{ item.title }}</div></NuxtLink> </div> </div> </template> diff --git a/components/navigation/menu/Sidebar.vue b/components/navigation/menu/Sidebar.vue index 35092eefb3a61144155e6cdb8a415a0cc865aa14..3a493c5b96b111b3db3dd83d80e99d4a4e794768 100644 --- a/components/navigation/menu/Sidebar.vue +++ b/components/navigation/menu/Sidebar.vue @@ -1,6 +1,6 @@ <template> <aside class="menu shadow position-fixed"> - <div class="nav_header border-bottom pb-3 mb-5"> + <div class="nav_header pb-3 mb-5"> <nuxt-link to="/"><h1 class="h2 d-flex"><img src="@/assets/img/logo.png" alt="Accueil" class="logo"> Wotwizard</h1></nuxt-link> <button type="button" class="close position-absolute d-xl-none" aria-label="Close" @click="toggleMenu"> <span aria-hidden="true">×</span> diff --git a/layouts/default.vue b/layouts/default.vue index 26bacf504c43b598545fc8d82af01d44e61f3a29..8e78d1eef03df0624ff8b5e8c87d34052b761528 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -12,16 +12,10 @@ export default { breadcrumb: [], menus : [ { - title: 'Développement', + title: 'En Développement', items : [ {path: '/chartjs',title: 'ChartJS'}, {path: '/membres',title: 'Membres'} - ]}, - { - title: 'Un menu', - items : [ - {path: '/lien',title: 'Un lien'}, - {path: '/autrelien',title: 'Un aure lien'} ]} ] } @@ -38,7 +32,7 @@ export default { /* Define styles for the default root window element */ :root { --text-primary-color: var(--dark); - --text-secondary-color: #322959; + --text-secondary-color: #8a8a8a; --background-color-primary: var(--white); --background-color-secondary: #e9ecef; --element-size: 4rem; @@ -48,7 +42,7 @@ export default { /* Define styles for the root window with dark - mode preference */ :root.dark-theme { --text-primary-color: var(--white); - --text-secondary-color: #173346; + --text-secondary-color: #c9c9c9; --background-color-primary: var(--dark); --background-color-secondary: hsl(210, 16%, 60%); } diff --git a/pages/index.vue b/pages/index.vue index 79720e0dc576b43d2b3ae7940095011c27ec4f2a..f38fe3cb1486f801f4412e6b4643db80137c9a08 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -3,8 +3,8 @@ <h2 class="display-2 text-center mb-5">Page d'accueil</h2> <div class="row"> <div class="col-6 m-auto text-center"> - <button class="btn btn-primary mb-3" @click="helloWorld($event)" data-response="Hello world !">Hello ?</button> - <p>{{ hello }}</p> + <p>Wotwizard-UI est une application web qui a pour but d'offrir une meilleure expérience utilisateur que celle actuellement disponible pour <a href="https://wot-wizard.duniter.org" target="_blank">Wotwizard</a>.</p> + <p>Le code source du projet est disponible sur <a href="https://git.duniter.org/clients/wotwizard-ui" target="_blank">le Gitlab des développeurs de la monnaie libre</a>.</p> </div> </div> </main> diff --git a/pages/hash/_hash.vue b/pages/membres/_hash.vue similarity index 96% rename from pages/hash/_hash.vue rename to pages/membres/_hash.vue index 562e94815158d357c0dd7ff4517a5ea2a91fff4b..bf731fb62abb4716dd9c0fae5e30a917d8cfb433 100644 --- a/pages/hash/_hash.vue +++ b/pages/membres/_hash.vue @@ -64,9 +64,6 @@ export default { minDatePassed membership_pending limitDate - quality { - ratio - } distance { value { ratio @@ -94,6 +91,9 @@ export default { uid hash status + quality { + ratio + } } `, variables() { @@ -124,6 +124,5 @@ export default { </script> <style lang="sass"> - .dark-theme *[class*="list-group-item-"] - opacity: .9 + </style> diff --git a/pages/membres.vue b/pages/membres/index.vue similarity index 93% rename from pages/membres.vue rename to pages/membres/index.vue index 31dad846f837ad67cec7132c9e966f29120bae6f..763999b01232f6868337acb9cf13fb554845ebf6 100644 --- a/pages/membres.vue +++ b/pages/membres/index.vue @@ -21,7 +21,7 @@ </thead> <tbody> <tr v-for="member in idSearch.ids" :key="member.uid" - @click="redirect('/hash/' + member.hash)"> + @click="redirect('/membres/' + member.hash)"> <th scope="row">{{ member.uid }} <BadgeStatus :membre="member" /></th> <td class="d-none d-xl-table-cell">{{ member.pubkey }}</td> </tr> @@ -89,14 +89,6 @@ export default { <style lang="sass" scoped> // CSS Lié au composant .table.table-striped tbody - color: var(--dark) tr - opacity: .9 cursor: pointer - - &:nth-child(2n+1) - opacity: .7 - - &:hover - opacity: 1 </style> \ No newline at end of file