good forst commit

This commit is contained in:
2026-06-09 02:02:40 +05:30
parent 801c1d7121
commit 249d759e6a
215 changed files with 15425 additions and 1240 deletions
+41
View File
@@ -0,0 +1,41 @@
import { BotSettingsCard } from './BotSettingsCard';
import { apiFetch } from '../../_lib/api';
interface BotSummary {
id: string;
platform: string;
jid: string | null;
displayName: string | null;
status: 'ACTIVE' | 'DISCONNECTED' | 'BANNED' | 'PAIRING';
isBot: boolean;
createdAt: string;
updatedAt: string;
}
interface BotState {
bot: BotSummary | null;
shared: boolean;
}
export default async function BotSettingsPage() {
let state: BotState = { bot: null, shared: false };
try {
const res = await apiFetch('/admin/bot');
if (res.ok) {
state = (await res.json()) as BotState;
}
} catch {
state = { bot: null, shared: false };
}
return (
<div className="max-w-2xl">
<h1 className="text-xl font-semibold mb-6">Bot Settings</h1>
<p className="text-sm text-gray-600 mb-4">
TOWER runs on a dedicated WhatsApp number. Adding the bot to a group makes it eligible for
claim by any tenant admin. The bot number is hidden from members and the public web.
</p>
<BotSettingsCard initial={state} />
</div>
);
}