-
Notifications
You must be signed in to change notification settings - Fork 2.6k
perf: Optimize packaging #3903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: Optimize packaging #3903
Changes from all commits
a6e9374
7ebf173
1730a46
c27a49f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,8 +3,10 @@ export default { | |
| syncUsers: 'Sync Users', | ||
| syncUsersTip: 'Only sync newly added users', | ||
| setUserGroups: 'Configure User Groups', | ||
| knowledgeTitleTip: 'This configuration will only take effect after enabling chat user login authentication in the associated application', | ||
| applicationTitleTip: 'This configuration requires login authentication to be enabled in the application', | ||
| knowledgeTitleTip: | ||
| 'This configuration will only take effect after enabling chat user login authentication in the associated application', | ||
| applicationTitleTip: | ||
| 'This configuration requires login authentication to be enabled in the application', | ||
| autoAuthorization: 'Auto Authorization', | ||
| authorization: 'Authorization', | ||
| batchDeleteUser: 'Delete selected {count} users?', | ||
|
|
@@ -14,16 +16,18 @@ export default { | |
| group: { | ||
| title: 'User Groups', | ||
| name: 'User Group Name', | ||
| requiredMessage: 'Please select user group', | ||
| usernameOrName: 'Username/Name', | ||
| delete: { | ||
| confirmTitle: 'Confirm to delete user group:', | ||
| confirmMessage: 'All members in this group will be removed after deletion. Proceed with caution!', | ||
| confirmMessage: | ||
| 'All members in this group will be removed after deletion. Proceed with caution!', | ||
| }, | ||
| batchDeleteMember: 'Remove selected {count} members?', | ||
| }, | ||
| syncMessage: { | ||
| title: 'Successfully synced {count} users', | ||
| usernameExist: 'The following usernames already exist:', | ||
| nicknameExist: 'The following nicknames already exist:', | ||
| } | ||
| }, | ||
| } | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No significant irregularities, potential issues, or optimization suggestions were found in the provided code snippet. The translation and structure remain consistent throughout. There is no need for further changes. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -287,3 +287,13 @@ | |
| .el-input { | ||
| --el-input-text-color: var(--el-text-color-primary); | ||
| } | ||
|
|
||
| .el-input-group__prepend div.el-select .el-select__wrapper { | ||
| background: #ffffff; | ||
| &:hover { | ||
| background: #ffffff; | ||
| } | ||
| .el-select__placeholder { | ||
| color: var(--el-text-color-regular); | ||
| } | ||
| } | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided CSS rule looks mostly correct for styling an
-.el-input-group__prepend div.el-select .el-select__wrapper {
Here's the optimized version of your code: .el-input-group__prepend div.el-select .el-select__wrapper {
--el-bg-color-overlay: transparent; /* Add missing property if needed */
background: rgba(255, 255, 255, 0); /* Fallback to RGBA for older browsers */
&:hover {
--el-bg-color-overlay: transparent;
background: rgba(255, 255, 255, 0); /* Same as hover state */
}
/* Uncomment below to define placeholder color explicitly (if needed):
.el-select__placeholder { */
/* color: var(--el-text-color-regular); */
}These changes make the CSS more concise and ensure better readability. If you're targeting modern browsers that support |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The given JavaScript function
uploadFilehas several checks to handle file uploads, including limits on number of files, file size, and warning messages for excessive limit usage or invalid file sizes.Code Review:
fileLimitOncereached) is correct.Optimization Suggestions:
fileLimit, you can consolidate them into one loop using a helper function or by directly returning without an additional conditional if applicable.Additional Enhancements:
Here's a revised version with minor adjustments:
In this updated version:
These changes improve readability and potentially reduce unnecessary computations without compromising functionality.