- Added new model "Claude Opus 4.6" to the provider models.
This commit is contained in:
1 parent
39c555ca7e
commit
e8aa3e21fe
10 files changed
+159
-143
No files matched your search
@@ -42,31 +42,23 @@ export function formatResetTime(date) {
|
||||
/**
|
||||
* Get Tailwind color class based on percentage
|
||||
* @param {number} percentage - Remaining percentage (0-100)
|
||||
* @returns {string} Color name: "green" | "yellow" | "red" | "gray"
|
||||
* @returns {string} Color name: "green" | "yellow" | "red"
|
||||
*/
|
||||
export function getStatusColor(percentage) {
|
||||
if (percentage === 0 || percentage === null || percentage === undefined) {
|
||||
return "gray";
|
||||
}
|
||||
|
||||
if (percentage > 70) return "green";
|
||||
if (percentage >= 30) return "yellow";
|
||||
return "red";
|
||||
return "red"; // 0-29% including 0% (out of quota) - show red
|
||||
}
|
||||
|
||||
/**
|
||||
* Get status emoji based on percentage
|
||||
* @param {number} percentage - Remaining percentage (0-100)
|
||||
* @returns {string} Emoji: "🟢" | "🟡" | "🔴" | "⚫"
|
||||
* @returns {string} Emoji: "🟢" | "🟡" | "🔴"
|
||||
*/
|
||||
export function getStatusEmoji(percentage) {
|
||||
if (percentage === 0 || percentage === null || percentage === undefined) {
|
||||
return "⚫";
|
||||
}
|
||||
|
||||
if (percentage > 70) return "🟢";
|
||||
if (percentage >= 30) return "🟡";
|
||||
return "🔴";
|
||||
return "🔴"; // 0-29% including 0% (out of quota) - show red
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user