Skip to content
Snippets Groups Projects
Commit dc853940 authored by Pierre-Jean CHANCELLIER's avatar Pierre-Jean CHANCELLIER
Browse files

Add a star to favorites UID

parent d96ab668
No related branches found
No related tags found
No related merge requests found
......@@ -116,6 +116,7 @@
">
<th scope="row" class="py-1">
<div>
<span v-if="$isFavourite(getNeighbor(certif).uid)">&nbsp;</span>
{{ getNeighbor(certif).uid }}
<BadgeCertifStatus
:limitDate="getNeighbor(certif).received_certifications.limit"
......
......@@ -15,6 +15,7 @@
:key="member.uid"
@click="redirect(member.hash)">
<th scope="row">
<span v-if="$isFavourite(member.uid)">&nbsp;</span>
{{ member.uid }}
<BadgeCertifStatus
:limitDate="member.received_certifications.limit"
......
import i18n from './i18n'
import webpack from 'webpack'
import i18n from "./i18n"
import webpack from "webpack"
export default {
// Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
ssr: false,
// Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
ssr: false,
// Target: https://go.nuxtjs.dev/config-target
target: 'static',
// Target: https://go.nuxtjs.dev/config-target
target: "static",
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: 'wotwizard-ui',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '' },
{ name: 'format-detection', content: 'telephone=no' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: "wotwizard-ui",
meta: [
{ charset: "utf-8" },
{ name: "viewport", content: "width=device-width, initial-scale=1" },
{ hid: "description", name: "description", content: "" },
{ name: "format-detection", content: "telephone=no" }
],
link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }]
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: [
'@/assets/css/style.scss'
],
// Global CSS: https://go.nuxtjs.dev/config-css
css: ["@/assets/css/style.scss"],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
'~plugins/filters.js',
'~plugins/bootstrap.js'
],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
"~plugins/functions.js",
"~plugins/filters.js",
"~plugins/bootstrap.js"
],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
// https://go.nuxtjs.dev/pwa
'@nuxtjs/pwa'
],
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [
// https://go.nuxtjs.dev/pwa
"@nuxtjs/pwa"
],
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
// https://github.com/nuxt-community/apollo-module
'@nuxtjs/apollo',
// https://i18n.nuxtjs.org
'@nuxtjs/i18n'
],
// Modules: https://go.nuxtjs.dev/config-modules
modules: [
// https://github.com/nuxt-community/apollo-module
"@nuxtjs/apollo",
// https://i18n.nuxtjs.org
"@nuxtjs/i18n"
],
i18n: {
defaultLocale: 'fr',
locales: [
{
code: 'en',
name: 'English'
},
{
code: 'fr',
name: 'Français'
},
{
code: 'es',
name: 'Español'
}
],
detectBrowserLanguage: {
alwaysRedirect: true
},
vueI18n: i18n
},
i18n: {
defaultLocale: "fr",
locales: [
{
code: "en",
name: "English"
},
{
code: "fr",
name: "Français"
},
{
code: "es",
name: "Español"
}
],
detectBrowserLanguage: {
alwaysRedirect: true
},
vueI18n: i18n
},
// PWA module configuration: https://go.nuxtjs.dev/pwa
pwa: {
manifest: {
lang: 'fr'
}
},
// PWA module configuration: https://go.nuxtjs.dev/pwa
pwa: {
manifest: {
lang: "fr"
}
},
apollo: {
clientConfigs: {
default: '~/graphql/clients/coindufeu'
//you can setup multiple clients with arbitrary names
//, myotherclient : '~/graphql/clients/otherclient'
},
},
apollo: {
clientConfigs: {
default: "~/graphql/clients/coindufeu"
//you can setup multiple clients with arbitrary names
//, myotherclient : '~/graphql/clients/otherclient'
}
},
router: {
linkExactActiveClass: 'active'
},
router: {
linkExactActiveClass: "active"
},
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
plugins: [
new webpack.ProvidePlugin({
$: "jquery"
})
],
}
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
plugins: [
new webpack.ProvidePlugin({
$: "jquery"
})
]
}
}
......@@ -60,6 +60,9 @@
)
">
<th scope="row">
<span v-if="$isFavourite(forecast.member.uid)"
>&nbsp;</span
>
{{ forecast.member.uid }}
<BadgeStatus :membre="forecast.member" />
</th>
......@@ -114,6 +117,9 @@
v-for="member in forecast.forecasts"
:key="member.member.uid">
<div class="mr-3">
<span v-if="$isFavourite(member.member.uid)"
>&nbsp;</span
>
{{ member.member.uid }}
<BadgeStatus :membre="member.member" />
</div>
......
export default (context, inject) => {
const isFavourite = (uid) => {
if (!localStorage.favourites) {
return false
} else if (JSON.parse(localStorage.favourites).includes(uid)) {
return true
}
return false
}
inject("isFavourite", isFavourite)
// For Nuxt <= 2.12, also add 👇
// context.$hello = hello
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment