-
Notifications
You must be signed in to change notification settings - Fork 124
perf: update confirm dialog #4987
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
Conversation
@@ -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' | |||
} |
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 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) |
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.
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 TypeError
s 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!
|
perf: update confirm dialog