mirror of
https://github.com/langgenius/dify.git
synced 2026-05-13 00:33:37 +08:00
- Move MainNav sections into focused components under main-nav/components - Reuse Explore AppNavItem for MainNav web app rows via a mainNav variant - Keep WorkspaceCard expanded panel behavior and styling aligned with the pre-refactor UI
6 lines
274 B
TypeScript
6 lines
274 B
TypeScript
export const getWorkspaceInitial = (name?: string) => name?.[0]?.toLocaleUpperCase() || '?'
|
|
|
|
export const getRemainingCredits = (total: number, used: number) => Math.max(total - used, 0)
|
|
|
|
export const formatCredits = (value: number) => new Intl.NumberFormat().format(value)
|