Conversation
|
New changes:
|
|
System theme now doesn't work and even doesn't follow system. In system theme it used Legacy light theme which is pretty weird and outdated When cancelling the the payment stuff on sponsor page it doesn't removes loader from header |
|
Changes:
|
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new sponsorship system to replace the existing donation functionality, updates build configurations for better organization, and modernizes the development setup.
- Replaced the donation page with a new comprehensive sponsor system featuring tiered sponsorship levels
- Refactored webpack configuration to consolidate build outputs and simplified asset management
- Updated dependencies including biomejs, sass, and html-tag-js with improved SCSS module usage
Reviewed Changes
Copilot reviewed 94 out of 115 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/pages/sponsors/ | New sponsor listing page with tier-based sponsor display |
| src/pages/sponsor/ | New individual sponsor page with purchase integration |
| src/pages/donate/ | Removed old donation system files |
| webpack.config.js | Consolidated build outputs and simplified asset handling |
| src/main.scss | Updated to use @use instead of @import for SCSS modules |
| src/lang/*.json | Updated language files to replace "donate" with "sponsor" |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/pages/sponsors/sponsors.js
Outdated
| }} | ||
| > | ||
| <div className="sponsor-avatar"> | ||
| <img src={`https://acode.app/sponsor/image/${image}`} /> |
There was a problem hiding this comment.
The image src will result in a broken URL when the image parameter is undefined or null. Consider adding a fallback or conditional rendering.
| <img src={`https://acode.app/sponsor/image/${image}`} /> | |
| {image && ( | |
| <img src={`https://acode.app/sponsor/image/${image}`} /> | |
| )} |
| reader.onload = () => { | ||
| image = reader.result; | ||
|
|
||
| if (result && typeof result === "object") { |
There was a problem hiding this comment.
The condition checks if result exists, but result is not defined at this point in the code. This will cause a ReferenceError.
src/pages/sponsors/sponsors.js
Outdated
| website = "http://" + website; | ||
| } | ||
| system.openInBrowser(website); | ||
| }} |
There was a problem hiding this comment.
[nitpick] Creating a new arrow function on every render can impact performance. Consider extracting this to a named function or using useCallback equivalent.
| }} | |
| function handleClick() { | |
| if (!website) return; | |
| let url = website; | |
| if (!url.startsWith("http")) { | |
| url = "http://" + url; | |
| } | |
| system.openInBrowser(url); | |
| } | |
| return ( | |
| <div | |
| attr-role="button" | |
| className={`sponsor-card ${tier}`} | |
| onclick={handleClick} |
| return View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR; | ||
| } | ||
|
|
||
| private int getDeprecatedSystemUiVisibility(View decorView) { |
There was a problem hiding this comment.
[nitpick] The method name suggests it's deprecated but it's a new method. Consider using a more descriptive name like getSystemUiVisibilityLegacy or getSystemUiVisibilityApi30.
| private int getDeprecatedSystemUiVisibility(View decorView) { | |
| private int getSystemUiVisibilityLegacy(View decorView) { |
Changes: