Webhooks for the AT Protocol airglow.run
atproto atprotocol automation webhook
12
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: automation activation toggle button

Hugo 2ccaf6a4 d4dc0abc

+18 -7
+1
app/islands/DeliveryLog.css.ts
··· 40 40 41 41 export const toggleBtn = style({ 42 42 ...btnBase, 43 + minInlineSize: "10ch", 43 44 color: vars.color.text, 44 45 backgroundColor: "transparent", 45 46 ":hover": {
+7 -1
app/islands/DeliveryLog.tsx
··· 1 1 import { useState, useCallback } from "hono/jsx"; 2 2 import * as s from "./DeliveryLog.css.ts"; 3 + import { variant as badgeVariant } from "../components/Badge/styles.css.ts"; 3 4 4 5 type LogEntry = { 5 6 id: number; ··· 36 37 const data = await res.json(); 37 38 setError(data.error || "Failed to update"); 38 39 } else { 39 - setIsActive(!isActive); 40 + const newActive = !isActive; 41 + setIsActive(newActive); 42 + document.querySelectorAll("[data-automation-status] > span").forEach((el) => { 43 + el.className = newActive ? badgeVariant.success : badgeVariant.neutral; 44 + el.textContent = newActive ? "Active" : "Inactive"; 45 + }); 40 46 } 41 47 } catch { 42 48 setError("Request failed");
+10 -6
app/routes/dashboard/automations/[rkey].tsx
··· 57 57 description={auto.description ?? undefined} 58 58 actions={ 59 59 <div class={inlineCluster}> 60 - <Badge variant={auto.active ? "success" : "neutral"}> 61 - {auto.active ? "Active" : "Inactive"} 62 - </Badge> 60 + <span data-automation-status> 61 + <Badge variant={auto.active ? "success" : "neutral"}> 62 + {auto.active ? "Active" : "Inactive"} 63 + </Badge> 64 + </span> 63 65 <Button href={`/dashboard/automations/${rkey}/edit`} variant="secondary" size="sm"> 64 66 Edit 65 67 </Button> ··· 79 81 </dd> 80 82 <dt>Status</dt> 81 83 <dd> 82 - <Badge variant={auto.active ? "success" : "neutral"}> 83 - {auto.active ? "Active" : "Inactive"} 84 - </Badge> 84 + <span data-automation-status> 85 + <Badge variant={auto.active ? "success" : "neutral"}> 86 + {auto.active ? "Active" : "Inactive"} 87 + </Badge> 88 + </span> 85 89 </dd> 86 90 <dt>AT URI</dt> 87 91 <dd>