Fix desktop and use icons from packages instead of public #4307
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.
🤖[deprecated] Generated by Copilot at 784f15c
Summary
🚀🎨🚧
The pull request refactors various components in the
frontend/desktop
project to use the UI components and icons from the@chakra-ui/react
and@sealos/ui
packages, instead of custom ones. This improves the code quality, consistency, and scalability of the UI, and also adds some new features, such as copying the user's ID and checking the sign up feature flag. The pull request also improves the performance and user experience of the application by using SWC to transpile thesealos-desktop-sdk
package and by replacing dynamic imports with static imports. The pull request also removes some unused and redundant code and imports from the project.Walkthrough
enableSignUp
function to check sign up feature status by environment variable infrontend/desktop/src/services/enable.ts
(link)enableSignUp
function to prevent sign up by password or oauth if feature is disabled infrontend/desktop/src/pages/api/auth/password/exist.ts
(link,link) andfrontend/desktop/src/services/backend/oauth.ts
(link,link)@sealos/ui
package in various components (link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link)@chakra-ui/react
library in various components (link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link)Account
component fromIndex
toAccount
infrontend/desktop/src/components/account/index.tsx
(link)UserMenu
component with static import infrontend/desktop/src/components/desktop_content/index.tsx
(link)frontend/desktop/src/services/backend/oauth.ts
(link,link,link)frontend/desktop/src/services/backend/oauth.ts
(link,link)transpilePackages
option innextConfig
object infrontend/desktop/next.config.js
(link)frontend/desktop/src/components/icons/GroupAdd.tsx
andfrontend/desktop/src/components/icons/DeleteIcon.tsx
files (link,link)