diff --git a/src/admin/public/style.css b/src/admin/public/style.css index 2ceadd1..c7a8399 100644 --- a/src/admin/public/style.css +++ b/src/admin/public/style.css @@ -352,19 +352,47 @@ pre { font-size: 0.8rem; white-space: pre-wrap; word-break: break-all; max-width background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); - padding: 1rem; - max-height: 70vh; - overflow-y: auto; + padding: 0; + position: sticky; + top: 1rem; + max-height: calc(100vh - 2rem); + display: flex; + flex-direction: column; + overflow: hidden; } -.wallet-sidebar h3 { - margin-bottom: 0.75rem; +.wallet-sidebar-header { + padding: 0.75rem 1rem 0.5rem; + border-bottom: 1px solid var(--border); + flex-shrink: 0; +} + +.wallet-sidebar-header h3 { + margin: 0 0 0.5rem 0; +} + +.wallet-search { + width: 100%; + padding: 0.4rem 0.6rem; + border: 1px solid var(--border); + border-radius: var(--radius); + font-size: 0.85rem; + margin: 0; + box-sizing: border-box; +} + +.wallet-search:focus { + outline: none; + border-color: var(--primary); } .wallet-user-list { + flex: 1; + overflow-y: auto; + padding: 0.5rem; display: flex; flex-direction: column; - gap: 0.25rem; + gap: 0.15rem; } .wallet-user-item { diff --git a/src/admin/views/wallets.js b/src/admin/views/wallets.js index 6b1f764..8a33c8c 100644 --- a/src/admin/views/wallets.js +++ b/src/admin/views/wallets.js @@ -21,7 +21,8 @@ export function renderWalletLayout(users, selectedUser, wallets, stats, seedPhra const userListHtml = users.map(u => { const isActive = selectedUser && u.id === selectedUser.id; const statusText = u.status === 0 ? '✅' : '❌'; - return ` + const dataAttr = `data-id="${u.id}" data-name="${escapeHtml((u.username || '').toLowerCase())}" data-tgid="${u.telegram_id}"`; + return ` #${u.id} ${escapeHtml(u.username || u.telegram_id)} ${statusText} ${u.wallet_count}w @@ -170,8 +171,11 @@ export function renderWalletLayout(users, selectedUser, wallets, stats, seedPhra const content = `
${selectedUser ? ` @@ -187,7 +191,23 @@ export function renderWalletLayout(users, selectedUser, wallets, stats, seedPhra ` : '

Select a user to view wallets

'} ${ownerSection}
-
`; + + `; return layout('Wallets', content, 'wallets'); } \ No newline at end of file