Skip to content

Conversation

fit2bot
Copy link
Contributor

@fit2bot fit2bot commented May 7, 2025

perf: update confirm dialog

@fit2bot fit2bot requested a review from a team May 7, 2025 07:37
@@ -158,6 +160,7 @@ export default {
faceToken: null,
faceCaptureUrl: null,
noCodeMFA: ['face', 'passkey'],
sendCodeMFA: ['email', 'sms'],
passkeyVisible: false,
passkeyUrl: '/api/v1/authentication/passkeys/login/?mfa=1'
}
Copy link
Member

Choose a reason for hiding this comment

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

The code doesn't contain any regularities, potential issues or significant optimizations. Please ensure that you have the correct inputs and parameters when using them to avoid unexpected errors.

@@ -129,7 +130,7 @@ export default {
this.$axios.get(url).then(res => {
return this.makeCredReq(res)
}).then((options) => {
if (!location.protocol.startsWith('https') && location.host !== 'localhost') {
if (!location.protocol.startsWith('https') && !location.host.startsWith('localhost:')) {
throw new Error(this.$tc('HTTPSRequiredForSupport'))
}
return navigator.credentials.create(options)
Copy link
Member

Choose a reason for hiding this comment

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

In general, it is good to keep the formatting of imports and exports consistent within a given file. The changes you've highlighted aren't really critical but might be stylistically more appealing with better coding practices.

The issue with formatterArgs seems unproblematic until we know exactly where and why it's being used (and whether there isn’t a simpler alternative). This should ideally only need to be updated or removed once you understand its purpose fully.

As for .then( res ,this.reloadTable()), the way you're handling errors could be improved here - specifically, catching TypeErrors from promises that don't fulfill on time could make sense. However, this depends heavily on the context provided.

If you would like advice on some specific aspects or if your actual goal was something else not mentioned yet (for example, wanting to refactor existing parts of the codebase), I'd be glad to offer a different perspective!

Copy link

sonarqubecloud bot commented May 7, 2025

@ibuler ibuler merged commit 989b4d5 into dev May 7, 2025
6 checks passed
@ibuler ibuler deleted the pr@dev@confirm_dialog branch May 7, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants