some style changes and cookies persistance added
This commit is contained in:
@@ -28,6 +28,7 @@ export default {
|
|||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
const auth = useAuthStore();
|
const auth = useAuthStore();
|
||||||
|
console.log("auth.cookiesAccepted", auth.cookiesAccepted);
|
||||||
if (auth.cookiesAccepted === true) {
|
if (auth.cookiesAccepted === true) {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -485,7 +485,7 @@ export default {
|
|||||||
h4 {
|
h4 {
|
||||||
font-size: $h4;
|
font-size: $h4;
|
||||||
font-weight: $medium;
|
font-weight: $medium;
|
||||||
color: $color-navy;
|
color: black;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ export default defineNuxtConfig({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
pinia: {
|
||||||
|
storesDirs: ['./stores/**'],
|
||||||
|
},
|
||||||
css: [
|
css: [
|
||||||
'~/assets/scss/main.scss',
|
'~/assets/scss/main.scss',
|
||||||
'bootstrap/dist/css/bootstrap.min.css',
|
'bootstrap/dist/css/bootstrap.min.css',
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.container {
|
.container {
|
||||||
margin-top: 40px;
|
|
||||||
margin-bottom: 80px;
|
margin-bottom: 80px;
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.container {
|
.container {
|
||||||
margin-top: 40px;
|
// margin-top: 40px;
|
||||||
margin-bottom: 80px;
|
margin-bottom: 80px;
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.container {
|
.container {
|
||||||
margin-top: 40px;
|
// margin-top: 40px;
|
||||||
margin-bottom: 80px;
|
margin-bottom: 80px;
|
||||||
}
|
}
|
||||||
.edit-product {
|
.edit-product {
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.container {
|
.container {
|
||||||
margin-top: 40px;
|
// margin-top: 40px;
|
||||||
margin-bottom: 80px;
|
margin-bottom: 80px;
|
||||||
}
|
}
|
||||||
.add-product {
|
.add-product {
|
||||||
|
|||||||
@@ -305,7 +305,7 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.container {
|
.container {
|
||||||
margin-top: 40px;
|
// margin-top: 40px;
|
||||||
margin-bottom: 80px;
|
margin-bottom: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.container {
|
.container {
|
||||||
margin-top: 40px;
|
// margin-top: 40px;
|
||||||
margin-bottom: 80px;
|
margin-bottom: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,14 +52,18 @@
|
|||||||
class="div-action-img"
|
class="div-action-img"
|
||||||
src="@/assets/img/latienda-telefono.svg"
|
src="@/assets/img/latienda-telefono.svg"
|
||||||
/>
|
/>
|
||||||
<span
|
<div class="div-action-tels">
|
||||||
|
<a :href="`tel:+${coop?.phone}`" class="tel-link"><span>{{ coop?.phone }}</span></a>
|
||||||
|
<a :href="`tel:+${coop?.mobile}`" class="tel-link"><span>{{ coop?.mobile }}</span></a>
|
||||||
|
</div>
|
||||||
|
<!-- <span
|
||||||
>{{ coop?.phone }} <br />
|
>{{ coop?.phone }} <br />
|
||||||
{{ coop?.mobile }}</span
|
{{ coop?.mobile }}</span
|
||||||
>
|
> -->
|
||||||
</div>
|
</div>
|
||||||
<div v-if="coop?.email" class="div-action mail">
|
<div v-if="coop?.email" class="div-action mail">
|
||||||
<img class="div-action-img" src="@/assets/img/latienda-email.svg" />
|
<img class="div-action-img" src="@/assets/img/latienda-email.svg" />
|
||||||
<span>{{ coop?.email }}</span>
|
<a :href="`mailto:${coop?.email}`" class="mail-link"><span>{{ coop?.email }}</span></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div v-if="coop?.city" class="div-action location">
|
<!-- <div v-if="coop?.city" class="div-action location">
|
||||||
@@ -73,7 +77,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="c-tabs-container">
|
<!-- <div class="c-tabs-container">
|
||||||
<div class="c-tabs">
|
<div class="c-tabs">
|
||||||
<div>
|
<div>
|
||||||
<BCard no-body class="b-card">
|
<BCard no-body class="b-card">
|
||||||
@@ -116,7 +120,7 @@
|
|||||||
</BCard>
|
</BCard>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
<div v-if="products && products.length" class="c-catalogo">
|
<div v-if="products && products.length" class="c-catalogo">
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<div class="title-lines"></div>
|
<div class="title-lines"></div>
|
||||||
@@ -309,6 +313,7 @@ export default {
|
|||||||
gap: 4rem;
|
gap: 4rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 4rem 4rem;
|
padding: 4rem 4rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
border-radius: var(--rounded-3xl, 24px);
|
border-radius: var(--rounded-3xl, 24px);
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
180deg,
|
180deg,
|
||||||
@@ -387,6 +392,12 @@ export default {
|
|||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.div-action-tels {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.c-image-container {
|
.c-image-container {
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.c-container {
|
.c-container {
|
||||||
margin-top: 40px;
|
|
||||||
margin-bottom: 80px;
|
margin-bottom: 80px;
|
||||||
@include mobile {
|
@include mobile {
|
||||||
margin-top: 80px;
|
margin-top: 80px;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
|
||||||
|
|
||||||
export const useAuthStore = defineStore('auth', {
|
export const useAuthStore = defineStore('auth', {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
@@ -12,25 +11,6 @@ export const useAuthStore = defineStore('auth', {
|
|||||||
cookiesAreAccepted: false,
|
cookiesAreAccepted: false,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
//persist: true, // TODO: Enable persistence. Cookies will be stored 'auth' 👉🏻 https://prazdevs.github.io/pinia-plugin-persistedstate/frameworks/nuxt
|
|
||||||
|
|
||||||
// persist: {
|
|
||||||
// key: 'authentication-cookie',
|
|
||||||
// storage: piniaPluginPersistedstate.cookies({
|
|
||||||
// expires: 14,
|
|
||||||
// sameSite: 'strict',
|
|
||||||
// secure: !import.meta.dev,
|
|
||||||
// }),
|
|
||||||
// paths: [
|
|
||||||
// 'id',
|
|
||||||
// 'name',
|
|
||||||
// 'email',
|
|
||||||
// 'role',
|
|
||||||
// 'access',
|
|
||||||
// 'refreshTokens',
|
|
||||||
// 'cookiesAreAccepted',
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
|
|
||||||
getters: {
|
getters: {
|
||||||
isAuthenticated: (state) => !!state.access,
|
isAuthenticated: (state) => !!state.access,
|
||||||
@@ -103,5 +83,7 @@ export const useAuthStore = defineStore('auth', {
|
|||||||
this.refreshTokens = payload.refresh
|
this.refreshTokens = payload.refresh
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
persist: true,
|
||||||
}
|
}
|
||||||
})
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user