Skip to content

Commit c18d35d

Browse files
committed
Update common.js
1 parent 75d5d43 commit c18d35d

File tree

1 file changed

+9
-26
lines changed

1 file changed

+9
-26
lines changed

front/common.js

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,7 @@ async function toggleAntigravityQuotaDetails(pathId) {
16071607
</h4>
16081608
<div style="font-size: 12px; opacity: 0.9; margin-top: 5px;">文件: ${filename}</div>
16091609
</div>
1610-
<div style="display: grid; gap: 12px;">
1610+
<div style="display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px;">
16111611
`;
16121612

16131613
for (const [modelName, quotaData] of Object.entries(models)) {
@@ -1626,34 +1626,17 @@ async function toggleAntigravityQuotaDetails(pathId) {
16261626
else if (usedPercentage >= 50) percentageColor = '#17a2b8'; // 蓝色:使用中等
16271627

16281628
quotaHTML += `
1629-
<div style="background: #f8f9fa; border: 1px solid #e1e4e8; border-radius: 8px; padding: 12px; border-left: 4px solid #17a2b8;">
1630-
<div style="font-weight: bold; color: #333; margin-bottom: 8px; font-size: 14px;">
1631-
🔹 ${modelName}
1632-
</div>
1633-
1634-
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px;">
1635-
<div style="background: white; padding: 8px; border-radius: 4px; border: 1px solid #dee2e6;">
1636-
<div style="font-size: 11px; color: #666; margin-bottom: 2px;">剩余额度</div>
1637-
<div style="font-size: 18px; font-weight: bold; color: #28a745;">${remainingPercentage}%</div>
1638-
</div>
1639-
<div style="background: white; padding: 8px; border-radius: 4px; border: 1px solid #dee2e6;">
1640-
<div style="font-size: 11px; color: #666; margin-bottom: 2px;">已使用</div>
1641-
<div style="font-size: 18px; font-weight: bold; color: #dc3545;">${usedPercentage}%</div>
1629+
<div style="background: white; border-left: 4px solid ${percentageColor}; border-radius: 4px; padding: 8px 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
1630+
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;">
1631+
<div style="font-weight: bold; color: #333; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; margin-right: 8px;" title="${modelName} - 剩余${remainingPercentage}% - ${resetTime}">
1632+
${modelName}
16421633
</div>
1643-
<div style="background: white; padding: 8px; border-radius: 4px; border: 1px solid #dee2e6; grid-column: span 2;">
1644-
<div style="font-size: 11px; color: #666; margin-bottom: 2px;">重置时间</div>
1645-
<div style="font-size: 14px; font-weight: bold; color: #666;">${resetTime}</div>
1634+
<div style="font-size: 13px; font-weight: bold; color: ${percentageColor}; white-space: nowrap;">
1635+
${remainingPercentage}%
16461636
</div>
16471637
</div>
1648-
1649-
<div>
1650-
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px;">
1651-
<span style="font-size: 11px; color: #666;">使用进度</span>
1652-
<span style="font-size: 12px; font-weight: bold; color: ${percentageColor};">${usedPercentage}%</span>
1653-
</div>
1654-
<div style="width: 100%; height: 10px; background-color: #e9ecef; border-radius: 5px; overflow: hidden;">
1655-
<div style="width: ${usedPercentage}%; height: 100%; background-color: ${percentageColor}; transition: width 0.3s ease;"></div>
1656-
</div>
1638+
<div style="width: 100%; height: 8px; background-color: #e9ecef; border-radius: 4px; overflow: hidden;">
1639+
<div style="width: ${usedPercentage}%; height: 100%; background-color: ${percentageColor}; transition: width 0.3s ease;"></div>
16571640
</div>
16581641
</div>
16591642
`;

0 commit comments

Comments
 (0)