refactor(app): split the workspace header menu per form factor
Wide layouts make tabs from the tab strip's + menu, so the header menu listing new agent / new terminal / new browser duplicated it. Compact has no tab strip, so those actions have to live in the header there. One menu with an isMobile prop could not express that: the prop only sized the trigger, and the item list was shared. Two components now, with the workspace actions (import, copy path, copy branch name, show setup) in one component both render from the same callbacks so they cannot drift.
This commit is contained in:
@@ -23,9 +23,15 @@ function ProviderProfileIcon({
|
||||
|
||||
const ThemedProviderProfileIcon = withUnistyles(ProviderProfileIcon);
|
||||
|
||||
export function TerminalProfileIcon({ iconKey }: { iconKey: string | undefined }): ReactElement {
|
||||
export function TerminalProfileIcon({
|
||||
iconKey,
|
||||
size = 14,
|
||||
}: {
|
||||
iconKey: string | undefined;
|
||||
size?: number;
|
||||
}): ReactElement {
|
||||
if (!iconKey) {
|
||||
return <ThemedSquareTerminal size={14} uniProps={mutedColorMapping} />;
|
||||
return <ThemedSquareTerminal size={size} uniProps={mutedColorMapping} />;
|
||||
}
|
||||
return <ThemedProviderProfileIcon iconKey={iconKey} size={14} uniProps={mutedColorMapping} />;
|
||||
return <ThemedProviderProfileIcon iconKey={iconKey} size={size} uniProps={mutedColorMapping} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user