feat(links): integrate app version and update link management #1826
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to handle the application version dynamically and improve the localization of links based on the user's locale. The most important changes include importing the version from
package.json
, defining a global__APP_VERSION__
variable, and updating theuseLinks
composable to provide localized links.Handling application version dynamically:
apps/desktop/electron.vite.config.ts
: Imported theversion
frompackage.json
and defined the__APP_VERSION__
variable in the Vite configuration. [1] [2]apps/web/vite.config.ts
: Imported theversion
frompackage.json
and defined the__APP_VERSION__
variable in the Vite configuration.packages/types/base.ts
: Declared a globalWindow
interface with the__APP_VERSION__
property.Localization improvements:
packages/ui/src/composables/useLinks.ts
: Updated theuseLinks
composable to provide localized links based on the user's locale.packages/ui/src/composables/__test__/useLinks.test.ts
: Added tests to verify the correct links are returned based on the locale.Other changes:
packages/ui/src/components/HelpView.vue
: Updated the help view to display thehelp
links.packages/ui/src/components/common/LeftMenu.vue
: Updated the left menu to use theleftBarLogo
link. [1] [2]scripts/gen-version.js
: Removed the script that generated aversion.ts
file.