-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
867 additions
and
531 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,5 +24,6 @@ | |
"@types/react-dom": "^19", | ||
"typescript": "^5", | ||
"unenv": "npm:@jogit/tmp-unenv" | ||
} | ||
}, | ||
"packageManager": "[email protected]+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,50 @@ | ||
<!doctype html> | ||
<html lang="en" class="dark"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<head> | ||
<script src="https://unpkg.com/react-scan/dist/auto.global.js"></script> | ||
|
||
<meta property="description" content="A unified platform to manage your game servers & backend." /> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
|
||
<meta property="og:url" content="https://rivet.gg/" /> | ||
<meta property="og:image" content="https://rivet.gg/promo/og.png"> | ||
<meta property="og:image:alt" content="Rivet promotional banner"> | ||
<meta property="og:image:type" content="image/png"> | ||
<meta property="og:type" content="website" /> | ||
<meta property="description" content="A unified platform to manage your game servers & backend." /> | ||
|
||
<meta name="twitter:card" content="summary_large_image" /> | ||
<meta name="twitter:site" content="@rivetgg" /> | ||
<meta name="twitter:title" content="Rivet" /> | ||
<meta name="twitter:description" content="A unified platform to manage your game servers & backend."> | ||
<meta name="twitter:image" content="https://rivet.gg/promo/og.png"> | ||
<meta name="twitter:image:alt" content="Rivet promotional banner"> | ||
<meta property="og:url" content="https://rivet.gg/" /> | ||
<meta property="og:image" content="https://rivet.gg/promo/og.png" /> | ||
<meta property="og:image:alt" content="Rivet promotional banner" /> | ||
<meta property="og:image:type" content="image/png" /> | ||
<meta property="og:type" content="website" /> | ||
|
||
<title>Rivet</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<meta name="twitter:card" content="summary_large_image" /> | ||
<meta name="twitter:site" content="@rivetgg" /> | ||
<meta name="twitter:title" content="Rivet" /> | ||
<meta | ||
name="twitter:description" | ||
content="A unified platform to manage your game servers & backend." | ||
/> | ||
<meta name="twitter:image" content="https://rivet.gg/promo/og.png" /> | ||
<meta name="twitter:image:alt" content="Rivet promotional banner" /> | ||
|
||
<script type="application/json" id="RIVET_CONFIG"> | ||
{ | ||
"apiUrl": "%VITE_APP_API_URL%", | ||
"assetsUrl": "%VITE_APP_ASSETS_URL%", | ||
"sentryDsn": "%VITE_APP_SENTRY_DSN%", | ||
"sentry": { | ||
"dsn": "%VITE_APP_SENTRY_DSN%", | ||
"projectId": "%VITE_APP_SENTRY_PROJECT_ID%" | ||
}, | ||
"posthog": { | ||
"apiKey": "%VITE_APP_POSTHOG_API_KEY%", | ||
"apiHost": "%VITE_APP_POSTHOG_HOST%" | ||
}, | ||
"outerbaseProviderToken": "%VITE_APP_OUTERBASE_PROVIDER_TOKEN%" | ||
} | ||
</script> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
<title>Rivet</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
|
||
<script type="application/json" id="RIVET_CONFIG"> | ||
{ | ||
"apiUrl": "%VITE_APP_API_URL%", | ||
"assetsUrl": "%VITE_APP_ASSETS_URL%", | ||
"sentryDsn": "%VITE_APP_SENTRY_DSN%", | ||
"sentry": { | ||
"dsn": "%VITE_APP_SENTRY_DSN%", | ||
"projectId": "%VITE_APP_SENTRY_PROJECT_ID%" | ||
}, | ||
"posthog": { | ||
"apiKey": "%VITE_APP_POSTHOG_API_KEY%", | ||
"apiHost": "%VITE_APP_POSTHOG_HOST%" | ||
}, | ||
"outerbaseProviderToken": "%VITE_APP_OUTERBASE_PROVIDER_TOKEN%" | ||
} | ||
</script> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
frontend/apps/hub/src/domains/project/components/actors/actor-build.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { useSuspenseQuery } from "@tanstack/react-query"; | ||
import { actorBuildQueryOptions } from "../../queries"; | ||
import { useId } from "react"; | ||
import { Dt, Dd, Dl, WithTooltip, CopyButton } from "@rivet-gg/components"; | ||
import { ActorTags } from "./actor-tags"; | ||
|
||
interface ActorBuildProps { | ||
projectNameId: string; | ||
environmentNameId: string; | ||
buildId: string; | ||
} | ||
|
||
export function ActorBuild({ projectNameId, environmentNameId, buildId }: ActorBuildProps) { | ||
const { data } = useSuspenseQuery( | ||
actorBuildQueryOptions({ | ||
projectNameId, | ||
environmentNameId, | ||
buildId, | ||
}), | ||
); | ||
|
||
const id = useId(); | ||
|
||
return ( | ||
<div className="border mt-2 px-4 py-4 rounded-md relative col-span-2"> | ||
<p | ||
id={id} | ||
className="inline-block bg-card w-auto absolute -top-0 left-3 font-semibold px-0.5 -translate-y-1/2" | ||
> | ||
Build | ||
</p> | ||
<div aria-describedby={id}> | ||
<Dl> | ||
<Dt>Id</Dt> | ||
<Dd> | ||
<WithTooltip | ||
content={data.id} | ||
trigger={ | ||
<CopyButton value={data.id}> | ||
<button type="button">{data.id.split("-")[0]}</button> | ||
</CopyButton> | ||
} | ||
/> | ||
</Dd> | ||
<Dt>Created At</Dt> | ||
<Dd>{data.createdAt.toLocaleString()}</Dd> | ||
<Dt>Tags</Dt> | ||
<Dd>{Object.keys(data.tags).length > 0 ? <ActorTags tags={data.tags} /> : "None"}</Dd> | ||
</Dl> | ||
</div> | ||
</div> | ||
); | ||
} |
14 changes: 14 additions & 0 deletions
14
frontend/apps/hub/src/domains/project/components/actors/actor-config-tab.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { ScrollArea } from "@rivet-gg/components"; | ||
import { ActorNetwork, ActorNetworkProps } from "./actor-network"; | ||
import { ActorRuntime, ActorRuntimeProps } from "./actor-runtime"; | ||
|
||
interface ActorConfigTabProps extends ActorRuntimeProps, ActorNetworkProps {} | ||
|
||
export function ActorConfigTab(props: ActorConfigTabProps) { | ||
return ( | ||
<ScrollArea className="overflow-auto h-full px-4 my-2"> | ||
<ActorNetwork {...props} /> | ||
<ActorRuntime {...props} /> | ||
</ScrollArea> | ||
); | ||
} |
81 changes: 0 additions & 81 deletions
81
frontend/apps/hub/src/domains/project/components/actors/actor-network-tab.tsx
This file was deleted.
Oops, something went wrong.
64 changes: 64 additions & 0 deletions
64
frontend/apps/hub/src/domains/project/components/actors/actor-network.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import type { Rivet } from "@rivet-gg/api"; | ||
import { Badge, Dd, Dl, Dt, SmallText } from "@rivet-gg/components"; | ||
import { Fragment } from "react"; | ||
|
||
export interface ActorNetworkProps extends Pick<Rivet.actor.Actor, "network"> {} | ||
|
||
const NETWORK_MODE_LABELS: Record<Rivet.actor.NetworkMode, string> = { | ||
bridge: "Bridge", | ||
host: "Host", | ||
}; | ||
|
||
export function ActorNetwork({ network }: ActorNetworkProps) { | ||
return ( | ||
<> | ||
<div className="border mt-4 px-4 py-4 rounded-md relative"> | ||
<p className="inline-block bg-card w-auto absolute -top-0 left-3 font-semibold px-0.5 -translate-y-1/2"> | ||
Network{" "} | ||
<Badge variant="secondary" className="ml-1"> | ||
{NETWORK_MODE_LABELS[network.mode]} | ||
</Badge> | ||
</p> | ||
<div className="text-xs"> | ||
{Object.keys(network.ports || {}).length === 0 ? ( | ||
<SmallText>No ports configured</SmallText> | ||
) : ( | ||
Object.entries(network.ports).map(([name, config]) => ( | ||
<Fragment key={name}> | ||
<div className="border p-2 rounded-md mt-4 relative"> | ||
<div className="inline-block bg-card w-auto absolute -top-0 left-3 font-semibold px-0.5 -translate-y-1/2"> | ||
{name}{" "} | ||
{config.routing.guard ? ( | ||
<Badge variant="outline" className="ml-1 text-xs"> | ||
Guard | ||
</Badge> | ||
) : null} | ||
{config.routing.host ? ( | ||
<Badge variant="outline" className="ml-1 text-xs"> | ||
Host | ||
</Badge> | ||
) : null} | ||
</div> | ||
<div className="border-t border-card mt-3 mb-1"> | ||
<Dl className="ml-2"> | ||
<Dt>Internal port</Dt> | ||
<Dd>{config.internalPort || "-"}</Dd> | ||
<Dt>Protocol</Dt> | ||
<Dd>{config.protocol}</Dd> | ||
<Dt>Hostname</Dt> | ||
<Dd>{config.hostname || "-"}</Dd> | ||
<Dt>Path</Dt> | ||
<Dd>{config.path || "-"}</Dd> | ||
<Dt>Port</Dt> | ||
<Dd>{config.port || "-"}</Dd> | ||
</Dl> | ||
</div> | ||
</div> | ||
</Fragment> | ||
)) | ||
)} | ||
</div> | ||
</div> | ||
</> | ||
); | ||
} |
Oops, something went wrong.