Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat: add immutable file type chip for block image (#2392)
gbirmanbad65bdf00ae
diff --git a/js/app/packages/block-image/component/TopBar.tsx b/js/app/packages/block-image/component/TopBar.tsxindex 54dc8c29f5..3651791026 100644--- a/js/app/packages/block-image/component/TopBar.tsx+++ b/js/app/packages/block-image/component/TopBar.tsx@@ -10,6 +10,7 @@ import { BlockItemSplitLabel } from '@app/component/split-layout/components/Spliimport { useIsAuthenticated } from '@core/auth';import { useBlockId } from '@core/block';+import { blockMetadataSignal } from '@core/signal/load';import {ReferencesButton,REFERENCES_DRAWER_ID,@@ -29,6 +30,18 @@ import Download from '@icon/regular/download.svg';import Quotes from '@icon/regular/quotes.svg';import IconShared from '@macro-icons/wide/share.svg';import { createCallback } from '@solid-primitives/rootless';+import { Show } from 'solid-js';++function FileTypeChip() {+ const fileType = () => blockMetadataSignal()?.fileType;+ return (+ <Show when={fileType()}>+ <span class="shrink-0 rounded px-1 py-0.5 text-[0.625rem] font-mono font-medium uppercase leading-none bg-image-bg text-image">+ {fileType()}+ </span>+ </Show>+ );+}export function TopBar() {const isAuth = useIsAuthenticated();@@ -85,7 +98,7 @@ export function TopBar() {return (<><SplitHeaderLeft>- <BlockItemSplitLabel />+ <BlockItemSplitLabel badges={<FileTypeChip />} /></SplitHeaderLeft><ResponsivePermissionsBadge />