0
1
Fork 0

Catalog mobile adjustments

This commit is contained in:
William Buezas 2024-10-01 17:01:40 -03:00
parent c950bf5ef1
commit 514af4f11e
7 changed files with 34 additions and 3 deletions

View File

@ -70,6 +70,7 @@ onMounted(() => {
bg-color="white" bg-color="white"
is-outlined is-outlined
:clearable="false" :clearable="false"
class="searchbar"
> >
<template #prepend> <template #prepend>
<QIcon name="search" class="cursor-pointer" @click="search()" /> <QIcon name="search" class="cursor-pointer" @click="search()" />
@ -77,6 +78,15 @@ onMounted(() => {
</VnInput> </VnInput>
</template> </template>
<style lang="scss" scoped>
@import 'src/css/responsive';
.searchbar {
@include mobile {
max-width: 120px;
}
}
</style>
<i18n lang="yaml"> <i18n lang="yaml">
en-US: en-US:
search: Search search: Search

View File

@ -119,6 +119,7 @@ export default {
confirmDelete: 'Estàs segur que vols esborrar la línia?', confirmDelete: 'Estàs segur que vols esborrar la línia?',
emptyList: 'Llista buida', emptyList: 'Llista buida',
logInAsGuest: `Accedir com a convidat`, logInAsGuest: `Accedir com a convidat`,
logIn: 'Iniciar sessió',
haveForgottenPassword: '¿Has oblidat la teva contrasenya?', haveForgottenPassword: '¿Has oblidat la teva contrasenya?',
signUp: 'Registrar-me', signUp: 'Registrar-me',
notACustomerYet: `Encara no ets client?`, notACustomerYet: `Encara no ets client?`,

View File

@ -153,7 +153,8 @@ export default {
save: 'Save', save: 'Save',
cancel: 'Cancel', cancel: 'Cancel',
of: 'of', of: 'of',
loginAsGuest: 'Login as guest', logInAsGuest: 'Login as guest',
logIn: 'Log in',
haveForgottenPassword: 'Have you forgotten your password?', haveForgottenPassword: 'Have you forgotten your password?',
signUp: 'Sign up', signUp: 'Sign up',
notACustomerYet: 'Not a customer yet?', notACustomerYet: 'Not a customer yet?',

View File

@ -120,6 +120,7 @@ export default {
emptyList: 'Vider la liste', emptyList: 'Vider la liste',
confirmDelete: 'Voulez-vous vraiment supprimer la ligne?', confirmDelete: 'Voulez-vous vraiment supprimer la ligne?',
logInAsGuest: `Entrez en tant qu'invité`, logInAsGuest: `Entrez en tant qu'invité`,
logIn: 'Se connecter',
haveForgottenPassword: 'Avez-vous oublié votre mot de passe?', haveForgottenPassword: 'Avez-vous oublié votre mot de passe?',
signUp: `S'inscrire`, signUp: `S'inscrire`,
notACustomerYet: `Pas encore client?`, notACustomerYet: `Pas encore client?`,

View File

@ -117,6 +117,7 @@ export default {
confirmDelete: 'Tens certeza que queres eliminar esta linha?', confirmDelete: 'Tens certeza que queres eliminar esta linha?',
emptyList: 'Lista vazia', emptyList: 'Lista vazia',
logInAsGuest: 'Entrar como convidado', logInAsGuest: 'Entrar como convidado',
logIn: 'Iniciar sessão',
haveForgottenPassword: 'Esqueceu a senha?', haveForgottenPassword: 'Esqueceu a senha?',
signUp: 'Registar', signUp: 'Registar',
notACustomerYet: 'Ainda não é cliente?', notACustomerYet: 'Ainda não é cliente?',

View File

@ -1,6 +1,6 @@
<template> <template>
<Teleport v-if="isHeaderMounted" to="#actions"> <Teleport v-if="isHeaderMounted" to="#actions">
<div class="q-gutter-x-sm row"> <div class="row">
<VnSearchBar :search-term="search" @on-search-error="items = []" /> <VnSearchBar :search-term="search" @on-search-error="items = []" />
<QBtn <QBtn
:icon="viewTypeButtonContent.icon" :icon="viewTypeButtonContent.icon"
@ -24,6 +24,15 @@
{{ t('shoppingCart') }} {{ t('shoppingCart') }}
</QTooltip> </QTooltip>
</QBtn> </QBtn>
<QBtn
v-if="!isDesktop"
flat
dense
round
icon="menu"
aria-label="Menu"
@click="toggleRightDrawer()"
/>
</div> </div>
</Teleport> </Teleport>
<div style="padding-bottom: 5em"> <div style="padding-bottom: 5em">
@ -290,7 +299,7 @@ const appStore = useAppStore();
const userStore = useUserStore(); const userStore = useUserStore();
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
const { isHeaderMounted, rightDrawerOpen, basketOrderId } = const { isHeaderMounted, rightDrawerOpen, basketOrderId, isDesktop } =
storeToRefs(appStore); storeToRefs(appStore);
const { isGuest } = storeToRefs(userStore); const { isGuest } = storeToRefs(userStore);
const { notify } = useNotify(); const { notify } = useNotify();
@ -915,6 +924,10 @@ const redirectToBasket = () => {
router.push({ name: 'basket' }); router.push({ name: 'basket' });
}; };
const toggleRightDrawer = () => {
rightDrawerOpen.value = !rightDrawerOpen.value;
};
watch( watch(
() => route.query.search, () => route.query.search,
val => { val => {

View File

@ -155,6 +155,10 @@ export const useAppStore = defineStore('hedera', {
isTablet() { isTablet() {
const $q = useQuasar(); const $q = useQuasar();
return $q?.screen?.width <= 1024; return $q?.screen?.width <= 1024;
},
isDesktop() {
const $q = useQuasar();
return $q?.screen?.width > 1024;
} }
} }
}); });