style(services): apply formatter to frontend services runtime

This commit is contained in:
Developer
2026-06-22 19:13:59 +00:00
parent 1da67f38c7
commit 739ad38e29
13 changed files with 177 additions and 61 deletions
+18 -11
View File
@@ -31,7 +31,9 @@ function Field({
<div className="flex flex-col gap-1.5">
<Label htmlFor={htmlFor}>{label}</Label>
{children}
{helper ? <p className="text-xs text-muted-foreground">{helper}</p> : null}
{helper ? (
<p className="text-xs text-muted-foreground">{helper}</p>
) : null}
</div>
);
}
@@ -66,9 +68,7 @@ export function ServicePage() {
if (!binding) {
return (
<Alert>
<AlertDescription>
Unknown service type: {serviceType}
</AlertDescription>
<AlertDescription>Unknown service type: {serviceType}</AlertDescription>
</Alert>
);
}
@@ -127,10 +127,7 @@ export function ServicePage() {
<Button onClick={save} disabled={saveService.isPending}>
Save
</Button>
<Button
variant="destructive"
onClick={() => setDeleteOpen(true)}
>
<Button variant="destructive" onClick={() => setDeleteOpen(true)}>
Delete
</Button>
</div>
@@ -140,7 +137,10 @@ export function ServicePage() {
<ServiceSecretsCard instance={instance} />
{binding.widgets.length > 0 ? (
<SectionCard title="Widgets" description="Widget kinds this service provides.">
<SectionCard
title="Widgets"
description="Widget kinds this service provides."
>
<div className="flex flex-col gap-2">
{binding.widgets.map((w) => (
<div
@@ -208,14 +208,21 @@ function ServiceSecretsCard({ instance }: { instance: ServiceInstance }) {
<div className="flex flex-col gap-3">
{Object.entries(instance.secrets_set).map(([key, isSet]) => (
<div key={key} className="flex flex-col gap-1.5">
<Field label={key} htmlFor={`secret-${key}`} helper="Leave blank to keep the current value.">
<Field
label={key}
htmlFor={`secret-${key}`}
helper="Leave blank to keep the current value."
>
<Input
id={`secret-${key}`}
type="password"
placeholder={isSet ? "•••••• (set)" : "Not set"}
value={draftSecrets[key] ?? ""}
onChange={(e) =>
setDraftSecrets({ ...draftSecrets, [key]: e.target.value })
setDraftSecrets({
...draftSecrets,
[key]: e.target.value,
})
}
/>
</Field>