first commit

This commit is contained in:
skidoodle 2025-03-14 23:25:41 +01:00
commit 38e6f714cb
No known key found for this signature in database
26 changed files with 1856 additions and 0 deletions

View file

@ -0,0 +1,29 @@
import { Spinner } from '@/components/Spinner';
import ServerInfo from '@/components/ServerInfo';
import Error from '@/components/Error';
export default function Popup() {
const { data, loading, error } = useTabData();
if (loading) {
return (
<div className="flex items-center justify-center h-48 bg-gray-900">
<Spinner className="w-12 h-12 text-purple-500" />
</div>
);
}
if (error) {
return (
<Error error={error} />
);
}
if (!data) {
return (
<Error error="No data found" />
);
}
return <ServerInfo data={data} />;
}

View file

@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>hostinfo</title>
<meta name="manifest.type" content="browser_action" />
</head>
<body>
<div id="root"></div>
<script type="module" src="./main.tsx"></script>
</body>
</html>

View file

@ -0,0 +1,10 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import Popup from '@/entrypoints/popup/Popup';
import '@/assets/tailwind.css';
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<Popup />
</React.StrictMode>,
);