mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-05-10 06:22:42 +00:00
feat: stores 部分接入 i18n(auth/settings/apistats/dashboard/clients:标题、错误与日期提示本地化)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { apiClient } from '@/config/api'
|
||||
import i18n from '@/i18n'
|
||||
|
||||
export const useClientsStore = defineStore('clients', {
|
||||
state: () => ({
|
||||
@@ -24,13 +25,13 @@ export const useClientsStore = defineStore('clients', {
|
||||
if (response.success) {
|
||||
this.supportedClients = response.data || []
|
||||
} else {
|
||||
this.error = response.message || '加载支持的客户端失败'
|
||||
this.error = response.message || i18n.global.t('common.errors.loadSupportedClientsFailed')
|
||||
console.error('Failed to load supported clients:', this.error)
|
||||
}
|
||||
|
||||
return this.supportedClients
|
||||
} catch (error) {
|
||||
this.error = error.message || '加载支持的客户端失败'
|
||||
this.error = error.message || i18n.global.t('common.errors.loadSupportedClientsFailed')
|
||||
console.error('Error loading supported clients:', error)
|
||||
return []
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user