"backend/vscode:/vscode.git/clone" did not exist on "422f60a14513b8c9df33bdf8209d82fb6888d7b9"
Commit 67518a59 authored by erio's avatar erio
Browse files

revert: remove fork-only changes from release sync

Revert payment/wechat, sora/claude-max cleanup, fork-only migrations,
and cosmetic changes that were brought in by the release sync commit.
Keep only channel-monitor related improvements:
- PublicSettingsInjectionPayload named struct with drift test
- ChannelMonitorRunner graceful shutdown in wire
- image_output_price in SupportedModelChip
- Simplified buildSelfNavItems in AppSidebar
- Gateway WARN logs for 503 branches
parent a3ea8eca
...@@ -17,7 +17,7 @@ import type { ...@@ -17,7 +17,7 @@ import type {
AdminDataPayload, AdminDataPayload,
AdminDataImportResult, AdminDataImportResult,
CheckMixedChannelRequest, CheckMixedChannelRequest,
CheckMixedChannelResponse, CheckMixedChannelResponse
} from '@/types' } from '@/types'
/** /**
...@@ -663,7 +663,7 @@ export const accountsAPI = { ...@@ -663,7 +663,7 @@ export const accountsAPI = {
getAntigravityDefaultModelMapping, getAntigravityDefaultModelMapping,
batchClearError, batchClearError,
batchRefresh, batchRefresh,
setPrivacy, setPrivacy
} }
export default accountsAPI export default accountsAPI
...@@ -698,48 +698,6 @@ ...@@ -698,48 +698,6 @@
</div> </div>
</div> </div>
<!-- Allow Overages (Antigravity only) -->
<div v-if="allAntigravity" class="border-t border-gray-200 pt-4 dark:border-dark-600">
<div class="flex items-center justify-between">
<div class="flex-1 pr-4">
<label
id="bulk-edit-allow-overages-label"
class="input-label mb-0"
for="bulk-edit-allow-overages-enabled"
>
{{ t('admin.accounts.allowOverages') }}
</label>
<p class="mt-1 text-xs text-gray-500 dark:text-gray-400">
{{ t('admin.accounts.allowOveragesTooltip') }}
</p>
</div>
<input
v-model="enableAllowOverages"
id="bulk-edit-allow-overages-enabled"
type="checkbox"
aria-controls="bulk-edit-allow-overages-body"
class="rounded border-gray-300 text-primary-600 focus:ring-primary-500"
/>
</div>
<div v-if="enableAllowOverages" id="bulk-edit-allow-overages-body" class="mt-3">
<button
type="button"
:class="[
'relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2',
allowOverages ? 'bg-primary-600' : 'bg-gray-200 dark:bg-dark-600'
]"
@click="allowOverages = !allowOverages"
>
<span
:class="[
'pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out',
allowOverages ? 'translate-x-5' : 'translate-x-0'
]"
/>
</button>
</div>
</div>
<!-- RPM Limit (仅全部为 Anthropic OAuth/SetupToken 时显示) --> <!-- RPM Limit (仅全部为 Anthropic OAuth/SetupToken 时显示) -->
<div v-if="allAnthropicOAuthOrSetupToken" class="border-t border-gray-200 pt-4 dark:border-dark-600"> <div v-if="allAnthropicOAuthOrSetupToken" class="border-t border-gray-200 pt-4 dark:border-dark-600">
<div class="mb-3 flex items-center justify-between"> <div class="mb-3 flex items-center justify-between">
...@@ -1009,11 +967,6 @@ const allOpenAIOAuth = computed(() => { ...@@ -1009,11 +967,6 @@ const allOpenAIOAuth = computed(() => {
) )
}) })
// 是否全部为 Antigravity 平台(allow_overages 仅在此条件下显示)
const allAntigravity = computed(() =>
props.selectedPlatforms.length === 1 && props.selectedPlatforms[0] === 'antigravity'
)
// 是否全部为 Anthropic OAuth/SetupToken(RPM 配置仅在此条件下显示) // 是否全部为 Anthropic OAuth/SetupToken(RPM 配置仅在此条件下显示)
const allAnthropicOAuthOrSetupToken = computed(() => { const allAnthropicOAuthOrSetupToken = computed(() => {
return ( return (
...@@ -1060,7 +1013,6 @@ const enableGroups = ref(false) ...@@ -1060,7 +1013,6 @@ const enableGroups = ref(false)
const enableOpenAIPassthrough = ref(false) const enableOpenAIPassthrough = ref(false)
const enableOpenAIWSMode = ref(false) const enableOpenAIWSMode = ref(false)
const enableRpmLimit = ref(false) const enableRpmLimit = ref(false)
const enableAllowOverages = ref(false)
// State - field values // State - field values
const submitting = ref(false) const submitting = ref(false)
...@@ -1088,7 +1040,6 @@ const bulkBaseRpm = ref<number | null>(null) ...@@ -1088,7 +1040,6 @@ const bulkBaseRpm = ref<number | null>(null)
const bulkRpmStrategy = ref<'tiered' | 'sticky_exempt'>('tiered') const bulkRpmStrategy = ref<'tiered' | 'sticky_exempt'>('tiered')
const bulkRpmStickyBuffer = ref<number | null>(null) const bulkRpmStickyBuffer = ref<number | null>(null)
const userMsgQueueMode = ref<string | null>(null) const userMsgQueueMode = ref<string | null>(null)
const allowOverages = ref(false)
const umqModeOptions = computed(() => [ const umqModeOptions = computed(() => [
{ value: '', label: t('admin.accounts.quotaControl.rpmLimit.umqModeOff') }, { value: '', label: t('admin.accounts.quotaControl.rpmLimit.umqModeOff') },
{ value: 'throttle', label: t('admin.accounts.quotaControl.rpmLimit.umqModeThrottle') }, { value: 'throttle', label: t('admin.accounts.quotaControl.rpmLimit.umqModeThrottle') },
...@@ -1330,13 +1281,6 @@ const buildUpdatePayload = (): Record<string, unknown> | null => { ...@@ -1330,13 +1281,6 @@ const buildUpdatePayload = (): Record<string, unknown> | null => {
umqExtra.user_msg_queue_enabled = false // 清理旧字段(JSONB merge) umqExtra.user_msg_queue_enabled = false // 清理旧字段(JSONB merge)
} }
// Allow overages (Antigravity only)
if (enableAllowOverages.value) {
if (!updates.extra) updates.extra = {}
const overagesExtra = updates.extra as Record<string, unknown>
overagesExtra.allow_overages = allowOverages.value
}
return Object.keys(updates).length > 0 ? updates : null return Object.keys(updates).length > 0 ? updates : null
} }
...@@ -1401,7 +1345,6 @@ const handleSubmit = async () => { ...@@ -1401,7 +1345,6 @@ const handleSubmit = async () => {
enableGroups.value || enableGroups.value ||
enableOpenAIWSMode.value || enableOpenAIWSMode.value ||
enableRpmLimit.value || enableRpmLimit.value ||
enableAllowOverages.value ||
userMsgQueueMode.value !== null userMsgQueueMode.value !== null
if (!hasAnyFieldEnabled) { if (!hasAnyFieldEnabled) {
...@@ -1495,7 +1438,6 @@ watch( ...@@ -1495,7 +1438,6 @@ watch(
enableOpenAIPassthrough.value = false enableOpenAIPassthrough.value = false
enableOpenAIWSMode.value = false enableOpenAIWSMode.value = false
enableRpmLimit.value = false enableRpmLimit.value = false
enableAllowOverages.value = false
// Reset all values // Reset all values
baseUrl.value = '' baseUrl.value = ''
...@@ -1519,7 +1461,6 @@ watch( ...@@ -1519,7 +1461,6 @@ watch(
bulkRpmStrategy.value = 'tiered' bulkRpmStrategy.value = 'tiered'
bulkRpmStickyBuffer.value = null bulkRpmStickyBuffer.value = null
userMsgQueueMode.value = null userMsgQueueMode.value = null
allowOverages.value = false
// Reset mixed channel warning state // Reset mixed channel warning state
showMixedChannelWarning.value = false showMixedChannelWarning.value = false
......
...@@ -3322,12 +3322,7 @@ watch( ...@@ -3322,12 +3322,7 @@ watch(
if (newVal) { if (newVal) {
// Load TLS fingerprint profiles // Load TLS fingerprint profiles
adminAPI.tlsFingerprintProfiles.list() adminAPI.tlsFingerprintProfiles.list()
.then(profiles => { .then(profiles => { tlsFingerprintProfiles.value = profiles.map(p => ({ id: p.id, name: p.name })) })
tlsFingerprintProfiles.value = profiles.map(p => ({
id: p.id,
name: p.name,
}))
})
.catch(() => { tlsFingerprintProfiles.value = [] }) .catch(() => { tlsFingerprintProfiles.value = [] })
// Modal opened - fill related models // Modal opened - fill related models
allowedModels.value = [...getModelsByPlatform(form.platform)] allowedModels.value = [...getModelsByPlatform(form.platform)]
......
...@@ -2440,10 +2440,7 @@ watch( ...@@ -2440,10 +2440,7 @@ watch(
const loadTLSProfiles = async () => { const loadTLSProfiles = async () => {
try { try {
const profiles = await adminAPI.tlsFingerprintProfiles.list() const profiles = await adminAPI.tlsFingerprintProfiles.list()
tlsFingerprintProfiles.value = profiles.map(p => ({ tlsFingerprintProfiles.value = profiles.map(p => ({ id: p.id, name: p.name }))
id: p.id,
name: p.name,
}))
} catch { } catch {
tlsFingerprintProfiles.value = [] tlsFingerprintProfiles.value = []
} }
...@@ -3312,5 +3309,4 @@ const handleMixedChannelConfirm = async () => { ...@@ -3312,5 +3309,4 @@ const handleMixedChannelConfirm = async () => {
const handleMixedChannelCancel = () => { const handleMixedChannelCancel = () => {
clearMixedChannelDialog() clearMixedChannelDialog()
} }
</script> </script>
...@@ -122,7 +122,7 @@ describe('AccountStatusIndicator', () => { ...@@ -122,7 +122,7 @@ describe('AccountStatusIndicator', () => {
} }
}) })
expect(wrapper.text()).toContain('admin.accounts.status.creditsExhausted') expect(wrapper.text()).toContain('account.creditsExhausted')
}) })
it('模型限流 + overages 启用 + AICredits key 生效 → 普通限流样式(积分耗尽,无 ⚡)', () => { it('模型限流 + overages 启用 + AICredits key 生效 → 普通限流样式(积分耗尽,无 ⚡)', () => {
...@@ -157,6 +157,6 @@ describe('AccountStatusIndicator', () => { ...@@ -157,6 +157,6 @@ describe('AccountStatusIndicator', () => {
expect(wrapper.text()).toContain('CSon45') expect(wrapper.text()).toContain('CSon45')
expect(wrapper.text()).not.toContain('') expect(wrapper.text()).not.toContain('')
// AICredits 积分耗尽状态应显示 // AICredits 积分耗尽状态应显示
expect(wrapper.text()).toContain('admin.accounts.status.creditsExhausted') expect(wrapper.text()).toContain('account.creditsExhausted')
}) })
}) })
...@@ -15,10 +15,6 @@ vi.mock('@/api/admin', () => ({ ...@@ -15,10 +15,6 @@ vi.mock('@/api/admin', () => ({
} }
})) }))
vi.mock('@/utils/usageLoadQueue', () => ({
enqueueUsageRequest: (_account: unknown, fn: () => Promise<unknown>) => fn()
}))
vi.mock('vue-i18n', async () => { vi.mock('vue-i18n', async () => {
const actual = await vi.importActual<typeof import('vue-i18n')>('vue-i18n') const actual = await vi.importActual<typeof import('vue-i18n')>('vue-i18n')
return { return {
...@@ -389,117 +385,6 @@ describe('AccountUsageCell', () => { ...@@ -389,117 +385,6 @@ describe('AccountUsageCell', () => {
expect(wrapper.text()).toContain('7d|0|27700') expect(wrapper.text()).toContain('7d|0|27700')
}) })
it('OpenAI OAuth 在 usage 请求失败时仍回退显示本地 codex 快照', async () => {
getUsage.mockRejectedValue(new Error('network error'))
const errorSpy = vi.spyOn(console, 'error').mockImplementation(() => {})
const wrapper = mount(AccountUsageCell, {
props: {
account: makeAccount({
id: 2004,
platform: 'openai',
type: 'oauth',
extra: {
codex_usage_updated_at: '2099-03-07T10:00:00Z',
codex_5h_used_percent: 12,
codex_5h_reset_at: '2099-03-07T12:00:00Z',
codex_7d_used_percent: 34,
codex_7d_reset_at: '2099-03-13T12:00:00Z'
}
})
},
global: {
stubs: {
UsageProgressBar: {
props: ['label', 'utilization', 'resetsAt', 'windowStats', 'color'],
template: '<div class="usage-bar">{{ label }}|{{ utilization }}|{{ resetsAt }}</div>'
},
AccountQuotaInfo: true
}
}
})
await flushPromises()
expect(getUsage).toHaveBeenCalledWith(2004)
expect(wrapper.text()).toContain('5h|12|2099-03-07T12:00:00.000Z')
expect(wrapper.text()).toContain('7d|34|2099-03-13T12:00:00.000Z')
errorSpy.mockRestore()
})
it('OpenAI OAuth 已限额时首屏优先等待重新查询的 usage,而不是先显示旧 codex 快照', async () => {
let resolveUsage: ((value: any) => void) | null = null
getUsage.mockReturnValue(
new Promise((resolve) => {
resolveUsage = resolve
})
)
const wrapper = mount(AccountUsageCell, {
props: {
account: makeAccount({
id: 2005,
platform: 'openai',
type: 'oauth',
rate_limit_reset_at: '2099-03-07T12:00:00Z',
extra: {
codex_5h_used_percent: 0,
codex_5h_reset_at: '2099-03-07T12:00:00Z',
codex_7d_used_percent: 0,
codex_7d_reset_at: '2099-03-13T12:00:00Z'
}
})
},
global: {
stubs: {
UsageProgressBar: {
props: ['label', 'utilization', 'resetsAt', 'windowStats', 'color'],
template: '<div class="usage-bar">{{ label }}|{{ utilization }}|{{ windowStats?.tokens }}</div>'
},
AccountQuotaInfo: true
}
}
})
await Promise.resolve()
expect(getUsage).toHaveBeenCalledWith(2005)
expect(wrapper.text()).not.toContain('5h|0|')
expect(wrapper.text()).not.toContain('7d|0|')
resolveUsage?.({
five_hour: {
utilization: 100,
resets_at: '2026-03-07T12:00:00Z',
remaining_seconds: 3600,
window_stats: {
requests: 211,
tokens: 106540000,
cost: 38.13,
standard_cost: 38.13,
user_cost: 38.13
}
},
seven_day: {
utilization: 100,
resets_at: '2026-03-13T12:00:00Z',
remaining_seconds: 3600,
window_stats: {
requests: 211,
tokens: 106540000,
cost: 38.13,
standard_cost: 38.13,
user_cost: 38.13
}
}
})
await flushPromises()
expect(wrapper.text()).toContain('5h|100|106540000')
expect(wrapper.text()).toContain('7d|100|106540000')
})
it('OpenAI OAuth 在行数据刷新但仍无 codex 快照时会重新拉取 usage', async () => { it('OpenAI OAuth 在行数据刷新但仍无 codex 快照时会重新拉取 usage', async () => {
getUsage getUsage
.mockResolvedValueOnce({ .mockResolvedValueOnce({
......
<script setup lang="ts"> <script setup lang="ts">
import { ref, useTemplateRef, nextTick } from 'vue' import { onBeforeUnmount, onMounted, ref, useTemplateRef, nextTick } from 'vue'
defineProps<{ const props = withDefaults(defineProps<{
content?: string content?: string
}>() trigger?: 'hover' | 'click'
widthClass?: string
}>(), {
trigger: 'hover',
widthClass: 'w-64',
})
const show = ref(false) const show = ref(false)
const triggerRef = useTemplateRef<HTMLElement>('trigger') const triggerRef = useTemplateRef<HTMLElement>('trigger')
const tooltipRef = useTemplateRef<HTMLElement>('tooltip')
const tooltipStyle = ref({ top: '0px', left: '0px' }) const tooltipStyle = ref({ top: '0px', left: '0px' })
function onEnter() { function openTooltip() {
show.value = true show.value = true
nextTick(updatePosition) nextTick(updatePosition)
} }
function onLeave() { function closeTooltip() {
show.value = false show.value = false
} }
function onEnter() {
if (props.trigger !== 'hover') return
openTooltip()
}
function onLeave() {
if (props.trigger !== 'hover') return
closeTooltip()
}
function onClick(event: MouseEvent) {
if (props.trigger !== 'click') return
event.stopPropagation()
if (show.value) {
closeTooltip()
return
}
openTooltip()
}
function onDocumentClick(event: MouseEvent) {
if (props.trigger !== 'click' || !show.value) return
const target = event.target as Node | null
if (!target) return
if (triggerRef.value?.contains(target) || tooltipRef.value?.contains(target)) return
closeTooltip()
}
function onDocumentKeydown(event: KeyboardEvent) {
if (props.trigger !== 'click') return
if (event.key === 'Escape') {
closeTooltip()
}
}
function onViewportChange() {
if (!show.value) return
updatePosition()
}
function updatePosition() { function updatePosition() {
const el = triggerRef.value const el = triggerRef.value
if (!el) return if (!el) return
...@@ -27,6 +73,20 @@ function updatePosition() { ...@@ -27,6 +73,20 @@ function updatePosition() {
left: `${rect.left + rect.width / 2 + window.scrollX}px`, left: `${rect.left + rect.width / 2 + window.scrollX}px`,
} }
} }
onMounted(() => {
document.addEventListener('click', onDocumentClick, true)
document.addEventListener('keydown', onDocumentKeydown)
window.addEventListener('resize', onViewportChange)
window.addEventListener('scroll', onViewportChange, true)
})
onBeforeUnmount(() => {
document.removeEventListener('click', onDocumentClick, true)
document.removeEventListener('keydown', onDocumentKeydown)
window.removeEventListener('resize', onViewportChange)
window.removeEventListener('scroll', onViewportChange, true)
})
</script> </script>
<template> <template>
...@@ -35,6 +95,7 @@ function updatePosition() { ...@@ -35,6 +95,7 @@ function updatePosition() {
class="group relative ml-1 inline-flex items-center align-middle" class="group relative ml-1 inline-flex items-center align-middle"
@mouseenter="onEnter" @mouseenter="onEnter"
@mouseleave="onLeave" @mouseleave="onLeave"
@click="onClick"
> >
<!-- Trigger Icon --> <!-- Trigger Icon -->
<slot name="trigger"> <slot name="trigger">
...@@ -56,10 +117,26 @@ function updatePosition() { ...@@ -56,10 +117,26 @@ function updatePosition() {
<!-- Teleport to body to escape modal overflow clipping --> <!-- Teleport to body to escape modal overflow clipping -->
<Teleport to="body"> <Teleport to="body">
<div <div
ref="tooltip"
v-show="show" v-show="show"
class="fixed z-[99999] w-64 -translate-x-1/2 -translate-y-full rounded-lg bg-gray-900 p-3 text-xs leading-relaxed text-white shadow-xl ring-1 ring-white/10 dark:bg-gray-800" role="tooltip"
:class="[
'fixed z-[99999] -translate-x-1/2 -translate-y-full rounded-lg bg-gray-900 p-3 text-xs leading-relaxed text-white shadow-xl ring-1 ring-white/10 dark:bg-gray-800',
props.widthClass,
]"
:style="{ top: `calc(${tooltipStyle.top} - 8px)`, left: tooltipStyle.left }" :style="{ top: `calc(${tooltipStyle.top} - 8px)`, left: tooltipStyle.left }"
> >
<button
v-if="props.trigger === 'click'"
type="button"
class="absolute right-1.5 top-1.5 rounded p-1 text-gray-300 transition-colors hover:bg-white/10 hover:text-white"
aria-label="Close"
@click.stop="closeTooltip"
>
<svg class="h-3.5 w-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
<slot>{{ content }}</slot> <slot>{{ content }}</slot>
<div class="absolute -bottom-1 left-1/2 h-2 w-2 -translate-x-1/2 rotate-45 bg-gray-900 dark:bg-gray-800"></div> <div class="absolute -bottom-1 left-1/2 h-2 w-2 -translate-x-1/2 rotate-45 bg-gray-900 dark:bg-gray-800"></div>
</div> </div>
......
<template>
<!-- 悬浮按钮 - 使用主题色 -->
<button
@click="showModal = true"
class="fixed bottom-6 right-6 z-50 flex items-center gap-2 rounded-full bg-gradient-to-r from-primary-500 to-primary-600 px-4 py-3 text-white shadow-lg shadow-primary-500/25 transition-all hover:from-primary-600 hover:to-primary-700 hover:shadow-xl hover:shadow-primary-500/30"
>
<svg class="h-5 w-5" viewBox="0 0 24 24" fill="currentColor">
<path d="M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 01.213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.328.328 0 00.186-.059l2.114-1.225a.87.87 0 01.415-.106.807.807 0 01.213.026 10.07 10.07 0 002.696.37c.262 0 .52-.011.776-.028a5.91 5.91 0 01-.193-1.479c0-3.644 3.374-6.6 7.536-6.6.262 0 .52.011.776.028-.628-3.513-4.27-6.472-8.885-6.472zM5.785 5.97a1.1 1.1 0 110 2.2 1.1 1.1 0 010-2.2zm5.813 0a1.1 1.1 0 110 2.2 1.1 1.1 0 010-2.2zm5.192 2.642c-3.703 0-6.71 2.567-6.71 5.73 0 3.163 3.007 5.73 6.71 5.73a7.9 7.9 0 002.126-.288.644.644 0 01.17-.022.69.69 0 01.329.085l1.672.97a.262.262 0 00.147.046c.128 0 .23-.104.23-.233a.403.403 0 00-.038-.168l-.309-1.17a.468.468 0 01.168-.527c1.449-1.065 2.374-2.643 2.374-4.423 0-3.163-3.007-5.73-6.71-5.73h-.159zm-2.434 3.34a.88.88 0 110 1.76.88.88 0 010-1.76zm4.868 0a.88.88 0 110 1.76.88.88 0 010-1.76z"/>
</svg>
<span class="text-sm font-medium">客服</span>
</button>
<!-- 弹窗 -->
<Teleport to="body">
<Transition name="fade">
<div
v-if="showModal"
class="fixed inset-0 z-[100] flex items-center justify-center bg-black/50 p-4 backdrop-blur-sm"
@click.self="showModal = false"
>
<Transition name="scale">
<div
v-if="showModal"
class="relative w-full max-w-sm rounded-2xl bg-white p-6 shadow-2xl dark:bg-dark-700"
>
<!-- 关闭按钮 -->
<button
@click="showModal = false"
class="absolute right-4 top-4 text-gray-400 transition-colors hover:text-gray-600 dark:text-dark-400 dark:hover:text-dark-200"
>
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
<!-- 标题 -->
<div class="mb-4 flex items-center gap-3">
<div class="flex h-10 w-10 items-center justify-center rounded-full bg-gradient-to-br from-primary-500 to-primary-600">
<svg class="h-6 w-6 text-white" viewBox="0 0 24 24" fill="currentColor">
<path d="M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 01.213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.328.328 0 00.186-.059l2.114-1.225a.87.87 0 01.415-.106.807.807 0 01.213.026 10.07 10.07 0 002.696.37c.262 0 .52-.011.776-.028a5.91 5.91 0 01-.193-1.479c0-3.644 3.374-6.6 7.536-6.6.262 0 .52.011.776.028-.628-3.513-4.27-6.472-8.885-6.472zM5.785 5.97a1.1 1.1 0 110 2.2 1.1 1.1 0 010-2.2zm5.813 0a1.1 1.1 0 110 2.2 1.1 1.1 0 010-2.2zm5.192 2.642c-3.703 0-6.71 2.567-6.71 5.73 0 3.163 3.007 5.73 6.71 5.73a7.9 7.9 0 002.126-.288.644.644 0 01.17-.022.69.69 0 01.329.085l1.672.97a.262.262 0 00.147.046c.128 0 .23-.104.23-.233a.403.403 0 00-.038-.168l-.309-1.17a.468.468 0 01.168-.527c1.449-1.065 2.374-2.643 2.374-4.423 0-3.163-3.007-5.73-6.71-5.73h-.159zm-2.434 3.34a.88.88 0 110 1.76.88.88 0 010-1.76zm4.868 0a.88.88 0 110 1.76.88.88 0 010-1.76z"/>
</svg>
</div>
<div>
<h3 class="text-lg font-semibold text-gray-900 dark:text-white">联系客服</h3>
<p class="text-sm text-gray-500 dark:text-dark-400">扫码添加好友</p>
</div>
</div>
<!-- 二维码卡片 -->
<div class="mb-4 overflow-hidden rounded-xl border border-primary-100 bg-gradient-to-br from-primary-50 to-white p-3 dark:border-primary-800/30 dark:from-primary-900/10 dark:to-dark-800">
<img
src="/wechat-qr.jpg"
alt="微信二维码"
class="w-full rounded-lg"
/>
</div>
<!-- 提示文字 -->
<div class="text-center">
<p class="mb-2 text-sm font-medium text-primary-600 dark:text-primary-400">
微信扫码添加客服
</p>
<p class="flex items-center justify-center gap-1 text-xs text-gray-500 dark:text-dark-400">
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
工作时间:周一至周五 9:00-18:00
</p>
</div>
</div>
</Transition>
</div>
</Transition>
</Teleport>
</template>
<script setup lang="ts">
import { ref } from 'vue'
const showModal = ref(false)
</script>
<style scoped>
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.2s ease;
}
.fade-enter-from,
.fade-leave-to {
opacity: 0;
}
.scale-enter-active,
.scale-leave-active {
transition: all 0.2s ease;
}
.scale-enter-from,
.scale-leave-to {
opacity: 0;
transform: scale(0.95);
}
</style>
import { afterEach, describe, expect, it } from 'vitest'
import { mount } from '@vue/test-utils'
import { nextTick } from 'vue'
import HelpTooltip from '@/components/common/HelpTooltip.vue'
function getTooltipElement(): HTMLDivElement {
const tooltip = document.body.querySelector('[role="tooltip"]')
if (!(tooltip instanceof HTMLDivElement)) {
throw new Error('tooltip element not found')
}
return tooltip
}
describe('HelpTooltip', () => {
afterEach(() => {
document.body.innerHTML = ''
})
it('keeps the existing hover interaction by default', async () => {
const wrapper = mount(HelpTooltip, {
attachTo: document.body,
props: {
content: 'hover details',
},
})
const trigger = wrapper.get('.group')
const tooltip = getTooltipElement()
expect(tooltip.style.display).toBe('none')
await trigger.trigger('mouseenter')
await nextTick()
expect(tooltip.style.display).not.toBe('none')
await trigger.trigger('mouseleave')
await nextTick()
expect(tooltip.style.display).toBe('none')
wrapper.unmount()
})
it('supports click-to-toggle details and closes on outside click', async () => {
const wrapper = mount(HelpTooltip, {
attachTo: document.body,
props: {
content: 'click details',
trigger: 'click',
},
})
const trigger = wrapper.get('.group')
const tooltip = getTooltipElement()
expect(tooltip.style.display).toBe('none')
await trigger.trigger('click')
await nextTick()
expect(tooltip.style.display).not.toBe('none')
expect(tooltip.textContent).toContain('click details')
const closeButton = tooltip.querySelector('button[aria-label="Close"]')
if (!(closeButton instanceof HTMLButtonElement)) {
throw new Error('close button not found')
}
closeButton.click()
await nextTick()
expect(tooltip.style.display).toBe('none')
await trigger.trigger('click')
await nextTick()
expect(tooltip.style.display).not.toBe('none')
document.body.dispatchEvent(new MouseEvent('click', { bubbles: true }))
await nextTick()
expect(tooltip.style.display).toBe('none')
wrapper.unmount()
})
})
...@@ -125,6 +125,7 @@ ...@@ -125,6 +125,7 @@
<Icon name="key" size="sm" /> <Icon name="key" size="sm" />
{{ t('nav.apiKeys') }} {{ t('nav.apiKeys') }}
</router-link> </router-link>
<a <a
v-if="authStore.isAdmin" v-if="authStore.isAdmin"
href="https://github.com/Wei-Shaw/sub2api" href="https://github.com/Wei-Shaw/sub2api"
...@@ -142,6 +143,7 @@ ...@@ -142,6 +143,7 @@
</svg> </svg>
{{ t('nav.github') }} {{ t('nav.github') }}
</a> </a>
</div> </div>
<!-- Contact Support (only show if configured) --> <!-- Contact Support (only show if configured) -->
......
...@@ -73,9 +73,42 @@ ...@@ -73,9 +73,42 @@
<!-- Config fields --> <!-- Config fields -->
<div class="border-t border-gray-200 pt-4 dark:border-dark-700"> <div class="border-t border-gray-200 pt-4 dark:border-dark-700">
<h4 class="mb-3 text-sm font-semibold text-gray-900 dark:text-white"> <div class="mb-3 flex items-center gap-2">
{{ t('admin.settings.payment.providerConfig') }} <h4 class="text-sm font-semibold text-gray-900 dark:text-white">
</h4> {{ t('admin.settings.payment.providerConfig') }}
</h4>
<HelpTooltip v-if="paymentGuide" trigger="click" width-class="w-80">
<template #trigger>
<button
type="button"
class="inline-flex h-5 w-5 items-center justify-center rounded-full border border-gray-300 text-[11px] font-semibold text-gray-400 transition-colors hover:border-primary-500 hover:text-primary-600 dark:border-dark-500 dark:text-gray-500 dark:hover:border-primary-400 dark:hover:text-primary-400"
:aria-label="t('admin.settings.payment.paymentGuideTrigger')"
:title="t('admin.settings.payment.paymentGuideTrigger')"
>
?
</button>
</template>
<div class="space-y-3">
<p class="font-medium text-white">{{ paymentGuide.summary }}</p>
<div
v-for="item in paymentGuide.items"
:key="item.title"
class="space-y-1.5 border-t border-white/10 pt-2 first:border-t-0 first:pt-0"
>
<p class="font-medium text-white">{{ item.title }}</p>
<p><span class="text-gray-300">{{ t('admin.settings.payment.guideOpenLabel') }}</span>{{ item.open }}</p>
<p><span class="text-gray-300">{{ t('admin.settings.payment.guideCallLabel') }}</span>{{ item.call }}</p>
<p><span class="text-gray-300">{{ t('admin.settings.payment.guideFallbackLabel') }}</span>{{ item.fallback }}</p>
</div>
<p v-if="paymentGuide.note" class="border-t border-white/10 pt-2 text-[11px] text-gray-300">
{{ paymentGuide.note }}
</p>
</div>
</HelpTooltip>
</div>
<p v-if="paymentGuide" class="mb-3 text-xs text-gray-500 dark:text-gray-400">
{{ paymentGuide.summary }}
</p>
<div class="space-y-3"> <div class="space-y-3">
<div v-for="field in resolvedFields" :key="field.key"> <div v-for="field in resolvedFields" :key="field.key">
<label class="input-label"> <label class="input-label">
...@@ -220,6 +253,7 @@ ...@@ -220,6 +253,7 @@
import { reactive, computed, ref } from 'vue' import { reactive, computed, ref } from 'vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import BaseDialog from '@/components/common/BaseDialog.vue' import BaseDialog from '@/components/common/BaseDialog.vue'
import HelpTooltip from '@/components/common/HelpTooltip.vue'
import Select from '@/components/common/Select.vue' import Select from '@/components/common/Select.vue'
import type { SelectOption } from '@/components/common/Select.vue' import type { SelectOption } from '@/components/common/Select.vue'
import ToggleSwitch from './ToggleSwitch.vue' import ToggleSwitch from './ToggleSwitch.vue'
...@@ -263,6 +297,19 @@ const emit = defineEmits<{ ...@@ -263,6 +297,19 @@ const emit = defineEmits<{
const { t } = useI18n() const { t } = useI18n()
interface PaymentGuideItem {
title: string
open: string
call: string
fallback: string
}
interface PaymentGuide {
summary: string
items: PaymentGuideItem[]
note?: string
}
// --- Form state --- // --- Form state ---
const form = reactive({ const form = reactive({
name: '', name: '',
...@@ -314,6 +361,63 @@ const resolvedFields = computed(() => { ...@@ -314,6 +361,63 @@ const resolvedFields = computed(() => {
})) }))
}) })
const paymentGuide = computed<PaymentGuide | null>(() => {
if (form.provider_key === 'alipay') {
return {
summary: t('admin.settings.payment.alipayGuideSummary'),
items: [
{
title: t('admin.settings.payment.alipayGuideFaceToFaceTitle'),
open: t('admin.settings.payment.alipayGuideFaceToFaceOpen'),
call: t('admin.settings.payment.alipayGuideFaceToFaceCall'),
fallback: t('admin.settings.payment.alipayGuideFaceToFaceFallback'),
},
{
title: t('admin.settings.payment.alipayGuidePagePayTitle'),
open: t('admin.settings.payment.alipayGuidePagePayOpen'),
call: t('admin.settings.payment.alipayGuidePagePayCall'),
fallback: t('admin.settings.payment.alipayGuidePagePayFallback'),
},
{
title: t('admin.settings.payment.alipayGuideWapTitle'),
open: t('admin.settings.payment.alipayGuideWapOpen'),
call: t('admin.settings.payment.alipayGuideWapCall'),
fallback: t('admin.settings.payment.alipayGuideWapFallback'),
},
],
}
}
if (form.provider_key === 'wxpay') {
return {
summary: t('admin.settings.payment.wxpayGuideSummary'),
note: t('admin.settings.payment.wxpayGuideNote'),
items: [
{
title: t('admin.settings.payment.wxpayGuideNativeTitle'),
open: t('admin.settings.payment.wxpayGuideNativeOpen'),
call: t('admin.settings.payment.wxpayGuideNativeCall'),
fallback: t('admin.settings.payment.wxpayGuideNativeFallback'),
},
{
title: t('admin.settings.payment.wxpayGuideJsapiTitle'),
open: t('admin.settings.payment.wxpayGuideJsapiOpen'),
call: t('admin.settings.payment.wxpayGuideJsapiCall'),
fallback: t('admin.settings.payment.wxpayGuideJsapiFallback'),
},
{
title: t('admin.settings.payment.wxpayGuideH5Title'),
open: t('admin.settings.payment.wxpayGuideH5Open'),
call: t('admin.settings.payment.wxpayGuideH5Call'),
fallback: t('admin.settings.payment.wxpayGuideH5Fallback'),
},
],
}
}
return null
})
const limitableTypes = computed(() => { const limitableTypes = computed(() => {
// Stripe: single "stripe" entry (one set of shared limits) // Stripe: single "stripe" entry (one set of shared limits)
if (form.provider_key === 'stripe') { if (form.provider_key === 'stripe') {
......
...@@ -84,6 +84,9 @@ ...@@ -84,6 +84,9 @@
</div> </div>
</div> </div>
<p v-if="scanHint" class="text-center text-sm text-gray-500 dark:text-gray-400">{{ scanHint }}</p> <p v-if="scanHint" class="text-center text-sm text-gray-500 dark:text-gray-400">{{ scanHint }}</p>
<button v-if="payUrl" class="btn btn-secondary text-sm" @click="reopenPopup">
{{ t('payment.qr.openPayWindow') }}
</button>
</div> </div>
</div> </div>
<div class="card p-4 text-center"> <div class="card p-4 text-center">
......
import { describe, expect, it, vi } from 'vitest'
import { mount } from '@vue/test-utils'
import { nextTick } from 'vue'
import PaymentProviderDialog from '@/components/payment/PaymentProviderDialog.vue'
const messages: Record<string, string> = {
'admin.settings.payment.providerConfig': 'Credentials',
'admin.settings.payment.paymentGuideTrigger': 'View payment guide',
'admin.settings.payment.alipayGuideSummary': 'Desktop prefers QR precreate and falls back to cashier; mobile prefers WAP checkout.',
'admin.settings.payment.wxpayGuideSummary': 'Desktop prefers Native QR; mobile routes to JSAPI or H5 based on browser context.',
}
vi.mock('vue-i18n', () => ({
useI18n: () => ({
t: (key: string) => messages[key] ?? key,
}),
}))
function mountDialog() {
return mount(PaymentProviderDialog, {
props: {
show: true,
saving: false,
editing: null,
allKeyOptions: [
{ value: 'alipay', label: 'Alipay' },
{ value: 'wxpay', label: 'WeChat Pay' },
{ value: 'stripe', label: 'Stripe' },
],
enabledKeyOptions: [
{ value: 'alipay', label: 'Alipay' },
{ value: 'wxpay', label: 'WeChat Pay' },
],
allPaymentTypes: [
{ value: 'alipay', label: 'Alipay' },
{ value: 'wxpay', label: 'WeChat Pay' },
],
redirectLabel: 'Redirect',
},
global: {
stubs: {
BaseDialog: {
template: '<div><slot /><slot name="footer" /></div>',
},
Select: {
props: ['modelValue', 'options', 'disabled'],
template: '<div />',
},
ToggleSwitch: {
template: '<div />',
},
},
},
})
}
describe('PaymentProviderDialog payment guide', () => {
it('shows no payment guide for providers without a flow guide', () => {
const wrapper = mountDialog()
expect(wrapper.text()).not.toContain(messages['admin.settings.payment.alipayGuideSummary'])
expect(wrapper.text()).not.toContain(messages['admin.settings.payment.wxpayGuideSummary'])
expect(wrapper.find('button[title="View payment guide"]').exists()).toBe(false)
})
it.each([
['alipay', 'admin.settings.payment.alipayGuideSummary'],
['wxpay', 'admin.settings.payment.wxpayGuideSummary'],
])('shows the payment guide summary for %s', async (providerKey, summaryKey) => {
const wrapper = mountDialog()
;(wrapper.vm as unknown as { reset: (key: string) => void }).reset(providerKey)
await nextTick()
expect(wrapper.text()).toContain(messages[summaryKey])
expect(wrapper.find('button[title="View payment guide"]').exists()).toBe(true)
})
})
...@@ -96,4 +96,36 @@ describe('PaymentStatusPanel', () => { ...@@ -96,4 +96,36 @@ describe('PaymentStatusPanel', () => {
expect(wrapper.text()).toContain('payment.result.success') expect(wrapper.text()).toContain('payment.result.success')
expect(wrapper.emitted('success')).toHaveLength(1) expect(wrapper.emitted('success')).toHaveLength(1)
}) })
it('shows reopen button in QR mode when payUrl is also available', async () => {
const openSpy = vi.spyOn(window, 'open').mockReturnValue({ closed: false } as Window)
const wrapper = mount(PaymentStatusPanel, {
props: {
orderId: 42,
qrCode: 'https://pay.example.com/qr/42',
payUrl: 'https://pay.example.com/session/42',
expiresAt: '2099-01-01T12:30:00Z',
paymentType: 'alipay',
orderType: 'balance',
},
global: {
stubs: {
Icon: true,
},
},
})
await flushPromises()
expect(wrapper.text()).toContain('payment.qr.openPayWindow')
await wrapper.get('button.btn.btn-secondary.text-sm').trigger('click')
expect(openSpy).toHaveBeenCalledWith(
'https://pay.example.com/session/42',
'paymentPopup',
expect.any(String),
)
openSpy.mockRestore()
})
}) })
...@@ -190,12 +190,14 @@ describe('buildCreateOrderPayload', () => { ...@@ -190,12 +190,14 @@ describe('buildCreateOrderPayload', () => {
paymentType: 'alipay_direct', paymentType: 'alipay_direct',
orderType: 'balance', orderType: 'balance',
origin: 'https://app.example.com/', origin: 'https://app.example.com/',
isMobile: true,
isWechatBrowser: false, isWechatBrowser: false,
})).toEqual({ })).toEqual({
amount: 88, amount: 88,
payment_type: 'alipay', payment_type: 'alipay',
order_type: 'balance', order_type: 'balance',
return_url: 'https://app.example.com/payment/result', return_url: 'https://app.example.com/payment/result',
is_mobile: true,
payment_source: 'hosted_redirect', payment_source: 'hosted_redirect',
}) })
}) })
...@@ -207,6 +209,7 @@ describe('buildCreateOrderPayload', () => { ...@@ -207,6 +209,7 @@ describe('buildCreateOrderPayload', () => {
orderType: 'subscription', orderType: 'subscription',
planId: 7, planId: 7,
origin: 'https://app.example.com', origin: 'https://app.example.com',
isMobile: false,
isWechatBrowser: true, isWechatBrowser: true,
})).toEqual({ })).toEqual({
amount: 128, amount: 128,
...@@ -214,6 +217,7 @@ describe('buildCreateOrderPayload', () => { ...@@ -214,6 +217,7 @@ describe('buildCreateOrderPayload', () => {
order_type: 'subscription', order_type: 'subscription',
plan_id: 7, plan_id: 7,
return_url: 'https://app.example.com/payment/result', return_url: 'https://app.example.com/payment/result',
is_mobile: false,
payment_source: 'wechat_in_app_resume', payment_source: 'wechat_in_app_resume',
}) })
}) })
......
...@@ -12,9 +12,9 @@ describe('PROVIDER_CONFIG_FIELDS.wxpay', () => { ...@@ -12,9 +12,9 @@ describe('PROVIDER_CONFIG_FIELDS.wxpay', () => {
expect(findField('certSerial')?.optional).toBeFalsy() expect(findField('certSerial')?.optional).toBeFalsy()
}) })
it('exposes optional mp and H5 metadata fields for WeChat-specific flows', () => { it('only keeps the simplified visible credential set in the admin form', () => {
expect(findField('mpAppId')?.optional).toBe(true) expect(findField('mpAppId')).toBeUndefined()
expect(findField('h5AppName')?.optional).toBe(true) expect(findField('h5AppName')).toBeUndefined()
expect(findField('h5AppUrl')?.optional).toBe(true) expect(findField('h5AppUrl')).toBeUndefined()
}) })
}) })
...@@ -68,6 +68,7 @@ export interface BuildCreateOrderPayloadInput { ...@@ -68,6 +68,7 @@ export interface BuildCreateOrderPayloadInput {
orderType: OrderType orderType: OrderType
planId?: number planId?: number
origin?: string origin?: string
isMobile: boolean
isWechatBrowser: boolean isWechatBrowser: boolean
} }
...@@ -106,6 +107,7 @@ export function buildCreateOrderPayload(input: BuildCreateOrderPayloadInput): Cr ...@@ -106,6 +107,7 @@ export function buildCreateOrderPayload(input: BuildCreateOrderPayloadInput): Cr
amount: input.amount, amount: input.amount,
payment_type: visibleMethod, payment_type: visibleMethod,
order_type: input.orderType, order_type: input.orderType,
is_mobile: input.isMobile,
payment_source: visibleMethod === 'wxpay' && input.isWechatBrowser payment_source: visibleMethod === 'wxpay' && input.isWechatBrowser
? 'wechat_in_app_resume' ? 'wechat_in_app_resume'
: 'hosted_redirect', : 'hosted_redirect',
......
...@@ -96,15 +96,12 @@ export const PROVIDER_CONFIG_FIELDS: Record<string, ConfigFieldDef[]> = { ...@@ -96,15 +96,12 @@ export const PROVIDER_CONFIG_FIELDS: Record<string, ConfigFieldDef[]> = {
], ],
wxpay: [ wxpay: [
{ key: 'appId', label: 'App ID', sensitive: false }, { key: 'appId', label: 'App ID', sensitive: false },
{ key: 'mpAppId', label: '', sensitive: false, optional: true },
{ key: 'mchId', label: '', sensitive: false }, { key: 'mchId', label: '', sensitive: false },
{ key: 'privateKey', label: '', sensitive: true }, { key: 'privateKey', label: '', sensitive: true },
{ key: 'apiV3Key', label: '', sensitive: true }, { key: 'apiV3Key', label: '', sensitive: true },
{ key: 'certSerial', label: '', sensitive: false }, { key: 'certSerial', label: '', sensitive: false },
{ key: 'publicKey', label: '', sensitive: true }, { key: 'publicKey', label: '', sensitive: true },
{ key: 'publicKeyId', label: '', sensitive: false }, { key: 'publicKeyId', label: '', sensitive: false },
{ key: 'h5AppName', label: '', sensitive: false, optional: true },
{ key: 'h5AppUrl', label: '', sensitive: false, optional: true },
], ],
stripe: [ stripe: [
{ key: 'secretKey', label: '', sensitive: true }, { key: 'secretKey', label: '', sensitive: true },
......
...@@ -1665,6 +1665,8 @@ export default { ...@@ -1665,6 +1665,8 @@ export default {
failedToLoadApiKeys: 'Failed to load user API keys', failedToLoadApiKeys: 'Failed to load user API keys',
emailRequired: 'Please enter email', emailRequired: 'Please enter email',
concurrencyMin: 'Concurrency must be at least 1', concurrencyMin: 'Concurrency must be at least 1',
soraStorageQuota: 'Sora Storage Quota',
soraStorageQuotaHint: 'In GB, 0 means use group or system default quota',
amountRequired: 'Please enter a valid amount', amountRequired: 'Please enter a valid amount',
insufficientBalance: 'Insufficient balance', insufficientBalance: 'Insufficient balance',
deleteConfirm: "Are you sure you want to delete '{email}'? This action cannot be undone.", deleteConfirm: "Are you sure you want to delete '{email}'? This action cannot be undone.",
...@@ -1997,6 +1999,14 @@ export default { ...@@ -1997,6 +1999,14 @@ export default {
enabled: 'Enabled', enabled: 'Enabled',
disabled: 'Disabled' disabled: 'Disabled'
}, },
claudeMaxSimulation: {
title: 'Claude Max Usage Simulation',
tooltip:
'When enabled, for Claude models without upstream cache-write usage, the system deterministically maps tokens to a small input plus 1h cache creation while keeping total tokens unchanged.',
enabled: 'Enabled (simulate 1h cache)',
disabled: 'Disabled',
hint: 'Only token categories in usage billing logs are adjusted. No per-request mapping state is persisted.'
},
supportedScopes: { supportedScopes: {
title: 'Supported Model Families', title: 'Supported Model Families',
tooltip: 'Select the model families this group supports. Unchecked families will not be routed to this group.', tooltip: 'Select the model families this group supports. Unchecked families will not be routed to this group.',
...@@ -2630,7 +2640,7 @@ export default { ...@@ -2630,7 +2640,7 @@ export default {
resetQuota: 'Reset Quota', resetQuota: 'Reset Quota',
quotaLimit: 'Quota Limit', quotaLimit: 'Quota Limit',
quotaLimitPlaceholder: '0 means unlimited', quotaLimitPlaceholder: '0 means unlimited',
quotaLimitHint: 'Set daily/weekly/total spending limits (USD). Changing limits won\'t reset usage.', quotaLimitHint: 'Set daily/weekly/total spending limits (USD). Anthropic API key accounts can also configure client affinity. Changing limits won\'t reset usage.',
quotaLimitToggle: 'Enable Quota Limit', quotaLimitToggle: 'Enable Quota Limit',
quotaLimitToggleHint: 'When enabled, account will be paused when usage reaches the set limit', quotaLimitToggleHint: 'When enabled, account will be paused when usage reaches the set limit',
quotaDailyLimit: 'Daily Limit', quotaDailyLimit: 'Daily Limit',
...@@ -2834,7 +2844,7 @@ export default { ...@@ -2834,7 +2844,7 @@ export default {
// Quota control (Anthropic OAuth/SetupToken only) // Quota control (Anthropic OAuth/SetupToken only)
quotaControl: { quotaControl: {
title: 'Quota Control', title: 'Quota Control',
hint: 'Configure cost windows, session limits and other scheduling controls.', hint: 'Configure cost window, session limits, client affinity and other scheduling controls.',
windowCost: { windowCost: {
label: '5h Window Cost Limit', label: '5h Window Cost Limit',
hint: 'Limit account cost usage within the 5-hour window', hint: 'Limit account cost usage within the 5-hour window',
...@@ -2880,7 +2890,7 @@ export default { ...@@ -2880,7 +2890,7 @@ export default {
label: 'TLS Fingerprint Simulation', label: 'TLS Fingerprint Simulation',
hint: 'Simulate Node.js/Claude Code client TLS fingerprint', hint: 'Simulate Node.js/Claude Code client TLS fingerprint',
defaultProfile: 'Built-in Default', defaultProfile: 'Built-in Default',
randomProfile: 'Random', randomProfile: 'Random'
}, },
sessionIdMasking: { sessionIdMasking: {
label: 'Session ID Masking', label: 'Session ID Masking',
...@@ -2897,7 +2907,25 @@ export default { ...@@ -2897,7 +2907,25 @@ export default {
hint: 'Forward requests to a custom relay service. Proxy URL will be passed as a query parameter.', hint: 'Forward requests to a custom relay service. Proxy URL will be passed as a query parameter.',
urlHint: 'Relay service URL (e.g., https://relay.example.com)', urlHint: 'Relay service URL (e.g., https://relay.example.com)',
}, },
clientAffinity: {
label: 'Client Affinity Scheduling',
hint: 'When enabled, new sessions prefer accounts previously used by this client to reduce account switching'
}
}, },
affinityNoClients: 'No affinity clients',
affinityClients: '{count} affinity clients:',
affinitySection: 'Client Affinity',
affinitySectionHint: 'Control how clients are distributed across accounts. Configure zone thresholds to balance load.',
affinityToggle: 'Enable Client Affinity',
affinityToggleHint: 'New sessions prefer accounts previously used by this client',
affinityBase: 'Base Limit (Green Zone)',
affinityBasePlaceholder: 'Empty = no limit',
affinityBaseHint: 'Max clients in green zone (full priority scheduling)',
affinityBaseOffHint: 'No green zone limit. All clients receive full priority scheduling.',
affinityBuffer: 'Buffer (Yellow Zone)',
affinityBufferPlaceholder: 'e.g. 3',
affinityBufferHint: 'Additional clients allowed in the yellow zone (degraded priority)',
affinityBufferInfinite: 'Unlimited',
expired: 'Expired', expired: 'Expired',
proxy: 'Proxy', proxy: 'Proxy',
noProxy: 'No Proxy', noProxy: 'No Proxy',
...@@ -4919,6 +4947,12 @@ export default { ...@@ -4919,6 +4947,12 @@ export default {
integrationDoc: 'Payment Integration Docs', integrationDoc: 'Payment Integration Docs',
integrationDocHint: 'Covers endpoint specs, idempotency semantics, and code samples' integrationDocHint: 'Covers endpoint specs, idempotency semantics, and code samples'
}, },
soraClient: {
title: 'Sora Client',
description: 'Control whether to show the Sora client entry in the sidebar',
enabled: 'Enable Sora Client',
enabledHint: 'When enabled, the Sora entry will be shown in the sidebar for users to access Sora features'
},
customMenu: { customMenu: {
title: 'Custom Menu Pages', title: 'Custom Menu Pages',
description: 'Add custom iframe pages to the sidebar navigation. Each page can be visible to regular users or administrators.', description: 'Add custom iframe pages to the sidebar navigation. Each page can be visible to regular users or administrators.',
...@@ -5010,6 +5044,8 @@ export default { ...@@ -5010,6 +5044,8 @@ export default {
field_certSerial: 'Certificate Serial', field_certSerial: 'Certificate Serial',
field_h5AppName: 'H5 App Name', field_h5AppName: 'H5 App Name',
field_h5AppUrl: 'H5 App URL', field_h5AppUrl: 'H5 App URL',
wxpayConfigHint: 'WeChat Pay usually only needs App ID. Fill MP App ID, H5 App Name, and H5 App URL only when your Official Account or H5 flow specifically requires them.',
wxpayAdvancedOptions: 'WeChat Pay Advanced Options',
field_secretKey: 'Secret Key', field_secretKey: 'Secret Key',
field_publishableKey: 'Publishable Key', field_publishableKey: 'Publishable Key',
field_webhookSecret: 'Webhook Secret', field_webhookSecret: 'Webhook Secret',
...@@ -5040,6 +5076,37 @@ export default { ...@@ -5040,6 +5076,37 @@ export default {
providerKey: 'Provider Type', providerKey: 'Provider Type',
selectProviderKey: 'Select Provider Type', selectProviderKey: 'Select Provider Type',
providerConfig: 'Credentials', providerConfig: 'Credentials',
paymentGuideTrigger: 'View payment guide',
guideOpenLabel: 'Enable: ',
guideCallLabel: 'Call: ',
guideFallbackLabel: 'Fallback: ',
alipayGuideSummary: 'Desktop prefers QR precreate and falls back to cashier; mobile prefers WAP checkout.',
alipayGuideFaceToFaceTitle: 'Face-to-face / QR Payment',
alipayGuideFaceToFaceOpen: 'Enable face-to-face or QR payment capability.',
alipayGuideFaceToFaceCall: 'Desktop orders call alipay.trade.precreate first and render the QR code directly.',
alipayGuideFaceToFaceFallback: 'If unavailable or failed, the flow falls back to website checkout automatically.',
alipayGuidePagePayTitle: 'Website Payment',
alipayGuidePagePayOpen: 'Enable website payment.',
alipayGuidePagePayCall: 'When face-to-face is unavailable on desktop, the flow calls alipay.trade.page.pay and still renders the returned link as a QR code.',
alipayGuidePagePayFallback: 'The cashier link stays available so users can reopen the checkout page manually.',
alipayGuideWapTitle: 'WAP Payment',
alipayGuideWapOpen: 'Enable mobile website payment.',
alipayGuideWapCall: 'Mobile orders call alipay.trade.wap.pay first and jump to Alipay checkout.',
alipayGuideWapFallback: 'If mobile payment is unavailable or fails, the frontend switches to QR payment and shows a notice.',
wxpayGuideSummary: 'Desktop prefers Native QR; mobile routes to JSAPI or H5 based on browser context.',
wxpayGuideNote: 'The current form defaults to one shared App ID, which fits the common single-subject web, mobile, and Official Account setup.',
wxpayGuideNativeTitle: 'Native / QR Payment',
wxpayGuideNativeOpen: 'Enable Native or QR payment capability.',
wxpayGuideNativeCall: 'Desktop orders use Native by default and the frontend renders the QR payload.',
wxpayGuideNativeFallback: 'Mobile flows also fall back here when JSAPI or H5 cannot be used.',
wxpayGuideJsapiTitle: 'JSAPI / Official Account',
wxpayGuideJsapiOpen: 'Enable Official Account payment and ensure the browser is inside WeChat with an available OpenID.',
wxpayGuideJsapiCall: 'Inside WeChat, the app calls JSAPI after authorization and launches WeChat Pay directly.',
wxpayGuideJsapiFallback: 'If configuration is missing, the bridge is unavailable, or launch fails, the flow falls back to QR payment.',
wxpayGuideH5Title: 'H5 Payment',
wxpayGuideH5Open: 'Enable H5 payment.',
wxpayGuideH5Call: 'On mobile browsers outside WeChat, the app calls H5 payment when a client IP is available.',
wxpayGuideH5Fallback: 'If H5 is unavailable or order creation fails, the flow falls back to QR payment.',
noProviders: 'No provider instances configured', noProviders: 'No provider instances configured',
supportedTypes: 'Supported Payment Types', supportedTypes: 'Supported Payment Types',
supportedTypesHint: 'Comma-separated, e.g. alipay,wxpay', supportedTypesHint: 'Comma-separated, e.g. alipay,wxpay',
...@@ -5138,6 +5205,98 @@ export default { ...@@ -5138,6 +5205,98 @@ export default {
securityWarning: 'Warning: This key provides full admin access. Keep it secure.', securityWarning: 'Warning: This key provides full admin access. Keep it secure.',
usage: 'Usage: Add to request header - x-api-key: <your-admin-api-key>' usage: 'Usage: Add to request header - x-api-key: <your-admin-api-key>'
}, },
soraS3: {
title: 'Sora Storage',
description: 'Manage Sora media storage profiles with S3 and Google Drive support',
newProfile: 'New Profile',
reloadProfiles: 'Reload Profiles',
empty: 'No storage profiles yet, create one first',
createTitle: 'Create Storage Profile',
editTitle: 'Edit Storage Profile',
selectProvider: 'Select Storage Type',
providerS3Desc: 'S3-compatible object storage',
providerGDriveDesc: 'Google Drive cloud storage',
profileID: 'Profile ID',
profileName: 'Profile Name',
setActive: 'Set as active after creation',
saveProfile: 'Save Profile',
activateProfile: 'Activate',
profileCreated: 'Storage profile created',
profileSaved: 'Storage profile saved',
profileDeleted: 'Storage profile deleted',
profileActivated: 'Active storage profile switched',
profileIDRequired: 'Profile ID is required',
profileNameRequired: 'Profile name is required',
profileSelectRequired: 'Please select a profile first',
endpointRequired: 'S3 endpoint is required when enabled',
bucketRequired: 'Bucket is required when enabled',
accessKeyRequired: 'Access Key ID is required when enabled',
deleteConfirm: 'Delete storage profile {profileID}?',
columns: {
profile: 'Profile',
profileId: 'Profile ID',
name: 'Name',
provider: 'Type',
active: 'Active',
endpoint: 'Endpoint',
bucket: 'Bucket',
storagePath: 'Storage Path',
capacityUsage: 'Capacity / Used',
capacityUnlimited: 'Unlimited',
videoCount: 'Videos',
videoCompleted: 'completed',
videoInProgress: 'in progress',
quota: 'Default Quota',
updatedAt: 'Updated At',
actions: 'Actions',
rootFolder: 'Root folder',
testInTable: 'Test',
testingInTable: 'Testing...',
testTimeout: 'Test timed out (15s)'
},
enabled: 'Enable Storage',
enabledHint: 'When enabled, Sora generated media files will be automatically uploaded',
endpoint: 'S3 Endpoint',
region: 'Region',
bucket: 'Bucket',
prefix: 'Object Prefix',
accessKeyId: 'Access Key ID',
secretAccessKey: 'Secret Access Key',
secretConfigured: '(Configured, leave blank to keep)',
cdnUrl: 'CDN URL',
cdnUrlHint: 'Optional. When configured, files are accessed via CDN URL',
forcePathStyle: 'Force Path Style',
defaultQuota: 'Default Storage Quota',
defaultQuotaHint: 'Default quota when not specified at user or group level. 0 means unlimited',
testConnection: 'Test Connection',
testing: 'Testing...',
testSuccess: 'Connection test successful',
testFailed: 'Connection test failed',
saved: 'Storage settings saved successfully',
saveFailed: 'Failed to save storage settings',
gdrive: {
authType: 'Authentication Method',
serviceAccount: 'Service Account',
clientId: 'Client ID',
clientSecret: 'Client Secret',
clientSecretConfigured: '(Configured, leave blank to keep)',
refreshToken: 'Refresh Token',
refreshTokenConfigured: '(Configured, leave blank to keep)',
serviceAccountJson: 'Service Account JSON',
serviceAccountConfigured: '(Configured, leave blank to keep)',
folderId: 'Folder ID (optional)',
authorize: 'Authorize Google Drive',
authorizeHint: 'Get Refresh Token via OAuth2',
oauthFieldsRequired: 'Please fill in Client ID and Client Secret first',
oauthSuccess: 'Google Drive authorization successful',
oauthFailed: 'Google Drive authorization failed',
closeWindow: 'This window will close automatically',
processing: 'Processing authorization...',
testStorage: 'Test Storage',
testSuccess: 'Google Drive storage test passed (upload, access, delete all OK)',
testFailed: 'Google Drive storage test failed'
}
},
overloadCooldown: { overloadCooldown: {
title: '529 Overload Cooldown', title: '529 Overload Cooldown',
description: 'Configure account scheduling pause strategy when upstream returns 529 (overloaded)', description: 'Configure account scheduling pause strategy when upstream returns 529 (overloaded)',
...@@ -5804,6 +5963,7 @@ export default { ...@@ -5804,6 +5963,7 @@ export default {
wechatOpenInWeChatHint: 'Open the current page inside WeChat, or switch to desktop WeChat QR payment.', wechatOpenInWeChatHint: 'Open the current page inside WeChat, or switch to desktop WeChat QR payment.',
wechatScanOnDesktopHint: 'On desktop, use WeChat Scan to pay; on mobile, reopen the current page inside WeChat.', wechatScanOnDesktopHint: 'On desktop, use WeChat Scan to pay; on mobile, reopen the current page inside WeChat.',
wechatSwitchBrowserHint: 'Switch to desktop WeChat QR payment, or reopen this page in an external browser and retry.', wechatSwitchBrowserHint: 'Switch to desktop WeChat QR payment, or reopen this page in an external browser and retry.',
mobilePaymentFallbackToQr: 'This merchant has not enabled mobile payment. The flow has been switched to QR payment automatically.',
alipayDesktopUnavailable: 'The desktop Alipay flow could not generate a QR code.', alipayDesktopUnavailable: 'The desktop Alipay flow could not generate a QR code.',
alipayDesktopQrHint: 'Desktop Alipay should render a QR code. Refresh and retry, or make sure the payment page was not blocked.', alipayDesktopQrHint: 'Desktop Alipay should render a QR code. Refresh and retry, or make sure the payment page was not blocked.',
alipayMobileUnavailable: 'This page could not hand off to Alipay.', alipayMobileUnavailable: 'This page could not hand off to Alipay.',
......
...@@ -1729,6 +1729,8 @@ export default { ...@@ -1729,6 +1729,8 @@ export default {
failedToAdjust: '调整失败', failedToAdjust: '调整失败',
emailRequired: '请输入邮箱', emailRequired: '请输入邮箱',
concurrencyMin: '并发数不能小于1', concurrencyMin: '并发数不能小于1',
soraStorageQuota: 'Sora 存储配额',
soraStorageQuotaHint: '单位 GB,0 表示使用分组或系统默认配额',
amountRequired: '请输入有效金额', amountRequired: '请输入有效金额',
insufficientBalance: '余额不足', insufficientBalance: '余额不足',
setAllowedGroups: '设置允许分组', setAllowedGroups: '设置允许分组',
...@@ -2985,7 +2987,7 @@ export default { ...@@ -2985,7 +2987,7 @@ export default {
// Quota control (Anthropic OAuth/SetupToken only) // Quota control (Anthropic OAuth/SetupToken only)
quotaControl: { quotaControl: {
title: '配额控制', title: '配额控制',
hint: '配置费用窗口、会话限制等调度控制。', hint: '配置费用窗口、会话限制、客户端亲和等调度控制。',
windowCost: { windowCost: {
label: '5h窗口费用控制', label: '5h窗口费用控制',
hint: '限制账号在5小时窗口内的费用使用', hint: '限制账号在5小时窗口内的费用使用',
...@@ -3031,7 +3033,7 @@ export default { ...@@ -3031,7 +3033,7 @@ export default {
label: 'TLS 指纹模拟', label: 'TLS 指纹模拟',
hint: '模拟 Node.js/Claude Code 客户端的 TLS 指纹', hint: '模拟 Node.js/Claude Code 客户端的 TLS 指纹',
defaultProfile: '内置默认', defaultProfile: '内置默认',
randomProfile: '随机', randomProfile: '随机'
}, },
sessionIdMasking: { sessionIdMasking: {
label: '会话 ID 伪装', label: '会话 ID 伪装',
...@@ -3048,7 +3050,25 @@ export default { ...@@ -3048,7 +3050,25 @@ export default {
hint: '启用后将请求转发到自定义中继服务,代理地址将作为 URL 参数传递给中继服务', hint: '启用后将请求转发到自定义中继服务,代理地址将作为 URL 参数传递给中继服务',
urlHint: '中继服务地址(如 https://relay.example.com)', urlHint: '中继服务地址(如 https://relay.example.com)',
}, },
clientAffinity: {
label: '客户端亲和调度',
hint: '启用后,新会话会优先调度到该客户端之前使用过的账号,避免频繁切换账号'
}
}, },
affinityNoClients: '无亲和客户端',
affinityClients: '{count} 个亲和客户端:',
affinitySection: '客户端亲和',
affinitySectionHint: '控制客户端在账号间的分布。通过配置区域阈值来平衡负载。',
affinityToggle: '启用客户端亲和',
affinityToggleHint: '新会话优先调度到该客户端之前使用过的账号',
affinityBase: '基础限额(绿区)',
affinityBasePlaceholder: '留空表示不限制',
affinityBaseHint: '绿区最大客户端数量(完整优先级调度)',
affinityBaseOffHint: '未开启绿区限制,所有客户端均享受完整优先级调度',
affinityBuffer: '缓冲区(黄区)',
affinityBufferPlaceholder: '例如 3',
affinityBufferHint: '黄区允许的额外客户端数量(降级优先级调度)',
affinityBufferInfinite: '不限制',
expired: '已过期', expired: '已过期',
proxy: '代理', proxy: '代理',
noProxy: '无代理', noProxy: '无代理',
...@@ -5091,6 +5111,12 @@ export default { ...@@ -5091,6 +5111,12 @@ export default {
integrationDoc: '支付集成文档', integrationDoc: '支付集成文档',
integrationDocHint: '包含接口说明、幂等语义及示例代码' integrationDocHint: '包含接口说明、幂等语义及示例代码'
}, },
soraClient: {
title: 'Sora 客户端',
description: '控制是否在侧边栏展示 Sora 客户端入口',
enabled: '启用 Sora 客户端',
enabledHint: '开启后,侧边栏将显示 Sora 入口,用户可访问 Sora 功能'
},
customMenu: { customMenu: {
title: '自定义菜单页面', title: '自定义菜单页面',
description: '添加自定义 iframe 页面到侧边栏导航。每个页面可以设置为普通用户或管理员可见。', description: '添加自定义 iframe 页面到侧边栏导航。每个页面可以设置为普通用户或管理员可见。',
...@@ -5182,6 +5208,8 @@ export default { ...@@ -5182,6 +5208,8 @@ export default {
field_certSerial: '证书序列号', field_certSerial: '证书序列号',
field_h5AppName: 'H5 应用名称', field_h5AppName: 'H5 应用名称',
field_h5AppUrl: 'H5 应用地址', field_h5AppUrl: 'H5 应用地址',
wxpayConfigHint: '微信支付通常只需要填写 App ID。公众号 App ID、H5 应用名称、H5 应用地址仅在公众号支付或 H5 场景有特殊要求时再填写。',
wxpayAdvancedOptions: '微信支付高级可选项',
field_secretKey: '密钥', field_secretKey: '密钥',
field_publishableKey: '公开密钥', field_publishableKey: '公开密钥',
field_webhookSecret: 'Webhook 密钥', field_webhookSecret: 'Webhook 密钥',
...@@ -5212,6 +5240,37 @@ export default { ...@@ -5212,6 +5240,37 @@ export default {
providerKey: '服务商类型', providerKey: '服务商类型',
selectProviderKey: '选择服务商类型', selectProviderKey: '选择服务商类型',
providerConfig: '凭证配置', providerConfig: '凭证配置',
paymentGuideTrigger: '查看支付方式说明',
guideOpenLabel: '开通:',
guideCallLabel: '调用:',
guideFallbackLabel: '降级:',
alipayGuideSummary: '桌面优先扫码单,失败再走收银台;移动优先手机网站支付。',
alipayGuideFaceToFaceTitle: '当面付 / 扫码支付',
alipayGuideFaceToFaceOpen: '需开通当面付或扫码支付能力。',
alipayGuideFaceToFaceCall: '桌面端下单时优先调用 alipay.trade.precreate,前台直接渲染二维码。',
alipayGuideFaceToFaceFallback: '接口不可用或返回失败时,自动降级到电脑网站支付。',
alipayGuidePagePayTitle: '电脑网站支付',
alipayGuidePagePayOpen: '需开通电脑网站支付。',
alipayGuidePagePayCall: '桌面端当面付不可用时调用 alipay.trade.page.pay,并继续把返回链接渲染成二维码。',
alipayGuidePagePayFallback: '同时保留打开收银台入口,用户可手动重新拉起支付页。',
alipayGuideWapTitle: '手机网站支付',
alipayGuideWapOpen: '需开通手机网站支付。',
alipayGuideWapCall: '移动端优先调用 alipay.trade.wap.pay,跳转支付宝收银台。',
alipayGuideWapFallback: '未开通或返回异常时,前端自动改走扫码支付并提示未开通移动支付。',
wxpayGuideSummary: '桌面优先 Native 扫码,移动端按浏览器环境走 JSAPI 或 H5。',
wxpayGuideNote: '当前表单默认共用一个 App ID,适合同主体下统一配置网页、移动和公众号场景。',
wxpayGuideNativeTitle: 'Native / 扫码支付',
wxpayGuideNativeOpen: '需开通 Native 或扫码支付能力。',
wxpayGuideNativeCall: '桌面端默认调用 Native,下发二维码内容给前台渲染。',
wxpayGuideNativeFallback: '移动端无法走 JSAPI 或 H5 时,也会自动回退到这里。',
wxpayGuideJsapiTitle: 'JSAPI / 公众号支付',
wxpayGuideJsapiOpen: '需开通公众号支付,并保证当前浏览器在微信内且能拿到 OpenID。',
wxpayGuideJsapiCall: '微信内浏览器完成授权后调用 JSAPI,直接拉起微信支付。',
wxpayGuideJsapiFallback: '未配置、Bridge 不可用或拉起失败时,自动改走扫码支付。',
wxpayGuideH5Title: 'H5 支付',
wxpayGuideH5Open: '需开通 H5 支付。',
wxpayGuideH5Call: '移动端非微信浏览器且有客户端 IP 时调用 H5 支付,跳转微信收银台。',
wxpayGuideH5Fallback: '未开通 H5 或下单失败时,自动改走扫码支付。',
noProviders: '暂无服务商实例', noProviders: '暂无服务商实例',
supportedTypes: '支持的支付方式', supportedTypes: '支持的支付方式',
supportedTypesHint: '逗号分隔,如 alipay,wxpay', supportedTypesHint: '逗号分隔,如 alipay,wxpay',
...@@ -5309,6 +5368,98 @@ export default { ...@@ -5309,6 +5368,98 @@ export default {
securityWarning: '警告:此密钥拥有完整的管理员权限,请妥善保管。', securityWarning: '警告:此密钥拥有完整的管理员权限,请妥善保管。',
usage: '使用方法:在请求头中添加 x-api-key: <your-admin-api-key>' usage: '使用方法:在请求头中添加 x-api-key: <your-admin-api-key>'
}, },
soraS3: {
title: 'Sora 存储配置',
description: '以多配置列表管理 Sora 媒体存储,支持 S3 和 Google Drive',
newProfile: '新建配置',
reloadProfiles: '刷新列表',
empty: '暂无存储配置,请先创建',
createTitle: '新建存储配置',
editTitle: '编辑存储配置',
selectProvider: '选择存储类型',
providerS3Desc: 'S3 兼容对象存储',
providerGDriveDesc: 'Google Drive 云盘',
profileID: '配置 ID',
profileName: '配置名称',
setActive: '创建后设为生效',
saveProfile: '保存配置',
activateProfile: '设为生效',
profileCreated: '存储配置创建成功',
profileSaved: '存储配置保存成功',
profileDeleted: '存储配置删除成功',
profileActivated: '生效配置已切换',
profileIDRequired: '请填写配置 ID',
profileNameRequired: '请填写配置名称',
profileSelectRequired: '请先选择配置',
endpointRequired: '启用时必须填写 S3 端点',
bucketRequired: '启用时必须填写存储桶',
accessKeyRequired: '启用时必须填写 Access Key ID',
deleteConfirm: '确定删除存储配置 {profileID} 吗?',
columns: {
profile: '配置',
profileId: 'Profile ID',
name: '名称',
provider: '存储类型',
active: '生效状态',
endpoint: '端点',
bucket: '存储桶',
storagePath: '存储路径',
capacityUsage: '容量 / 已用',
capacityUnlimited: '无限制',
videoCount: '视频数',
videoCompleted: '完成',
videoInProgress: '进行中',
quota: '默认配额',
updatedAt: '更新时间',
actions: '操作',
rootFolder: '根目录',
testInTable: '测试',
testingInTable: '测试中...',
testTimeout: '测试超时(15秒)'
},
enabled: '启用存储',
enabledHint: '启用后,Sora 生成的媒体文件将自动上传到存储',
endpoint: 'S3 端点',
region: '区域',
bucket: '存储桶',
prefix: '对象前缀',
accessKeyId: 'Access Key ID',
secretAccessKey: 'Secret Access Key',
secretConfigured: '(已配置,留空保持不变)',
cdnUrl: 'CDN URL',
cdnUrlHint: '可选,配置后使用 CDN URL 访问文件',
forcePathStyle: '强制路径风格(Path Style)',
defaultQuota: '默认存储配额',
defaultQuotaHint: '未在用户或分组级别指定配额时的默认值,0 表示无限制',
testConnection: '测试连接',
testing: '测试中...',
testSuccess: '连接测试成功',
testFailed: '连接测试失败',
saved: '存储设置保存成功',
saveFailed: '保存存储设置失败',
gdrive: {
authType: '认证方式',
serviceAccount: '服务账号',
clientId: 'Client ID',
clientSecret: 'Client Secret',
clientSecretConfigured: '(已配置,留空保持不变)',
refreshToken: 'Refresh Token',
refreshTokenConfigured: '(已配置,留空保持不变)',
serviceAccountJson: '服务账号 JSON',
serviceAccountConfigured: '(已配置,留空保持不变)',
folderId: 'Folder ID(可选)',
authorize: '授权 Google Drive',
authorizeHint: '通过 OAuth2 获取 Refresh Token',
oauthFieldsRequired: '请先填写 Client ID 和 Client Secret',
oauthSuccess: 'Google Drive 授权成功',
oauthFailed: 'Google Drive 授权失败',
closeWindow: '此窗口将自动关闭',
processing: '正在处理授权...',
testStorage: '测试存储',
testSuccess: 'Google Drive 存储测试成功(上传、访问、删除均正常)',
testFailed: 'Google Drive 存储测试失败'
}
},
overloadCooldown: { overloadCooldown: {
title: '529 过载冷却', title: '529 过载冷却',
description: '配置上游返回 529(过载)时的账号调度暂停策略', description: '配置上游返回 529(过载)时的账号调度暂停策略',
...@@ -6000,6 +6151,7 @@ export default { ...@@ -6000,6 +6151,7 @@ export default {
wechatOpenInWeChatHint: '请复制当前页面链接到微信内打开,或直接改用电脑端微信扫码支付。', wechatOpenInWeChatHint: '请复制当前页面链接到微信内打开,或直接改用电脑端微信扫码支付。',
wechatScanOnDesktopHint: '电脑端请直接使用微信扫一扫完成支付;移动端请在微信内打开当前页面。', wechatScanOnDesktopHint: '电脑端请直接使用微信扫一扫完成支付;移动端请在微信内打开当前页面。',
wechatSwitchBrowserHint: '请改用电脑端微信扫码,或在外部浏览器重新打开本页后再试。', wechatSwitchBrowserHint: '请改用电脑端微信扫码,或在外部浏览器重新打开本页后再试。',
mobilePaymentFallbackToQr: '当前商户未开通移动支付,已自动切换为扫码支付。',
alipayDesktopUnavailable: '当前支付宝桌面支付未成功生成二维码。', alipayDesktopUnavailable: '当前支付宝桌面支付未成功生成二维码。',
alipayDesktopQrHint: '电脑端支付宝应展示扫码单,请刷新后重试,或确认浏览器未拦截当前支付页。', alipayDesktopQrHint: '电脑端支付宝应展示扫码单,请刷新后重试,或确认浏览器未拦截当前支付页。',
alipayMobileUnavailable: '当前页面未成功跳转到支付宝。', alipayMobileUnavailable: '当前页面未成功跳转到支付宝。',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment