mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-20 23:07:18 +00:00
fix: comprehensive Sora & GDrive code review fixes
P0 fixes: - StorageType: UploadFromURL now returns actual storageType, fixing GDrive tasks being incorrectly recorded as "s3" - Concurrency: selectAccount returns ReleaseFunc to caller, fixing premature slot release before task creation - Race condition: applyRecoveredToken uses copy-on-write for account.Credentials map to prevent concurrent write panic - GetCameoStatus: use direct HTTP call to populate missing fields (StatusMessage, InstructionSetHint, InstructionSet) - Frontend: progress bar uses reactive now.value instead of non-reactive Date.now() P1 fixes: - EditImage: pass req.Image through to CreateImageRequest - ListPending: add LIMIT 200 to prevent unbounded queries - Worker encapsulation: add ListPendingTasks/UpdateTask proxy methods to SoraTaskService, worker no longer accesses repo directly - Frontend polling: add retry counter (3 attempts) before giving up P2-P3 fixes: - QuotaBar: handle both quota_source and source field names - i18n: replace hardcoded Chinese labels in SoraPromptBar and example prompts in SoraGeneratePage with i18n keys - Fix regenrate → regenerate i18n typo - SoraMediaPreview: skip Escape handler when not visible - SoraGeneratePage: void handleGenerate promise in handleRetry Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
f9695ca83f
commit
597c19e80b
18 files changed
+168
-81
No files matched your search
@@ -167,11 +167,17 @@ import type { ApiKey, UserSubscription } from '@/types'
|
||||
|
||||
const MAX_IMAGE_SIZE = 20 * 1024 * 1024
|
||||
|
||||
/** 方向显示配置 */
|
||||
const ASPECT_META: Record<string, { icon: string; label: string }> = {
|
||||
landscape: { icon: '▬', label: '横屏' },
|
||||
portrait: { icon: '▮', label: '竖屏' },
|
||||
square: { icon: '◻', label: '方形' }
|
||||
/** 方向显示配置(使用 i18n key) */
|
||||
const ASPECT_ICONS: Record<string, string> = {
|
||||
landscape: '▬',
|
||||
portrait: '▮',
|
||||
square: '◻'
|
||||
}
|
||||
|
||||
const ASPECT_LABEL_KEYS: Record<string, string> = {
|
||||
landscape: 'sora.landscape',
|
||||
portrait: 'sora.portrait',
|
||||
square: 'sora.square'
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -221,7 +227,11 @@ const availableAspects = computed(() => {
|
||||
const fam = currentFamily.value
|
||||
if (!fam?.orientations?.length) return []
|
||||
return fam.orientations
|
||||
.map(o => ({ value: o, ...(ASPECT_META[o] || { icon: '?', label: o }) }))
|
||||
.map(o => ({
|
||||
value: o,
|
||||
icon: ASPECT_ICONS[o] || '?',
|
||||
label: ASPECT_LABEL_KEYS[o] ? t(ASPECT_LABEL_KEYS[o]) : o
|
||||
}))
|
||||
})
|
||||
|
||||
// 当前家族支持的时长列表
|
||||
|
||||
Reference in new issue
Block a user