fix(webui): use Tailwind's standard breakpoints everywhere
This commit is contained in:
1 parent
d01a3c4647
commit
73e718dea4
23 files changed
+38
-55
No files matched your search
+2
-2
@@ -64,10 +64,10 @@ onMounted(() => {
|
||||
so the chat launcher has to render outside this element.
|
||||
-->
|
||||
<div
|
||||
class="flex min-h-[calc(100vh-2rem)] flex-col overflow-hidden rounded-xl border border-[var(--hairline)] bg-[var(--workspace)] shadow-[var(--shadow-workspace)] backdrop-blur-[28px] backdrop-saturate-[1.2] max-[900px]:min-h-screen max-[900px]:rounded-none max-[900px]:border-0 max-[900px]:shadow-none"
|
||||
class="flex min-h-[calc(100vh-2rem)] flex-col overflow-hidden rounded-xl border border-[var(--hairline)] bg-[var(--workspace)] shadow-[var(--shadow-workspace)] backdrop-blur-[28px] backdrop-saturate-[1.2] max-lg:min-h-screen max-lg:rounded-none max-lg:border-0 max-lg:shadow-none"
|
||||
>
|
||||
<Topbar :hidden="hidden" />
|
||||
<main class="w-full flex-1 overflow-x-hidden p-8 max-[900px]:p-4">
|
||||
<main class="w-full flex-1 overflow-x-hidden p-8 max-lg:p-4">
|
||||
<Alert v-if="authenticationRequired" variant="destructive" class="mb-4">
|
||||
<AlertTitle>Dashboard authentication required</AlertTitle>
|
||||
<AlertDescription>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { useMediaQuery } from "@vueuse/core";
|
||||
import { breakpointsTailwind, useBreakpoints } from "@vueuse/core";
|
||||
import { computed, ref, watch } from "vue";
|
||||
|
||||
import {
|
||||
@@ -40,7 +40,7 @@ const pane = ref<HTMLElement | null>(null);
|
||||
|
||||
// The pane is in its stacked layout exactly when the grid is: same breakpoint
|
||||
// as CapturesPage, matched there in CSS and here in script.
|
||||
const stacked = useMediaQuery("(max-width: 1099px)");
|
||||
const stacked = useBreakpoints(breakpointsTailwind).smaller("lg");
|
||||
|
||||
const cap = computed(() =>
|
||||
stacked.value || !props.maxHeight ? undefined : `${props.maxHeight}px`,
|
||||
@@ -85,7 +85,7 @@ watch(selected, () => {
|
||||
become a ten-thousand-pixel page. Split, the page's cap is the bound
|
||||
and this one is lifted. -->
|
||||
<CardContent
|
||||
class="min-h-0 max-h-[62vh] overflow-y-auto min-[1100px]:max-h-none"
|
||||
class="min-h-0 max-h-[62vh] overflow-y-auto lg:max-h-none"
|
||||
>
|
||||
<div class="flex flex-col gap-5">
|
||||
<CapturePayload label="Payload" :raw="selected.body" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { useMediaQuery } from "@vueuse/core";
|
||||
import { breakpointsTailwind, useBreakpoints } from "@vueuse/core";
|
||||
import { onBeforeUnmount, onMounted, ref, watch } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
|
||||
@@ -37,7 +37,7 @@ const paneCap = ref<number | null>(null);
|
||||
|
||||
// The same breakpoint the grid states in its classes: one layout decision,
|
||||
// expressed twice because CSS cannot hand it to script.
|
||||
const stacked = useMediaQuery("(max-width: 1099px)");
|
||||
const stacked = useBreakpoints(breakpointsTailwind).smaller("lg");
|
||||
|
||||
// Below the frame: the room left under the pane's own top edge. A margin
|
||||
// rather than a measured padding on purpose -- being a few pixels out costs a
|
||||
@@ -97,7 +97,7 @@ watch(selected, (capture) => {
|
||||
<CaptureStatus />
|
||||
</div>
|
||||
<div
|
||||
class="grid min-w-0 items-start gap-4 min-[1100px]:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]"
|
||||
class="grid min-w-0 items-start gap-4 lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]"
|
||||
>
|
||||
<div ref="listColumn" class="min-w-0">
|
||||
<CapturesCard />
|
||||
|
||||
@@ -42,7 +42,7 @@ onMounted(() => Promise.all([load(), controlPlane.load()]));
|
||||
<PageHeader title="Channels" />
|
||||
|
||||
<div
|
||||
class="grid grid-cols-1 gap-4 min-[1080px]:grid-cols-[repeat(auto-fit,minmax(340px,1fr))]"
|
||||
class="grid grid-cols-1 gap-4 lg:grid-cols-[repeat(auto-fit,minmax(340px,1fr))]"
|
||||
>
|
||||
<Empty v-if="error">
|
||||
<EmptyHeader>
|
||||
|
||||
@@ -59,7 +59,7 @@ onUnmounted(() => document.removeEventListener("keydown", onKeydown));
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="fixed right-6 bottom-6 z-40 max-[720px]:right-4 max-[720px]:bottom-4"
|
||||
class="fixed right-6 bottom-6 z-40 max-md:right-4 max-md:bottom-4"
|
||||
>
|
||||
<ChatPanel :open="open" />
|
||||
<ChatFab ref="fab" :open="open" @toggle="toggle" />
|
||||
|
||||
@@ -41,7 +41,7 @@ const composer = ref<InstanceType<typeof ChatComposer> | null>(null);
|
||||
const panelShape = computed(() =>
|
||||
props.open
|
||||
? "pointer-events-auto rounded-lg opacity-100 [transform:none] [transition:opacity_160ms_cubic-bezier(0.4,0,0.2,1),transform_260ms_cubic-bezier(0.22,1,0.36,1),border-radius_260ms_cubic-bezier(0.22,1,0.36,1)]"
|
||||
: "pointer-events-none rounded-full opacity-0 [transform:translateX(calc(56px_+_0.75rem))_scale(0.16)] max-[720px]:[transform:translateY(calc(56px_+_0.75rem))_scale(0.16)] [transition:opacity_140ms_cubic-bezier(0.4,0,0.2,1),transform_200ms_cubic-bezier(0.4,0,1,1),border-radius_200ms_cubic-bezier(0.4,0,1,1)]",
|
||||
: "pointer-events-none rounded-full opacity-0 [transform:translateX(calc(56px_+_0.75rem))_scale(0.16)] max-md:[transform:translateY(calc(56px_+_0.75rem))_scale(0.16)] [transition:opacity_140ms_cubic-bezier(0.4,0,0.2,1),transform_200ms_cubic-bezier(0.4,0,1,1),border-radius_200ms_cubic-bezier(0.4,0,1,1)]",
|
||||
);
|
||||
|
||||
// The contents follow the shape rather than stretching with it: they fade in
|
||||
@@ -64,7 +64,7 @@ function usePrompt(text: string): void {
|
||||
:id="CHAT_PANEL_ID"
|
||||
aria-label="Chat with Archie"
|
||||
:aria-hidden="open ? undefined : 'true'"
|
||||
class="pointer-events-none absolute bottom-0 right-[calc(56px_+_0.75rem)] h-[min(640px,calc(100vh_-_3rem))] w-[min(440px,calc(100vw_-_56px_-_0.75rem_-_3rem))] max-[720px]:fixed max-[720px]:bottom-[calc(1rem_+_56px_+_0.75rem)] max-[720px]:left-4 max-[720px]:right-4 max-[720px]:h-[min(72vh,calc(100vh_-_2rem_-_56px_-_0.75rem))] max-[720px]:w-auto"
|
||||
class="pointer-events-none absolute bottom-0 right-[calc(56px_+_0.75rem)] h-[min(640px,calc(100vh_-_3rem))] w-[min(440px,calc(100vw_-_56px_-_0.75rem_-_3rem))] max-md:fixed max-md:bottom-[calc(1rem_+_56px_+_0.75rem)] max-md:left-4 max-md:right-4 max-md:h-[min(72vh,calc(100vh_-_2rem_-_56px_-_0.75rem))] max-md:w-auto"
|
||||
>
|
||||
<div
|
||||
:class="
|
||||
|
||||
@@ -41,7 +41,7 @@ onMounted(load);
|
||||
<PageHeader title="Curators" />
|
||||
|
||||
<div
|
||||
class="grid grid-cols-1 gap-4 min-[1080px]:grid-cols-[repeat(auto-fit,minmax(340px,1fr))]"
|
||||
class="grid grid-cols-1 gap-4 lg:grid-cols-[repeat(auto-fit,minmax(340px,1fr))]"
|
||||
>
|
||||
<Empty v-if="loadError">
|
||||
<EmptyHeader>
|
||||
|
||||
@@ -35,7 +35,7 @@ const setupIncomplete = computed(
|
||||
class="grid items-start gap-4"
|
||||
:class="
|
||||
setupIncomplete
|
||||
? 'grid-cols-1 min-[1080px]:grid-cols-[minmax(0,1.6fr)_minmax(0,1fr)]'
|
||||
? 'grid-cols-1 lg:grid-cols-[minmax(0,1.6fr)_minmax(0,1fr)]'
|
||||
: 'grid-cols-1'
|
||||
"
|
||||
>
|
||||
@@ -54,7 +54,7 @@ const setupIncomplete = computed(
|
||||
|
||||
<DashboardSection v-if="summary" title="Right now">
|
||||
<div
|
||||
class="grid grid-cols-1 gap-4 min-[1080px]:grid-cols-[minmax(0,1fr)_minmax(0,1.5fr)]"
|
||||
class="grid grid-cols-1 gap-4 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.5fr)]"
|
||||
>
|
||||
<TokenOutlookCard />
|
||||
<LiveActivityCard />
|
||||
|
||||
@@ -42,7 +42,7 @@ const pct = computed(() => {
|
||||
the statuses themselves.
|
||||
-->
|
||||
<div
|
||||
class="grid grid-cols-1 gap-6 min-[720px]:grid-cols-[auto_minmax(0,1fr)]"
|
||||
class="grid grid-cols-1 gap-6 md:grid-cols-[auto_minmax(0,1fr)]"
|
||||
>
|
||||
<div class="flex flex-col justify-center">
|
||||
<span class="text-3xl font-semibold">{{ pct }}%</span>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="grid grid-cols-1 min-[701px]:supports-[grid-template-columns:subgrid]:grid-cols-[max-content_minmax(0,1fr)_auto]"
|
||||
class="grid grid-cols-1 md:supports-[grid-template-columns:subgrid]:grid-cols-[max-content_minmax(0,1fr)_auto]"
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
@@ -35,7 +35,7 @@ const lockedReason = computed(() => props.field?.locked_reason ?? "");
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="grid grid-cols-1 items-center gap-x-4 gap-y-1 border-t border-border py-2 first:border-t-0 hover:bg-muted/40 min-[701px]:grid-cols-[minmax(8rem,16rem)_minmax(0,1fr)_auto] min-[701px]:supports-[grid-template-columns:subgrid]:col-span-full min-[701px]:supports-[grid-template-columns:subgrid]:grid-cols-subgrid"
|
||||
class="grid grid-cols-1 items-center gap-x-4 gap-y-1 border-t border-border py-2 first:border-t-0 hover:bg-muted/40 md:grid-cols-[minmax(8rem,16rem)_minmax(0,1fr)_auto] md:supports-[grid-template-columns:subgrid]:col-span-full md:supports-[grid-template-columns:subgrid]:grid-cols-subgrid"
|
||||
>
|
||||
<!-- The field's own description is the row's tooltip: the line that
|
||||
explains a setting is the one place that explanation fits without
|
||||
@@ -70,7 +70,7 @@ const lockedReason = computed(() => props.field?.locked_reason ?? "");
|
||||
<span
|
||||
:class="
|
||||
cn(
|
||||
'min-w-0 break-words font-mono text-sm min-[701px]:truncate',
|
||||
'min-w-0 break-words font-mono text-sm md:truncate',
|
||||
text === '—' ? 'text-fg-subtle' : 'text-foreground',
|
||||
lockedReason && 'text-fg-muted',
|
||||
)
|
||||
@@ -82,7 +82,7 @@ const lockedReason = computed(() => props.field?.locked_reason ?? "");
|
||||
|
||||
<span
|
||||
v-if="lockedReason"
|
||||
class="col-span-full text-xs text-fg-subtle min-[701px]:col-span-2 min-[701px]:col-start-2"
|
||||
class="col-span-full text-xs text-fg-subtle md:col-span-2 md:col-start-2"
|
||||
>{{ lockedReason }}</span
|
||||
>
|
||||
</div>
|
||||
|
||||
@@ -35,7 +35,7 @@ const label = (cp: DangerCheckpoint): string =>
|
||||
<Field orientation="horizontal">
|
||||
<FieldLabel class="sr-only" for="danger-checkpoint">Checkpoint</FieldLabel>
|
||||
<Select v-model="checkpoint">
|
||||
<SelectTrigger id="danger-checkpoint" class="w-full min-[701px]:max-w-80">
|
||||
<SelectTrigger id="danger-checkpoint" class="w-full md:max-w-80">
|
||||
<SelectValue placeholder="Select checkpoint" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
|
||||
@@ -24,7 +24,7 @@ const requested = computed(() => spec.value.trim().length > 0);
|
||||
v-model="spec"
|
||||
placeholder="Process name or id"
|
||||
autocomplete="off"
|
||||
class="w-full min-[701px]:max-w-80"
|
||||
class="w-full md:max-w-80"
|
||||
/>
|
||||
<Button
|
||||
variant="outline"
|
||||
|
||||
@@ -46,7 +46,7 @@ function chooseMotion(value: unknown): void {
|
||||
title="Dashboard preferences"
|
||||
description="Saved only in this browser and applied immediately."
|
||||
>
|
||||
<div class="grid gap-8 min-[700px]:grid-cols-2 min-[1100px]:grid-cols-4">
|
||||
<div class="grid gap-8 md:grid-cols-2 lg:grid-cols-4">
|
||||
<section class="flex min-w-0 flex-col items-start">
|
||||
<div>
|
||||
<h2 id="appearance-theme" class="text-sm font-medium">Theme</h2>
|
||||
|
||||
@@ -67,7 +67,7 @@ const filtered = computed(() => {
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div
|
||||
class="grid grid-cols-1 gap-4 min-[1080px]:grid-cols-[repeat(auto-fit,minmax(340px,1fr))]"
|
||||
class="grid grid-cols-1 gap-4 lg:grid-cols-[repeat(auto-fit,minmax(340px,1fr))]"
|
||||
>
|
||||
<Empty v-if="loadError">
|
||||
<EmptyHeader>
|
||||
|
||||
+1
-1
@@ -275,7 +275,7 @@
|
||||
/* The frame is a desktop affordance: below this width the workspace goes
|
||||
edge to edge, because a rounded card inset on a phone wastes the only
|
||||
axis that matters. */
|
||||
@media (max-width: 900px) {
|
||||
@media (width < 64rem) {
|
||||
body {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@@ -51,14 +51,14 @@ const nodeClass = computed(() =>
|
||||
|
||||
<template>
|
||||
<li
|
||||
class="relative grid grid-cols-[1.75rem_1fr] gap-2 pb-4 before:absolute before:top-4 before:bottom-0 before:left-[0.6875rem] before:w-px before:bg-border-strong last:before:hidden max-[700px]:grid-cols-1 max-[700px]:border-b max-[700px]:border-border max-[700px]:pb-3 max-[700px]:before:hidden"
|
||||
class="relative grid grid-cols-[1.75rem_1fr] gap-2 pb-4 before:absolute before:top-4 before:bottom-0 before:left-[0.6875rem] before:w-px before:bg-border-strong last:before:hidden max-md:grid-cols-1 max-md:border-b max-md:border-border max-md:pb-3 max-md:before:hidden"
|
||||
:class="props.selected ? 'rounded-md bg-primary-soft' : ''"
|
||||
>
|
||||
<span
|
||||
:class="nodeClass"
|
||||
:title="meta.label"
|
||||
aria-hidden="true"
|
||||
class="max-[700px]:hidden"
|
||||
class="max-md:hidden"
|
||||
/>
|
||||
<div class="min-w-0" :class="props.selected ? '-my-2 rounded-md py-2' : ''">
|
||||
<!--
|
||||
|
||||
@@ -55,7 +55,7 @@ const run = provideTaskRun(taskId);
|
||||
<TaskNotes :id="rawId" />
|
||||
|
||||
<div
|
||||
class="grid items-start gap-4 min-[900px]:grid-cols-[20rem_minmax(0,1fr)]"
|
||||
class="grid items-start gap-4 lg:grid-cols-[20rem_minmax(0,1fr)]"
|
||||
>
|
||||
<!--
|
||||
The master pane: the attempt's stage rail, always on screen. It owns
|
||||
|
||||
@@ -46,13 +46,13 @@ function selectStatus(value: unknown) {
|
||||
:model-value="props.search"
|
||||
aria-label="Search tasks by title or repository"
|
||||
placeholder="Search by title or repo…"
|
||||
class="w-55 max-[480px]:w-full"
|
||||
class="w-55 max-sm:w-full"
|
||||
@update:model-value="emit('update:search', String($event))"
|
||||
/>
|
||||
<Select :model-value="selected" @update:model-value="selectStatus">
|
||||
<SelectTrigger
|
||||
aria-label="Filter by status"
|
||||
class="w-45 max-[480px]:w-full"
|
||||
class="w-45 max-sm:w-full"
|
||||
>
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
|
||||
@@ -15,7 +15,7 @@ const props = defineProps<{ stages: StageStats[] }>();
|
||||
<template>
|
||||
<div
|
||||
v-if="props.stages.length"
|
||||
class="mt-4 grid grid-cols-1 gap-4 min-[1080px]:grid-cols-[repeat(auto-fit,minmax(340px,1fr))]"
|
||||
class="mt-4 grid grid-cols-1 gap-4 lg:grid-cols-[repeat(auto-fit,minmax(340px,1fr))]"
|
||||
>
|
||||
<SlowestStagesCard :stages="props.stages" />
|
||||
<StageFailuresCard :stages="props.stages" />
|
||||
|
||||
Reference in new issue
Block a user