failedToUpdateStatus:'Failed to update API key status',
clickToChangeGroup:'Click to change group',
groupChangedSuccess:'Group changed successfully',
failedToChangeGroup:'Failed to change group',
groupRequired:'Please select a group',
usage:'Usage',
today:'Today',
total:'Total',
useKey:'Use Key',
useKeyModal:{
title:'Use API Key',
description:'Add the following environment variables to your terminal profile or run directly in terminal to configure API access.',
copy:'Copy',
copied:'Copied',
note:'These environment variables will be active in the current terminal session. For permanent configuration, add them to ~/.bashrc, ~/.zshrc, or the appropriate configuration file.',
},
customKeyLabel:'Custom Key',
customKeyPlaceholder:'Enter your custom key (min 16 chars)',
customKeyHint:'Only letters, numbers, underscores and hyphens allowed. Minimum 16 characters.',
customKeyTooShort:'Custom key must be at least 16 characters',
customKeyInvalidChars:'Custom key can only contain letters, numbers, underscores, and hyphens',
customKeyRequired:'Please enter a custom key',
},
// Usage
usage:{
title:'Usage Records',
description:'View and analyze your API usage history',
totalRequests:'Total Requests',
totalTokens:'Total Tokens',
totalCost:'Total Cost',
standardCost:'Standard',
actualCost:'Actual',
avgDuration:'Avg Duration',
inSelectedRange:'in selected range',
perRequest:'per request',
apiKeyFilter:'API Key',
allApiKeys:'All API Keys',
timeRange:'Time Range',
exportCsv:'Export CSV',
model:'Model',
type:'Type',
tokens:'Tokens',
cost:'Cost',
firstToken:'First Token',
duration:'Duration',
time:'Time',
stream:'Stream',
sync:'Sync',
in:'In',
out:'Out',
rate:'Rate',
original:'Original',
billed:'Billed',
noRecords:'No usage records found. Try adjusting your filters.',
failedToLoad:'Failed to load usage logs',
noDataToExport:'No data to export',
exportSuccess:'Usage data exported successfully',
billingType:'Billing',
balance:'Balance',
subscription:'Subscription',
},
// Redeem
redeem:{
title:'Redeem Code',
description:'Enter your redeem code to add balance or increase concurrency',
currentBalance:'Current Balance',
concurrency:'Concurrency',
requests:'requests',
redeemCodeLabel:'Redeem Code',
redeemCodePlaceholder:'Enter your redeem code',
redeemCodeHint:'Redeem codes are case-sensitive',
redeeming:'Redeeming...',
redeemButton:'Redeem Code',
redeemSuccess:'Code Redeemed Successfully!',
redeemFailed:'Redemption Failed',
added:'Added',
concurrentRequests:'concurrent requests',
newBalance:'New Balance',
newConcurrency:'New Concurrency',
aboutCodes:'About Redeem Codes',
codeRule1:'Each code can only be used once',
codeRule2:'Codes may add balance, increase concurrency, or grant trial access',
codeRule3:'Contact support if you have issues redeeming a code',
codeRule4:'Balance and concurrency updates are immediate',
recentActivity:'Recent Activity',
historyWillAppear:'Your redemption history will appear here',
description:'System overview and real-time statistics',
apiKeys:'API Keys',
accounts:'Accounts',
users:'Users',
todayRequests:'Today Requests',
newUsersToday:'New Users Today',
todayTokens:'Today Tokens',
totalTokens:'Total Tokens',
cacheToday:'Cache (Today)',
avgResponse:'Avg Response',
active:'active',
ok:'ok',
err:'err',
activeUsers:'active users',
create:'Create',
timeRange:'Time Range',
granularity:'Granularity',
day:'Day',
hour:'Hour',
modelDistribution:'Model Distribution',
tokenUsageTrend:'Token Usage Trend',
userUsageTrend:'User Usage Trend (Top 12)',
model:'Model',
requests:'Requests',
tokens:'Tokens',
actual:'Actual',
standard:'Standard',
noDataAvailable:'No data available',
failedToLoad:'Failed to load dashboard statistics',
},
// Users
users:{
title:'User Management',
description:'Manage users and their permissions',
createUser:'Create User',
editUser:'Edit User',
deleteUser:'Delete User',
searchUsers:'Search users...',
allRoles:'All Roles',
allStatus:'All Status',
admin:'Admin',
user:'User',
disabled:'Disabled',
columns:{
user:'User',
role:'Role',
balance:'Balance',
usage:'Usage',
concurrency:'Concurrency',
status:'Status',
created:'Created',
actions:'Actions',
},
today:'Today',
total:'Total',
disableUser:'Disable User',
enableUser:'Enable User',
viewApiKeys:'View API Keys',
userApiKeys:'User API Keys',
noApiKeys:'This user has no API keys',
group:'Group',
none:'None',
noUsersYet:'No users yet',
createFirstUser:'Create your first user to get started.',
email:'Email',
password:'Password',
enterEmail:'Enter email',
enterPassword:'Enter password',
enterNewPassword:'Enter new password (optional)',
leaveEmptyToKeep:'Leave empty to keep current password',
generatePassword:'Generate random password',
copyPassword:'Copy password',
creating:'Creating...',
updating:'Updating...',
userCreated:'User created successfully',
userUpdated:'User updated successfully',
userDeleted:'User deleted successfully',
userEnabled:'User enabled successfully',
userDisabled:'User disabled successfully',
failedToLoad:'Failed to load users',
failedToCreate:'Failed to create user',
failedToUpdate:'Failed to update user',
failedToDelete:'Failed to delete user',
failedToToggle:'Failed to update user status',
failedToLoadApiKeys:'Failed to load user API keys',
deleteConfirm:"Are you sure you want to delete '{email}'? This action cannot be undone.",
setAllowedGroups:'Set Allowed Groups',
allowedGroupsHint:'Select which standard groups this user can use. Subscription groups are managed separately.',
noStandardGroups:'No standard groups available',
allowAllGroups:'Allow All Groups',
allowAllGroupsHint:'User can use any non-exclusive group',
allowedGroupsUpdated:'Allowed groups updated successfully',
failedToLoadGroups:'Failed to load groups',
failedToUpdateAllowedGroups:'Failed to update allowed groups',
},
// Groups
groups:{
title:'Group Management',
description:'Manage API key groups and rate multipliers',
createGroup:'Create Group',
editGroup:'Edit Group',
deleteGroup:'Delete Group',
allPlatforms:'All Platforms',
allStatus:'All Status',
allGroups:'All Groups',
exclusive:'Exclusive',
nonExclusive:'Non-Exclusive',
public:'Public',
columns:{
name:'Name',
platform:'Platform',
rateMultiplier:'Rate Multiplier',
type:'Type',
accounts:'Accounts',
status:'Status',
actions:'Actions',
},
accountsCount:'{count} accounts',
form:{
name:'Name',
description:'Description',
platform:'Platform',
rateMultiplier:'Rate Multiplier',
status:'Status',
},
enterGroupName:'Enter group name',
optionalDescription:'Optional description',
platformHint:'Select the platform this group is associated with',
rateMultiplierHint:'Cost multiplier for this group (e.g., 1.5 = 150% of base cost)',
exclusiveHint:'Exclusive (requires explicit user access)',
noGroupsYet:'No groups yet',
createFirstGroup:'Create your first group to organize API keys.',
creating:'Creating...',
updating:'Updating...',
groupCreated:'Group created successfully',
groupUpdated:'Group updated successfully',
groupDeleted:'Group deleted successfully',
failedToLoad:'Failed to load groups',
failedToCreate:'Failed to create group',
failedToUpdate:'Failed to update group',
failedToDelete:'Failed to delete group',
deleteConfirm:"Are you sure you want to delete '{name}'? All associated API keys will no longer belong to any group.",
deleteConfirmSubscription:"Are you sure you want to delete subscription group '{name}'? This will invalidate all API keys bound to this subscription and delete all related subscription records. This action cannot be undone.",
subscription:{
title:'Subscription Settings',
type:'Billing Type',
typeHint:'Standard billing deducts from user balance. Subscription mode uses quota limits instead.',
standard:'Standard (Balance)',
subscription:'Subscription (Quota)',
dailyLimit:'Daily Limit (USD)',
weeklyLimit:'Weekly Limit (USD)',
monthlyLimit:'Monthly Limit (USD)',
defaultValidityDays:'Default Validity (Days)',
validityHint:'Number of days the subscription is valid when assigned to a user',
noLimit:'No limit',
},
},
// Subscriptions
subscriptions:{
title:'Subscription Management',
description:'Manage user subscriptions and quota limits',
assignSubscription:'Assign Subscription',
extendSubscription:'Extend Subscription',
revokeSubscription:'Revoke Subscription',
allStatus:'All Status',
allGroups:'All Groups',
daily:'Daily',
weekly:'Weekly',
monthly:'Monthly',
noLimits:'No limits configured',
daysRemaining:'days remaining',
noExpiration:'No expiration',
status:{
active:'Active',
expired:'Expired',
revoked:'Revoked',
},
columns:{
user:'User',
group:'Group',
usage:'Usage',
expires:'Expires',
status:'Status',
actions:'Actions',
},
form:{
user:'User',
group:'Subscription Group',
validityDays:'Validity (Days)',
extendDays:'Extend by (Days)',
},
selectUser:'Select a user',
selectGroup:'Select a subscription group',
groupHint:'Only groups with subscription billing type are shown',
validityHint:'Number of days the subscription will be valid',
extendingFor:'Extending subscription for',
currentExpiration:'Current expiration',
assign:'Assign',
assigning:'Assigning...',
extend:'Extend',
extending:'Extending...',
revoke:'Revoke',
noSubscriptionsYet:'No subscriptions yet',
assignFirstSubscription:'Assign a subscription to get started.',
readyToTest:'Ready to test. Click "Start Test" to begin...',
connectingToApi:'Connecting to API...',
testCompleted:'Test completed successfully!',
testFailed:'Test failed',
connectedToApi:'Connected to API',
usingModel:'Using model: {model}',
sendingTestMessage:'Sending test message: "hi"',
response:'Response:',
startTest:'Start Test',
testing:'Testing...',
retry:'Retry',
copyOutput:'Copy output',
startingTestForAccount:'Starting test for account: {name}',
testAccountTypeLabel:'Account type: {type}',
testModel:'claude-sonnet-4-5-20250929',
testPrompt:'Prompt: "hi"',
},
// Proxies
proxies:{
title:'Proxy Management',
description:'Manage proxy servers for accounts',
createProxy:'Create Proxy',
editProxy:'Edit Proxy',
deleteProxy:'Delete Proxy',
searchProxies:'Search proxies...',
allProtocols:'All Protocols',
allStatus:'All Status',
columns:{
name:'Name',
protocol:'Protocol',
address:'Address',
status:'Status',
actions:'Actions',
},
testConnection:'Test Connection',
batchTest:'Test All Proxies',
testFailed:'Failed',
name:'Name',
protocol:'Protocol',
host:'Host',
port:'Port',
username:'Username (Optional)',
password:'Password (Optional)',
status:'Status',
enterProxyName:'Enter proxy name',
leaveEmptyToKeep:'Leave empty to keep current',
optionalAuth:'Optional authentication',
noProxiesYet:'No proxies yet',
createFirstProxy:'Create your first proxy to route traffic through it.',
// Batch import
standardAdd:'Standard Add',
batchAdd:'Quick Add',
batchInput:'Proxy List',
batchInputPlaceholder:'Enter one proxy per line in the following formats:\nsocks5://user:pass@192.168.1.1:1080\nhttp://192.168.1.1:8080\nhttps://user:pass@proxy.example.com:443',
This directory contains the Vue Router configuration for the Sub2API frontend application. The router implements a comprehensive navigation system with authentication guards, role-based access control, and lazy loading.
## Files
-**index.ts**: Main router configuration with route definitions and navigation guards
-**meta.d.ts**: TypeScript type definitions for route meta fields
## Route Structure
### Public Routes (No Authentication Required)
| Path | Component | Description |
|------|-----------|-------------|
| `/login` | LoginView | User login page |
| `/register` | RegisterView | User registration page |
### User Routes (Authentication Required)
| Path | Component | Description |
|------|-----------|-------------|
| `/` | - | Redirects to `/dashboard` |
| `/dashboard` | DashboardView | User dashboard with stats |
| `/keys` | KeysView | API key management |
| `/usage` | UsageView | Usage records and statistics |