Browse Source

fix: balance unit sync

skynono 7 months ago
parent
commit
17e1ea5f4b
2 changed files with 4 additions and 4 deletions
  1. 3 3
      web/src/components/table/ChannelsTable.js
  2. 1 1
      web/src/helpers/render.js

+ 3 - 3
web/src/components/table/ChannelsTable.js

@@ -6,7 +6,7 @@ import {
   showSuccess,
   timestamp2string,
   renderGroup,
-  renderNumberWithPoint,
+  renderQuotaWithAmount,
   renderQuota
 } from '../../helpers/index.js';
 
@@ -328,7 +328,7 @@ const ChannelsTable = () => {
                     {renderQuota(record.used_quota)}
                   </Tag>
                 </Tooltip>
-                <Tooltip content={t('剩余额度') + record.balance + t(',点击更新')}>
+                <Tooltip content={t('剩余额度$') + record.balance + t(',点击更新')}>
                   <Tag
                     color='white'
                     type='ghost'
@@ -336,7 +336,7 @@ const ChannelsTable = () => {
                     shape='circle'
                     onClick={() => updateChannelBalance(record)}
                   >
-                    ${renderNumberWithPoint(record.balance)}
+                    {renderQuotaWithAmount(record.balance)}
                   </Tag>
                 </Tooltip>
               </Space>

+ 1 - 1
web/src/helpers/render.js

@@ -764,7 +764,7 @@ export function renderQuotaWithAmount(amount) {
   if (displayInCurrency) {
     return '$' + amount;
   } else {
-    return renderUnitWithQuota(amount);
+    return renderNumber(renderUnitWithQuota(amount));
   }
 }