admin page cleanup
This commit is contained in:
parent
45f79148c2
commit
c91fb5ae92
8 changed files with 15 additions and 60 deletions
|
|
@ -392,6 +392,7 @@ WHERE NOT u.is_bot
|
|||
OR lower((u.username)::text) LIKE $3
|
||||
OR p.username_lower = $4
|
||||
OR lower(TRIM(BOTH FROM ((u.first_name)::text || ' '::text || (u.last_name)::text))) LIKE $3
|
||||
OR lower(COALESCE(ap.login_email, '')) LIKE $3
|
||||
)
|
||||
AND ($5::bigint = 0 OR (COALESCE(a.last_active_at, '0001-01-01 00:00:00+00'::timestamptz), u.id) < (to_timestamp(($5::double precision) / 1000000.0), $6::bigint))
|
||||
ORDER BY COALESCE(a.last_active_at, '0001-01-01 00:00:00+00'::timestamptz) DESC, u.id DESC
|
||||
|
|
|
|||
10
cmd/telesrv-admin/web/dist/assets/index-COMz6S13.js
vendored
Normal file
10
cmd/telesrv-admin/web/dist/assets/index-COMz6S13.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
cmd/telesrv-admin/web/dist/index.html
vendored
2
cmd/telesrv-admin/web/dist/index.html
vendored
|
|
@ -23,7 +23,7 @@
|
|||
})();
|
||||
</script>
|
||||
|
||||
<script type="module" crossorigin src="/assets/index-CmjlUwWc.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-COMz6S13.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-EkAGiEK9.css">
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ import {
|
|||
LayoutDashboard,
|
||||
LogOut,
|
||||
MessageSquareText,
|
||||
Server,
|
||||
Shield,
|
||||
ShieldAlert,
|
||||
ShieldCheck,
|
||||
Smile,
|
||||
|
|
@ -22,7 +20,7 @@ import {
|
|||
import { useEffect, useState, type ReactNode } from "react";
|
||||
import { api } from "../api";
|
||||
import { permissionBotVerificationReview, permissionVerificationReview, useCan } from "../permissions";
|
||||
import { type Navigate, type RouteState, routeSubtitle, routeTitle } from "../routing";
|
||||
import { type Navigate, type RouteState, routeTitle } from "../routing";
|
||||
import { ThemeSwitch } from "../theme";
|
||||
import { AppLink } from "./AppLink";
|
||||
|
||||
|
|
@ -137,17 +135,10 @@ export function Shell({
|
|||
)}
|
||||
</div>
|
||||
</nav>
|
||||
<div className="sidebar-status">
|
||||
<div className="sidebar-label">{"Runtime"}</div>
|
||||
<div className="runtime-row"><Server size={14} /><span>{"Admin backend"}</span><strong>{"Ready"}</strong></div>
|
||||
<div className="runtime-row"><Database size={14} /><span>{"PG read"}</span><strong>{"Read-only"}</strong></div>
|
||||
<div className="runtime-row"><Shield size={14} /><span>{"Write operations"}</span><strong>{"Dry-run"}</strong></div>
|
||||
</div>
|
||||
</aside>
|
||||
<div className="workspace">
|
||||
<header className="topbar">
|
||||
<div>
|
||||
<div className="eyebrow">{routeSubtitle(route.path)}</div>
|
||||
<h1>{routeTitle(route.path)}</h1>
|
||||
</div>
|
||||
<div className="topbar-actions">
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ export function AccountsPage({ navigate }: { navigate: Navigate }) {
|
|||
<form className="toolbar" onSubmit={(event) => { event.preventDefault(); void loadFresh(); }}>
|
||||
<label className="searchbox">
|
||||
<Search size={15} />
|
||||
<input value={q} onChange={(event) => setQ(event.target.value)} placeholder={"User ID / phone / username"} />
|
||||
<input value={q} onChange={(event) => setQ(event.target.value)} placeholder={"User ID / phone / username / email / name"} />
|
||||
</label>
|
||||
<label className="gift-page-size">
|
||||
<span>{"Limit"}</span>
|
||||
|
|
|
|||
|
|
@ -1,34 +1,16 @@
|
|||
import { CheckCircle2, ChevronRight, Clock3, FileJson, KeyRound, MessageSquareText, ShieldCheck, Users } from "lucide-react";
|
||||
import { ChevronRight, MessageSquareText, ShieldCheck, Users } from "lucide-react";
|
||||
import type { ReactNode } from "react";
|
||||
import { AppLink } from "../components/AppLink";
|
||||
import { StatusItem } from "../components/ui";
|
||||
import type { Navigate } from "../routing";
|
||||
|
||||
export function Dashboard({ navigate }: { navigate: Navigate }) {
|
||||
return (
|
||||
<div className="dashboard-layout">
|
||||
<section className="overview-band">
|
||||
<div>
|
||||
<div className="eyebrow">{"Runtime Overview"}</div>
|
||||
<h2>{"Console Overview"}</h2>
|
||||
</div>
|
||||
<div className="overview-metrics">
|
||||
<StatusItem label={"Read path"} value={"PG read-only"} tone="neutral" />
|
||||
<StatusItem label={"Write path"} value="Admin API" tone="good" />
|
||||
<StatusItem label={"Execution policy"} value={"Dry-run first"} tone="warn" />
|
||||
</div>
|
||||
</section>
|
||||
<div className="command-grid">
|
||||
<Launcher icon={<Users />} title={"Accounts"} text={"Account status, premium, verification, sessions."} href="/accounts" navigate={navigate} />
|
||||
<Launcher icon={<ShieldCheck />} title={"Supergroups and Channels"} text={"Public entities, member counts, verification state."} href="/channels" navigate={navigate} />
|
||||
<Launcher icon={<MessageSquareText />} title={"Message Audit"} text={"Message boxes, updates, outbox state."} href="/messages" navigate={navigate} />
|
||||
</div>
|
||||
<section className="work-strip">
|
||||
<div className="strip-item"><CheckCircle2 size={16} /><span>{"All dangerous actions start with dry-run"}</span></div>
|
||||
<div className="strip-item"><KeyRound size={16} /><span>{"Browser never stores internal tokens"}</span></div>
|
||||
<div className="strip-item"><Clock3 size={16} /><span>{"Lists use cursor pagination"}</span></div>
|
||||
<div className="strip-item"><FileJson size={16} /><span>{"Detail pages retain raw state snapshots"}</span></div>
|
||||
</section>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,22 +34,3 @@ export function routeTitle(pathname: string): string {
|
|||
if (pathname.startsWith("/emoji")) return "Emoji";
|
||||
return "Operations Console";
|
||||
}
|
||||
|
||||
export function routeSubtitle(pathname: string): string {
|
||||
if (pathname.startsWith("/bot-verification")) return "Console / Third-party verification";
|
||||
if (pathname.startsWith("/verification")) return "Console / Verification";
|
||||
if (pathname.startsWith("/collectible-usernames")) return "Console / Collectible usernames";
|
||||
if (pathname.startsWith("/account-ratings")) return "Console / Account rating";
|
||||
if (pathname.startsWith("/storage")) return "Console / Storage";
|
||||
if (pathname.startsWith("/accounts")) return "Console / Accounts";
|
||||
if (pathname.startsWith("/channels")) return "Console / Channels";
|
||||
if (pathname.startsWith("/bots")) return "Console / Bots";
|
||||
if (pathname.startsWith("/moderation")) return "Console / Moderation";
|
||||
if (pathname.startsWith("/emoji")) return "Console / Emoji";
|
||||
if (pathname.startsWith("/messages")) return "Console / Messages";
|
||||
if (pathname.startsWith("/give-gifts")) return "Console / Give Gifts";
|
||||
if (pathname.startsWith("/gifts")) return "Console / Star Gifts";
|
||||
if (pathname.startsWith("/stickers")) return "Console / Stickers";
|
||||
if (pathname.startsWith("/emoji")) return "Console / Emoji";
|
||||
return "Console / Overview";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue