Merge branch 'main' of https://git.586vip.cn/oadmin/xinghuoapi
# Conflicts: # frontend/src/views/auth/EmailVerifyView.vue
This commit is contained in:
@@ -1678,7 +1678,7 @@ export default {
|
||||
antigravityOauth: 'Antigravity OAuth',
|
||||
antigravityApikey: 'Connect via Base URL + API Key',
|
||||
soraApiKey: 'API Key / Upstream',
|
||||
soraApiKeyHint: 'Connect to another Sub2API or compatible API',
|
||||
soraApiKeyHint: 'Connect to another StarFireAPI or compatible API',
|
||||
soraBaseUrlRequired: 'Sora API Key account requires a Base URL',
|
||||
soraBaseUrlInvalidScheme: 'Base URL must start with http:// or https://',
|
||||
upstream: 'Upstream',
|
||||
@@ -2383,7 +2383,7 @@ export default {
|
||||
selectTestModel: 'Select Test Model',
|
||||
testModel: 'Test model',
|
||||
testPrompt: 'Prompt: "hi"',
|
||||
soraUpstreamBaseUrlHint: 'Upstream Sora service URL (another Sub2API instance or compatible API)',
|
||||
soraUpstreamBaseUrlHint: 'Upstream Sora service URL (another StarFireAPI instance or compatible API)',
|
||||
soraTestHint: 'Sora test runs connectivity and capability checks (/backend/me, subscription, Sora2 invite and remaining quota).',
|
||||
soraTestTarget: 'Target: Sora account capability',
|
||||
soraTestMode: 'Mode: Connectivity + Capability checks',
|
||||
|
||||
@@ -1835,7 +1835,7 @@ export default {
|
||||
antigravityOauth: 'Antigravity OAuth',
|
||||
antigravityApikey: '通过 Base URL + API Key 连接',
|
||||
soraApiKey: 'API Key / 上游透传',
|
||||
soraApiKeyHint: '连接另一个 Sub2API 或兼容 API',
|
||||
soraApiKeyHint: '连接另一个 StarFireAPI 或兼容 API',
|
||||
soraBaseUrlRequired: 'Sora apikey 账号必须设置上游地址(Base URL)',
|
||||
soraBaseUrlInvalidScheme: 'Base URL 必须以 http:// 或 https:// 开头',
|
||||
upstream: '对接上游',
|
||||
@@ -2512,7 +2512,7 @@ export default {
|
||||
selectTestModel: '选择测试模型',
|
||||
testModel: '测试模型',
|
||||
testPrompt: '提示词:"hi"',
|
||||
soraUpstreamBaseUrlHint: '上游 Sora 服务地址(另一个 Sub2API 实例或兼容 API)',
|
||||
soraUpstreamBaseUrlHint: '上游 Sora 服务地址(另一个 StarFireAPI 实例或兼容 API)',
|
||||
soraTestHint: 'Sora 测试将执行连通性与能力检测(/backend/me、订阅信息、Sora2 邀请码与剩余额度)。',
|
||||
soraTestTarget: '检测目标:Sora 账号能力',
|
||||
soraTestMode: '模式:连通性 + 能力探测',
|
||||
|
||||
@@ -28,7 +28,7 @@ async function bootstrap() {
|
||||
appStore.initFromInjectedConfig()
|
||||
|
||||
// Set document title immediately after config is loaded
|
||||
if (appStore.siteName && appStore.siteName !== 'Sub2API') {
|
||||
if (appStore.siteName && appStore.siteName !== 'StarFireAPI') {
|
||||
document.title = `${appStore.siteName} - AI API Gateway`
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ describe('resolveDocumentTitle', () => {
|
||||
})
|
||||
|
||||
it('站点名为空时,回退默认站点名', () => {
|
||||
expect(resolveDocumentTitle('Dashboard', '')).toBe('Dashboard - Sub2API')
|
||||
expect(resolveDocumentTitle(undefined, ' ')).toBe('Sub2API')
|
||||
expect(resolveDocumentTitle('Dashboard', '')).toBe('Dashboard - StarFireAPI')
|
||||
expect(resolveDocumentTitle(undefined, ' ')).toBe('StarFireAPI')
|
||||
})
|
||||
|
||||
it('站点名变更时仅影响后续路由标题计算', () => {
|
||||
|
||||
@@ -446,7 +446,7 @@ router.beforeEach((to, _from, next) => {
|
||||
const menuItem = publicItems.find((item) => item.id === id)
|
||||
?? (authStore.isAdmin ? adminSettingsStore.customMenuItems.find((item) => item.id === id) : undefined)
|
||||
if (menuItem?.label) {
|
||||
const siteName = appStore.siteName || 'Sub2API'
|
||||
const siteName = appStore.siteName || 'StarFireAPI'
|
||||
document.title = `${menuItem.label} - ${siteName}`
|
||||
} else {
|
||||
document.title = resolveDocumentTitle(to.meta.title, appStore.siteName, to.meta.titleKey as string)
|
||||
|
||||
@@ -5,7 +5,7 @@ import { i18n } from '@/i18n'
|
||||
* 优先使用 titleKey 通过 i18n 翻译,fallback 到静态 routeTitle。
|
||||
*/
|
||||
export function resolveDocumentTitle(routeTitle: unknown, siteName?: string, titleKey?: string): string {
|
||||
const normalizedSiteName = typeof siteName === 'string' && siteName.trim() ? siteName.trim() : 'Sub2API'
|
||||
const normalizedSiteName = typeof siteName === 'string' && siteName.trim() ? siteName.trim() : 'StarFireAPI'
|
||||
|
||||
if (typeof titleKey === 'string' && titleKey.trim()) {
|
||||
const translated = i18n.global.t(titleKey)
|
||||
|
||||
@@ -24,7 +24,7 @@ export const useAppStore = defineStore('app', () => {
|
||||
// Public settings cache state
|
||||
const publicSettingsLoaded = ref<boolean>(false)
|
||||
const publicSettingsLoading = ref<boolean>(false)
|
||||
const siteName = ref<string>('Sub2API')
|
||||
const siteName = ref<string>('StarFireAPI')
|
||||
const siteLogo = ref<string>('')
|
||||
const siteVersion = ref<string>('')
|
||||
const contactInfo = ref<string>('')
|
||||
@@ -284,7 +284,7 @@ export const useAppStore = defineStore('app', () => {
|
||||
*/
|
||||
function applySettings(config: PublicSettings): void {
|
||||
cachedPublicSettings.value = config
|
||||
siteName.value = config.site_name || 'Sub2API'
|
||||
siteName.value = config.site_name || 'StarFireAPI'
|
||||
siteLogo.value = config.site_logo || ''
|
||||
siteVersion.value = config.version || ''
|
||||
contactInfo.value = config.contact_info || ''
|
||||
|
||||
@@ -1655,7 +1655,7 @@ const form = reactive<SettingsForm>({
|
||||
default_balance: 0,
|
||||
default_concurrency: 1,
|
||||
default_subscriptions: [],
|
||||
site_name: 'Sub2API',
|
||||
site_name: 'StarFireAPI',
|
||||
site_logo: '',
|
||||
site_subtitle: 'Subscription to API Conversion Platform',
|
||||
api_base_url: '',
|
||||
|
||||
@@ -212,7 +212,7 @@ const hasRegisterData = ref<boolean>(false)
|
||||
// Public settings
|
||||
const turnstileEnabled = ref<boolean>(false)
|
||||
const turnstileSiteKey = ref<string>('')
|
||||
const siteName = ref<string>('Sub2API')
|
||||
const siteName = ref<string>('StarFireAPI')
|
||||
const registrationEmailSuffixWhitelist = ref<string[]>([])
|
||||
|
||||
// Turnstile for resend
|
||||
@@ -249,7 +249,7 @@ onMounted(async () => {
|
||||
const settings = await getPublicSettings()
|
||||
turnstileEnabled.value = settings.turnstile_enabled
|
||||
turnstileSiteKey.value = settings.turnstile_site_key || ''
|
||||
siteName.value = settings.site_name || 'Sub2API'
|
||||
siteName.value = settings.site_name || 'StarFireAPI'
|
||||
registrationEmailSuffixWhitelist.value = normalizeRegistrationEmailSuffixWhitelist(
|
||||
settings.registration_email_suffix_whitelist || []
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user