* fix: resolve Prism syntax highlighting error in peer config modal
The PeerViewModal and InterfaceViewModal components displayed:
Error: The language "undefined" has no grammar.
Root cause: vue-prism-component bundles its own instance of prismjs
(separate from the one imported elsewhere), so registering the ini
grammar on a different Prism instance had no effect on the one
actually performing the highlighting.
Fix: bypass vue-prism-component entirely. Import a single Prism
instance via a new helper (frontend/src/helpers/prism-setup.js) that
also registers the ini grammar, then render highlighted HTML directly
with <pre><code v-html="highlightedConfig">. This ensures the same
Prism object that owns the ini grammar is the one calling highlight().
Affected files:
- frontend/src/helpers/prism-setup.js (new): imports prismjs, defines
the ini grammar on the Prism instance, re-exports it
- frontend/src/components/PeerViewModal.vue: replaces <Prism> with
v-html using the shared Prism instance
- frontend/src/components/InterfaceViewModal.vue: same replacement
- frontend/src/main.js: removes the now-unused prism-setup import
Fixes#726
* Revert "fix: resolve Prism syntax highlighting error in peer config modal"
This reverts commit 8d1155224d.
* fix: resolve Prism syntax highlighting error in peer config modal
The PeerViewModal displayed: Error: The language "undefined" has no grammar.
Root cause: Vite bundled prismjs as separate instances per lazy-loaded
chunk, so the ini grammar registered in one instance was invisible to
vue-prism-component which used a different instance.
Fix:
- Add dedupe: ['prismjs'] to vite.config.mjs to force a single Prism
instance across all chunks
- Add the missing 'prismjs/components/prism-ini' import in
PeerViewModal.vue (InterfaceViewModal already had it)
Remove hardcoded `--base=/app/` from npm build script and set `base:
'./'` in vite.config to generate relative asset URLs
Update server `updateBasePathInFrontend` to handle relative paths
Fixes#710
Signed-off-by: Rich C <richcarni@gmail.com>
- Add frontend/src/lang/translations/ja.json (full translation of all 422 entries from en.json)
- Register ja in frontend/src/lang/index.js so it appears in the language selector
Tested locally with v2.2.3 build. UI strings render correctly in Japanese.
Closes: language support request
Co-authored-by: Taro Kawakami <tarokun@tunagufactory.jp>
* feat(frontend): add confirmation dialog before deleting users, peers, and interfaces (#652)
Add a browser confirm() dialog to the delete functions in UserEditModal,
PeerEditModal, and InterfaceEditModal to prevent accidental deletions.
The bulk-delete actions in UserView already had this protection; this
change brings single-item deletion in line with that behavior.
Translation keys (confirm-delete) added for all 10 supported locales:
de, en, es, fr, ko, pt, ru, uk, vi, zh.
Signed-off-by: LeC-D <leo.openc@gmail.com>
* fix broken translation files
---------
Signed-off-by: LeC-D <leo.openc@gmail.com>
Co-authored-by: Christoph Haas <christoph.h@sprinternet.at>
* mikrotik: allow to set DNS, wip: handle routes in wg-controller
* replace old route handling for local controller
* cleanup route handling for local backend
* implement route handling for mikrotik controller