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.

fix[sidebar]: minor tweaks (#1878)

Peter Chinman5fd0cd7386ba
diff --git a/js/app/packages/app/component/app-sidebar/channels-unread-widget.tsx b/js/app/packages/app/component/app-sidebar/channels-unread-widget.tsx
index 999e3c0770..be23f0f1a1 100644
--- a/js/app/packages/app/component/app-sidebar/channels-unread-widget.tsx
+++ b/js/app/packages/app/component/app-sidebar/channels-unread-widget.tsx
@@ -187,19 +187,18 @@ export const ChannelsUnreadWidget = () => {
});
return (
- <section class="w-full h-full px-2 py-1.5 flex flex-col justify-center">
- <header class="text-xs font-medium text-ink-muted ml-3">
- <h1>Unread</h1>
- </header>
-
- <div class="flex-1 overflow-y-auto">
- <For
- each={channelGroups()}
- fallback={<span class="text-ink/80 text-xs">No unread messages</span>}
- >
- {(group) => <ChannelGroupItem group={group} animate={false} />}
- </For>
- </div>
- </section>
+ <Show when={channelGroups().length > 0}>
+ <section class="w-full h-full px-2 py-1.5 flex flex-col justify-center">
+ <header class="text-xs font-medium text-ink-muted ml-3">
+ <h1>Unread</h1>
+ </header>
+
+ <div class="flex-1 overflow-y-auto">
+ <For each={channelGroups()}>
+ {(group) => <ChannelGroupItem group={group} animate={false} />}
+ </For>
+ </div>
+ </section>
+ </Show>
);
};
diff --git a/js/app/packages/app/component/app-sidebar/sidebar.tsx b/js/app/packages/app/component/app-sidebar/sidebar.tsx
index c0259a7292..66e36cef50 100644
--- a/js/app/packages/app/component/app-sidebar/sidebar.tsx
+++ b/js/app/packages/app/component/app-sidebar/sidebar.tsx
@@ -1,4 +1,3 @@
-import KeyboardIcon from '@icon/regular/keyboard.svg';
import GearIcon from '@phosphor-icons/core/regular/gear.svg?component-solid';
import { type Component, createSignal, For, type JSX, Show } from 'solid-js';
import { Dynamic } from 'solid-js/web';
@@ -113,7 +112,7 @@ type AppSidebarProps = {
export const AppSidebar = (props: AppSidebarProps) => {
const layout = useSplitLayout();
- const { toggleSettings, openSettings } = useSettingsState();
+ const { toggleSettings } = useSettingsState();
const handleCommandPaletteClick = () => {
CommandState.toggle();
@@ -308,6 +307,19 @@ export const AppSidebar = (props: AppSidebarProps) => {
</Show>
<div class="mt-auto w-full px-2">
+ {/*<Button
+ class={cn(
+ 'flex items-center justify-start text-sm gap-2 cursor-default',
+ isSlim() ? 'justify-center aspect-square' : 'w-full'
+ )}
+ variant="ghost"
+ size={isSlim() ? 'icon-sm' : 'sm'}
+ onClick={() => openSettings('Shortcuts')}
+ >
+ <KeyboardIcon class="size-4 shrink-0" />
+ <span class={cn(isSlim() ? 'sr-only' : 'block')}>Shortcuts</span>
+ </Button>*/}
+
<Tooltip
class="w-full"
tooltip={
@@ -330,19 +342,6 @@ export const AppSidebar = (props: AppSidebarProps) => {
<span class={cn(isSlim() ? 'sr-only' : 'block')}>Settings</span>
</Button>
</Tooltip>
-
- <Button
- class={cn(
- 'flex items-center justify-start text-sm gap-2 cursor-default',
- isSlim() ? 'justify-center aspect-square' : 'w-full'
- )}
- variant="ghost"
- size={isSlim() ? 'icon-sm' : 'sm'}
- onClick={() => openSettings('Shortcuts')}
- >
- <KeyboardIcon class="size-4 shrink-0" />
- <span class={cn(isSlim() ? 'sr-only' : 'block')}>Shortcuts</span>
- </Button>
</div>
</div>
</>