mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-10-26 22:37:00 +00:00
fe3eaee3fb
The WhatsApp migration was numbered v3.0.0, but help center added v2.5.0 through v2.7.0 and ships first. Renamed it to v2.8.0 so the upgrade path stays in order. Country data had two copies after the merge. The frontend kept its own hand written list in shared-ui, and the WhatsApp branch added an API backed store reading the same data from Go. Both lists were identical. Now countries.json in internal/countries is the only source. The shared-ui constant imports it through a new @countries Vite alias, so PhoneNumberInput, phone.js and ContactForm keep working as before. The sidebar and the WhatsApp form read the constant directly instead of fetching on mount. Static wins over the API here because the widget uses PhoneNumberInput and cannot call an authenticated endpoint, and phone.js builds its zod schema synchronously. So the countries store, api.getCountries, the /api/v1/countries route and countries.JSON() are gone. DialCodeForISO stays, it still builds the WhatsApp wa_id.
Libredesk frontend
This template should help get you started developing with Vue 3 in Vite.
Recommended IDE Setup
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
Customize configuration
See Vite Configuration Reference.
Project Setup
npm install
Compile and Hot-Reload for Development
npm run dev
Compile and Minify for Production
npm run build
Run Headed Component Tests with Cypress Component Testing
npm run test:unit:dev # or `npm run test:unit` for headless testing
Run End-to-End Tests with Cypress
npm run test:e2e:dev
This runs the end-to-end tests against the Vite development server. It is much faster than the production build.
But it's still recommended to test the production build with test:e2e before deploying (e.g. in CI environments):
npm run build
npm run test:e2e
Lint with ESLint
npm run lint