claude-codex-proxy 1.0.5-beta.9 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,183 +0,0 @@
1
- <div x-show="activeTab === 'accounts'" x-transition class="view-container">
2
- <div class="flex items-center justify-between gap-4 mb-6">
3
- <div class="flex flex-wrap items-center gap-4">
4
- <h1 class="text-2xl font-bold text-white tracking-tight">Account Management</h1>
5
- <div class="flex items-center h-6 px-3 rounded-full bg-space-800/80 border border-space-border/50 shadow-sm backdrop-blur-sm">
6
- <span class="text-[10px] font-mono text-gray-400 uppercase tracking-wider">Manage ChatGPT accounts</span>
7
- </div>
8
- </div>
9
-
10
- <div class="flex flex-wrap items-center justify-end gap-2 sm:flex-nowrap">
11
- <div class="relative" x-show="accounts.length > 0">
12
- <input type="text" x-model="searchQuery" placeholder="Search accounts..."
13
- class="input-search-sm w-48 pl-9 h-8" @keydown.escape="searchQuery = ''">
14
- <svg class="w-4 h-4 absolute left-3 top-2 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
15
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
16
- </svg>
17
- </div>
18
-
19
- <button class="btn btn-xs btn-outline border-space-border text-gray-400 hover:text-white transition-all gap-2 h-8"
20
- @click="refreshAllTokens()" x-show="accounts.length > 0">
21
- <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
22
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"></path>
23
- </svg>
24
- <span>Refresh All</span>
25
- </button>
26
-
27
- <div class="flex items-center h-6 px-2 rounded bg-space-800/80 border border-space-border/50 sm:ml-1">
28
- <span class="text-[11px] font-mono text-gray-400" x-text="accounts.length + ' accounts'"></span>
29
- </div>
30
-
31
- <button class="btn bg-neon-purple hover:bg-purple-600 border-none text-white btn-xs gap-2 shadow-lg shadow-neon-purple/20 h-8"
32
- @click="showAddModal = true">
33
- <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
34
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4" />
35
- </svg>
36
- <span>Add Account</span>
37
- </button>
38
- </div>
39
- </div>
40
-
41
- <div class="view-card !p-0 overflow-x-auto">
42
- <table class="w-full min-w-[860px]">
43
- <thead x-show="filteredAccounts.length > 0">
44
- <tr class="bg-space-900/50 border-b border-space-border/50">
45
- <th class="py-3 text-left text-[10px] font-bold text-gray-500 uppercase tracking-wider w-20">Status</th>
46
- <th class="py-3 text-center text-[10px] font-bold text-gray-500 uppercase tracking-wider flex-1 min-w-[200px]">Account (Email)</th>
47
- <th class="py-3 text-left text-[10px] font-bold text-gray-500 uppercase tracking-wider w-20">Plan</th>
48
- <th class="py-3 text-left text-[10px] font-bold text-gray-500 uppercase tracking-wider w-32">Token</th>
49
- <th class="py-3 text-left text-[10px] font-bold text-gray-500 uppercase tracking-wider w-24">Quota</th>
50
- <th class="py-3 pr-6 text-right text-[10px] font-bold text-gray-500 uppercase tracking-wider w-40">Operations</th>
51
- </tr>
52
- </thead>
53
- <tbody>
54
- <template x-if="filteredAccounts.length === 0 && accounts.length === 0">
55
- <tr>
56
- <td colspan="6" class="py-16 text-center flex justify-center">
57
- <div class="flex flex-col items-center gap-4 max-w-lg mx-auto">
58
- <svg class="w-20 h-20 text-gray-700" fill="none" stroke="currentColor" viewBox="0 0 24 24">
59
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" />
60
- </svg>
61
- <h3 class="text-xl font-semibold text-gray-400">No Accounts Yet</h3>
62
- <p class="text-sm text-gray-600 max-w-md leading-relaxed">Get started by adding a ChatGPT account via OAuth, or import from the Codex app.</p>
63
- <div class="flex items-center gap-4 mt-2">
64
- <button class="btn bg-neon-purple hover:bg-purple-600 border-none text-white btn-sm gap-2 shadow-lg shadow-neon-purple/20"
65
- @click="showAddModal = true">
66
- <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
67
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4" />
68
- </svg>
69
- <span>Add Your First Account</span>
70
- </button>
71
- <span class="text-xs text-gray-600">or</span>
72
- <button class="btn btn-outline btn-sm text-gray-400" @click="importFromCodex()">
73
- Import from Codex
74
- </button>
75
- </div>
76
- </div>
77
- </td>
78
- </tr>
79
- </template>
80
-
81
- <template x-for="acc in filteredAccounts" :key="acc.email">
82
- <tr class="border-b border-space-border/30 last:border-0 hover:bg-white/5 transition-colors group">
83
- <td class="py-4 pl-6">
84
- <div class="flex items-center gap-2">
85
- <div class="w-2 h-2 rounded-full flex-shrink-0"
86
- :class="acc.isActive ? 'bg-neon-green shadow-[0_0_8px_rgba(34,197,94,0.6)] animate-pulse' : 'bg-gray-500'">
87
- </div>
88
- <span class="text-xs font-mono font-semibold"
89
- :class="acc.isActive ? 'text-neon-green' : 'text-gray-500'"
90
- x-text="acc.isActive ? 'ACTIVE' : 'IDLE'">
91
- </span>
92
- </div>
93
- </td>
94
- <td class="py-4 text-center">
95
- <span class="font-mono text-sm text-gray-300 truncate max-w-[320px] inline-block group-hover:text-white transition-colors"
96
- x-text="acc.email"></span>
97
- </td>
98
- <td class="py-4">
99
- <span class="text-[10px] font-bold uppercase px-2 py-1 rounded"
100
- :class="{
101
- 'bg-yellow-500/10 text-yellow-400 border border-yellow-500/30': acc.planType === 'plus',
102
- 'bg-blue-500/10 text-blue-400 border border-blue-500/30': acc.planType === 'pro',
103
- 'bg-gray-500/10 text-gray-400 border border-gray-500/30': acc.planType === 'free'
104
- }"
105
- x-text="(acc.planType || 'free').toUpperCase()"></span>
106
- </td>
107
- <td class="py-4">
108
- <div class="flex items-center gap-2">
109
- <span class="text-xs font-mono"
110
- :class="acc.tokenExpired ? 'text-red-400' : 'text-neon-green'"
111
- x-text="acc.tokenExpired ? 'Expired' : 'Valid'"></span>
112
- <button class="btn btn-xs btn-ghost p-2 rounded hover:bg-white/10 text-gray-500 hover:text-white transition-colors"
113
- @click="refreshToken(acc.email)"
114
- :disabled="refreshingTokenEmails.includes(acc.email)" title="Refresh token">
115
- <svg class="w-4 h-4" :class="{'animate-spin': refreshingTokenEmails.includes(acc.email)}" fill="none" stroke="currentColor" viewBox="0 0 24 24">
116
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
117
- </svg>
118
- </button>
119
- </div>
120
- </td>
121
- <td class="py-4 cursor-pointer" @click="showQuotaModal(acc)">
122
- <template x-if="getRemainingPercentage(acc) !== null">
123
- <div class="flex flex-col gap-1">
124
- <div class="flex items-center gap-2">
125
- <div class="w-16 bg-gray-700 rounded-full h-2 overflow-hidden">
126
- <div class="h-full rounded-full transition-all"
127
- :class="quotaBarClass(acc)"
128
- :style="`width: ${getRemainingPercentage(acc)}%`">
129
- </div>
130
- </div>
131
- <template x-if="isQuotaExhausted(acc)">
132
- <span class="text-[10px] font-bold uppercase text-red-400 bg-red-500/10 px-1.5 py-0.5 rounded border border-red-500/30">USED</span>
133
- </template>
134
- <template x-if="!isQuotaExhausted(acc)">
135
- <span class="text-xs font-mono"
136
- :class="quotaTextClass(acc)"
137
- x-text="quotaLabel(acc)"></span>
138
- </template>
139
- </div>
140
- <template x-if="quotaResetSummary(acc)">
141
- <span class="text-[10px] font-mono text-gray-500" x-text="quotaResetSummary(acc)"></span>
142
- </template>
143
- </div>
144
- </template>
145
- <template x-if="getRemainingPercentage(acc) === null">
146
- <span class="text-xs text-gray-600">-</span>
147
- </template>
148
- </td>
149
- <td class="py-4 pr-6">
150
- <div class="flex justify-end gap-2">
151
- <button x-show="!acc.isActive"
152
- class="cursor-pointer px-3 py-1 text-[10px] font-bold font-mono uppercase tracking-wider rounded bg-neon-purple/10 text-neon-purple hover:bg-neon-purple/20 border border-neon-purple/30 hover:border-neon-purple/50 transition-all"
153
- @click="switchAccount(acc.email)">
154
- SWITCH
155
- </button>
156
- <button class="btn btn-xs btn-ghost p-2 rounded hover:bg-red-500/10 text-gray-500 hover:text-red-400 transition-colors"
157
- @click="confirmDelete(acc.email)" title="Delete account">
158
- <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
159
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
160
- </svg>
161
- </button>
162
- </div>
163
- </td>
164
- </tr>
165
- </template>
166
-
167
- <template x-if="accounts.length > 0 && filteredAccounts.length === 0">
168
- <tr>
169
- <td colspan="6" class="py-12 text-center">
170
- <div class="flex flex-col items-center gap-3">
171
- <svg class="w-12 h-12 text-gray-700" fill="none" stroke="currentColor" viewBox="0 0 24 24">
172
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
173
- </svg>
174
- <p class="text-sm text-gray-600">No accounts match your search</p>
175
- <button class="text-xs text-neon-cyan hover:underline" @click="searchQuery = ''">Clear Search</button>
176
- </div>
177
- </td>
178
- </tr>
179
- </template>
180
- </tbody>
181
- </table>
182
- </div>
183
- </div>
@@ -1,55 +0,0 @@
1
- <div x-show="showCreateClientApiKeyModal" x-transition class="fixed inset-0 z-50 flex items-center justify-center p-4" style="display: none;" @keydown.escape.window="showCreateClientApiKeyModal = false">
2
- <div class="absolute inset-0 bg-black/70 backdrop-blur-sm" @click="showCreateClientApiKeyModal = false"></div>
3
- <div class="relative bg-space-900 border border-space-border rounded-xl shadow-2xl max-w-md w-full p-6">
4
- <h3 class="font-bold text-lg text-white mb-2">New Client API Key</h3>
5
- <p class="text-sm text-gray-400 mb-5">The key is shown once after creation. Copy it before closing the result.</p>
6
- <div class="space-y-4">
7
- <label class="block">
8
- <span class="block text-xs text-gray-400 mb-2">Name</span>
9
- <input type="text" x-model="clientApiKeyName" placeholder="e.g. Development workstation"
10
- class="input w-full bg-space-800 border-space-border text-white font-mono text-sm" @keydown.enter="createClientApiKey()">
11
- </label>
12
- <label class="block">
13
- <span class="block text-xs text-gray-400 mb-2">Remark</span>
14
- <input type="text" x-model="clientApiKeyRemark" placeholder="Optional note"
15
- class="input w-full bg-space-800 border-space-border text-white font-mono text-sm" @keydown.enter="createClientApiKey()">
16
- </label>
17
- <label class="block">
18
- <span class="block text-xs text-gray-400 mb-2">Weekly limit (USD)</span>
19
- <input type="number" min="0" step="0.01" x-model="clientApiKeyWeeklyLimitUsd"
20
- class="input w-full bg-space-800 border-space-border text-white font-mono text-sm" @keydown.enter="createClientApiKey()">
21
- </label>
22
- </div>
23
- <div class="mt-6 flex justify-end gap-2">
24
- <button class="btn btn-outline btn-sm text-gray-400" @click="showCreateClientApiKeyModal = false" :disabled="clientApiKeySaving">Cancel</button>
25
- <button class="btn btn-sm bg-neon-purple hover:bg-purple-600 border-none text-white" @click="createClientApiKey()" :disabled="clientApiKeySaving">
26
- <span x-text="clientApiKeySaving ? 'Creating...' : 'Create Key'"></span>
27
- </button>
28
- </div>
29
- </div>
30
- </div>
31
-
32
- <div x-show="revealedClientApiKey" x-transition class="fixed inset-0 z-50 flex items-center justify-center p-4" style="display: none;" @keydown.escape.window="revealedClientApiKey = ''">
33
- <div class="absolute inset-0 bg-black/70 backdrop-blur-sm" @click="revealedClientApiKey = ''"></div>
34
- <div class="relative bg-space-900 border border-yellow-400/40 rounded-xl shadow-2xl max-w-xl w-full p-6">
35
- <h3 class="font-bold text-lg text-yellow-300 mb-2">Client API Key Created</h3>
36
- <p class="text-sm text-gray-400 mb-5">Copy this key now. It cannot be retrieved later.</p>
37
- <code class="block break-all rounded-lg border border-space-border bg-space-800 p-3 text-sm text-white font-mono" x-text="revealedClientApiKey"></code>
38
- <template x-if="clientProxyConfig">
39
- <div class="mt-5 space-y-3">
40
- <p class="text-xs font-semibold uppercase tracking-wider text-gray-400">Claude Code configuration</p>
41
- <div class="rounded-lg border border-space-border bg-space-800 p-3 font-mono text-xs text-gray-300 space-y-2">
42
- <div><span class="text-gray-500">ANTHROPIC_BASE_URL=</span><span class="break-all" x-text="clientProxyConfig.env.ANTHROPIC_BASE_URL"></span></div>
43
- <div><span class="text-gray-500">ANTHROPIC_API_KEY=</span><span class="break-all" x-text="revealedClientApiKey"></span></div>
44
- <div><span class="text-gray-500">CLAUDE_CODE_AUTO_COMPACT_WINDOW=</span><span x-text="clientProxyConfig.env.CLAUDE_CODE_AUTO_COMPACT_WINDOW"></span></div>
45
- </div>
46
- <p class="text-xs text-gray-500" x-text="clientProxyConfig.message"></p>
47
- <button class="btn btn-outline btn-sm text-gray-300" @click="copyClientProxyCommands()">Copy PowerShell Commands</button>
48
- </div>
49
- </template>
50
- <div class="mt-6 flex justify-end gap-2">
51
- <button class="btn btn-outline btn-sm text-gray-300" @click="copyClientApiKey()">Copy Key</button>
52
- <button class="btn btn-sm bg-neon-purple hover:bg-purple-600 border-none text-white" @click="revealedClientApiKey = ''; clientProxyConfig = null">Done</button>
53
- </div>
54
- </div>
55
- </div>
@@ -1,69 +0,0 @@
1
- <div x-show="activeTab === 'client-api-keys'" x-transition class="view-container">
2
- <div class="flex flex-wrap items-center justify-between gap-4 mb-6">
3
- <div class="flex flex-wrap items-center gap-4">
4
- <h1 class="text-2xl font-bold text-white tracking-tight">Claude Code Client API Keys</h1>
5
- <div class="flex items-center h-6 px-3 rounded-full bg-space-800/80 border border-space-border/50 shadow-sm backdrop-blur-sm">
6
- <span class="text-[10px] font-mono text-gray-400 uppercase tracking-wider">Client access management</span>
7
- </div>
8
- </div>
9
- </div>
10
-
11
- <div class="client-keys-panel">
12
- <div class="client-keys-toolbar">
13
- <div>
14
- <h2>Access keys</h2>
15
- <p>Edit a key, then save its changes.</p>
16
- </div>
17
- <div class="client-keys-toolbar-actions">
18
- <div x-show="clientApiKeys.length" class="client-keys-reset">
19
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M12 8v4l2.5 2.5M21 12a9 9 0 11-2.64-6.36M21 4v5h-5"/></svg>
20
- <div><span>Next weekly reset</span><strong x-text="clientApiKeys[0]?.quota?.nextPeriodStart ? new Date(clientApiKeys[0].quota.nextPeriodStart).toLocaleString() : '-'"></strong></div>
21
- </div>
22
- <button class="client-keys-new" @click="revealedClientApiKey = ''; clientProxyConfig = null; showCreateClientApiKeyModal = true">
23
- <span>+</span> New API Key
24
- </button>
25
- </div>
26
- </div>
27
-
28
- <template x-if="clientApiKeysLoading">
29
- <div class="client-keys-empty">Loading client API keys...</div>
30
- </template>
31
-
32
- <div class="client-keys-list" x-show="!clientApiKeysLoading && clientApiKeys.length">
33
- <template x-for="clientApiKey in clientApiKeys" :key="clientApiKey.id">
34
- <article class="client-key-card">
35
- <div class="client-key-identity">
36
- <div class="client-key-icon">
37
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M15 7a5 5 0 11-9.6 2H3v4h3v3h3v-3h2.4A5 5 0 0115 7z"/></svg>
38
- </div>
39
- <div class="client-key-fields">
40
- <label><span>Client name</span><input type="text" x-model="clientApiKey.name" placeholder="Unnamed"></label>
41
- <label><span>Remark</span><input type="text" x-model="clientApiKey.remark" placeholder="No remark"></label>
42
- </div>
43
- </div>
44
-
45
- <div class="client-key-quota">
46
- <div class="client-key-quota-heading">
47
- <span>Weekly usage</span>
48
- <strong><span x-text="`$${(clientApiKey.quota?.consumedUsd ?? 0).toFixed(2)}`"></span><small x-text="` / $${Number(clientApiKey.weeklyLimitUsd || 0).toFixed(2)}`"></small></strong>
49
- </div>
50
- <div class="client-key-progress"><i :style="`width: ${Math.min(100, Math.max(0, ((clientApiKey.quota?.consumedUsd ?? 0) / Math.max(Number(clientApiKey.weeklyLimitUsd) || 0, 0.000001)) * 100))}%`"></i></div>
51
- <div class="client-key-quota-foot"><span x-text="`$${(clientApiKey.quota?.remainingUsd ?? (Number(clientApiKey.weeklyLimitUsd) || 0)).toFixed(2)} remaining`"></span><span x-text="`${Math.min(100, Math.max(0, ((clientApiKey.quota?.consumedUsd ?? 0) / Math.max(Number(clientApiKey.weeklyLimitUsd) || 0, 0.000001)) * 100)).toFixed(1)}% used`"></span></div>
52
- </div>
53
-
54
- <label class="client-key-limit"><span>Weekly limit</span><div><b>$</b><input type="number" min="0" step="0.01" x-model="clientApiKey.weeklyLimitUsd"></div></label>
55
-
56
- <div class="client-key-meta"><span>Created</span><strong x-text="new Date(clientApiKey.createdAt).toLocaleDateString()"></strong><small x-text="new Date(clientApiKey.createdAt).toLocaleTimeString()"></small></div>
57
-
58
- <div class="client-key-actions">
59
- <button class="client-key-save" @click="updateClientApiKey(clientApiKey)" :disabled="clientApiKeySaving">Save changes</button>
60
- <button class="client-key-delete" @click="deleteClientApiKey(clientApiKey)" :disabled="clientApiKeySaving" aria-label="Delete API key" title="Delete">
61
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M4 7h16M9 7V4h6v3m-8 0 1 13h8l1-13M10 11v5m4-5v5"/></svg>
62
- </button>
63
- </div>
64
- </article>
65
- </template>
66
- </div>
67
- <div x-show="!clientApiKeysLoading && !clientApiKeys.length" class="client-keys-empty">No client API keys. Create one to connect Claude Code clients.</div>
68
- </div>
69
- </div>
@@ -1,90 +0,0 @@
1
- <div x-show="activeTab === 'dashboard'" x-transition class="view-container">
2
- <div class="flex items-center justify-between gap-4 mb-6">
3
- <div class="flex flex-wrap items-center gap-4">
4
- <h1 class="text-2xl font-bold text-white tracking-tight">Dashboard</h1>
5
- <div class="flex items-center h-6 px-3 rounded-full bg-space-800/80 border border-space-border/50 shadow-sm backdrop-blur-sm">
6
- <span class="text-[10px] font-mono text-gray-400 uppercase tracking-wider">CHATGPT PROXY SYSTEM</span>
7
- </div>
8
- </div>
9
- <div class="flex items-center gap-2 px-2.5 py-1.5 rounded-lg bg-space-900/60 border border-space-border/40 whitespace-nowrap flex-shrink-0">
10
- <div class="relative flex items-center justify-center">
11
- <span class="absolute w-1.5 h-1.5 bg-neon-green rounded-full animate-ping opacity-75"></span>
12
- <span class="relative w-1.5 h-1.5 bg-neon-green rounded-full"></span>
13
- </div>
14
- <span class="text-[10px] font-mono text-gray-500 uppercase tracking-wider">Live</span>
15
- <span class="text-gray-700">•</span>
16
- <span class="text-[10px] font-mono text-gray-400 tabular-nums" x-text="currentTime"></span>
17
- </div>
18
- </div>
19
-
20
- <div class="grid grid-cols-2 sm:grid-cols-4 gap-2 lg:gap-3 mb-6">
21
- <div class="stat bg-space-900/40 border border-space-border/30 rounded-xl p-3 lg:p-4 hover:border-cyan-500/30 hover:bg-cyan-500/5 transition-all duration-300 group relative cursor-pointer min-w-0">
22
- <div class="absolute top-3 right-3 text-gray-700/40 group-hover:text-cyan-400/70 transition-colors">
23
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="w-4 h-4 sm:w-5 sm:h-5 stroke-current">
24
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0z"></path>
25
- </svg>
26
- </div>
27
- <div class="stat-value text-white font-mono text-2xl lg:text-3xl font-bold mb-1 truncate" x-text="stats.total"></div>
28
- <div class="stat-title text-gray-500 font-mono text-[10px] uppercase tracking-wider truncate">Total Accounts</div>
29
- <div class="stat-desc text-cyan-400/60 text-[10px] truncate">Linked accounts</div>
30
- </div>
31
-
32
- <div class="stat bg-space-900/40 border border-space-border/30 rounded-xl p-3 lg:p-4 hover:border-green-500/30 hover:bg-green-500/5 transition-all duration-300 group relative cursor-pointer min-w-0">
33
- <div class="absolute top-3 right-3 text-gray-700/40 group-hover:text-green-400/70 transition-colors">
34
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="w-4 h-4 sm:w-5 sm:h-5 stroke-current">
35
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path>
36
- </svg>
37
- </div>
38
- <div class="stat-value text-white font-mono text-2xl lg:text-3xl font-bold mb-1 truncate" x-text="stats.active"></div>
39
- <div class="stat-title text-gray-500 font-mono text-[10px] uppercase tracking-wider truncate">Active</div>
40
- <div class="stat-desc text-green-400/60 text-[10px] truncate">Operational</div>
41
- </div>
42
-
43
- <div class="stat bg-space-900/40 border border-space-border/30 rounded-xl p-3 lg:p-4 hover:border-yellow-500/30 hover:bg-yellow-500/5 transition-all duration-300 group relative cursor-pointer min-w-0">
44
- <div class="absolute top-3 right-3 text-gray-700/40 group-hover:text-yellow-400/70 transition-colors">
45
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="w-4 h-4 sm:w-5 sm:h-5 stroke-current">
46
- <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"></path>
47
- </svg>
48
- </div>
49
- <div class="stat-value text-white font-mono text-2xl lg:text-3xl font-bold mb-1 truncate" x-text="stats.expired"></div>
50
- <div class="stat-title text-gray-500 font-mono text-[10px] uppercase tracking-wider truncate">Token Expired</div>
51
- <div class="stat-desc text-yellow-400/60 text-[10px] truncate">Needs refresh</div>
52
- </div>
53
-
54
- <div class="stat bg-space-900/40 border border-space-border/30 rounded-xl p-3 lg:p-4 hover:border-purple-500/30 hover:bg-purple-500/5 transition-all duration-300 group relative cursor-pointer min-w-0">
55
- <div class="absolute top-3 right-3 text-gray-700/40 group-hover:text-purple-400/70 transition-colors">
56
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="w-4 h-4 sm:w-5 sm:h-5 stroke-current">
57
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"></path>
58
- </svg>
59
- </div>
60
- <div class="stat-value text-white font-mono text-2xl lg:text-3xl font-bold mb-1 truncate" x-text="stats.planType"></div>
61
- <div class="stat-title text-gray-500 font-mono text-[10px] uppercase tracking-wider truncate">Active Plan</div>
62
- <div class="stat-desc text-purple-400/60 text-[10px] truncate">Current tier</div>
63
- </div>
64
- </div>
65
-
66
- <div class="view-card">
67
- <div class="flex items-center gap-2.5 mb-4">
68
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" class="w-4 h-4 text-neon-purple">
69
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path>
70
- </svg>
71
- <h3 class="text-xs font-mono text-gray-400 uppercase tracking-widest">Quick Test</h3>
72
- </div>
73
- <div class="flex gap-3">
74
- <input type="text" x-model="testPrompt" placeholder="Enter a test prompt..."
75
- class="input flex-1 bg-space-800 border-space-border text-white font-mono text-sm">
76
- <button class="btn bg-neon-purple hover:bg-purple-600 border-none text-white btn-sm gap-2"
77
- @click="testChat()" :disabled="testing">
78
- <svg class="w-4 h-4" :class="{'animate-spin': testing}" fill="none" stroke="currentColor" viewBox="0 0 24 24">
79
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"></path>
80
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
81
- </svg>
82
- <span>Test</span>
83
- </button>
84
- </div>
85
- <div x-show="testResponse" class="mt-4 p-3 rounded-lg bg-space-800/50 border border-space-border/30">
86
- <pre class="text-xs font-mono text-gray-300 whitespace-pre-wrap" x-text="testResponse"></pre>
87
- </div>
88
- </div>
89
-
90
- </div>
File without changes
@@ -1,99 +0,0 @@
1
- <div x-show="activeTab === 'logs'" x-transition class="view-container h-full flex flex-col">
2
- <div class="flex items-center justify-between gap-4 mb-6">
3
- <div class="flex flex-wrap items-center gap-4">
4
- <h1 class="text-2xl font-bold text-white tracking-tight">Server Logs</h1>
5
- <div class="flex items-center h-6 px-3 rounded-full bg-space-800/80 border border-space-border/50 shadow-sm backdrop-blur-sm">
6
- <span class="text-[10px] font-mono text-gray-400 uppercase tracking-wider">Real-time log stream</span>
7
- </div>
8
- </div>
9
- <div class="flex items-center gap-3">
10
- <div class="text-[10px] font-mono text-gray-600">
11
- <span x-text="logTotal"></span> entries
12
- </div>
13
- <button class="btn btn-xs btn-ghost text-gray-400 hover:text-white" @click="clearLogs()" title="Clear logs">
14
- <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
15
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
16
- </svg>
17
- </button>
18
- </div>
19
- </div>
20
-
21
- <div class="view-card !p-0 flex flex-col flex-1 min-h-0">
22
- <div class="bg-space-900 flex items-center p-2 px-4 border-b border-space-border gap-4">
23
- <div class="flex gap-2">
24
- <div class="w-3 h-3 rounded-full bg-red-500/20 border border-red-500/50"></div>
25
- <div class="w-3 h-3 rounded-full bg-yellow-500/20 border border-yellow-500/50"></div>
26
- <div class="w-3 h-3 rounded-full bg-green-500/20 border border-green-500/50"></div>
27
- </div>
28
- <span class="text-xs font-mono text-gray-500 hidden sm:inline-block">~/logs</span>
29
-
30
- <div class="flex-1 flex items-center justify-center gap-4">
31
- <div class="relative w-full max-w-xs">
32
- <input type="text" x-model="logSearchQuery" placeholder="Search logs..."
33
- class="w-full h-7 bg-space-950 border border-space-border rounded text-xs font-mono pl-7 pr-2 focus:border-neon-purple focus:outline-none transition-colors placeholder-gray-700 text-gray-300">
34
- <svg class="w-3 h-3 absolute left-2.5 top-2 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
35
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
36
- </svg>
37
- </div>
38
-
39
- <div class="hidden md:flex gap-3 text-[10px] font-mono font-bold uppercase select-none">
40
- <label class="flex items-center gap-1.5 cursor-pointer text-blue-400 opacity-50 hover:opacity-100 transition-opacity" :class="{'opacity-100': logFilters.INFO}">
41
- <input type="checkbox" class="checkbox checkbox-xs rounded-[2px] w-3 h-3" x-model="logFilters.INFO"> INFO
42
- </label>
43
- <label class="flex items-center gap-1.5 cursor-pointer text-green-400 opacity-50 hover:opacity-100 transition-opacity" :class="{'opacity-100': logFilters.SUCCESS}">
44
- <input type="checkbox" class="checkbox checkbox-xs rounded-[2px] w-3 h-3" x-model="logFilters.SUCCESS"> SUCCESS
45
- </label>
46
- <label class="flex items-center gap-1.5 cursor-pointer text-yellow-400 opacity-50 hover:opacity-100 transition-opacity" :class="{'opacity-100': logFilters.WARN}">
47
- <input type="checkbox" class="checkbox checkbox-xs rounded-[2px] w-3 h-3" x-model="logFilters.WARN"> WARN
48
- </label>
49
- <label class="flex items-center gap-1.5 cursor-pointer text-red-500 opacity-50 hover:opacity-100 transition-opacity" :class="{'opacity-100': logFilters.ERROR}">
50
- <input type="checkbox" class="checkbox checkbox-xs rounded-[2px] w-3 h-3" x-model="logFilters.ERROR"> ERROR
51
- </label>
52
- </div>
53
- </div>
54
- </div>
55
-
56
- <div id="logs-container" class="flex-1 overflow-auto p-4 font-mono text-[11px] leading-relaxed bg-space-950 custom-scrollbar">
57
- <template x-for="(log, idx) in filteredLogs" :key="`${log.timestamp}-${idx}`">
58
- <div class="flex gap-3 px-2 py-1 -mx-2 hover:bg-white/[0.03] transition-colors group border-b border-space-border/10">
59
- <span class="text-zinc-600 w-16 shrink-0 select-none group-hover:text-zinc-500 transition-colors"
60
- x-text="new Date(log.timestamp).toLocaleTimeString([], {hour12:false})"></span>
61
- <div class="w-16 shrink-0 flex items-center">
62
- <span class="px-1.5 py-0.5 rounded-[2px] text-[10px] font-bold uppercase tracking-wider leading-none border"
63
- :class="{
64
- 'bg-blue-500/10 text-blue-400 border-blue-500/20': log.level === 'INFO',
65
- 'bg-yellow-500/10 text-yellow-400 border-yellow-500/20': log.level === 'WARN',
66
- 'bg-red-500/10 text-red-500 border-red-500/20': log.level === 'ERROR',
67
- 'bg-emerald-500/10 text-emerald-400 border-emerald-500/20': log.level === 'SUCCESS',
68
- 'bg-purple-500/10 text-purple-400 border-purple-500/20': log.level === 'DEBUG'
69
- }" x-text="log.level"></span>
70
- </div>
71
- <div class="flex-1 flex flex-col gap-0.5 min-w-0">
72
- <span class="text-zinc-200 break-all group-hover:text-white transition-colors"
73
- x-text="formatLogMessage(log.message)"></span>
74
- <template x-if="getLogDetails(log.message)">
75
- <div class="flex flex-wrap gap-2 text-[10px] text-zinc-500 mt-0.5">
76
- <template x-for="(detail, key) in getLogDetails(log.message)" :key="key">
77
- <span class="px-1.5 py-0.5 bg-space-800/50 rounded border border-space-border/30">
78
- <span class="text-zinc-600" x-text="key"></span>=<span class="text-zinc-400" x-text="detail"></span>
79
- </span>
80
- </template>
81
- </div>
82
- </template>
83
- </div>
84
- </div>
85
- </template>
86
- <div class="h-3 w-1.5 bg-zinc-600 animate-pulse mt-1 inline-block" x-show="logPage === 1 && filteredLogs.length === logs.length && !logSearchQuery"></div>
87
- <div x-show="filteredLogs.length === 0 && logs.length > 0" class="text-zinc-700 italic mt-8 text-center">
88
- No logs match filter
89
- </div>
90
- </div>
91
- <div class="flex items-center justify-between gap-3 px-4 py-3 border-t border-space-border bg-space-900/60 text-xs font-mono">
92
- <span class="text-gray-500" x-text="logTotalPages ? `Page ${logPage} of ${logTotalPages} · 30 per page` : 'No logs' "></span>
93
- <div class="flex items-center gap-2">
94
- <button class="btn btn-xs btn-ghost" :disabled="logPage <= 1 || logLoading" @click="changeLogPage(logPage - 1)">Previous</button>
95
- <button class="btn btn-xs btn-ghost" :disabled="logPage >= logTotalPages || logLoading" @click="changeLogPage(logPage + 1)">Next</button>
96
- </div>
97
- </div>
98
- </div>
99
- </div>