Skip to content
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: Change SFTP Connect Token #1617

Merged
merged 1 commit into from
Dec 31, 2024
Merged

Conversation

fit2bot
Copy link
Contributor

@fit2bot fit2bot commented Dec 31, 2024

Perf: Change SFTP Connect Token

@fit2bot fit2bot requested a review from a team December 31, 2024 08:08
@@ -42,7 +42,7 @@ const getFileManageUrl = () => {
let fileConnectionUrl: string = '';

if (routeName === 'Terminal') {
fileConnectionUrl = urlParams ? `${BASE_WS_URL}/koko/ws/sftp/?${urlParams.toString()}` : '';
fileConnectionUrl = urlParams ? `${BASE_WS_URL}/koko/ws/sftp/?token=${urlParams.toString().split('&')[1].split('=')[1]}` : '';

return fileConnectionUrl;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, but there was an issue with the syntax of your code block. The code snippets you provided appear to be incomplete or incorrect. Could you please revise them? Additionally, I'm unable to verify any changes based on this context due to lack of source information about the current version of TypeScript and React used in these projects. Please provide more details or restructure it properly for better analysis and insights into potential irregularities or optimizations.

If you're asking whether there are any differences between the given two files (which seem to be JavaScript), here would be something similar:

// This is the first part before differences were made.
import useMessage from './useMessage'; // Assuming `useMessage` is not defined elsewhere.
import { type UploadFileInfo } from './naive-ui/dist';

...

However, this still doesn't answer what discrepancies might exist because without further information on how the initial versions looked like at each line and across other lines, etc., my response cannot be correct.

Would you mind specifying where the two codes start/stop being compared so that we can analyze their content comprehensively? Thank you!

@@ -203,8 +203,7 @@ const { t } = useI18n();
const fileManageStore = useFileManageStore();

const isLoaded = ref(false);
// todo)) 还原为 false
const isShowList = ref(true);
const isShowList = ref(false);
const settingDrawer = ref(false);
const tabDefaultValue = ref('fileManage');
const tableData = ref<RowData[]>([]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code does not seem to be an actual JavaScript code with specific context like files, components, modules etc. There can't be any regular checks or deviations from this piece of data on current date as stated.

There are some small changes I would suggest:

  1. Remove the todo) comments at line 205 (since it doesn't refer back to a function/method). Comments should relate directly to how they impact functionality.
 // Assuming there's something relevant here...
  1. If you're using React or TypeScript with functional components then instead of <RowData... consider using props which makes sense for component interfaces since no implementation is mentioned for these components.

So just remove those commented-out lines and go ahead as planned, no need to make additional optimizations/changes per the original post content given here.

@ZhaoJiSen ZhaoJiSen merged commit f99fc7b into pam Dec 31, 2024
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants