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.
Fix #5112
This pull request includes several updates to the
packages/client/hmi-client
to improve user role management, menu item labeling, and project filtering. The most important changes include adding a computed property for admin checks, updating menu item labels, and refining project filtering logic.User Role Management:
stores/auth.ts
: Added a computed propertyisAdmin
to check if the user has an admin role.tera-navbar.vue
: Updated visibility logic for user menu items to use the newisAdmin
property.Menu Item Labeling:
tera-project-menu.vue
: Updated labels for menu items (renameMenuItem
toeditDetailsMenuItem
,removeMenuItem
todeleteMenuItem
, andcopyMenuItem
tocopy
).Project Filtering:
Home.vue
: Refined the filtering logic to include projects that the user can edit or view if they are not public.Miscellaneous:
Home.vue
: Cleaned up the template code by removing commented-out sections.tera-project-menu.vue
: Removed theseparatorMenuItem
and adjusted the logic for adding menu items based on user permissions and admin status.