-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
fix(web): duplicate key error and enable expiration editing for expired shared links #24686
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
Merged
danieldietzler
merged 5 commits into
immich-app:main
from
timonrieger:fix/shared-link-expiry-label
Jan 5, 2026
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
bfa0634
fix(web): improve unique expiration options for shared links
timonrieger 6df06e5
fix(web): enable shared link expiration regardless of current date
timonrieger a62ea4a
extract deduplication logic for expiration options into a separate fu…
timonrieger 6568568
Merge remote-tracking branch 'origin/main' into fix/shared-link-expir…
danieldietzler de91e3d
chore: cleanup
danieldietzler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,7 +68,17 @@ | |
| <SettingSelect | ||
| bind:value={expirationOption} | ||
| {onSelect} | ||
| options={[...new Set([...expiredDateOptions, getExpirationOption(createdAt, expiresAt)])]} | ||
| options={(() => { | ||
| const allOptions = [...expiredDateOptions, getExpirationOption(createdAt, expiresAt)]; | ||
| const seen = new Set<string | number>(); | ||
| return allOptions.filter((option) => { | ||
| if (seen.has(option.value)) { | ||
| return false; | ||
| } | ||
| seen.add(option.value); | ||
| return true; | ||
| }); | ||
| })()} | ||
| label={$t('expire_after')} | ||
|
Collaborator
Author
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. and that's the "55 years old" and crash fix |
||
| disabled={expiresAt !== null && DateTime.fromISO(expiresAt) < DateTime.now()} | ||
| number={true} | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Probably cleaner to extract this into a method instead of inlining it
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.
done in a62ea4a ✅