Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

chg(calls): remove call again button from soup, make channel call button nicer (#3344)

teo8344451a5b35
diff --git a/js/app/packages/channel/Call/ChannelCallButton.tsx b/js/app/packages/channel/Call/ChannelCallButton.tsx
index c09f357e08..010b9acc8d 100644
--- a/js/app/packages/channel/Call/ChannelCallButton.tsx
+++ b/js/app/packages/channel/Call/ChannelCallButton.tsx
@@ -1,10 +1,9 @@
import { useChannelTab } from '@channel/Channel/ChannelTabContext';
import { DEFAULT_CHANNEL_TAB } from '@channel/Channel/channel-tabs';
-import { isTouchDevice } from '@core/mobile/isTouchDevice';
import PhoneIcon from '@icon/wide-call.svg';
import PhoneDisconnectIcon from '@icon/wide-call-disconnect.svg';
import { useActiveCallQuery } from '@queries/call/call';
-import { Button } from '@ui';
+import { Button, cn } from '@ui';
import { Show } from 'solid-js';
import { useCall } from './use-call';
@@ -24,6 +23,12 @@ export function ChannelCallButton(props: { channelId: string }) {
const tooltip = () => {
if (call.isInThisChannel()) return 'Leave Call';
if (isCallInProgress()) return 'Join Call';
+ return 'Start Call';
+ };
+
+ const label = () => {
+ if (call.isInThisChannel()) return 'Leave';
+ if (isCallInProgress()) return 'Join';
return 'Call';
};
@@ -46,16 +51,19 @@ export function ChannelCallButton(props: { channelId: string }) {
onClick={handleClick}
disabled={isPending()}
tooltip={tooltip()}
- class={
- isHighlighted()
- ? 'px-1 bg-accent/20 hover:bg-accent/30 text-accent'
- : 'px-1'
- }
- size={isTouchDevice() ? 'icon-md' : 'icon-sm'}
+ variant="base"
+ size="sm"
+ depth={2}
+ class={cn(
+ 'bg-surface',
+ isHighlighted() &&
+ 'bg-accent/20 hover:bg-accent/30 text-accent border-accent/30'
+ )}
>
<Show when={call.isInThisChannel()} fallback={<PhoneIcon />}>
<PhoneDisconnectIcon />
</Show>
+ <span>{label()}</span>
</Button>
);
}
diff --git a/js/app/packages/entity/src/composed/list-entity/wide-layout.tsx b/js/app/packages/entity/src/composed/list-entity/wide-layout.tsx
index 5daf8d78d0..df114d3ce8 100644
--- a/js/app/packages/entity/src/composed/list-entity/wide-layout.tsx
+++ b/js/app/packages/entity/src/composed/list-entity/wide-layout.tsx
@@ -1,5 +1,4 @@
import { useMaybeSoupView } from '@app/component/next-soup/soup-view/soup-view-context';
-import { CallAgainButton } from '@channel/Call/CallAgainButton';
import { cn } from '@ui';
import { Match, Show, Switch } from 'solid-js';
import { AttendanceBadge, SharedBadge } from '../../components/Badges';
@@ -118,14 +117,6 @@ export function WideLayout(props: LayoutProps) {
<Show when={isCallEntity(props.entity) && props.entity}>
{(entity) => (
<>
- <span class="flex w-24 shrink-0 justify-end">
- <Show when={!entity().isActive}>
- <CallAgainButton
- channelId={entity().channelId}
- class="opacity-0 group-hover/narrow:opacity-100 transition-opacity flex shrink-0 items-center gap-1 rounded-xs border border-edge-muted px-1.5 py-1 text-xs font-medium text-ink-muted hover:bg-hover hover:text-ink focus-visible:outline-none"
- />
- </Show>
- </span>
<Show when={(soupView?.activeTab() ?? 'all') === 'all'}>
<AttendanceBadge attended={entity().attended} />
</Show>