Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
66cdf577
Unverified
Commit
66cdf577
authored
Jan 04, 2024
by
zxhlyh
Committed by
GitHub
Jan 04, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: model quota format (#1909)
parent
89121861
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
quota-panel.tsx
...g/model-provider-page/provider-added-card/quota-panel.tsx
+2
-1
index.tsx
web/app/components/header/index.tsx
+1
-1
No files found.
web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx
View file @
66cdf577
...
...
@@ -15,6 +15,7 @@ import PriorityUseTip from './priority-use-tip'
import
{
InfoCircle
}
from
'@/app/components/base/icons/src/vender/line/general'
import
Button
from
'@/app/components/base/button'
import
TooltipPlus
from
'@/app/components/base/tooltip-plus'
import
{
formatNumber
}
from
'@/utils/format'
type
QuotaPanelProps
=
{
provider
:
ModelProvider
...
...
@@ -50,7 +51,7 @@ const QuotaPanel: FC<QuotaPanelProps> = ({
{
currentQuota
&&
(
<
div
className=
'flex items-center h-4 text-xs text-gray-500'
>
<
span
className=
'mr-0.5 text-sm font-semibold text-gray-700'
>
{
(
currentQuota
?.
quota_limit
||
0
)
-
(
currentQuota
?.
quota_used
||
0
)
}
</
span
>
<
span
className=
'mr-0.5 text-sm font-semibold text-gray-700'
>
{
formatNumber
((
currentQuota
?.
quota_limit
||
0
)
-
(
currentQuota
?.
quota_used
||
0
)
)
}
</
span
>
{
currentQuota
?.
quota_unit
===
QuotaUnitEnum
.
tokens
&&
'Tokens'
}
...
...
web/app/components/header/index.tsx
View file @
66cdf577
...
...
@@ -19,7 +19,7 @@ import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'
import
{
useProviderContext
}
from
'@/context/provider-context'
const
navClassName
=
`
flex items-center relative mr-0 sm:mr-3 px-3 h-
9
rounded-xl
flex items-center relative mr-0 sm:mr-3 px-3 h-
8
rounded-xl
font-medium text-sm
cursor-pointer
`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment