feat: add logging for voice list retrieval from cache and fix loading option text

This commit is contained in:
zuoban
2025-08-12 14:09:04 +08:00
parent 66421eebec
commit 99fd935ae9
2 changed files with 3 additions and 1 deletions

View File

@@ -117,6 +117,8 @@ func (c *Client) ListVoices(ctx context.Context, locale string) ([]models.Voice,
// 检查缓存是否有效
c.voicesCacheMu.RLock()
if !c.voicesCacheExpiry.IsZero() && time.Now().Before(c.voicesCacheExpiry) && len(c.voicesCache) > 0 {
// 从缓存中获取
log.Println("从缓存中获取语音列表: ", len(c.voicesCache), "个", "剩余时间:", c.voicesCacheExpiry.Sub(time.Now()))
voices := c.voicesCache
c.voicesCacheMu.RUnlock()

View File

@@ -947,7 +947,7 @@
<label for="style" class="mb-1 font-semibold text-slate-700">风格:</label>
<select id="style"
class="p-2 border border-slate-300 rounded-md bg-white/90 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition">
<option value="loading">加载<EFBFBD><EFBFBD><EFBFBD>...</option>
<option value="loading">加载...</option>
</select>
</div>
</div>