docs: update README with desktop requirements, helper builds, and realistic MVP usage notes
Expand README with desktop platform requirements (Windows x86, macOS ARM), helper build commands, gateway utility scripts, and updated local test flow. Add realistic MVP usage section clarifying current platform build status, gateway configuration needs, and admin debug profile behavior with client private key handling.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { FormEvent, useState } from "react";
|
||||
import { FormEvent, useEffect, useState } from "react";
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
|
||||
type EnrollmentState = {
|
||||
@@ -6,6 +6,9 @@ type EnrollmentState = {
|
||||
resources: string[];
|
||||
profileRevision: number;
|
||||
gatewayEndpoint: string;
|
||||
profilePath: string;
|
||||
lastSyncTime: string;
|
||||
tunnelStrategy: string;
|
||||
};
|
||||
|
||||
export function App() {
|
||||
@@ -17,6 +20,16 @@ export function App() {
|
||||
const [connected, setConnected] = useState(false);
|
||||
const [state, setState] = useState<EnrollmentState | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
void invoke<EnrollmentState | null>("load_state")
|
||||
.then((value) => {
|
||||
if (value) {
|
||||
setState(value);
|
||||
}
|
||||
})
|
||||
.catch(() => undefined);
|
||||
}, []);
|
||||
|
||||
async function onSubmit(event: FormEvent) {
|
||||
event.preventDefault();
|
||||
setLoading(true);
|
||||
@@ -36,8 +49,13 @@ export function App() {
|
||||
|
||||
async function toggleConnection() {
|
||||
const command = connected ? "disconnect_tunnel" : "connect_tunnel";
|
||||
await invoke(command);
|
||||
setConnected((value) => !value);
|
||||
try {
|
||||
await invoke(command);
|
||||
setConnected((value) => !value);
|
||||
setError(null);
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : "Tunnel action failed");
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -91,7 +109,22 @@ export function App() {
|
||||
<span>Profile revision</span>
|
||||
<strong>{state.profileRevision}</strong>
|
||||
</div>
|
||||
<div>
|
||||
<span>Last sync</span>
|
||||
<strong>{state.lastSyncTime}</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div className="details">
|
||||
<div>
|
||||
<span>Profile path</span>
|
||||
<strong>{state.profilePath}</strong>
|
||||
</div>
|
||||
<div>
|
||||
<span>Tunnel strategy</span>
|
||||
<strong>{state.tunnelStrategy}</strong>
|
||||
</div>
|
||||
</div>
|
||||
{error ? <div className="error">{error}</div> : null}
|
||||
<div>
|
||||
<p className="eyebrow">Allowed resources</p>
|
||||
<ul className="resource-list">
|
||||
|
||||
Reference in New Issue
Block a user