Repository navigation
Commit be60e1d
活动作品提交与投票系统
* feat(SubmissionDetailPage): implement conditional vote count display based on event stage
Added logic to the SubmissionDetailPage to determine when to show exact vote counts based on the event's current stage. This enhancement improves user experience during hackathons by only revealing vote counts when appropriate, aligning with the existing functionality in the EventSubmissions components.
* feat(EventSubmissions): enhance vote display logic in gallery and detail components
Updated the EventSubmissionsGallery and SubmissionDetail components to conditionally render vote counts based on the `showResults` prop. This change maintains layout stability when votes are hidden, improving the user experience during the results stage of hackathons.
* fix(EditSubmissionPage): update fetch logic to build absolute URL for API requests
Refactored the submission fetching logic in the EditSubmissionPage to construct an absolute URL using the request's protocol and host. This change ensures compatibility with Node fetch in the current context and maintains session integrity by forwarding relevant headers.
* feat(SubmissionsDashboard): integrate locale support for submission links
Added locale handling to the submission detail links in the SubmissionsDashboard component, ensuring that links are correctly formatted based on the current locale. This enhancement improves the user experience for multilingual users navigating to submission details.
* feat(i18n): add missing translations for awards in English and Chinese
Introduced a new script to update missing translations for the awards section under events.hackathon in both English and Chinese language files. The script ensures that existing noAwards and noAwardsDesc entries are preserved while enhancing multilingual support for the hackathon awards. Updated the en.json and zh.json files accordingly.
* fix(HackathonManagement): update label for award count to improve clarity
Changed the label from "获奖人数" to "获奖数" in the HackathonManagement component to enhance clarity regarding the number of awards.
* feat(PublicSubmissionsPage): add back navigation button and improve layout
Introduced a back navigation button to the PublicSubmissionsPage, allowing users to return to the event page easily. Enhanced the layout by grouping the button and title in a flex container for better visual alignment.
* feat(EventSubmissions): display results stage details in submissions gallery
Enhanced the EventSubmissionsGallery to conditionally show ranks and exact vote counts during the results stage of hackathons. Updated the PublicSubmissionsPage to pass the new `showResults` prop, ensuring a tailored user experience based on event status.
* feat(SubmissionsDashboard): remove "全部作品" section as per product requirement
Eliminated the "全部作品" section from the SubmissionsDashboard component to align with updated product specifications, streamlining the user interface.
* feat(NavigationContent): enhance theme handling with client-side rendering
Added a new HardDriveIcon to the navigation and implemented client-side rendering for theme-dependent UI to prevent SSR/CSR hydration mismatches. This change improves the user experience by ensuring stable icon and label rendering during initial load.
* refactor(EventSubmissions): simplify media source handling in gallery and detail components
Removed redundant type attributes from media source elements in EventSubmissionsGallery and SubmissionDetail components, streamlining the code for better readability and maintainability. Ensured that audio and video attachments are displayed correctly while maintaining functionality.
* feat(HackathonContent): update submission button to link for registered users
Replaced the button for project submission with a link that directs users to the private submission URL, enhancing the user experience for registered participants during the submission window.
* feat(i18n): add "Submit My Project" translation to English and Chinese files
Enhanced the multilingual support by adding the translation for "Submit My Project" in both English and Chinese language files, improving user experience during event registration.
* feat(EventSubmissions): enhance voting logic and media display in submissions gallery
Updated the voting logic to prevent team members from voting on their own submissions. Enhanced the media display in the EventSubmissionsGallery and SubmissionDetail components to prioritize video and audio attachments, improving user experience. Added inline media players for better accessibility of submission content.
* feat(storage): add S3 client for presigned URLs without Appid header
Introduced a new S3 client specifically for generating presigned URLs, ensuring that the Appid header is not included in the SignedHeaders. This change prevents issues with signature mismatches during direct uploads from browsers. Enhanced error handling for missing environment variables related to S3 configuration.
* feat(i18n): add translation for "Set as current" in English and Chinese
Added the translation for the phrase "Set as current" to both the English and Chinese language files, enhancing the multilingual support for the application.
* fix(HackathonManagement): correct API endpoint and enhance error handling
Updated the API endpoint for hackathon configuration to remove an incorrect segment, ensuring proper server communication. Added a sanitization function to filter out incomplete resource items in the payload. Improved error handling to provide more meaningful messages based on server responses, enhancing user feedback during configuration updates.
* feat(participants): add participant search functionality with server-side filtering
Implemented a new route for searching participants in events, allowing for both event-specific and global searches. The search supports exclusion of specific user IDs and requires authentication. Updated the UserSearchCombobox to disable client-side filtering, ensuring results are fetched directly from the server.
* feat(AttachmentUploader): implement secure file name generation and enhance error handling
Added a function to generate secure server file names for uploaded files, incorporating file type and size. Enhanced error handling during file upload to provide more informative messages based on server responses. Updated allowed content types in the server route to support additional file formats.
* refactor(EventSubmissionForm): restructure description field with FormField component
Updated the EventSubmissionForm to use the FormField component for the description input, enhancing the structure and readability of the form. This change includes the addition of FormMessage for better user feedback.
PR-URL: #31 parent 4144845 commit be60e1d
34 files changed
Lines changed: 6020 additions & 892 deletions
File tree
- .github/workflows
- scripts
- src
- app
- (app)/app/(account)/events/[eventId]/submissions
- [submissionId]/edit
- new
- (public)/[locale]/events/[eventId]
- components
- photos
- submissions
- [submissionId]
- features/event-submissions
- hooks
- lib
- database/prisma
- i18n/translations
- storage
- modules
- dashboard
- events
- components
- submissions
- hooks
- public/events
- components
- submissions
- server/routes
- events
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments