fix(ui): trim view prose, en dash placeholders, collapse fixed grids on phones
Drop empty-state essays that repeated their titles, the harness native select becomes the Select component, and the binding and source forms collapse to one column below sm. Issue-ID and history narration removed from comments.
This commit is contained in:
1 parent
f1b33eb6f9
commit
686da8be4d
16 files changed
+58
-63
No files matched your search
@@ -1,5 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
import { NativeSelect, NativeSelectOption } from "@/components/ui/native-select";
|
||||
/**
|
||||
* Harness: the OAuth credential bindings a Kit profile resolves, and the
|
||||
* setup terminal that captures a binding's tokens
|
||||
@@ -18,10 +17,18 @@ import { Button } from "@/components/ui/button";
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import {
|
||||
Empty,
|
||||
EmptyDescription,
|
||||
EmptyHeader,
|
||||
EmptyTitle,
|
||||
} from "@/components/ui/empty";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectGroup,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@/components/ui/select";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
import {
|
||||
Table,
|
||||
@@ -93,13 +100,13 @@ function openTerminal(): void {
|
||||
}
|
||||
|
||||
function formatTimestamp(value?: string): string {
|
||||
if (!value) return "—";
|
||||
if (!value) return "–";
|
||||
const at = new Date(value);
|
||||
return Number.isNaN(at.getTime()) ? value : at.toLocaleString();
|
||||
}
|
||||
|
||||
function scopes(binding: HarnessBinding): string {
|
||||
return binding.scopes?.length ? binding.scopes.join(", ") : "—";
|
||||
return binding.scopes?.length ? binding.scopes.join(", ") : "–";
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -107,11 +114,12 @@ function scopes(binding: HarnessBinding): string {
|
||||
<div>
|
||||
<PageHeader title="Harness" />
|
||||
|
||||
<p v-if="failure" class="mb-4 text-sm text-danger" role="alert">
|
||||
{{ failure }}
|
||||
</p>
|
||||
<Alert v-if="failure" variant="destructive" class="mb-4">
|
||||
<AlertTitle>Could not load the harness</AlertTitle>
|
||||
<AlertDescription>{{ failure }}</AlertDescription>
|
||||
</Alert>
|
||||
|
||||
<div v-if="loading" class="space-y-2">
|
||||
<div v-if="loading" class="flex flex-col gap-2">
|
||||
<Skeleton class="h-24 w-full" />
|
||||
<Skeleton class="h-40 w-full" />
|
||||
</div>
|
||||
@@ -119,32 +127,32 @@ function scopes(binding: HarnessBinding): string {
|
||||
<Empty v-else-if="unconfigured">
|
||||
<EmptyHeader>
|
||||
<EmptyTitle>Harness bindings are not configured</EmptyTitle>
|
||||
<EmptyDescription>Credential bindings and OAuth tokens unavailable.</EmptyDescription>
|
||||
</EmptyHeader>
|
||||
</Empty>
|
||||
|
||||
<template v-else-if="state">
|
||||
<Alert v-if="!state.terminal" class="mb-4">
|
||||
<AlertTitle>Setup terminal unavailable</AlertTitle>
|
||||
<AlertDescription>Start the daemon with a container runtime and a harness token to log in to a
|
||||
CLI from here. Bindings are still listed below.</AlertDescription>
|
||||
<AlertDescription>Start the daemon with a container runtime and a harness token to log in to a CLI from here.</AlertDescription>
|
||||
</Alert>
|
||||
|
||||
<Card v-else class="mb-4">
|
||||
<CardContent class="flex flex-wrap items-end gap-3">
|
||||
<label class="flex flex-col gap-1 text-sm">
|
||||
<span class="text-muted-foreground">Profile</span>
|
||||
<NativeSelect
|
||||
size="sm"
|
||||
v-model="profile" class="min-w-48"
|
||||
:disabled="!state.profiles.length"
|
||||
>
|
||||
<NativeSelectOption v-if="!state.profiles.length" value="">No profiles configured</NativeSelectOption>
|
||||
<NativeSelectOption v-for="name in state.profiles" :key="name" :value="name">
|
||||
{{ name }}
|
||||
</NativeSelectOption>
|
||||
</NativeSelect>
|
||||
</label>
|
||||
<div class="flex flex-col gap-1 text-sm">
|
||||
<Label for="harness-profile" class="text-muted-foreground">Profile</Label>
|
||||
<Select v-model="profile" :disabled="!state.profiles.length">
|
||||
<SelectTrigger id="harness-profile" size="sm" class="min-w-48">
|
||||
<SelectValue placeholder="No profiles configured" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectGroup>
|
||||
<SelectItem v-for="name in state.profiles" :key="name" :value="name">
|
||||
{{ name }}
|
||||
</SelectItem>
|
||||
</SelectGroup>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
<Button :disabled="!profile" @click="openTerminal">Open setup terminal</Button>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
Reference in new issue
Block a user