-
Notifications
You must be signed in to change notification settings - Fork 0
feat(filesharing): require signer fullname; fix canEncrypt reactivity #239
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
Changes from all commits
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 |
|---|---|---|
|
|
@@ -37,7 +37,7 @@ | |
| const emailRegex = | ||
| /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/ | ||
|
|
||
| let canEncrypt = $derived(() => { | ||
| let canEncrypt = $derived.by(() => { | ||
| if (encryptState.files.length === 0) return false | ||
| const totalSize = encryptState.files.reduce((a, f) => a + f.size, 0) | ||
| if (totalSize >= MAX_UPLOAD_SIZE) return false | ||
|
Contributor
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. [Code review] Threshold mismatch with |
||
|
|
@@ -138,7 +138,7 @@ | |
| await tick() | ||
|
|
||
| try { | ||
| if (!canEncrypt()) return | ||
| if (!canEncrypt) return | ||
|
Contributor
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. [Code review] Early |
||
|
|
||
| // Build recipients | ||
| const recipients = encryptState.recipients.map( | ||
|
|
@@ -151,13 +151,14 @@ | |
| } | ||
| ) | ||
|
|
||
| // Build sign method — email always included, other attributes optional | ||
| // Build sign method — email and full name always required so the | ||
| // recipient mail can show a real name; other attributes optional. | ||
| const sign = pg.sign.yivi({ | ||
| element: '#crypt-irma-qr', | ||
| attributes: [ | ||
| { | ||
| t: 'pbdf.gemeente.personalData.fullname', | ||
| optional: true, | ||
| optional: false, | ||
|
Contributor
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. [Code review] Making |
||
| }, | ||
| { | ||
| t: 'pbdf.sidn-pbdf.mobilenumber.mobilenumber', | ||
|
|
||
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.
[Code review]
$derived→$derived.byswap is semantically correct, butcanEncryptis never read in a reactive context — only consumed once insidestartEncryption. The PR-description claim of a real reactivity bug overstates the impact; no user-visible behaviour changes from this hunk.