#7750 - first-beta-review #95

Merged
jsegarra merged 26 commits from wbuezas/hedera-web-mindshore:first-beta-review into beta 2024-12-09 23:18:07 +00:00
1 changed files with 10 additions and 17 deletions
Showing only changes of commit 9fb67992ae - Show all commits

View File

@ -20,12 +20,7 @@ export const useAppStore = defineStore('hedera', {
menuEssentialLinks: [],
hiddenMenuLinks: new Set(['Reports']),
basketOrderId: null,
localeDates: {
days: [],
months: [],
daysShort: [],
monthsShort: []
},
siteLang: null,
localeOptions: [
{ label: t('langs.en'), lang: 'en-US', value: 'en' },
@ -66,20 +61,9 @@ export const useAppStore = defineStore('hedera', {
this.$patch({ imageUrl });
},
getLocaleDates() {
const { messages, locale } = i18n.global;
this.localeDates = {
days: messages.value[locale.value].date.days,
months: messages.value[locale.value].date.months,
daysShort: messages.value[locale.value].date.daysShort,
monthsShort: messages.value[locale.value].date.monthsShort
};
},
async init() {
this.updateSiteLocale(localStorage.getItem('siteLang') || 'es-ES');
this.getBasketOrderId();
this.getLocaleDates();
},
getBasketOrderId() {
@ -187,6 +171,15 @@ export const useAppStore = defineStore('hedera', {
isDesktop() {
const $q = useQuasar();
return $q?.screen?.width > 1024;
},
localeDates() {
const { messages, locale } = i18n.global;
return {
jsegarra marked this conversation as resolved Outdated

dale una vuelta porque esto se puede simplificar mucho

dale una vuelta porque esto se puede simplificar mucho

Simplificado

Simplificado
days: messages.value[locale.value].date.days,
months: messages.value[locale.value].date.months,
daysShort: messages.value[locale.value].date.daysShort,
monthsShort: messages.value[locale.value].date.monthsShort
};
}
}
});