forked from QuantumNous/new-api
-
Notifications
You must be signed in to change notification settings - Fork 0
refactor(console/dashboard): replace Card with HeroUI Pro Widget #2
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
Closed
Closed
Changes from all commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
cf71834
feat(console): port template-dashboard styling to /console pages
dingyi dc4321f
refactor(sidebar): port template-dashboard Sidebar styling to console…
dingyi 0d99560
refactor(console): port template-dashboard chrome to header + sidebar
dingyi 6e45741
refactor(sidebar): move trigger to navbar, avatar to footer, drop mis…
dingyi 2743282
fix(sidebar): import heroui-pro stylesheet so <Sidebar> actually has CSS
dingyi 3b3ac62
fix(console): scroll, trigger placement, and active icon color
dingyi 9e926d4
fix(sidebar): show user footer, fix trigger position, drop strokeWidt…
dingyi 7ca4121
fix(sidebar): trigger relocates to sidebar top when collapsed
dingyi 75acdf5
refactor(tokens): rewrite TokensColumnDefs without HeroCompat
dingyi 5805062
refactor(usage-logs): rewrite UsageLogsColumnDefs without HeroCompat
dingyi ba35951
refactor(tokens): rewrite tokens/index FluentRead notice without Hero…
dingyi e27b853
refactor(headerbar): adopt heroui-pro Navbar with native mobile menu
dingyi 083200b
refactor(console): swap literal slate/gray tones for semantic tokens
dingyi 9781494
refactor(console): swap literal slate/gray tones for semantic tokens …
dingyi c233c19
refactor(console): swap literal slate/gray tones for semantic tokens …
dingyi 0ce83f7
refactor(console): swap literal slate/gray tones for semantic tokens …
dingyi 26ffb23
docs(todo): log /console literal-color → semantic-token audit
dingyi c919dcf
refactor(visitor-chrome): swap literal slate/gray tones for semantic …
dingyi a628d89
refactor(playground+setup+chrome): swap literal slate/gray tones for …
dingyi 5aef451
fix(headerbar): restore Navbar.Item hover, lock dropdown text to 14px…
dingyi 0f7bccd
fix(headerbar): move dropdown font-size to wrapper so HeroUI button r…
dingyi 733fefc
refactor(final-sweep): swap last literal slate/gray tones for semanti…
dingyi 8eaa62c
fix(headerbar): apply same dropdown font-size hoist to ThemeToggle
dingyi c190781
fix(headerbar): add cursor-pointer to navbar trigger + dropdown buttons
dingyi 35cc1e7
refactor(pricing): rewrite PricingTable to native HTML table without …
dingyi 203a6a6
chore(pricing): align cherry-picked PricingTable with semantic-token …
dingyi 3d733c5
refactor(deployments): rewrite ViewDetailsModal without HeroCompat
dingyi d4c55c3
refactor(deployments): rewrite ViewLogsModal without HeroCompat
dingyi dd5d486
refactor(deployments): rewrite DeploymentsColumnDefs without HeroCompat
dingyi d5109db
refactor(deployments): rewrite ExtendDurationModal + UpdateConfigModa…
dingyi 5447126
refactor(channels): rewrite ModelTestModal without HeroCompat
dingyi 0616bdb
refactor(channels): rewrite ChannelsColumnDefs without HeroCompat
dingyi 7dc18a5
refactor(channels): rewrite ModelSelectModal without HeroCompat
dingyi a0cab42
refactor(settings): rewrite OtherSetting without HeroCompat
dingyi 427748f
refactor(tokens): rewrite EditTokenModal without HeroCompat + fix nul…
dingyi 846147f
refactor(subscriptions): rewrite AddEditSubscriptionModal without Her…
dingyi 79e3bdc
refactor(users): rewrite EditUserModal without HeroCompat
dingyi 670d075
refactor(models): rewrite EditModelModal without HeroCompat
dingyi 3611c1a
refactor(channels): rewrite OllamaModelModal without HeroCompat
dingyi 4e963c4
refactor(channels): rewrite CodexUsageModal without HeroCompat
dingyi d8c4fe9
refactor(setting): rewrite SettingsChats without HeroCompat
dingyi c200957
refactor(channels): rewrite EditTagModal without HeroCompat
dingyi 66f6662
refactor(topup): rewrite RechargeCard without HeroCompat
dingyi 5501c18
refactor(settings): rewrite TwoFASetting without HeroCompat
dingyi cb2602f
refactor(setting): rewrite SettingsPaymentGatewayWaffo without HeroCo…
dingyi 6f9d42f
refactor(channels): rewrite MultiKeyManageModal without HeroCompat
dingyi 3b1530d
refactor(settings): rewrite AccountManagement without HeroCompat
dingyi cd062d5
refactor(setting): rewrite SettingsPerformance without HeroCompat
dingyi 3a747e7
refactor(setting): rewrite GroupRatioSettings without HeroCompat
dingyi 7a0699e
refactor(setting): rewrite ModelPricingEditor without HeroCompat
dingyi 1930465
refactor(setting): rewrite UpstreamRatioSync without HeroCompat
dingyi cc1dce3
refactor(settings): rewrite NotificationSettings without HeroCompat
dingyi 6cbe16c
refactor(settings): rewrite CustomOAuthSetting without HeroCompat
dingyi 705be82
refactor(setting): rewrite SettingsChannelAffinity without HeroCompat
dingyi aa55ed9
feat(token): polish token page actions area and empty state
dingyi e01ca42
fix(css): wrap form-element font reset in @layer base
dingyi a58f028
refactor(deployments): rewrite CreateDeploymentModal without HeroCompat
dingyi 910a3c5
style(token): drop key icon and use foreground color for card title
dingyi 0eff24b
refactor(settings): rewrite SystemSetting without HeroCompat
dingyi 3cb4116
refactor(channels): rewrite ParamOverrideEditorModal without HeroCompat
dingyi 0ded524
refactor(channels): rewrite EditChannelModal without HeroCompat
dingyi 57d5e66
chore(web): remove HeroCompat / Semi shim packages
dingyi ec88016
style(task-logs): align card title with theme and let card fill width
dingyi 0b0c3a0
style(mj-logs): align card title with theme and let card fill width
dingyi d9be515
style(table): unify card titles to icon-less foreground style
dingyi 020c5d0
fix(web/personal): replace broken Semi-style Badge in UserInfoHeader
dingyi 14fa967
refactor(web/personal): use HeroUI Tabs and proper Button variants in…
dingyi bab3fb5
refactor(web/personal): adopt HeroUI Tabs and Avatar in notification …
dingyi 73c8821
refactor(web/personal): replace Tabs with HeroUI Pro Segment for swit…
dingyi 4faa004
refactor(web/personal): swap native <select> for HeroUI Pro CellSelect
dingyi 9f663a7
fix(web/personal): keep balance and stats from truncating in UserInfo…
dingyi f54cb30
refactor(console/dashboard): replace Card with HeroUI Pro Widget
dingyi e6d9072
refactor(console/dashboard): polish Widget header, empty state, and grid
dingyi c41b67c
style(console/dashboard): use primary 充值 CTA and bare-icon header but…
dingyi 3721de7
style(uptime-panel): shrink the refresh action to read as inline glyph
dingyi f8b73ea
style(charts-panel): drop chart tab label font from text-sm to text-xs
dingyi b7eabc6
fix(api-info-panel): center empty state vertically inside the panel
dingyi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
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
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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -0,0 +1,146 @@ | ||
| { | ||
| "compatShimFiles": { | ||
| "description": "These compatibility files re-export Semi-style components backed by HeroUI v3. They allow incremental migration without breaking pages that still use the legacy props (`checked`, `onChange`, `xs/sm/md/lg/xl`, render-prop Form, `Spin spinning`, etc.).", | ||
| "files": [ | ||
| "web/src/components/common/ui/HeroCompat.jsx", | ||
| "web/src/components/common/ui/HeroIconsCompat.jsx", | ||
| "web/src/components/common/ui/HeroIllustrationsCompat.jsx", | ||
| "web/src/components/ui/semi.js", | ||
| "web/src/components/ui/semi-icons.js", | ||
| "web/src/components/common/ui/TableFilterForm.jsx" | ||
| ] | ||
| }, | ||
| "sharedV3Components": [ | ||
| "web/src/components/common/ui/ConfirmDialog.jsx — HeroUI v3 Modal-based confirm dialog (replaces Semi Popconfirm and Modal.confirm).", | ||
| "web/src/components/common/ui/HoverPanel.jsx — Hover-triggered popover (replaces Semi Popover trigger='hover').", | ||
| "web/src/components/common/ui/ClickMenu.jsx — Click-triggered dropdown menu (replaces Semi Dropdown trigger='click')." | ||
| ], | ||
| "compatBugsFixed": [ | ||
| "Spin: now wraps children with overlay; previously returned null when spinning=false hiding everything inside.", | ||
| "Switch: now renders Switch.Control + Switch.Thumb anatomy; previously rendered a bare role=\"switch\" input with no visible toggle.", | ||
| "Col: now honors xs/sm/md/lg/xl/xxl breakpoint props via Tailwind responsive classes; previously fell back to span=24 (full width) ignoring all breakpoints.", | ||
| "Form: stable api ref, no more infinite update loop when controlled `values` is provided.", | ||
| "Form: supports render-prop children `({ values, formApi, formState }) => ...` used by SystemSetting.", | ||
| "useFormField: only backfills `initValue` once per field and skips it entirely in controlled mode (was the source of the infinite re-render).", | ||
| "Radio: added `Radio.Group` alias for legacy callers.", | ||
| "useTableFilterForm: stabilized `api` ref so freshly-allocated `initValues` literals from parents no longer trigger an infinite re-render loop on /console/token (and any other table using the hook).", | ||
| "Banner: now honors `description`, `title`, `closeIcon`, `fullMode`, `bordered` props from Semi UI; previously only rendered `children`, dropping the actual message text on every page that used the description prop.", | ||
| "withIcon (semi-icons): maps Semi-style string sizes (`small`, `default`, `large`, `extra-large`) to numeric pixel values; previously the literal string was forwarded to lucide-react which serialized it as a width/height attribute, blowing up the icon to e.g. 600+ pixels (caused the giant warning triangle on /console/models)." | ||
| ], | ||
| "filesStillImportingHeroCompat": 37, | ||
| "rewrittenToHeroUIv3": [ | ||
| "web/src/pages/Setting/Operation/SettingsHeaderNavModules.jsx", | ||
| "web/src/pages/Setting/Operation/SettingsSidebarModulesAdmin.jsx", | ||
| "web/src/pages/Setting/Operation/SettingsCheckin.jsx", | ||
| "web/src/pages/Setting/Operation/SettingsCreditLimit.jsx", | ||
| "web/src/pages/Setting/Operation/SettingsLog.jsx", | ||
| "web/src/pages/Setting/Operation/SettingsSensitiveWords.jsx", | ||
| "web/src/pages/Setting/Operation/SettingsMonitoring.jsx", | ||
| "web/src/pages/Setting/Operation/SettingsGeneral.jsx", | ||
| "web/src/components/settings/HttpStatusCodeRulesInput.jsx", | ||
| "web/src/pages/Setting/Dashboard/SettingsDataDashboard.jsx", | ||
| "web/src/pages/Setting/Drawing/SettingsDrawing.jsx", | ||
| "web/src/pages/Setting/RateLimit/SettingsRequestRateLimit.jsx", | ||
| "web/src/pages/Setting/Payment/SettingsGeneralPayment.jsx", | ||
| "web/src/pages/Setting/Payment/SettingsPaymentGateway.jsx", | ||
| "web/src/pages/Setting/Payment/SettingsPaymentGatewayStripe.jsx", | ||
| "web/src/pages/Setting/Model/SettingGlobalModel.jsx", | ||
| "web/src/pages/Setting/Model/SettingGeminiModel.jsx", | ||
| "web/src/pages/Setting/Model/SettingClaudeModel.jsx", | ||
| "web/src/pages/Setting/Model/SettingGrokModel.jsx", | ||
| "web/src/pages/Setting/Model/SettingModelDeployment.jsx", | ||
| "web/src/components/table/model-pricing/modal/components/ModelHeader.jsx", | ||
| "web/src/components/table/model-pricing/modal/components/ModelEndpoints.jsx", | ||
| "web/src/components/table/model-pricing/modal/components/ModelBasicInfo.jsx", | ||
| "web/src/components/table/channels/modals/BatchTagModal.jsx", | ||
| "web/src/components/table/channels/ChannelsTabs.jsx", | ||
| "web/src/components/table/channels/index.jsx", | ||
| "web/src/components/table/models/ModelsTabs.jsx", | ||
| "web/src/components/table/models/components/SelectionNotification.jsx", | ||
| "web/src/components/table/models/index.jsx", | ||
| "web/src/components/table/models/modals/SyncWizardModal.jsx", | ||
| "web/src/components/table/models/modals/MissingModelsModal.jsx", | ||
| "web/src/components/table/models/modals/EditVendorModal.jsx", | ||
| "web/src/components/table/model-deployments/modals/ConfirmationDialog.jsx", | ||
| "web/src/components/table/model-pricing/modal/PricingFilterModal.jsx", | ||
| "web/src/components/table/subscriptions/index.jsx", | ||
| "web/src/pages/Setting/Ratio/components/AutoGroupList.jsx", | ||
| "web/src/pages/Setting/Ratio/components/GroupTable.jsx", | ||
| "web/src/components/table/model-pricing/modal/ModelDetailSideSheet.jsx", | ||
| "web/src/components/table/model-pricing/view/table/PricingTable.jsx", | ||
| "web/src/components/table/channels/modals/CodexOAuthModal.jsx", | ||
| "web/src/components/table/channels/modals/SingleModelSelectModal.jsx", | ||
| "web/src/components/table/model-deployments/modals/EditDeploymentModal.jsx", | ||
| "web/src/components/table/models/modals/PrefillGroupManagement.jsx", | ||
| "web/src/pages/Setting/Ratio/components/GroupGroupRatioRules.jsx", | ||
| "web/src/pages/Setting/Ratio/components/GroupSpecialUsableRules.jsx", | ||
| "web/src/components/table/users/modals/AddUserModal.jsx", | ||
| "web/src/components/table/models/ModelsActions.jsx", | ||
| "web/src/helpers/utils.jsx", | ||
| "web/src/helpers/render.jsx", | ||
| "web/src/components/table/model-pricing/modal/components/ModelPricingTable.jsx", | ||
| "web/src/components/table/channels/ChannelsActions.jsx", | ||
| "web/src/components/table/users/UsersColumnDefs.jsx", | ||
| "web/src/components/table/subscriptions/SubscriptionsColumnDefs.jsx", | ||
| "web/src/components/table/models/ModelsColumnDefs.jsx", | ||
| "web/src/pages/Setting/Ratio/ModelRatioSettings.jsx", | ||
| "web/src/components/table/model-pricing/view/table/PricingTableColumns.jsx", | ||
| "web/src/components/table/channels/modals/ChannelUpstreamUpdateModal.jsx", | ||
| "web/src/components/table/models/modals/UpstreamConflictModal.jsx", | ||
| "web/src/components/table/models/modals/EditPrefillGroupModal.jsx", | ||
| "web/src/components/table/users/modals/UserBindingManagementModal.jsx", | ||
| "web/src/components/table/users/modals/UserSubscriptionsModal.jsx", | ||
| "web/src/components/settings/personal/cards/CheckinCalendar.jsx", | ||
| "web/src/components/table/redemptions/modals/EditRedemptionModal.jsx", | ||
| "web/src/components/settings/ChannelSelectorModal.jsx", | ||
| "web/src/pages/Setting/Payment/SettingsPaymentGatewayCreem.jsx", | ||
| "web/src/pages/Setting/Dashboard/SettingsFAQ.jsx", | ||
| "web/src/pages/Setting/Payment/SettingsPaymentGatewayWaffoPancake.jsx", | ||
| "web/src/pages/Setting/Dashboard/SettingsUptimeKuma.jsx", | ||
| "web/src/pages/Setting/Dashboard/SettingsAPIInfo.jsx", | ||
| "web/src/pages/Setting/Dashboard/SettingsAnnouncements.jsx", | ||
| "web/src/components/table/task-logs/TaskLogsColumnDefs.jsx", | ||
| "web/src/components/table/mj-logs/MjLogsColumnDefs.jsx" | ||
| ], | ||
| "v3ApiNotes": { | ||
| "Switch": "Compound component — needs <Switch.Control><Switch.Thumb /></Switch.Control>; uses isSelected + onChange(value) (NOT onValueChange).", | ||
| "Input": "Thin wrapper over react-aria-components Input — accepts standard HTML props (value, onChange={(e) => ...}, disabled). Does NOT support onValueChange or isDisabled.", | ||
| "TextArea": "Same as Input — wrapper over react-aria-components TextArea. Use rows attr instead of minRows/maxRows. For complex layouts use a plain <textarea> with Tailwind classes.", | ||
| "Button": "Wrapper over react-aria-components Button. Loading prop is isPending (NOT isLoading). Uses onPress (not onClick), color, variant, size, isDisabled, isIconOnly, fullWidth.", | ||
| "Modal": "Uses compound Modal/ModalBackdrop/ModalContainer/ModalDialog/ModalHeader/ModalBody/ModalFooter + useOverlayState({ isOpen, onOpenChange }) — see ConfirmDialog.jsx for the canonical example." | ||
| }, | ||
| "verifiedRendering": [ | ||
| "/console (Dashboard)", | ||
| "/console/personal", | ||
| "/console/topup", | ||
| "/console/channel", | ||
| "/console/token", | ||
| "/console/log", | ||
| "/console/midjourney", | ||
| "/console/task", | ||
| "/console/redemption", | ||
| "/console/user", | ||
| "/console/playground", | ||
| "/console/models", | ||
| "/console/deployment", | ||
| "/console/subscription", | ||
| "/console/setting?tab=operation", | ||
| "/console/setting?tab=dashboard", | ||
| "/console/setting?tab=chats", | ||
| "/console/setting?tab=drawing", | ||
| "/console/setting?tab=payment", | ||
| "/console/setting?tab=ratio", | ||
| "/console/setting?tab=ratelimit", | ||
| "/console/setting?tab=models", | ||
| "/console/setting?tab=model-deployment", | ||
| "/console/setting?tab=performance", | ||
| "/console/setting?tab=system", | ||
| "/console/setting?tab=other", | ||
| "/pricing" | ||
| ], | ||
| "summary": { | ||
| "remainingHeroCompatImporters": 37, | ||
| "compatShimFunctional": true, | ||
| "criticalRenderBugsFixed": true | ||
| } | ||
| } |
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
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
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
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.
Missing
.jpegexception in.gitignoreforweb/publicMedium Severity
The
.gitignoreadds*.jpegto the global ignore list but only creates exceptions for!web/public/**/*.pngand!web/public/**/*.jpg— there's no matching!web/public/**/*.jpegexception. Any.jpegfile added toweb/public/in the future would be silently ignored by git, inconsistent with the treatment of the other two image extensions.Reviewed by Cursor Bugbot for commit f54cb30. Configure here.