mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-20 15:06:36 +00:00
feat(ollama): 支持 Cloud 官方用量自动刷新
This commit is contained in:
1 parent
2c76506e07
commit
5ac4a9fac2
47 files changed
+5571
-85
No files matched your search
@@ -552,6 +552,10 @@
|
||||
<AccountQuotaInfo v-if="account.platform === 'gemini'" :account="account" />
|
||||
<!-- Key/Bedrock accounts: show today stats + optional quota bars -->
|
||||
<div v-else class="space-y-1">
|
||||
<OllamaCloudUsageCell
|
||||
v-if="account.ollama_cloud_usage?.eligible"
|
||||
:account="account"
|
||||
/>
|
||||
<!-- Today stats row (requests, tokens, cost, user_cost) -->
|
||||
<div
|
||||
v-if="todayStats"
|
||||
@@ -609,7 +613,10 @@
|
||||
/>
|
||||
|
||||
<!-- No data at all -->
|
||||
<div v-if="!todayStats && !todayStatsLoading && !hasApiKeyQuota" class="text-xs text-gray-400">-</div>
|
||||
<div
|
||||
v-if="!todayStats && !todayStatsLoading && !hasApiKeyQuota && !account.ollama_cloud_usage?.eligible"
|
||||
class="text-xs text-gray-400"
|
||||
>-</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -627,6 +634,7 @@ import UsageProgressBar from './UsageProgressBar.vue'
|
||||
import AccountQuotaInfo from './AccountQuotaInfo.vue'
|
||||
import OpenAIQuotaResetCell from './OpenAIQuotaResetCell.vue'
|
||||
import GrokQuotaProbeCell from './GrokQuotaProbeCell.vue'
|
||||
import OllamaCloudUsageCell from './OllamaCloudUsageCell.vue'
|
||||
|
||||
// Module-level cache shared across all AccountUsageCell instances
|
||||
const _usageCache = new Map<number, { data: AccountUsageInfo; ts: number }>()
|
||||
|
||||
Reference in new issue
Block a user