-
Notifications
You must be signed in to change notification settings - Fork 208
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
fixed: Fixed an issue where user information could not be seen under SSH connections #1580
Conversation
@@ -390,7 +391,7 @@ const onSocketData = (msgType: string, msg: any, terminal: Terminal) => { | |||
} | |||
}; | |||
|
|||
const onEvent = (event: string, data: any) => { | |||
const onEvent = (event: string, _data: any) => { | |||
switch (event) { | |||
case 'reconnect': | |||
Object.keys(onlineUsersMap).filter(key => { |
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 provided code is JavaScript related to WebSocket server implementation and includes some oddities which need investigation:
- The 'click' method appears to be not fully implemented.
- A comment block starting with '@@' should be removed.
These blocks are typically used for debugging purposes.
Potential Issues:
- "click" Method:
click
seems incorrectly named; this is missing parentheses after it's invoked. It needs at least one parenthesis so that it invokes correctly within an event listener context.
Optimization Suggestion:
- Remove comments from @@ line, unless they are necessary for debug purpose only.
This will make the code more clear and maintainable once the issues have been corrected. For instance, using proper formatting and naming conventions can improve readability.
@@ -65,6 +67,8 @@ | |||
</n-thing> | |||
</n-list-item> | |||
</n-list> | |||
|
|||
<!-- 快捷键 --> | |||
<n-list class="mt-[-15px]" clickable v-else-if="item.label === 'Keyboard'"> | |||
<n-list-item> | |||
<n-thing class="ml-[15px] mt-[10px]"> |
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.
There is an oddity where item.title has two empty spaces after it which seems to be a typo. This can lead to incorrect parsing of title text when rendering the component and may cause unexpected output.
Potential issue: Incorrectly rendered strings due to extra space in item.title
Suggestions:
1. Validate and validate that there's no leading/trailing whitespaces in items.label for accurate display/label extraction
2. Use string trimming methods to correct the string content if necessary.
Optimization Suggestions:
Ensure consistency with spacing around elements (labels, contents) to maintain readability.
The current code does not appear to contain any obvious bugs, but some small details should be paid attention to prevent possible confusion.
|
fixed: Fixed an issue where user information could not be seen under SSH connections