Merge branch '4922-vueMigration' into feature/RenewToken
gitea/hedera-web/pipeline/pr-4922-vueMigration This commit looks good Details

This commit is contained in:
Javier Segarra 2024-10-04 22:29:46 +00:00
commit 0b70344708
7 changed files with 36 additions and 3 deletions

View File

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

View File

@ -9,3 +9,9 @@
@content;
}
}
@mixin desktop {
@media screen and (min-width: 1025px) {
@content;
}
}

View File

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

View File

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

View File

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

View File

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

View File

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