Fix admin API default URL
Этот коммит содержится в:
@@ -3,7 +3,7 @@ import { createRoot } from 'react-dom/client';
|
|||||||
import { RefreshCw, Server, ShieldCheck, Wifi } from 'lucide-react';
|
import { RefreshCw, Server, ShieldCheck, Wifi } from 'lucide-react';
|
||||||
import './styles.css';
|
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() {
|
function App() {
|
||||||
const [health, setHealth] = useState(null);
|
const [health, setHealth] = useState(null);
|
||||||
@@ -12,7 +12,7 @@ function App() {
|
|||||||
async function checkHealth() {
|
async function checkHealth() {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${API_URL}/health`);
|
const response = await fetch(API_URL + '/health');
|
||||||
setHealth(await response.json());
|
setHealth(await response.json());
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setHealth({ ok: false, error: error.message });
|
setHealth({ ok: false, error: error.message });
|
||||||
@@ -29,13 +29,13 @@ function App() {
|
|||||||
<main className="page">
|
<main className="page">
|
||||||
<section className="hero">
|
<section className="hero">
|
||||||
<div>
|
<div>
|
||||||
<p className="eyebrow">Raspi Telegram Live Chat</p>
|
<p className="eyebrow">WSChat</p>
|
||||||
<h1>Админка управления чатом</h1>
|
<h1>Admin panel</h1>
|
||||||
<p className="lead">MVP-каркас: backend на Raspberry Pi, фронт на VPS/FastPanel, операторы в Telegram.</p>
|
<p className="lead">VPS backend, website widget, Telegram operators.</p>
|
||||||
</div>
|
</div>
|
||||||
<button className="button" onClick={checkHealth} disabled={loading}>
|
<button className="button" onClick={checkHealth} disabled={loading}>
|
||||||
<RefreshCw size={18} />
|
<RefreshCw size={18} />
|
||||||
{loading ? 'Проверяю...' : 'Проверить API'}
|
{loading ? 'Checking...' : 'Check API'}
|
||||||
</button>
|
</button>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -50,13 +50,13 @@ function App() {
|
|||||||
<article className="card">
|
<article className="card">
|
||||||
<ShieldCheck />
|
<ShieldCheck />
|
||||||
<h2>FastPanel-safe deploy</h2>
|
<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>
|
||||||
|
|
||||||
<article className="card">
|
<article className="card">
|
||||||
<Wifi />
|
<Wifi />
|
||||||
<h2>SOCKS5 для Telegram</h2>
|
<h2>Telegram SOCKS5</h2>
|
||||||
<p>Настройки proxy заложены в backend config и будут вынесены в админку отдельным разделом.</p>
|
<p>Proxy settings are already supported by backend config and will be moved into admin settings.</p>
|
||||||
</article>
|
</article>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user