Этот коммит содержится в:
Виктор
2026-05-08 17:31:29 +09:00
родитель 9943376645
Коммит 3e956e5c2a
+9 -9
Просмотреть файл
@@ -3,7 +3,7 @@ import { createRoot } from 'react-dom/client';
import { RefreshCw, Server, ShieldCheck, Wifi } from 'lucide-react';
import './styles.css';
const API_URL = import.meta.env.VITE_API_URL || 'http://localhost:3000';
const API_URL = import.meta.env.VITE_API_URL || 'https://api.stackworks.ru';
function App() {
const [health, setHealth] = useState(null);
@@ -12,7 +12,7 @@ function App() {
async function checkHealth() {
setLoading(true);
try {
const response = await fetch(`${API_URL}/health`);
const response = await fetch(API_URL + '/health');
setHealth(await response.json());
} catch (error) {
setHealth({ ok: false, error: error.message });
@@ -29,13 +29,13 @@ function App() {
<main className="page">
<section className="hero">
<div>
<p className="eyebrow">Raspi Telegram Live Chat</p>
<h1>Админка управления чатом</h1>
<p className="lead">MVP-каркас: backend на Raspberry Pi, фронт на VPS/FastPanel, операторы в Telegram.</p>
<p className="eyebrow">WSChat</p>
<h1>Admin panel</h1>
<p className="lead">VPS backend, website widget, Telegram operators.</p>
</div>
<button className="button" onClick={checkHealth} disabled={loading}>
<RefreshCw size={18} />
{loading ? 'Проверяю...' : 'Проверить API'}
{loading ? 'Checking...' : 'Check API'}
</button>
</section>
@@ -50,13 +50,13 @@ function App() {
<article className="card">
<ShieldCheck />
<h2>FastPanel-safe deploy</h2>
<p>Деплой будет обновлять только static-файлы admin/widget внутри разрешённых webroot-директорий.</p>
<p>Deploy updates only widget/admin static files inside the configured webroot.</p>
</article>
<article className="card">
<Wifi />
<h2>SOCKS5 для Telegram</h2>
<p>Настройки proxy заложены в backend config и будут вынесены в админку отдельным разделом.</p>
<h2>Telegram SOCKS5</h2>
<p>Proxy settings are already supported by backend config and will be moved into admin settings.</p>
</article>
</section>
</main>