Commit d20697be authored by shaw's avatar shaw
Browse files

Merge branch 'feat/account-notes'

parents 91f9d4c7 94750fb6
...@@ -936,6 +936,9 @@ export default { ...@@ -936,6 +936,9 @@ export default {
editAccount: 'Edit Account', editAccount: 'Edit Account',
deleteAccount: 'Delete Account', deleteAccount: 'Delete Account',
searchAccounts: 'Search accounts...', searchAccounts: 'Search accounts...',
notes: 'Notes',
notesPlaceholder: 'Enter notes',
notesHint: 'Notes are optional',
allPlatforms: 'All Platforms', allPlatforms: 'All Platforms',
allTypes: 'All Types', allTypes: 'All Types',
allStatus: 'All Status', allStatus: 'All Status',
...@@ -975,6 +978,23 @@ export default { ...@@ -975,6 +978,23 @@ export default {
overloadedUntil: 'Overloaded until {time}', overloadedUntil: 'Overloaded until {time}',
viewTempUnschedDetails: 'View temp unschedulable details' viewTempUnschedDetails: 'View temp unschedulable details'
}, },
columns: {
name: 'Name',
platformType: 'Platform/Type',
platform: 'Platform',
type: 'Type',
concurrencyStatus: 'Concurrency',
notes: 'Notes',
priority: 'Priority',
weight: 'Weight',
status: 'Status',
schedulable: 'Schedulable',
todayStats: 'Today Stats',
groups: 'Groups',
usageWindows: 'Usage Windows',
lastUsed: 'Last Used',
actions: 'Actions'
},
tempUnschedulable: { tempUnschedulable: {
title: 'Temp Unschedulable', title: 'Temp Unschedulable',
statusTitle: 'Temp Unschedulable Status', statusTitle: 'Temp Unschedulable Status',
...@@ -1018,21 +1038,6 @@ export default { ...@@ -1018,21 +1038,6 @@ export default {
unavailableDesc: 'Unavailable - pause 30 minutes' unavailableDesc: 'Unavailable - pause 30 minutes'
} }
}, },
columns: {
name: 'Name',
platformType: 'Platform/Type',
platform: 'Platform',
type: 'Type',
concurrencyStatus: 'Concurrency',
status: 'Status',
schedulable: 'Schedule',
todayStats: "Today's Stats",
groups: 'Groups',
usageWindows: 'Usage Windows',
priority: 'Priority',
lastUsed: 'Last Used',
actions: 'Actions'
},
clearRateLimit: 'Clear Rate Limit', clearRateLimit: 'Clear Rate Limit',
testConnection: 'Test Connection', testConnection: 'Test Connection',
reAuthorize: 'Re-Authorize', reAuthorize: 'Re-Authorize',
......
...@@ -1014,6 +1014,9 @@ export default { ...@@ -1014,6 +1014,9 @@ export default {
refreshCookie: '刷新 Cookie', refreshCookie: '刷新 Cookie',
testAccount: '测试账号', testAccount: '测试账号',
searchAccounts: '搜索账号...', searchAccounts: '搜索账号...',
notes: '备注',
notesPlaceholder: '请输入备注',
notesHint: '备注可选',
// Filter options // Filter options
allPlatforms: '全部平台', allPlatforms: '全部平台',
allTypes: '全部类型', allTypes: '全部类型',
...@@ -1031,6 +1034,7 @@ export default { ...@@ -1031,6 +1034,7 @@ export default {
platform: '平台', platform: '平台',
type: '类型', type: '类型',
concurrencyStatus: '并发', concurrencyStatus: '并发',
notes: '备注',
priority: '优先级', priority: '优先级',
weight: '权重', weight: '权重',
status: '状态', status: '状态',
......
...@@ -385,6 +385,7 @@ export interface TempUnschedulableStatus { ...@@ -385,6 +385,7 @@ export interface TempUnschedulableStatus {
export interface Account { export interface Account {
id: number id: number
name: string name: string
notes?: string | null
platform: AccountPlatform platform: AccountPlatform
type: AccountType type: AccountType
credentials?: Record<string, unknown> credentials?: Record<string, unknown>
...@@ -477,6 +478,7 @@ export interface CodexUsageSnapshot { ...@@ -477,6 +478,7 @@ export interface CodexUsageSnapshot {
export interface CreateAccountRequest { export interface CreateAccountRequest {
name: string name: string
notes?: string | null
platform: AccountPlatform platform: AccountPlatform
type: AccountType type: AccountType
credentials: Record<string, unknown> credentials: Record<string, unknown>
...@@ -490,6 +492,7 @@ export interface CreateAccountRequest { ...@@ -490,6 +492,7 @@ export interface CreateAccountRequest {
export interface UpdateAccountRequest { export interface UpdateAccountRequest {
name?: string name?: string
notes?: string | null
type?: AccountType type?: AccountType
credentials?: Record<string, unknown> credentials?: Record<string, unknown>
extra?: Record<string, unknown> extra?: Record<string, unknown>
......
...@@ -30,6 +30,10 @@ ...@@ -30,6 +30,10 @@
<template #cell-name="{ value }"> <template #cell-name="{ value }">
<span class="font-medium text-gray-900 dark:text-white">{{ value }}</span> <span class="font-medium text-gray-900 dark:text-white">{{ value }}</span>
</template> </template>
<template #cell-notes="{ value }">
<span v-if="value" :title="value" class="block max-w-xs truncate text-sm text-gray-600 dark:text-gray-300">{{ value }}</span>
<span v-else class="text-sm text-gray-400 dark:text-dark-500">-</span>
</template>
<template #cell-platform_type="{ row }"> <template #cell-platform_type="{ row }">
<PlatformTypeBadge :platform="row.platform" :type="row.type" /> <PlatformTypeBadge :platform="row.platform" :type="row.type" />
</template> </template>
...@@ -177,6 +181,7 @@ const cols = computed(() => { ...@@ -177,6 +181,7 @@ const cols = computed(() => {
{ key: 'usage', label: t('admin.accounts.columns.usageWindows'), sortable: false }, { key: 'usage', label: t('admin.accounts.columns.usageWindows'), sortable: false },
{ key: 'priority', label: t('admin.accounts.columns.priority'), sortable: true }, { key: 'priority', label: t('admin.accounts.columns.priority'), sortable: true },
{ key: 'last_used_at', label: t('admin.accounts.columns.lastUsed'), sortable: true }, { key: 'last_used_at', label: t('admin.accounts.columns.lastUsed'), sortable: true },
{ key: 'notes', label: t('admin.accounts.columns.notes'), sortable: false },
{ key: 'actions', label: t('admin.accounts.columns.actions'), sortable: false } { key: 'actions', label: t('admin.accounts.columns.actions'), sortable: false }
) )
return c return c
......
...@@ -32,11 +32,11 @@ export default defineConfig({ ...@@ -32,11 +32,11 @@ export default defineConfig({
port: 3000, port: 3000,
proxy: { proxy: {
'/api': { '/api': {
target: 'http://localhost:8080', target: process.env.VITE_DEV_PROXY_TARGET || 'http://localhost:8080',
changeOrigin: true changeOrigin: true
}, },
'/setup': { '/setup': {
target: 'http://localhost:8080', target: process.env.VITE_DEV_PROXY_TARGET || 'http://localhost:8080',
changeOrigin: true changeOrigin: true
} }
} }
......
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