Fixes: 1) Replace deprecated context usage in `useAvatarUpload` mutation; 2) Resolve incorrect locale parsing in `useDate` utility and fix non-reactive cart state in `profile/cart.vue`; 3) Update stale imports and standardize type naming across composables; Extra: 1) Refactor i18n strings including order status and search-related texts; 2) Replace temporary workarounds with `apollo-upload-client` configuration and add `apollo-upload-link.ts` plugin; 3) Cleanup redundant files, comments, and improve SCSS structure with new variables and placeholders.
100 lines
No EOL
1.5 KiB
TypeScript
100 lines
No EOL
1.5 KiB
TypeScript
import type {LocaleDefinition} from "~/types";
|
|
|
|
// LOCALES
|
|
|
|
export const SUPPORTED_LOCALES: LocaleDefinition[] = [
|
|
{
|
|
code: 'en-gb',
|
|
file: 'en-gb.json',
|
|
default: true
|
|
},
|
|
{
|
|
code: 'ar-ar',
|
|
file: 'ar-ar.json',
|
|
default: false
|
|
},
|
|
{
|
|
code: 'cs-cz',
|
|
file: 'cs-cz.json',
|
|
default: false
|
|
},
|
|
{
|
|
code: 'da-dk',
|
|
file: 'da-dk.json',
|
|
default: false
|
|
},
|
|
{
|
|
code: 'de-de',
|
|
file: 'de-de.json',
|
|
default: false
|
|
},
|
|
{
|
|
code: 'en-us',
|
|
file: 'en-us.json',
|
|
default: false
|
|
},
|
|
{
|
|
code: 'es-es',
|
|
file: 'es-es.json',
|
|
default: false
|
|
},
|
|
{
|
|
code: 'fr-fr',
|
|
file: 'fr-fr.json',
|
|
default: false
|
|
},
|
|
{
|
|
code: 'it-it',
|
|
file: 'it-it.json',
|
|
default: false
|
|
},
|
|
{
|
|
code: 'ja-jp',
|
|
file: 'ja-jp.json',
|
|
default: false
|
|
},
|
|
{
|
|
code: 'nl-nl',
|
|
file: 'nl-nl.json',
|
|
default: false
|
|
},
|
|
{
|
|
code: 'pl-pl',
|
|
file: 'pl-pl.json',
|
|
default: false
|
|
},
|
|
{
|
|
code: 'pt-br',
|
|
file: 'pt-br.json',
|
|
default: false
|
|
},
|
|
{
|
|
code: 'ro-ro',
|
|
file: 'ro-ro.json',
|
|
default: false
|
|
},
|
|
{
|
|
code: 'ru-ru',
|
|
file: 'ru-ru.json',
|
|
default: false
|
|
},
|
|
{
|
|
code: 'zh-hans',
|
|
file: 'zh-hans.json',
|
|
default: false
|
|
}
|
|
];
|
|
|
|
export const DEFAULT_LOCALE = SUPPORTED_LOCALES.find(locale => locale.default)?.code || 'en-gb';
|
|
|
|
export const CURRENCY = '$';
|
|
|
|
export enum orderStatuses {
|
|
PENDING = 'PENDING',
|
|
FAILED = 'FAILED',
|
|
PAYMENT = 'PAYMENT',
|
|
CREATED = 'CREATED',
|
|
DELIVERING = 'DELIVERING',
|
|
FINISHED = 'FINISHED',
|
|
MOMENTAL = 'MOMENTAL'
|
|
} |